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
fix: api server should use ARGOCD_SERVER_LOG_LEVEL instead of ARGOCD_REPO_SERVER_LOGLEVEL (#9970) #9975
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9975 +/- ##
==========================================
- Coverage 46.00% 45.96% -0.04%
==========================================
Files 227 227
Lines 27236 27276 +40
==========================================
+ Hits 12529 12538 +9
- Misses 13009 13036 +27
- Partials 1698 1702 +4
Continue to review full report at Codecov.
|
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.
Changed a little bit too much. :-) But after those changes are reverted, the remaining changes are correct!
@@ -35,7 +35,7 @@ spec: | |||
name: argocd-cmd-params-cm | |||
key: reposerver.log.format | |||
optional: true | |||
- name: ARGOCD_REPO_SERVER_LOGLEVEL | |||
- name: ARGOCD_SERVER_LOG_LEVEL |
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.
This should not be changed here, since it is the repo-server deployment.
cmdutil.LogFormat = os.Getenv("ARGOCD_SERVER_LOG_LEVEL") | ||
} | ||
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", env.StringFromEnv("ARGOCD_REPO_SERVER_LOGFORMAT", "text"), "Set the logging format. One of: text|json") | ||
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", env.StringFromEnv("ARGOCD_REPO_SERVER_LOGLEVEL", "info"), "Set the logging level. One of: debug|info|warn|error") | ||
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", env.StringFromEnv("ARGOCD_SERVER_LOG_LEVEL", "info"), "Set the logging level. One of: debug|info|warn|error") |
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.
These should not be changed, since this is the repo server command code.
Signed-off-by: mabing <bing.ma@daocloud.io>
Signed-off-by: mabing <bing.ma@daocloud.io>
manifests/ha/install.yaml
Outdated
@@ -10792,7 +10792,7 @@ spec: | |||
key: reposerver.log.format | |||
name: argocd-cmd-params-cm | |||
optional: true | |||
- name: ARGOCD_REPO_SERVER_LOGLEVEL | |||
- name: ARGOCD_SERVER_LOG_LEVEL |
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.
You might have to run make manifests
or make manifests-local
to clear this up. :-)
Signed-off-by: mabing <bing.ma@daocloud.io>
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. @crenshaw-dev regarding your concern on Slack, I think that if someone dropped the default 'env' block for a hard-coded value, they did so knowing the consequences for their upgrade process. Besides that, in most cases you only change the log level temporarily.
I also recommend changing the PR title to fix: api server should use ARGOCD_SERVER_LOG_LEVEL instead of ARGOCD_REPO_SERVER_LOGLEVEL
. Otherwise it may be unclear in the release notes.
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.
thanks again @usernameisnull !
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist:
Fixes ArgoCD Server Log Level env var incorrect #9970