-
Notifications
You must be signed in to change notification settings - Fork 303
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
Clarify --include-retries docs and fixes #1341
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -22,17 +22,22 @@ Description: | |||||||||
|
||||||||||
Example: | ||||||||||
|
||||||||||
$ buildkite-agent artifact download "pkg/*.tar.gz" . --build xxx | ||||||||||
$ buildkite-agent artifact download --build xxx "pkg/*.tar.gz" . | ||||||||||
|
||||||||||
This will search across all the artifacts for the build with files that match that part. | ||||||||||
The first argument is the search query, and the second argument is the download destination. | ||||||||||
|
||||||||||
If you're trying to download a specific file, and there are multiple artifacts from different | ||||||||||
jobs, you can target the particular job you want to download the artifact from: | ||||||||||
|
||||||||||
$ buildkite-agent artifact download "pkg/*.tar.gz" . --step "tests" --build xxx | ||||||||||
$ buildkite-agent artifact download --step "tests" --build xxx "pkg/*.tar.gz" . | ||||||||||
|
||||||||||
You can also use the step's jobs id (provided by the environment variable $BUILDKITE_JOB_ID)` | ||||||||||
You can also use the step's job id (provided by the environment variable $BUILDKITE_JOB_ID) | ||||||||||
|
||||||||||
By default, only artifacts from the most recent job in a chain of retried jobs are downloaded. | ||||||||||
To include artifacts from previous retried jobs, use the "--include-retried-jobs" flag: | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I agree. How about
Suggested change
"Also", to make clear that it is as well as the last one. What do you reckon? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CC @ticky There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’m not sure this solves for the ambiguity in “retried,” and do we otherwise expose the step/job dichotomy to users? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. I'll ponder and reword tomorrow. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We expose step just a couple of lines above, on line 35. But if we're not specifying a job ID, we're just using the artifact path, right, so this flag is just saying "get all the stuff, not just the most recent stuff", so mentioning the step isn't helpful. This might be better:
Suggested change
|
||||||||||
|
||||||||||
$ buildkite-agent artifact download --include-retried-jobs "pkg/*.tar.gz" .` | ||||||||||
|
||||||||||
type ArtifactDownloadConfig struct { | ||||||||||
Query string `cli:"arg:0" label:"artifact search query" validate:"required"` | ||||||||||
|
@@ -73,7 +78,7 @@ var ArtifactDownloadCommand = cli.Command{ | |||||||||
cli.BoolFlag{ | ||||||||||
Name: "include-retried-jobs", | ||||||||||
EnvVar: "BUILDKITE_AGENT_INCLUDE_RETRIED_JOBS", | ||||||||||
Usage: "Include artifacts from retried jobs in the search", | ||||||||||
Usage: "Include artifacts from previous retried jobs in the search", | ||||||||||
}, | ||||||||||
|
||||||||||
// API Flags | ||||||||||
|
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.
I wonder if this makes it clearer? “Retried” really feels like it does double duty here:
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.
I'm less keen on superseded, because if I read that I'd be wondering if it meant something specific in this context. We could just use "from previous jobs"
Huh, that was unintentional:
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.
I’m just not sure “previous jobs” conveys “previous tries of this step” though, it seems ambiguous whether this means “prior jobs in the build” or something else