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 Resolved
Comment thread go.sum Resolved
Comment thread go.sum Resolved
Comment thread go.sum Resolved
Comment thread go.sum Resolved
Comment thread go.sum Resolved
Comment thread go.sum Resolved
Comment thread go.sum Resolved
Comment thread go.sum Resolved
Comment thread go.sum Resolved
@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

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
@aknysh
Andriy Knysh (aknysh) temporarily deployed to preview January 12, 2023 15:39 — with GitHub Actions Inactive

@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 <[email protected]>
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 <[email protected]>
Erik Osterman (Cloud Posse) (osterman) added a commit to arcaven/atmos that referenced this pull request Oct 18, 2026
…racker (cloudposse#3195)

* fix(agent-skills): track the Claude Code plugin version with Version Tracker

The atmos@cloudposse plugin declared "version": "1.0.0" since it was
added, so `claude plugin update` could never detect new skills. Track
cloudposse/atmos's own latest release as a Version Tracker dependency and
write it into plugin.json and marketplace.json with the json file manager
(format: trimPrefix "v" so the manifests carry bare semver).

A new workflow runs `atmos version track update` and `apply` inside the
published atmos container image whenever a stable image lands on GHCR, and
opens a no-release PR with the refreshed manifests and lock file.

Closes cloudposse#2895

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(ci): run the plugin version bump as a build.yml job, not a registry_package workflow

The image is pushed by build.yml with the default GITHUB_TOKEN, and GitHub
does not start workflow runs from events that token causes, so a
registry_package-triggered workflow would likely never fire. It would also
have read package_version.version, which can be a manifest digest rather
than a tag for multi-arch images.

Add the bump as a `needs: docker` job in build.yml instead (the same shape
as the homebrew job). It runs inside the exact image the docker job pushed,
using that job's image and tag outputs, and no longer needs its own trigger
filters. Also drop the workflow-level write permissions: the default token
only reads, and writes go through the GitHub App token.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(security): remediate 3 Dependabot alerts

- github.com/containerd/containerd/v2 v2.3.5 -> v2.3.6 (cloudposse#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 (cloudposse#300, cloudposse#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 (cloudposse#297, cloudposse#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 <[email protected]>

* fix(security): remediate 4 more Dependabot alerts in website deps

- fast-uri 3.1.7 -> 3.1.8 via pnpm override (cloudposse#308, medium): inconsistent
  host case normalization via percent-encoded octets. Already resolved
  to 3.1.8 by the prior fast-uri fix in this branch -- bumping the
  override floor to document the real requirement rather than leaving
  it implicit.
- dompurify 3.4.14 -> 3.4.16 via pnpm override (cloudposse#309, low): detached
  subtree event handlers left armed after IN_PLACE sanitization.
- brace-expansion 1.1.18 -> 1.1.21 and 2.1.4 -> 2.1.7 via pnpm overrides
  (cloudposse#302-cloudposse#307, high/medium): three stacked DoS advisories per major line
  (uncontrolled recursion, then quadratic-time expansion).

All four are patch bumps within their existing major version, inside
dependabot.yml's semver-major ignore policy. NOTICE unchanged (no
license changes).

Not auto-fixed: three new CodeQL alerts (#6283-#6285, govulncheck
advisories GO-2022-0635/GO-2022-0646/GO-2026-5932 on deep transitive
deps -- aws-sdk-go's S3 Crypto SDK and x/crypto/openpgp usage) aren't
on this repo's established safe-fix-pattern list and need investigation
into which dependency actually pulls them in before attempting a fix.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5 <[email protected]>

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