Skip to content

Commit be3efbd

Browse files
fix: settings request doesn't return default tracking method (argoproj#22965)
Signed-off-by: oleksandr-codefresh <[email protected]> Co-authored-by: Regina Voloshin <[email protected]>
1 parent dd5a878 commit be3efbd

File tree

16 files changed

+157
-103
lines changed

16 files changed

+157
-103
lines changed

controller/cache/cache.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ func (c *liveStateCache) loadCacheSettings() (*cacheSettings, error) {
242242
if err != nil {
243243
return nil, err
244244
}
245+
trackingMethod, err := c.settingsMgr.GetTrackingMethod()
246+
if err != nil {
247+
return nil, err
248+
}
245249
installationID, err := c.settingsMgr.GetInstallationID()
246250
if err != nil {
247251
return nil, err
@@ -267,7 +271,7 @@ func (c *liveStateCache) loadCacheSettings() (*cacheSettings, error) {
267271
ResourcesFilter: resourcesFilter,
268272
}
269273

270-
return &cacheSettings{clusterSettings, appInstanceLabelKey, argo.GetTrackingMethod(c.settingsMgr), installationID, resourceUpdatesOverrides, ignoreResourceUpdatesEnabled}, nil
274+
return &cacheSettings{clusterSettings, appInstanceLabelKey, appv1.TrackingMethod(trackingMethod), installationID, resourceUpdatesOverrides, ignoreResourceUpdatesEnabled}, nil
271275
}
272276

273277
func asResourceNode(r *clustercache.Resource) appv1.ResourceNode {

controller/state.go

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ func (m *appStateManager) GetRepoObjs(app *v1alpha1.Application, sources []v1alp
163163
return nil, nil, false, fmt.Errorf("failed to get Helm settings: %w", err)
164164
}
165165

166+
trackingMethod, err := m.settingsMgr.GetTrackingMethod()
167+
if err != nil {
168+
return nil, nil, false, fmt.Errorf("failed to get trackingMethod: %w", err)
169+
}
170+
166171
installationID, err := m.settingsMgr.GetInstallationID()
167172
if err != nil {
168173
return nil, nil, false, fmt.Errorf("failed to get installation ID: %w", err)
@@ -249,7 +254,7 @@ func (m *appStateManager) GetRepoObjs(app *v1alpha1.Application, sources []v1alp
249254
ApplicationSource: &source,
250255
KubeVersion: serverVersion,
251256
ApiVersions: apiVersions,
252-
TrackingMethod: string(argo.GetTrackingMethod(m.settingsMgr)),
257+
TrackingMethod: trackingMethod,
253258
RefSources: refSources,
254259
HasMultipleSources: app.Spec.HasMultipleSources(),
255260
InstallationID: installationID,
@@ -286,7 +291,7 @@ func (m *appStateManager) GetRepoObjs(app *v1alpha1.Application, sources []v1alp
286291
ApiVersions: apiVersions,
287292
VerifySignature: verifySignature,
288293
HelmRepoCreds: permittedHelmCredentials,
289-
TrackingMethod: string(argo.GetTrackingMethod(m.settingsMgr)),
294+
TrackingMethod: trackingMethod,
290295
EnabledSourceTypes: enabledSourceTypes,
291296
HelmOptions: helmOptions,
292297
HasMultipleSources: app.Spec.HasMultipleSources(),
@@ -435,24 +440,28 @@ func normalizeClusterScopeTracking(targetObjs []*unstructured.Unstructured, info
435440

436441
// getComparisonSettings will return the system level settings related to the
437442
// diff/normalization process.
438-
func (m *appStateManager) getComparisonSettings() (string, map[string]v1alpha1.ResourceOverride, *settings.ResourcesFilter, string, error) {
443+
func (m *appStateManager) getComparisonSettings() (string, map[string]v1alpha1.ResourceOverride, *settings.ResourcesFilter, string, string, error) {
439444
resourceOverrides, err := m.settingsMgr.GetResourceOverrides()
440445
if err != nil {
441-
return "", nil, nil, "", err
446+
return "", nil, nil, "", "", err
442447
}
443448
appLabelKey, err := m.settingsMgr.GetAppInstanceLabelKey()
444449
if err != nil {
445-
return "", nil, nil, "", err
450+
return "", nil, nil, "", "", err
446451
}
447452
resFilter, err := m.settingsMgr.GetResourcesFilter()
448453
if err != nil {
449-
return "", nil, nil, "", err
454+
return "", nil, nil, "", "", err
450455
}
451456
installationID, err := m.settingsMgr.GetInstallationID()
452457
if err != nil {
453-
return "", nil, nil, "", err
458+
return "", nil, nil, "", "", err
454459
}
455-
return appLabelKey, resourceOverrides, resFilter, installationID, nil
460+
trackingMethod, err := m.settingsMgr.GetTrackingMethod()
461+
if err != nil {
462+
return "", nil, nil, "", "", err
463+
}
464+
return appLabelKey, resourceOverrides, resFilter, installationID, trackingMethod, nil
456465
}
457466

458467
// verifyGnuPGSignature verifies the result of a GnuPG operation for a given git
@@ -503,7 +512,7 @@ func isManagedNamespace(ns *unstructured.Unstructured, app *v1alpha1.Application
503512
// revision and overrides in the app spec.
504513
func (m *appStateManager) CompareAppState(app *v1alpha1.Application, project *v1alpha1.AppProject, revisions []string, sources []v1alpha1.ApplicationSource, noCache bool, noRevisionCache bool, localManifests []string, hasMultipleSources bool, rollback bool) (*comparisonResult, error) {
505514
ts := stats.NewTimingStats()
506-
appLabelKey, resourceOverrides, resFilter, installationID, err := m.getComparisonSettings()
515+
appLabelKey, resourceOverrides, resFilter, installationID, trackingMethod, err := m.getComparisonSettings()
507516

508517
ts.AddCheckpoint("settings_ms")
509518

@@ -612,10 +621,8 @@ func (m *appStateManager) CompareAppState(app *v1alpha1.Application, project *v1
612621
infoProvider = &resourceInfoProviderStub{}
613622
}
614623

615-
trackingMethod := argo.GetTrackingMethod(m.settingsMgr)
616-
617624
err = normalizeClusterScopeTracking(targetObjs, infoProvider, func(u *unstructured.Unstructured) error {
618-
return m.resourceTracking.SetAppInstance(u, appLabelKey, app.InstanceName(m.namespace), app.Spec.Destination.Namespace, trackingMethod, installationID)
625+
return m.resourceTracking.SetAppInstance(u, appLabelKey, app.InstanceName(m.namespace), app.Spec.Destination.Namespace, v1alpha1.TrackingMethod(trackingMethod), installationID)
619626
})
620627
if err != nil {
621628
msg := "Failed to normalize cluster-scoped resource tracking: " + err.Error()
@@ -682,7 +689,7 @@ func (m *appStateManager) CompareAppState(app *v1alpha1.Application, project *v1
682689

683690
for _, liveObj := range liveObjByKey {
684691
if liveObj != nil {
685-
appInstanceName := m.resourceTracking.GetAppName(liveObj, appLabelKey, trackingMethod, installationID)
692+
appInstanceName := m.resourceTracking.GetAppName(liveObj, appLabelKey, v1alpha1.TrackingMethod(trackingMethod), installationID)
686693
if appInstanceName != "" && appInstanceName != app.InstanceName(m.namespace) {
687694
fqInstanceName := strings.ReplaceAll(appInstanceName, "_", "/")
688695
conditions = append(conditions, v1alpha1.ApplicationCondition{
@@ -821,7 +828,7 @@ func (m *appStateManager) CompareAppState(app *v1alpha1.Application, project *v1
821828
}
822829
gvk := obj.GroupVersionKind()
823830

824-
isSelfReferencedObj := m.isSelfReferencedObj(liveObj, targetObj, app.GetName(), trackingMethod, installationID)
831+
isSelfReferencedObj := m.isSelfReferencedObj(liveObj, targetObj, app.GetName(), v1alpha1.TrackingMethod(trackingMethod), installationID)
825832

826833
resState := v1alpha1.ResourceStatus{
827834
Namespace: obj.GetNamespace(),
@@ -1145,7 +1152,7 @@ func (m *appStateManager) isSelfReferencedObj(live, config *unstructured.Unstruc
11451152

11461153
// If tracking method doesn't contain required metadata for this check,
11471154
// we are not able to determine and just assume the object to be managed.
1148-
if trackingMethod == argo.TrackingMethodLabel {
1155+
if trackingMethod == v1alpha1.TrackingMethodLabel {
11491156
return true
11501157
}
11511158

controller/state_test.go

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import (
3131
"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
3232
"github.com/argoproj/argo-cd/v3/reposerver/apiclient"
3333
"github.com/argoproj/argo-cd/v3/test"
34-
"github.com/argoproj/argo-cd/v3/util/argo"
3534
)
3635

3736
// TestCompareAppStateEmpty tests comparison when both git and live have no objects
@@ -1423,52 +1422,52 @@ func TestIsLiveResourceManaged(t *testing.T) {
14231422
configObj := managedObj.DeepCopy()
14241423

14251424
// then
1426-
assert.True(t, manager.isSelfReferencedObj(managedObj, configObj, appName, argo.TrackingMethodLabel, ""))
1427-
assert.True(t, manager.isSelfReferencedObj(managedObj, configObj, appName, argo.TrackingMethodAnnotation, ""))
1425+
assert.True(t, manager.isSelfReferencedObj(managedObj, configObj, appName, v1alpha1.TrackingMethodLabel, ""))
1426+
assert.True(t, manager.isSelfReferencedObj(managedObj, configObj, appName, v1alpha1.TrackingMethodAnnotation, ""))
14281427
})
14291428
t.Run("will return true if tracked with label", func(t *testing.T) {
14301429
// given
14311430
t.Parallel()
14321431
configObj := managedObjWithLabel.DeepCopy()
14331432

14341433
// then
1435-
assert.True(t, manager.isSelfReferencedObj(managedObjWithLabel, configObj, appName, argo.TrackingMethodLabel, ""))
1434+
assert.True(t, manager.isSelfReferencedObj(managedObjWithLabel, configObj, appName, v1alpha1.TrackingMethodLabel, ""))
14361435
})
14371436
t.Run("will handle if trackingId has wrong resource name and config is nil", func(t *testing.T) {
14381437
// given
14391438
t.Parallel()
14401439

14411440
// then
1442-
assert.True(t, manager.isSelfReferencedObj(unmanagedObjWrongName, nil, appName, argo.TrackingMethodLabel, ""))
1443-
assert.False(t, manager.isSelfReferencedObj(unmanagedObjWrongName, nil, appName, argo.TrackingMethodAnnotation, ""))
1441+
assert.True(t, manager.isSelfReferencedObj(unmanagedObjWrongName, nil, appName, v1alpha1.TrackingMethodLabel, ""))
1442+
assert.False(t, manager.isSelfReferencedObj(unmanagedObjWrongName, nil, appName, v1alpha1.TrackingMethodAnnotation, ""))
14441443
})
14451444
t.Run("will handle if trackingId has wrong resource group and config is nil", func(t *testing.T) {
14461445
// given
14471446
t.Parallel()
14481447

14491448
// then
1450-
assert.True(t, manager.isSelfReferencedObj(unmanagedObjWrongGroup, nil, appName, argo.TrackingMethodLabel, ""))
1451-
assert.False(t, manager.isSelfReferencedObj(unmanagedObjWrongGroup, nil, appName, argo.TrackingMethodAnnotation, ""))
1449+
assert.True(t, manager.isSelfReferencedObj(unmanagedObjWrongGroup, nil, appName, v1alpha1.TrackingMethodLabel, ""))
1450+
assert.False(t, manager.isSelfReferencedObj(unmanagedObjWrongGroup, nil, appName, v1alpha1.TrackingMethodAnnotation, ""))
14521451
})
14531452
t.Run("will handle if trackingId has wrong kind and config is nil", func(t *testing.T) {
14541453
// given
14551454
t.Parallel()
14561455

14571456
// then
1458-
assert.True(t, manager.isSelfReferencedObj(unmanagedObjWrongKind, nil, appName, argo.TrackingMethodLabel, ""))
1459-
assert.False(t, manager.isSelfReferencedObj(unmanagedObjWrongKind, nil, appName, argo.TrackingMethodAnnotation, ""))
1457+
assert.True(t, manager.isSelfReferencedObj(unmanagedObjWrongKind, nil, appName, v1alpha1.TrackingMethodLabel, ""))
1458+
assert.False(t, manager.isSelfReferencedObj(unmanagedObjWrongKind, nil, appName, v1alpha1.TrackingMethodAnnotation, ""))
14601459
})
14611460
t.Run("will handle if trackingId has wrong namespace and config is nil", func(t *testing.T) {
14621461
// given
14631462
t.Parallel()
14641463

14651464
// then
1466-
assert.True(t, manager.isSelfReferencedObj(unmanagedObjWrongNamespace, nil, appName, argo.TrackingMethodLabel, ""))
1467-
assert.False(t, manager.isSelfReferencedObj(unmanagedObjWrongNamespace, nil, appName, argo.TrackingMethodAnnotationAndLabel, ""))
1465+
assert.True(t, manager.isSelfReferencedObj(unmanagedObjWrongNamespace, nil, appName, v1alpha1.TrackingMethodLabel, ""))
1466+
assert.False(t, manager.isSelfReferencedObj(unmanagedObjWrongNamespace, nil, appName, v1alpha1.TrackingMethodAnnotationAndLabel, ""))
14681467
})
14691468
t.Run("will return true if live is nil", func(t *testing.T) {
14701469
t.Parallel()
1471-
assert.True(t, manager.isSelfReferencedObj(nil, nil, appName, argo.TrackingMethodAnnotation, ""))
1470+
assert.True(t, manager.isSelfReferencedObj(nil, nil, appName, v1alpha1.TrackingMethodAnnotation, ""))
14721471
})
14731472

14741473
t.Run("will handle upgrade in desired state APIGroup", func(t *testing.T) {
@@ -1478,7 +1477,7 @@ func TestIsLiveResourceManaged(t *testing.T) {
14781477
delete(config.GetAnnotations(), common.AnnotationKeyAppInstance)
14791478

14801479
// then
1481-
assert.True(t, manager.isSelfReferencedObj(managedWrongAPIGroup, config, appName, argo.TrackingMethodAnnotation, ""))
1480+
assert.True(t, manager.isSelfReferencedObj(managedWrongAPIGroup, config, appName, v1alpha1.TrackingMethodAnnotation, ""))
14821481
})
14831482
}
14841483

controller/sync.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,11 @@ func (m *appStateManager) SyncAppState(app *v1alpha1.Application, state *v1alpha
309309
log.Errorf("Could not get installation ID: %v", err)
310310
return
311311
}
312-
trackingMethod := argo.GetTrackingMethod(m.settingsMgr)
312+
trackingMethod, err := m.settingsMgr.GetTrackingMethod()
313+
if err != nil {
314+
log.Errorf("Could not get trackingMethod: %v", err)
315+
return
316+
}
313317

314318
impersonationEnabled, err := m.settingsMgr.IsImpersonationEnabled()
315319
if err != nil {
@@ -360,7 +364,7 @@ func (m *appStateManager) SyncAppState(app *v1alpha1.Application, state *v1alpha
360364
return (len(syncOp.Resources) == 0 ||
361365
isPostDeleteHook(target) ||
362366
argo.ContainsSyncResource(key.Name, key.Namespace, schema.GroupVersionKind{Kind: key.Kind, Group: key.Group}, syncOp.Resources)) &&
363-
m.isSelfReferencedObj(live, target, app.GetName(), trackingMethod, installationID)
367+
m.isSelfReferencedObj(live, target, app.GetName(), v1alpha1.TrackingMethod(trackingMethod), installationID)
364368
}),
365369
sync.WithManifestValidation(!syncOp.SyncOptions.HasOption(common.SyncOptionsDisableValidation)),
366370
sync.WithSyncWaveHook(delayBetweenSyncWaves),

pkg/apis/application/v1alpha1/types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ func (id IgnoreDifferences) Equals(other IgnoreDifferences) bool {
102102

103103
type TrackingMethod string
104104

105+
const (
106+
TrackingMethodAnnotation TrackingMethod = "annotation"
107+
TrackingMethodLabel TrackingMethod = "label"
108+
TrackingMethodAnnotationAndLabel TrackingMethod = "annotation+label"
109+
)
110+
105111
// ResourceIgnoreDifferences contains resource filter and list of json paths which should be ignored during comparison with live state.
106112
type ResourceIgnoreDifferences struct {
107113
Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"`

reposerver/cache/cache.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818

1919
appv1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
2020
"github.com/argoproj/argo-cd/v3/reposerver/apiclient"
21-
"github.com/argoproj/argo-cd/v3/util/argo"
2221
cacheutil "github.com/argoproj/argo-cd/v3/util/cache"
2322
"github.com/argoproj/argo-cd/v3/util/env"
2423
"github.com/argoproj/argo-cd/v3/util/hash"
@@ -305,7 +304,7 @@ func manifestCacheKey(revision string, appSrc *appv1.ApplicationSource, srcRefs
305304

306305
func trackingKey(appLabelKey string, trackingMethod string) string {
307306
trackingKey := appLabelKey
308-
if text.FirstNonEmpty(trackingMethod, string(argo.TrackingMethodLabel)) != string(argo.TrackingMethodLabel) {
307+
if text.FirstNonEmpty(trackingMethod, string(appv1.TrackingMethodLabel)) != string(appv1.TrackingMethodLabel) {
309308
trackingKey = trackingMethod + ":" + trackingKey
310309
}
311310
return trackingKey
@@ -399,7 +398,7 @@ func (c *Cache) DeleteManifests(revision string, appSrc *appv1.ApplicationSource
399398

400399
func appDetailsCacheKey(revision string, appSrc *appv1.ApplicationSource, srcRefs appv1.RefTargetRevisionMapping, trackingMethod appv1.TrackingMethod, refSourceCommitSHAs ResolvedRevisions) string {
401400
if trackingMethod == "" {
402-
trackingMethod = argo.TrackingMethodLabel
401+
trackingMethod = appv1.TrackingMethodLabel
403402
}
404403
return fmt.Sprintf("appdetails|%s|%d|%s", revision, appSourceKey(appSrc, srcRefs, refSourceCommitSHAs), trackingMethod)
405404
}

server/application/application.go

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationMan
528528
if err != nil {
529529
return fmt.Errorf("error getting installation ID: %w", err)
530530
}
531+
trackingMethod, err := s.settingsMgr.GetTrackingMethod()
532+
if err != nil {
533+
return fmt.Errorf("error getting trackingMethod from settings: %w", err)
534+
}
531535

532536
manifestInfo, err := client.GenerateManifest(ctx, &apiclient.ManifestRequest{
533537
Repo: repo,
@@ -542,7 +546,7 @@ func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationMan
542546
ApiVersions: argo.APIResourcesToStrings(apiResources, true),
543547
HelmRepoCreds: helmCreds,
544548
HelmOptions: helmOptions,
545-
TrackingMethod: string(argo.GetTrackingMethod(s.settingsMgr)),
549+
TrackingMethod: trackingMethod,
546550
EnabledSourceTypes: enableGenerateManifests,
547551
ProjectName: proj.Name,
548552
ProjectSourceRepos: proj.Spec.SourceRepos,
@@ -613,6 +617,11 @@ func (s *Server) GetManifestsWithFiles(stream application.ApplicationService_Get
613617
return fmt.Errorf("error getting app instance label key from settings: %w", err)
614618
}
615619

620+
trackingMethod, err := s.settingsMgr.GetTrackingMethod()
621+
if err != nil {
622+
return fmt.Errorf("error getting trackingMethod from settings: %w", err)
623+
}
624+
616625
config, err := s.getApplicationClusterConfig(ctx, a)
617626
if err != nil {
618627
return fmt.Errorf("error getting application cluster config: %w", err)
@@ -662,7 +671,7 @@ func (s *Server) GetManifestsWithFiles(stream application.ApplicationService_Get
662671
ApiVersions: argo.APIResourcesToStrings(apiResources, true),
663672
HelmRepoCreds: helmCreds,
664673
HelmOptions: helmOptions,
665-
TrackingMethod: string(argo.GetTrackingMethod(s.settingsMgr)),
674+
TrackingMethod: trackingMethod,
666675
EnabledSourceTypes: enableGenerateManifests,
667676
ProjectName: proj.Name,
668677
ProjectSourceRepos: proj.Spec.SourceRepos,
@@ -777,6 +786,10 @@ func (s *Server) Get(ctx context.Context, q *application.ApplicationQuery) (*v1a
777786
if err != nil {
778787
return fmt.Errorf("error getting kustomize settings: %w", err)
779788
}
789+
trackingMethod, err := s.settingsMgr.GetTrackingMethod()
790+
if err != nil {
791+
return fmt.Errorf("error getting trackingMethod from settings: %w", err)
792+
}
780793
kustomizeOptions, err := kustomizeSettings.GetOptions(a.Spec.GetSource())
781794
if err != nil {
782795
return fmt.Errorf("error getting kustomize settings options: %w", err)
@@ -788,7 +801,7 @@ func (s *Server) Get(ctx context.Context, q *application.ApplicationQuery) (*v1a
788801
KustomizeOptions: kustomizeOptions,
789802
Repos: helmRepos,
790803
NoCache: true,
791-
TrackingMethod: string(argo.GetTrackingMethod(s.settingsMgr)),
804+
TrackingMethod: trackingMethod,
792805
EnabledSourceTypes: enabledSourceTypes,
793806
HelmOptions: helmOptions,
794807
})

test/e2e/app_management_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ func TestDuplicatedClusterResourcesAnnotationTracking(t *testing.T) {
10091009
// (i.e. resources where metadata.namespace is set). Before the bugfix, this test would fail with a diff in the
10101010
// tracking annotation.
10111011
Given(t).
1012-
SetTrackingMethod(string(argo.TrackingMethodAnnotation)).
1012+
SetTrackingMethod(string(TrackingMethodAnnotation)).
10131013
Path("duplicated-resources").
10141014
When().
10151015
CreateApp().
@@ -2600,7 +2600,7 @@ func TestSwitchTrackingMethod(t *testing.T) {
26002600
ctx := Given(t)
26012601

26022602
ctx.
2603-
SetTrackingMethod(string(argo.TrackingMethodAnnotation)).
2603+
SetTrackingMethod(string(TrackingMethodAnnotation)).
26042604
Path("deployment").
26052605
When().
26062606
CreateApp().
@@ -2637,7 +2637,7 @@ func TestSwitchTrackingMethod(t *testing.T) {
26372637
Expect(SyncStatusIs(SyncStatusCodeSynced)).
26382638
Expect(HealthIs(health.HealthStatusHealthy)).
26392639
When().
2640-
SetTrackingMethod(string(argo.TrackingMethodLabel)).
2640+
SetTrackingMethod(string(TrackingMethodLabel)).
26412641
Sync().
26422642
Then().
26432643
Expect(OperationPhaseIs(OperationSucceeded)).
@@ -2692,7 +2692,7 @@ func TestSwitchTrackingMethod(t *testing.T) {
26922692
func TestSwitchTrackingLabel(t *testing.T) {
26932693
ctx := Given(t)
26942694

2695-
require.NoError(t, fixture.SetTrackingMethod(string(argo.TrackingMethodLabel)))
2695+
require.NoError(t, fixture.SetTrackingMethod(string(TrackingMethodLabel)))
26962696
ctx.
26972697
Path("deployment").
26982698
When().
@@ -2786,7 +2786,7 @@ func TestSwitchTrackingLabel(t *testing.T) {
27862786
func TestAnnotationTrackingExtraResources(t *testing.T) {
27872787
ctx := Given(t)
27882788

2789-
require.NoError(t, fixture.SetTrackingMethod(string(argo.TrackingMethodAnnotation)))
2789+
require.NoError(t, fixture.SetTrackingMethod(string(TrackingMethodAnnotation)))
27902790
ctx.
27912791
Path("deployment").
27922792
When().
@@ -2952,7 +2952,7 @@ data:
29522952
func TestInstallationID(t *testing.T) {
29532953
ctx := Given(t)
29542954
ctx.
2955-
SetTrackingMethod(string(argo.TrackingMethodAnnotation)).
2955+
SetTrackingMethod(string(TrackingMethodAnnotation)).
29562956
And(func() {
29572957
_, err := fixture.KubeClientset.CoreV1().ConfigMaps(fixture.DeploymentNamespace()).Create(
29582958
t.Context(), &corev1.ConfigMap{

0 commit comments

Comments
 (0)