Skip to content

fix: default argocd verification hits application specific endpoint for health check#987

Merged
adityachoudhari26 merged 3 commits intomainfrom
fix-argo-verifications
Apr 13, 2026
Merged

fix: default argocd verification hits application specific endpoint for health check#987
adityachoudhari26 merged 3 commits intomainfrom
fix-argo-verifications

Conversation

@adityachoudhari26
Copy link
Copy Markdown
Member

@adityachoudhari26 adityachoudhari26 commented Apr 13, 2026

fixes #986

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

coderabbitai bot commented Apr 13, 2026

Warning

Rate limit exceeded

@adityachoudhari26 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 38 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 9 minutes and 38 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: b3ce0206-fef6-4c41-8199-b315e4928df3

📥 Commits

Reviewing files that changed from the base of the PR and between 55ca816 and 0a76a35.

📒 Files selected for processing (8)
  • apps/workspace-engine/pkg/jobagents/argo/argoapp_test.go
  • apps/workspace-engine/pkg/jobagents/argo/argocd_verification.go
  • apps/workspace-engine/pkg/jobagents/registry.go
  • apps/workspace-engine/pkg/jobagents/types/types.go
  • apps/workspace-engine/svc/controllers/jobdispatch/dispatcher.go
  • apps/workspace-engine/svc/controllers/jobdispatch/reconcile.go
  • apps/workspace-engine/svc/controllers/jobdispatch/reconcile_test.go
  • response.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-argo-verifications

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

Updates ArgoCD agent verification generation so the default health check targets a specific application endpoint (instead of the applications collection endpoint), using the job’s dispatch context to derive the application name.

Changes:

  • Extend the agent verification interfaces (AgentVerifier, types.Verifiable) to accept dispatchCtx.
  • Update jobdispatch reconciliation flow to pass job.DispatchContext into agent verification resolution.
  • Update ArgoCD verification builder and tests to render the application template and hit /api/v1/applications/{appName}.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/workspace-engine/svc/controllers/jobdispatch/reconcile_test.go Updates mock verifier signature to accept dispatch context.
apps/workspace-engine/svc/controllers/jobdispatch/reconcile.go Passes dispatch context into AgentVerifications call.
apps/workspace-engine/svc/controllers/jobdispatch/dispatcher.go Updates AgentVerifier interface to include dispatchCtx.
apps/workspace-engine/pkg/jobagents/types/types.go Updates types.Verifiable interface to include dispatchCtx.
apps/workspace-engine/pkg/jobagents/registry.go Forwards dispatch context into Verifications(...).
apps/workspace-engine/pkg/jobagents/argo/argocd_verification.go Renders app template to compute app name; uses application-specific ArgoCD endpoint for health checks.
apps/workspace-engine/pkg/jobagents/argo/argoapp_test.go Updates verification tests to use new signature and dispatch context-derived config.
Comments suppressed due to low confidence (1)

apps/workspace-engine/pkg/jobagents/argo/argoapp_test.go:288

  • This test doesn’t assert the new behavior introduced by the PR: that the verification uses the application-specific ArgoCD endpoint. Add an assertion against the generated HTTP metric provider URL (e.g., extract specs[0].Provider as an HTTPMetricProvider and verify it contains /api/v1/applications/test-app).
	specs, err := a.Verifications(config, job.DispatchContext)
	require.NoError(t, err)
	require.Len(t, specs, 1)
	assert.Equal(t, "argocd-application-health", specs[0].Name)
	assert.Equal(t, int32(60), specs[0].IntervalSeconds)

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

Comment thread apps/workspace-engine/pkg/jobagents/argo/argocd_verification.go
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Aditya Choudhari <48932219+adityachoudhari26@users.noreply.github.com>
@adityachoudhari26 adityachoudhari26 merged commit e4f31e9 into main Apr 13, 2026
11 checks passed
@adityachoudhari26 adityachoudhari26 deleted the fix-argo-verifications branch April 13, 2026 22:13
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.

bug: default argo verification should query app-specific endpoint

3 participants