Skip to content

Update atmos workflow command to allow restarting workflows from a named step. Update workflow docs - #300

Merged
Andriy Knysh (aknysh) merged 9 commits into
masterfrom
update-cli-3
Jan 12, 2023
Merged

Andriy Knysh (aknysh) merged 9 commits into
masterfrom
update-cli-3

Conversation

@aknysh

@aknysh Andriy Knysh (aknysh) commented Jan 12, 2023 •

Copy link
Copy Markdown
Member

what

why

Useful when you want to restart a workflow from a particular step.

Each workflow step can be given an arbitrary name (step's identifier) using the name attribute. For example:

workflows:
  test-1:
    description: "Test workflow"
    steps:
      - command: echo Command 1
        name: step1
        type: shell
      - command: echo Command 2
        name: step2
        type: shell
      - command: echo Command 3
        name: step3
        type: shell
      - command: echo Command 4
        type: shell

The step's name can be used in the --from-step command-line flag to start the workflow execution from the step.

For example, the following command will skip the first two steps and will start executing the workflow from step3:

atmos workflow test-1 -f workflow1 --from-step step3

This is useful when you want to restart the workflow from a particular step.

For example:

  • You run the workflow first time with the command atmos workflow test-1 -f workflow1
  • step1 and step2 succeed, but step3 fails
  • You fix the issue with the step3 command
  • You don't want to execute step1 and step2 again (to not spend time on it, or if they are
    not idempotent)
  • You run the command atmos workflow test-1 -f workflow1 --from-step step3 to restart the workflow from step3

related

test

atmos workflow test-1 -f workflow1 --from-step step3
Executing the workflow 'test-1' from 'examples/complete/stacks/workflows/workflow1.yaml'

description: Test workflow
steps:
- name: step1
  command: echo Command 1
  type: shell
- name: step2
  command: echo Command 2
  type: shell
- name: step3
  command: echo Command 3
  type: shell
- command: echo Command 4
  type: shell
- command: echo Command 5
  type: shell

Executing workflow step: echo Command 3

Executing command:
echo Command 3
Command 3

Executing workflow step: echo Command 4

Executing command:
echo Command 4
Command 4

Executing workflow step: echo Command 5

Executing command:
echo Command 5
Command 5

@bridgecrew bridgecrew Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bridgecrew has found errors in this PR ⬇️

Comment thread go.sum
Comment thread go.sum
Comment thread go.sum
Comment thread go.sum
Comment thread go.sum
Comment thread go.sum
Comment thread go.sum
Comment thread go.sum
Comment thread go.sum
Comment thread go.sum
@aknysh
Andriy Knysh (aknysh) temporarily deployed to preview January 12, 2023 04:05 — with GitHub Actions Inactive
@aknysh
Andriy Knysh (aknysh) temporarily deployed to preview January 12, 2023 04:11 — with GitHub Actions Inactive
@osterman

Copy link
Copy Markdown
Member

This closes #271

Comment thread pkg/config/schema.go Outdated
Comment thread website/docs/core-concepts/workflows/workflows.md Outdated
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com>
@aknysh
Andriy Knysh (aknysh) temporarily deployed to preview January 12, 2023 15:39 — with GitHub Actions Inactive
Comment thread website/docs/core-concepts/workflows/workflows.md Outdated

@dudymas Jeremy White (dudymas) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great!
thanks
image

@aknysh
Andriy Knysh (aknysh) merged commit 028c003 into master Jan 12, 2023
@aknysh
Andriy Knysh (aknysh) deleted the update-cli-3 branch January 12, 2023 19:51
Erik Osterman (Cloud Posse) (osterman) added a commit that referenced this pull request Sep 30, 2026
- github.com/containerd/containerd/v2 v2.3.5 -> v2.3.6 (#299, medium):
  image-pull DoS via crafted OCI index graph amplification. Requires
  bumping go.mod's go directive to 1.26.8 -- containerd v2.3.6 itself
  declares that as its minimum Go version.
- fast-uri 3.1.6 -> 3.1.8 via pnpm override (#300, #301, both high):
  authority injection via unvalidated port, and host confusion via an
  unclosed bracket in the URI authority.
- image-size 2.0.2 -> 2.0.4 via a new pnpm override (#297, #298, both
  high): denial of service through infinite loops in the ICNS/JXL/HEIF
  parsers.

All three are patch/minor bumps within their existing major version,
inside dependabot.yml's semver-major ignore policy. NOTICE regenerated
for the two website dependency changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Erik Osterman (Cloud Posse) (osterman) added a commit that referenced this pull request Oct 2, 2026
- github.com/containerd/containerd/v2 v2.3.5 -> v2.3.6 (#299, medium):
  image-pull DoS via crafted OCI index graph amplification. Requires
  bumping go.mod's go directive to 1.26.8 -- containerd v2.3.6 itself
  declares that as its minimum Go version.
- fast-uri 3.1.6 -> 3.1.8 via pnpm override (#300, #301, both high):
  authority injection via unvalidated port, and host confusion via an
  unclosed bracket in the URI authority.
- image-size 2.0.2 -> 2.0.4 via a new pnpm override (#297, #298, both
  high): denial of service through infinite loops in the ICNS/JXL/HEIF
  parsers.

All three are patch/minor bumps within their existing major version,
inside dependabot.yml's semver-major ignore policy. NOTICE regenerated
for the two website dependency changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

This branch was previously deployed

1 inactive deployment
preview — 7a65cb4a Deployed Jan 12, 2023 by aknysh
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.

Restart a workflow from a numbered and/or named step

3 participants