Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

Conversation

ranakan19
Copy link
Member

This should respect the loglevel set on ArgoCD instance when logging applied resources too.

@ranakan19 ranakan19 requested a review from a team as a code owner September 17, 2025 21:14
Copy link

Copy link

codecov bot commented Sep 17, 2025

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.38%. Comparing base (8849c3f) to head (92bc5ad).
⚠️ Report is 62 commits behind head on master.

Files with missing lines Patch % Lines
pkg/utils/kube/resource_ops.go 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #782      +/-   ##
==========================================
- Coverage   54.26%   47.38%   -6.88%     
==========================================
  Files          64       64              
  Lines        6164     6590     +426     
==========================================
- Hits         3345     3123     -222     
- Misses       2549     3210     +661     
+ Partials      270      257      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@anandf anandf left a comment

Choose a reason for hiding this comment

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

LGTM

"manager", manager,
"serverSideApply", serverSideApply,
"serverSideDiff", true).Info(fmt.Sprintf("Applying resource %s/%s in cluster: %s, namespace: %s", obj.GetKind(), obj.GetName(), k.config.Host, obj.GetNamespace()))
if logWithLevel.V(0).Enabled() {
Copy link
Contributor

Choose a reason for hiding this comment

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

why not avoiding the if and adding the V(0) in the log statement below?

Copy link
Member Author

@ranakan19 ranakan19 Sep 23, 2025

Choose a reason for hiding this comment

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

i thought it best to not disturb the verbosity level, since for For dry-run the verbosity level is set at V(1) and the if logWithLevel.V(0).Enabled() condition should pass for V>=0.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure if this is going to make a difference if the intention is to suppress this log entry when Argo CD is running in error mode. Error logs are sent with log.Error() not with log.V().Info(). So.. My understanding is that no log entry sent with the Info() method would be visible when setting the log level with error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants