Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/workspace-engine/pkg/jobagents/argo/argoapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,11 @@ func TestVerifications_ValidConfig(t *testing.T) {
require.Len(t, specs, 1)
assert.Equal(t, "argocd-application-health", specs[0].Name)
assert.Equal(t, int32(60), specs[0].IntervalSeconds)
assert.Equal(t, 10, specs[0].Count)
assert.Equal(t, 15, specs[0].Count)
require.NotNil(t, specs[0].SuccessThreshold)
assert.Equal(t, 2, *specs[0].SuccessThreshold)
require.NotNil(t, specs[0].FailureThreshold)
assert.Equal(t, 10, *specs[0].FailureThreshold)
}

func TestVerifications_MissingServerUrl(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ func (a *ArgoApplication) Verifications(
return nil, fmt.Errorf("build argocd health check provider: %w", err)
}

successThreshold := 1
successThreshold := 2
failureThreshold := 10
failureCondition := "result.statusCode != 200 || result.json.status.health.status == 'Degraded' || result.json.status.health.status == 'Missing'"
spec := oapi.VerificationMetricSpec{
Name: "argocd-application-health",
IntervalSeconds: 60,
Count: 10,
Count: 15,
Comment on lines 67 to +68
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Count was changed from 10 to 15 here, but there’s an existing unit test that asserts specs[0].Count == 10 (apps/workspace-engine/pkg/jobagents/argo/argoapp_test.go:279-290). Please update that test expectation (and any other assertions) so CI doesn’t fail.

Copilot uses AI. Check for mistakes.
SuccessThreshold: &successThreshold,
FailureThreshold: &failureThreshold,
SuccessCondition: "result.statusCode == 200 && result.json.status.sync.status == 'Synced' && result.json.status.health.status == 'Healthy'",
FailureCondition: &failureCondition,
Comment on lines +62 to 72
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With Count: 15 and FailureThreshold: 10, the verification engine will consider the metric successful once 15 measurements are taken as long as total failed measurements are <= 10 (even if the success threshold was never met). Please confirm this is the intended leniency level; if the goal is to require reaching the Healthy/Synced success condition, the thresholds/conditions may need adjusting so the metric can’t pass while remaining perpetually inconclusive or mostly failing.

Copilot uses AI. Check for mistakes.
Provider: provider,
Expand Down
Loading