-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
chore: add "dry_run" label to argocd_app_info metric #22010
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Javier Solana <[email protected]>
🔴 Preview Environment stopped on BunnyshellSee: Environment Details | Pipeline Logs Available 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.71% 55.74% +0.02%
==========================================
Files 342 342
Lines 57074 57078 +4
==========================================
+ Hits 31800 31818 +18
+ Misses 22632 22619 -13
+ Partials 2642 2641 -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 |
Signed-off-by: Javier Solana [email protected]
Fiixes #21899
Add a "dry_run" label to distinguish dryrun activity from real ones to
argocd_app_info
metric.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_run
label allow distinguish real activity from dryrun. Eg:Note: This situation has been occurring since the origins of the
argocd_app_info
metric.Checklist: