Skip to content

Commit

Permalink
fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ATGardner committed Jan 7, 2025
1 parent b2c3f3a commit cba139b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 38 deletions.
2 changes: 1 addition & 1 deletion controller/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func (m *appStateManager) GetRepoObjs(app *v1alpha1.Application, sources []v1alp
return nil, nil, false, fmt.Errorf("failed to generate manifest for source %d of %d: %w", i+1, len(sources), err)
}

targetObj, err := unmarshalManifests(manifestInfo.GetCompiledManifests())
targetObj, err := unmarshalManifests(manifestInfo.Manifests)
if err != nil {
return nil, nil, false, fmt.Errorf("failed to unmarshal manifests for source %d of %d: %w", i+1, len(sources), err)
}
Expand Down
9 changes: 0 additions & 9 deletions reposerver/apiclient/util.go

This file was deleted.

26 changes: 0 additions & 26 deletions reposerver/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,6 @@ func findManifests(logCtx *log.Entry, appPath string, repoRoot string, env *v1al
manifestFileInfo := potentiallyValidManifest.fileInfo

if strings.HasSuffix(manifestFileInfo.Name(), ".jsonnet") {
var objs []*unstructured.Unstructured
if !discovery.IsManifestGenerationEnabled(v1alpha1.ApplicationSourceTypeDirectory, enabledManifestGeneration) {
continue
}
Expand Down Expand Up @@ -1984,31 +1983,6 @@ func getPotentiallyValidManifests(logCtx *log.Entry, appPath string, repoRoot st
return potentiallyValidManifests, nil
}

func expandUnstructuredObjs(objs []*unstructured.Unstructured) ([]*unstructured.Unstructured, error) {
ret := make([]*unstructured.Unstructured, 0, len(objs))
for _, obj := range objs {
if obj.IsList() {
err := obj.EachListItem(func(object runtime.Object) error {
unstructuredObj, ok := object.(*unstructured.Unstructured)
if ok {
ret = append(ret, unstructuredObj)
return nil
}
return fmt.Errorf("resource list item has unexpected type")
})
if err != nil {
return nil, err
}
} else if isNullList(obj) {
// noop
} else {
ret = append(ret, obj)
}
}

return ret, nil
}

func makeJsonnetVm(appPath string, repoRoot string, sourceJsonnet v1alpha1.ApplicationSourceJsonnet, env *v1alpha1.Env) (*jsonnet.VM, error) {
vm := jsonnet.MakeVM()
for i, j := range sourceJsonnet.TLAs {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/app_management_ns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ func TestNamespacedAppWithSecrets(t *testing.T) {
})
errors.CheckError(err)

for _, manifest := range manifests.GetCompiledManifests() {
for _, manifest := range manifests.Manifests {
assetSecretDataHidden(t, manifest)
}

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/app_management_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ func TestAppWithSecrets(t *testing.T) {
manifests, err := client.GetManifests(context.Background(), &applicationpkg.ApplicationManifestQuery{Name: &app.Name})
errors.CheckError(err)

for _, manifest := range manifests.GetCompiledManifests() {
for _, manifest := range manifests.Manifests {
assetSecretDataHidden(t, manifest)
}

Expand Down

0 comments on commit cba139b

Please sign in to comment.