Skip to content

Commit be12987

Browse files
committed
chore: update generated protobuf files for TargetSourcesHash field
Signed-off-by: manvitha92 <62259625+manvitha92@users.noreply.github.com>
1 parent 964c62a commit be12987

11 files changed

Lines changed: 353 additions & 5612 deletions

File tree

applicationset/controllers/applicationset_controller_test.go

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5415,6 +5415,77 @@ func TestUpdateApplicationSetApplicationStatus(t *testing.T) {
54155415
},
54165416
},
54175417
},
5418+
{
5419+
name: "resets app to Waiting when valuesObject changes but git SHA stays the same",
5420+
appSet: newDefaultAppSet(2, []v1alpha1.ApplicationSetApplicationStatus{
5421+
{
5422+
Application: "app1",
5423+
Message: "",
5424+
Status: v1alpha1.ProgressiveSyncHealthy,
5425+
Step: "1",
5426+
TargetRevisions: []string{"abc123"},
5427+
TargetSourcesHash: "oldhash",
5428+
LastTransitionTime: &nowMinus5,
5429+
},
5430+
}),
5431+
apps: []v1alpha1.Application{
5432+
{
5433+
ObjectMeta: metav1.ObjectMeta{Name: "app1"},
5434+
Status: v1alpha1.ApplicationStatus{
5435+
ReconciledAt: &metav1.Time{Time: time.Now()},
5436+
Health: v1alpha1.AppHealthStatus{Status: health.HealthStatusHealthy},
5437+
Sync: v1alpha1.SyncStatus{
5438+
Status: v1alpha1.SyncStatusCodeOutOfSync,
5439+
Revision: "abc123",
5440+
},
5441+
},
5442+
Spec: v1alpha1.ApplicationSpec{
5443+
Source: &v1alpha1.ApplicationSource{
5444+
Helm: &v1alpha1.ApplicationSourceHelm{
5445+
Values: "image: newimage",
5446+
},
5447+
},
5448+
},
5449+
},
5450+
},
5451+
appStepMap: map[string]int{"app1": 0},
5452+
expectedAppStatus: []v1alpha1.ApplicationSetApplicationStatus{
5453+
{
5454+
Application: "app1",
5455+
Message: "Application has pending changes, setting status to Waiting",
5456+
Status: v1alpha1.ProgressiveSyncWaiting,
5457+
Step: "1",
5458+
TargetRevisions: []string{"abc123"},
5459+
},
5460+
},
5461+
},
5462+
{
5463+
name: "does not reset app to Waiting when TargetSourcesHash is empty (migration guard)",
5464+
appSet: newDefaultAppSet(2, []v1alpha1.ApplicationSetApplicationStatus{
5465+
{
5466+
Application: "app1",
5467+
Message: "",
5468+
Status: v1alpha1.ProgressiveSyncHealthy,
5469+
Step: "1",
5470+
TargetRevisions: []string{"abc123"},
5471+
TargetSourcesHash: "",
5472+
LastTransitionTime: &nowMinus5,
5473+
},
5474+
}),
5475+
apps: []v1alpha1.Application{
5476+
newApp("app1", health.HealthStatusHealthy, v1alpha1.SyncStatusCodeSynced, "abc123", newOperationState(common.OperationSucceeded)),
5477+
},
5478+
appStepMap: map[string]int{"app1": 0},
5479+
expectedAppStatus: []v1alpha1.ApplicationSetApplicationStatus{
5480+
{
5481+
Application: "app1",
5482+
Message: "",
5483+
Status: v1alpha1.ProgressiveSyncHealthy,
5484+
Step: "1",
5485+
TargetRevisions: []string{"abc123"},
5486+
},
5487+
},
5488+
},
54185489
} {
54195490
t.Run(cc.name, func(t *testing.T) {
54205491
kubeclientset := kubefake.NewClientset([]runtime.Object{}...)

assets/swagger.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifests/core-install-with-hydrator.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifests/core-install.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifests/crds/applicationset-crd.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifests/ha/install-with-hydrator.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifests/ha/install.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifests/install-with-hydrator.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifests/install.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)