-
Couldn't load subscription status.
- Fork 31
Increase logging for external commands #647
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
base: main
Are you sure you want to change the base?
Conversation
|
I'm investigating a vLLM build problem and could not figure out the exact build environment from our build logs. This PR includes all build environment variables in the global log and the run log. |
a23bd17 to
29aec4f
Compare
|
@tiran is there any risk to expose secret environments in CI logs, e.g. credentials embedded in URLs, or secrets? etc. |
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.
Looks good!
I will wait to approve till @EmilienM gets answer to his question
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
29aec4f to
b431951
Compare
That is a good point! GitHub and GitLab already mask sensitive values. I have added additional code to also mask keys that look like they hold sensitive values. |
b431951 to
876f694
Compare
876f694 to
e59971b
Compare
The `external_commands.run()` function now logs all environment variables. Before it only logged extra environment variables defined in a plugin. The logs were missing information about global environment variables, e.g. env vars defined in a build container. These additional env vars influence a build, too. The run log file now contains the command, env vars, and current working directory, too. Potentially sensitive env vars are masked. This is an additional precaution. GitHub and GitLab already mask sensitive values in logs. Signed-off-by: Christian Heimes <[email protected]>
e59971b to
7a8dcd7
Compare
|
|
||
| # *PAT (GitLab), SECRET, PASSWORD, PASSPHRASE, CRED(entials), TOKEN | ||
| SENSITIVE_KEYS = re.compile( | ||
| "^(*.PAT|.*SECRET.*|.*PASSWORD.*|.*PASSPHRASE.*|.*CRED.*|.*TOKEN.*)$", |
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.
| "^(*.PAT|.*SECRET.*|.*PASSWORD.*|.*PASSPHRASE.*|.*CRED.*|.*TOKEN.*)$", | |
| "^(.*PAT|.*SECRET.*|.*PASSWORD.*|.*PASSPHRASE.*|.*CRED.*|.*TOKEN.*)$", |
I think the tests are failing because of a typo here in the regex that makes it look like a glob pattern.
The
external_commands.run()function now logs all environment variables. Before it only logged extra environment variables defined in a plugin. The logs were missing information about global environment variables, e.g. env vars defined in a build container. These additional env vars influence a build, too.The run log file now contains the command, env vars, and current working directory, too.
Potentially sensitive env vars are masked. This is an additional precaution. GitHub and GitLab already mask sensitive values in logs.