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

Make windows hooks process env changes the same way as unix #1791

Merged
merged 4 commits into from
Nov 7, 2022

Conversation

moskyb
Copy link
Contributor

@moskyb moskyb commented Oct 18, 2022

This uses the new buildkite-agent env command introduced in #1781, and uses it for hooks on windows machines as well. This change was scoped out of the initial fix, as windows machines weren't affected by the bug, and the effort of testing them would add time between the issue being reported and a fix being issued.

This PR ports the behaviour that we were previously using for hooks running on unix machines to windows machines as well, making the code a bunch nicer and allowing us to delete a whole bunch of useless env processing code.

@moskyb moskyb requested a review from a team October 18, 2022 02:02
Copy link
Member

@pda pda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, assuming some automatic and perhaps manual testing passes.

Love the deletion of all that old env code 👌🏼

@moskyb
Copy link
Contributor Author

moskyb commented Oct 31, 2022

The tests here are failing because apparently some windows env vars start with an = 🙃

The fix here could either be to silently ignore them, or to special case them in some way. I would slightly prefer to special case them - i don't think our previous implementation properly handled these, but it would probably be good to have the option available.

@moskyb moskyb force-pushed the windows-hook-env-improvements branch from 9a65b1b to f4529bf Compare November 2, 2022 03:46
This uses the new buildkite-agent env command introduced in [#1781](#1781), and uses it for hooks on windows machines as well. This change was scoped out of the initial fix, as windows machines weren't affected by the bug, and the effort of testing them would add time between the issue being reported and a fix being issued.

This PR ports the behaviour that we were previously using for hooks running on unix machines to windows machines as well, making the code a bunch nicer and allowing us to delete a whole bunch of useless env processing code.
@DrJosh9000 DrJosh9000 force-pushed the windows-hook-env-improvements branch from f126ac8 to 939fb24 Compare November 7, 2022 02:28
@DrJosh9000 DrJosh9000 merged commit c4db847 into main Nov 7, 2022
@DrJosh9000 DrJosh9000 deleted the windows-hook-env-improvements branch November 7, 2022 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants