Skip to content

Commit 8d3c974

Browse files
Merge pull request #585 from darkdoc/fix-uninstall
fix: Correct the prefix for tracking id annotation on applications
2 parents ecdb544 + 555d6a2 commit 8d3c974

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

internal/controller/argo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,7 @@ func getChildApplications(client argoclient.Interface, parentApp *argoapi.Applic
12771277
expectedPrefix := fmt.Sprintf(
12781278
"%s:argoproj.io/Application:%s/",
12791279
parentApp.Name,
1280-
parentApp.Namespace,
1280+
parentApp.Name,
12811281
)
12821282

12831283
for _, app := range appList.Items { //nolint:gocritic // rangeValCopy: each iteration copies 992 bytes

internal/controller/argo_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ var _ = Describe("getChildApplications", func() {
13911391
Name: "child-app",
13921392
Namespace: namespace,
13931393
Annotations: map[string]string{
1394-
"argocd.argoproj.io/tracking-id": fmt.Sprintf("parent-app:argoproj.io/Application:%s/child-app", namespace),
1394+
"argocd.argoproj.io/tracking-id": "parent-app:argoproj.io/Application:parent-app/child-app",
13951395
},
13961396
},
13971397
}
@@ -2276,7 +2276,7 @@ var _ = Describe("getChildApplications", func() {
22762276
Name: "child-app",
22772277
Namespace: getClusterWideArgoNamespace(),
22782278
Annotations: map[string]string{
2279-
"argocd.argoproj.io/tracking-id": fmt.Sprintf("parent-app:argoproj.io/Application:%s/child-app", getClusterWideArgoNamespace()),
2279+
"argocd.argoproj.io/tracking-id": "parent-app:argoproj.io/Application:parent-app/child-app",
22802280
},
22812281
},
22822282
}

0 commit comments

Comments
 (0)