Skip to content

fix: Parse CODER_GITAUTH_N_NO_REFRESH env var value instead of key #7051

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

kconley-sq
Copy link
Contributor

I noticed in Coder v0.21.3 that setting the CODER_GITAUTH_N_NO_REFRESH environment variable in our server's /etc/coder.d/coder.env configuration file to prevent Coder from automatically refreshing gitauth tokens caused the Coder server to fail to launch with the error:

Apr 03 22:14:23 coder coder[3334506]: read git auth providers from env: parse bool: true
Apr 03 22:14:23 coder systemd[1]: coder.service: Main process exited, code=exited, status=1/FAILURE

This PR updates an existing test to capture the affected code path and then fixes the issue by changing the parsing code to parse the environment variable's value instead of the environment variable's name/key.

@github-actions
Copy link

github-actions bot commented Apr 7, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@kconley-sq
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

cdrcommunity added a commit to coder/cla that referenced this pull request Apr 7, 2023
@kylecarbs kylecarbs merged commit 4dd5d79 into coder:main Apr 11, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
@kconley-sq kconley-sq deleted the kconley/fix-git-auth-no-refresh-env-var-parsing branch April 11, 2023 15:58
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