Skip to content

chore: make default argo verification more lenient#1021

Merged
adityachoudhari26 merged 2 commits into
mainfrom
fix-default-argo-verification
Apr 21, 2026
Merged

chore: make default argo verification more lenient#1021
adityachoudhari26 merged 2 commits into
mainfrom
fix-default-argo-verification

Conversation

@adityachoudhari26
Copy link
Copy Markdown
Member

@adityachoudhari26 adityachoudhari26 commented Apr 21, 2026

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated ArgoCD application health verification metrics with improved threshold configurations and sample count parameters for enhanced reliability monitoring.

Copilot AI review requested due to automatic review settings April 21, 2026 18:15
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

Warning

Rate limit exceeded

@adityachoudhari26 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 56 minutes and 58 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 56 minutes and 58 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5c9bdc92-89ab-4638-a457-995cc27f4eda

📥 Commits

Reviewing files that changed from the base of the PR and between 526cb6a and fb15996.

📒 Files selected for processing (1)
  • apps/workspace-engine/pkg/jobagents/argo/argoapp_test.go
📝 Walkthrough

Walkthrough

Updated ArgoCD application health verification metrics by modifying success and sample count thresholds and introducing a new failure threshold parameter wired into the verification metric specification.

Changes

Cohort / File(s) Summary
ArgoCD Verification Metrics
apps/workspace-engine/pkg/jobagents/argo/argocd_verification.go
Adjusted health verification thresholds: successThreshold 1→2, Count 10→15, and added new failureThreshold (10) integrated into oapi.VerificationMetricSpec.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Thresholds hop and metrics dance,
Success now needs a second chance,
From ten to fifteen samples run,
Failure's limit set as one—
ArgoCD verifies with care,
More robust now everywhere!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: making ArgoCD verification thresholds more lenient by increasing success count from 10 to 15 and introducing a failure threshold.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-default-argo-verification

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the default ArgoCD application verification metric to be more tolerant of transient failures by increasing the number of samples and adding a failure threshold, affecting how the workspace-engine evaluates ArgoCD application health during job verification.

Changes:

  • Increase the default verification Count from 10 to 15 (15 minutes at 60s intervals).
  • Increase SuccessThreshold from 1 to 2 consecutive successes.
  • Introduce FailureThreshold (10) to allow continued retries despite some failures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 67 to +68
IntervalSeconds: 60,
Count: 10,
Count: 15,
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.
Comment on lines +62 to 72
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,
SuccessThreshold: &successThreshold,
FailureThreshold: &failureThreshold,
SuccessCondition: "result.statusCode == 200 && result.json.status.sync.status == 'Synced' && result.json.status.health.status == 'Healthy'",
FailureCondition: &failureCondition,
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.
@adityachoudhari26 adityachoudhari26 merged commit daf9167 into main Apr 21, 2026
10 checks passed
@adityachoudhari26 adityachoudhari26 deleted the fix-default-argo-verification branch April 21, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants