-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
CI setup: simplify environment passthrough code #16678
CI setup: simplify environment passthrough code #16678
Conversation
@cevich PTAL. |
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.
Minor thing: I'd like the test script to actually be run in CI.
45bb972
to
fe62b37
Compare
The passthrough_env function was unnecessarily complicated, hence fragile. Clean it up, and add regression tests. For future reference: CI broke horribly because of this. Rootless tests all failed with missing CI_DESIRED_NETWORK. Root cause was that CIRRUS_CHANGE_TITLE had a trailing space which, because of shell indirection, passthrough_env() wrote as trailing backslash (not backslash-space) in the /etc/ci_environment file, which then caused the next line in the file to get glommed onto CIRRUS_CHANGE_TITLE. Signed-off-by: Ed Santiago <[email protected]>
fe62b37
to
bdd5f82
Compare
So done. Thanks for letting me know the right place. |
|
||
# Combine into one | ||
PASSTHROUGH_ENV_RE="(^($PASSTHROUGH_ENV_EXACT)\$)|(^($PASSTHROUGH_ENV_ATSTART))|($PASSTHROUGH_ENV_ANYWHERE)" | ||
|
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.
Really great, and easy to read/understand.
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 Thanks for taking this on Ed.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cevich, edsantiago The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
The passthrough_env function was unnecessarily complicated,
hence fragile. Clean it up, and add regression tests.
For future reference: CI broke horribly because of this.
Rootless tests all failed with missing CI_DESIRED_NETWORK.
Root cause was that CIRRUS_CHANGE_TITLE had a trailing
space which, because of shell indirection, passthrough_env()
wrote as trailing backslash (not backslash-space) in the
/etc/ci_environment file, which then caused the next line
in the file to get glommed onto CIRRUS_CHANGE_TITLE.
[Github-only note: I've added a trailing space to the title of this PR. Github only, not git]
Signed-off-by: Ed Santiago [email protected]