-
Notifications
You must be signed in to change notification settings - Fork 6.5k
chore: add "dry_run" label to sync metrics #22010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Javier Solana <[email protected]>
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #22010 +/- ##
==========================================
+ Coverage 55.92% 55.94% +0.01%
==========================================
Files 343 343
Lines 57429 57432 +3
==========================================
+ Hits 32119 32128 +9
+ Misses 22657 22652 -5
+ Partials 2653 2652 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dry-run is a temporary parameter on the operation. It is not meant to be persisted in the application information since it is a transient attribute. It would make sense to add it to "operations" metrics, because it is the operation that is in dry-run. This way you could know how many dry-run vs normal operations are made.
I think this is not the correct way to address the linked issue
I think both approaches make sense. On one hand, adding the dry_run label to metrics more related to operations, such as The main idea of this issue is not only solve questions like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the failing tests that you asked on slack, have you tried running make codegen-local command before pushing changes?
…_total and argocd_app_sync_total Signed-off-by: Javier Solana <[email protected]>
Already done locally and there is no change. With a new commit it is solved then, It seems was a transient error. Thanks for your help! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Should we also add dry_run label to logAppEvent (https://github.com/argoproj/argo-cd/blob/master/controller/appcontroller.go#L2540) ? |
Mm maybe is interesting for logs perspective to add dryrun info but I think it already add this info in logs. Anyway in this case I'll prefer to move it in a different PR and issue cause is not as easy as modify the contract of logAppEvent (internally it uses |
|
Thanks for passing the failing checks, I'll be reviewing this shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Hi! Kyverno just merged a similar approach here. Anything I can do to push for this PR? Thanks! |
|
Friendly reminder @agaudreault ! Anything I can do to push for this change? Thanks! |
Signed-off-by: Javier Solana <[email protected]>
|
@agaudreault let me know if it is ok. Im gonna start taking a look to persist dryrun under Status. Thanks! |
Co-authored-by: Javier Solana <[email protected]> Co-authored-by: Pasha Kostohrys <[email protected]> Signed-off-by: Hapshanko <[email protected]>
Signed-off-by: Javier Solana [email protected]
Part of #21899
Add a "dry_run" label to distinguish dryrun activity from real ones to
argocd_app_infometric.The main issue is that if there are alerts based on these metrics, and the dry-run execution identifies an error (e.g., a change that violates a Kyverno policy or an invalid CRD schema) updates the metric, which can potentially trigger alerts based on it.
Adding the
dry_runlabel allow distinguish real activity from dryrun. Eg:Note: This situation has been occurring since the origins of the
argocd_app_infometric.Checklist: