Skip to content
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

build: fix ARGO_LOG_LEVEL -> ARGO_LOGLEVEL #11978

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

agilgur5
Copy link
Member

@agilgur5 agilgur5 commented Oct 10, 2023

Fixes kitproj/kit#41 and fixes the issue in this comment: #11879 (comment)

Motivation

  • credit to Julie and Alex for debugging this, I merely confirmed the issue and fixed it

  • the flag is loglevel and with the automatic env prefix, that becomes ARGO_LOGLEVEL as an env var

    • ARGO_LOG_LEVEL was a misconfiguration / typo as such

Modifications

Verification

After setting the env variable in tasks.yaml, the Controller is now showing debug logs during a kit run:

controller: time="2023-10-10T20:51:00.001Z" level=info msg="omniscient-python is suspended, skipping execution" namespace=argo workflow=omniscient-python
controller: time="2023-10-10T20:51:00.015Z" level=debug msg="Patch cronworkflows 200"
port-forward: Handling connection for 9000
port-forward: Handling connection for 9000
controller: time="2023-10-10T20:51:04.973Z" level=debug msg="Get leases 200"
controller: time="2023-10-10T20:51:04.986Z" level=debug msg="Update leases 200"

Notably, I realized that the Server doesn't even take a loglevel. Its parent command, argo, does take a loglevel, and so that should be inherited, but it seems like that flag doesn't pass through to Viper to be read as an env variable automatically.
That will require further fixes -- a CLI flag, like --loglevel=debug, is currently required for the Server as the env var is currently ignored.

- credit to Julie and Alex for debugging this, I merely confirmed the issue and fixed it

- the flag is [`loglevel`](https://github.com/argoproj/argo-workflows/blob/a45afc0c87b0ffa52a110c753b97d48f06cdf166/cmd/workflow-controller/main.go#L54) and with the [automatic env prefix](https://github.com/argoproj/argo-workflows/blob/a45afc0c87b0ffa52a110c753b97d48f06cdf166/cmd/workflow-controller/main.go#L195), that becomes `ARGO_LOGLEVEL` as an env var
  - `ARGO_LOG_LEVEL` was a misconfiguration / typo as such

- also add `watch` list for the `ui-deps` task after my dive into `task`
  - it seemed like `kit` kept re-installing deps when this was missing

Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
@agilgur5 agilgur5 added the area/build Build or GithubAction/CI issues label Oct 10, 2023
@terrytangyuan terrytangyuan enabled auto-merge (squash) October 10, 2023 21:21
@juliev0
Copy link
Contributor

juliev0 commented Oct 10, 2023

thanks for doing this @agilgur5 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Build or GithubAction/CI issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ARGO_LOG_LEVEL has no effect
3 participants