Skip to content

Add retry field to workflow step schema#2114

Merged
osterman merged 4 commits intocloudposse:mainfrom
utafrali:fix/issue-2112-schema-error-with-schema-not-recognizing
Mar 1, 2026
Merged

Add retry field to workflow step schema#2114
osterman merged 4 commits intocloudposse:mainfrom
utafrali:fix/issue-2112-schema-error-with-schema-not-recognizing

Conversation

@utafrali
Copy link
Contributor

@utafrali utafrali commented Feb 26, 2026

Adds retry field support to workflow steps with a new workflow_retry schema defining retry behavior (max attempts, backoff strategy, delay config). Fixes #2112.

Summary by CodeRabbit

New Features

  • Workflow steps now support optional retry configuration with control over maximum attempts, initial and maximum delays, backoff strategies (constant, linear, exponential), delay multiplier, random jitter, and total elapsed time limits.

… to workflow step schema

Add a `workflow_retry` definition to the atmos manifest JSON schema and
reference it as the `retry` property in workflow step items. This matches
the existing `WorkflowStep.Retry` field in the Go struct. Without this,
schema validation would reject any workflow file using `retry` in steps
with an "additionalProperties 'retry' not allowed" error.
@utafrali utafrali requested a review from a team as a code owner February 26, 2026 20:28
@github-actions github-actions bot added the size/m Medium size PR label Feb 26, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

📝 Walkthrough

Walkthrough

Updated the Atmos manifest JSON schema to support retry configuration in workflow steps by introducing a new workflow_retry definition and adding a retry property to workflow step objects in both test fixtures and website schemas.

Changes

Cohort / File(s) Summary
Schema Updates
tests/fixtures/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json, website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
Added workflow_retry definition supporting either string pattern (^!include) or object with retry config (max_attempts, initial_delay, max_delay, backoff_strategy, multiplier, random_jitter, max_elapsed_time). Updated workflow_manifest steps to include optional retry property referencing the new definition.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • PR #1373: Implements RetryConfig types and retry logic for workflow step execution, directly corresponding to this schema addition.

Suggested labels

minor

Suggested reviewers

  • osterman
  • mcalhoun
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add retry field to workflow step schema' directly and clearly describes the main change in the PR.
Linked Issues check ✅ Passed The PR implements the complete solution for issue #2112 by adding the workflow_retry definition and updating workflow_step to support the retry property.
Out of Scope Changes check ✅ Passed All changes are scoped to adding the workflow_retry schema definition and retry property to workflow steps, directly addressing issue #2112.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json (1)

1403-1456: Consider reusing a shared retry schema to avoid drift.

workflow_retry mirrors source_retry. Reusing one shared definition keeps future updates safer and leaner.

Proposed refactor
-                      "retry": {
-                        "$ref": "#/definitions/workflow_retry"
-                      }
+                      "retry": {
+                        "$ref": "#/definitions/source_retry"
+                      }

Then remove definitions.workflow_retry (Line 1403-Line 1456) if no workflow-specific divergence is needed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json` around
lines 1403 - 1456, The workflow_retry schema duplicates source_retry; replace
the duplicated definition by removing definitions.workflow_retry and instead add
a $ref to the shared definitions.source_retry wherever workflow_retry is
referenced (keep the existing oneOf semantics by referencing the shared schema
which should include the same string-or-object shape); update any places that
reference workflow_retry to point to the shared definition (use "$ref":
"#/definitions/source_retry") and ensure no workflow-specific properties
remain—delete the workflow_retry block (definitions.workflow_retry) if there is
no divergence.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json`:
- Around line 1403-1456: The workflow_retry schema duplicates source_retry;
replace the duplicated definition by removing definitions.workflow_retry and
instead add a $ref to the shared definitions.source_retry wherever
workflow_retry is referenced (keep the existing oneOf semantics by referencing
the shared schema which should include the same string-or-object shape); update
any places that reference workflow_retry to point to the shared definition (use
"$ref": "#/definitions/source_retry") and ensure no workflow-specific properties
remain—delete the workflow_retry block (definitions.workflow_retry) if there is
no divergence.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e7ad9a5 and 47bba0f.

📒 Files selected for processing (2)
  • tests/fixtures/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
  • website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json

@osterman osterman added the patch A minor, backward compatible change label Feb 26, 2026
@osterman osterman enabled auto-merge (squash) February 26, 2026 21:10
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.53%. Comparing base (5009216) to head (33c9b42).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2114   +/-   ##
=======================================
  Coverage   76.53%   76.53%           
=======================================
  Files         832      832           
  Lines       79407    79407           
=======================================
+ Hits        60772    60777    +5     
+ Misses      14842    14838    -4     
+ Partials     3793     3792    -1     
Flag Coverage Δ
unittests 76.53% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@utafrali
Copy link
Contributor Author

utafrali commented Mar 1, 2026

Thanks for the review @osterman! Let me know if there's anything else needed to get this merged.

@osterman osterman merged commit d30448e into cloudposse:main Mar 1, 2026
56 checks passed
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

These changes were released in v1.208.0.

goruha added a commit that referenced this pull request Mar 9, 2026
…raform-plan

* osterman/native-ci-terraform: (28 commits)
  feat: Add source cache TTL for JIT-vendored components (#2138)
  feat: Per-target version overrides in vendor manifests (#2141)
  docs: Add PRD for browser-based auth in aws/user identity (#1887)
  docs: Add EKS kubeconfig authentication integration PRD (#1884)
  fix: correct marketplace.json schema and update docs with install/uninstall commands (#2142)
  fix: propagate auth to all YAML functions in multi-component execution (#2140)
  fix: Use atmos_component for source provisioner workdir paths (#2137)
  Fix identity prompts to respect --interactive flag (#2130)
  Increase PR size thresholds to accommodate AI-assisted development (#2136)
  docs: Add Azure authentication provider documentation (#2132)
  fix: propagate component-type level dependencies through stack processor (#2127)
  fix: Add retry and missing workflow step properties to all schema copies (#2113)
  Exclude unsupported windows/arm from goreleaser build matrix (#2133)
  Add AI Agent Skills for LLM-Powered Infrastructure Development (#2121)
  Fix: Convert toolchain paths to absolute in PATH to resolve exec.LookPath failures (#2095)
  Fix workdir collision for component instances sharing base component (#2093)
  fix(auth): propagate TTY state to subprocesses for SSO device flow in workflows (#2126)
  fix(security): prevent SSRF in GitHub OIDC token URL handling (CWE-918) (#2106)
  Fix #2112: add workflow_retry definition and retry property to workflow step schema (#2114)
  fix(auth): auto-detect GitHub Actions WIF with proper audience, host validation, and lazy GSM init (#2109)
  ...
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

These changes were released in v1.208.1-test.9.

@github-actions
Copy link

github-actions bot commented Mar 9, 2026

These changes were released in v1.208.1-test.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch A minor, backward compatible change size/m Medium size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schema: error with schema not recognizing retry in workflows

2 participants