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

SUP-2343: remove "retry" example from "buildkite-agent step get" as not valid #2879

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

tomowatt
Copy link
Member

@tomowatt tomowatt commented Jul 8, 2024

Description

The "retry" attribute is not a valid for using with buildkite-agent step get command.

Context

Updating the docs on the buildkite-agent step commands to provide a list of valid attributes - see buildkite/docs#2872 - and ran the following, so see that "retry" is not a valid attribute for a Step:

$ buildkite-agent step get --format json
{
  "label": "label",
  "type": "command",
  "if": null,
  "state": "running",
  "key": "key",
  "outcome": null,
  "notify": [

  ],
  "command": "buildkite-agent step get --format json",
  "parallelism": null,
  "env": null,
  "timeout": 1,
  "concurrency_limit": null,
  "concurrency_key": null,
  "agents": null,
  "depends_on": [

  ]
}

and when running the following Pipeline:

steps:
  - label: "label"
    key: "key"
    command: buildkite-agent step get "retry" --format json
    retry: 
      automatic:
        signal_reason: "*"
        limit: 2

results in the following:

$ buildkite-agent step get "retry" --format json
2024-07-08 11:03:57 WARN   POST https://agent.buildkite.com/v3/steps/{STEP ID}/export: 400 Bad Request: `retry` is currently not supported. Please contact [email protected] if you'd like it added! (Attempt 1/10 Retrying in 5s)
fatal: failed to get step: POST https://agent.buildkite.com/v3/steps/{STEP ID}/export: 400 Bad Request: `retry` is currently not supported. Please contact [email protected] if you'd like it added!
🚨 Error: The command exited with status 1

Changes

Output changes

$ buildkite-agent step get --help                         
Usage:

    buildkite-agent step get <attribute> [options...]

Description:

Retrieve the value of an attribute in a step. If no attribute is passed, the
entire step will be returned.

In the event a complex object is returned (an object or an array),
you'll need to supply the --format option to tell the agent how it should
output the data (currently only JSON is supported).

Example:

    $ buildkite-agent step get "label" --step "key"
    $ buildkite-agent step get --format json
    $ buildkite-agent step get "state" --step "my-other-step"

Options:
...

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go fmt ./...)

Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

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

Good find!

@tomowatt tomowatt merged commit 62c6cba into main Jul 10, 2024
1 check passed
@tomowatt tomowatt deleted the SUP-2343 branch July 10, 2024 10:52
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.

2 participants