-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add choice of "command interposer" #371
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DrJosh9000
force-pushed
the
choice-of-interposer
branch
8 times, most recently
from
August 27, 2024 07:16
780cf82
to
30feb11
Compare
DrJosh9000
force-pushed
the
choice-of-interposer
branch
2 times, most recently
from
August 27, 2024 07:45
f7c7968
to
290681e
Compare
DrJosh9000
force-pushed
the
choice-of-interposer
branch
13 times, most recently
from
August 28, 2024 01:32
d5a2368
to
9601fa7
Compare
DrJosh9000
force-pushed
the
choice-of-interposer
branch
from
August 28, 2024 01:38
9601fa7
to
b22c1a1
Compare
@DrJosh9000 not a fan of the readme changes, was there a reason for this? Happy to defer to others but without some sort of automated formatter this feels like it is just adding friction. |
DrJosh9000
force-pushed
the
choice-of-interposer
branch
from
August 28, 2024 05:34
b22c1a1
to
2a3481e
Compare
@wolfeidau it's not important here, so I'll back out the 100 column change. |
wolfeidau
approved these changes
Aug 28, 2024
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 👍🏻 🚀
DrJosh9000
added a commit
that referenced
this pull request
Sep 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Change how
podSpec/command
andpodSpec/args
is interpreted. The choice of "interposer" is up to the user. If they allow the Kubernetes plugin, the choice can be made per-step, otherwise there is a default that can be set invalues.yaml
.The default (if no choice is made) is changing.
buildkite
mode is more convenient if you are used to pipeline.yaml syntax, and want to pass multiple commands as a list.vector
mode is much more like how Kubernetes treatscommand
andargs
, and is intended to execute a single command (that, per the Kubernetes docs, can be["sh", "-c", "big script here"]
. There's alsolegacy
mode, equivalent to what it does before this PR, to ease transitioning pipelines over to new modes.Why
Joining the container command and args with
strings.Join(..., " ")
was never exactly a good idea.For example, before this PR, this doesn't do what it looks like it does:
Because each command component was joined with spaces, this would run the command
echo First command echo Second command
, and echoFirst command echo Second command
, not two things over two lines.If we tried harder to interpret it the way Kubernetes does (as a raw arg vector executed directly, not a string interpreted by a shell), then we should be using the vector
["echo First command", "echo Second command"]
, which would fail because whileecho
could be an executable file (that takes one or more arguments), it's unlikely thatecho First command
is the name of an executable.With no apologies to Terry Pratchet: If we're breaking Kubernetes' rules, we ought to break 'em good an' 'ard.