Skip to content

fix(ci): handle non-zero exit code in SDK version bump workflow#1381

Merged
jeremyeder merged 1 commit intomainfrom
fix/sdk-version-bump-exit-code
Apr 21, 2026
Merged

fix(ci): handle non-zero exit code in SDK version bump workflow#1381
jeremyeder merged 1 commit intomainfrom
fix/sdk-version-bump-exit-code

Conversation

@jeremyeder
Copy link
Copy Markdown
Contributor

@jeremyeder jeremyeder commented Apr 21, 2026

Summary

  • SDK version bump workflow has been failing daily since at least April 17
  • Root cause: GitHub Actions' set -e aborts the shell when the Python check script exits with code 2 (meaning "updates available"), before EXIT_CODE=$? can capture it
  • Fix: initialize EXIT_CODE=0 and use || EXIT_CODE=$? to safely capture non-zero exits

Pending SDK updates once this lands and the workflow re-runs:

  • claude-agent-sdk: 0.1.50 → 0.1.64
  • anthropic: 0.88.0 → 0.96.0

Test plan

  • Merge and trigger SDK Version Bump workflow manually
  • Verify it creates a PR bumping the two SDK versions

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Improved error handling in the SDK version update checking workflow to better capture and report script exit statuses.

GitHub Actions defaults to `set -e`, so when the check script exits
with code 2 (updates available), the shell aborts before capturing
`$?`. This has caused the workflow to fail every day since at least
April 17.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 21, 2026

Deploy Preview for cheerful-kitten-f556a0 canceled.

Name Link
🔨 Latest commit d441d54
🔍 Latest deploy log https://app.netlify.com/projects/cheerful-kitten-f556a0/deploys/69e7b2d324052f00096f91da

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 819919d9-3563-481b-bd00-ec5fcb1eb2d6

📥 Commits

Reviewing files that changed from the base of the PR and between 2270790 and d441d54.

📒 Files selected for processing (1)
  • .github/workflows/sdk-version-bump.yml

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting


📝 Walkthrough

Walkthrough

Modified GitHub Actions workflow to gracefully capture script exit codes without immediate step failure, enabling conditional logic evaluation based on the script's exit status.

Changes

Cohort / File(s) Summary
Workflow Configuration
.github/workflows/sdk-version-bump.yml
Updated "Check for SDK updates" step to initialize EXIT_CODE to 0 and capture script exit code via || EXIT_CODE=$? pattern, allowing conditional logic to evaluate results instead of failing immediately on nonzero exit.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sdk-version-bump-exit-code
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/sdk-version-bump-exit-code

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

@jeremyeder jeremyeder merged commit 9cfa6cf into main Apr 21, 2026
16 of 19 checks passed
@jeremyeder jeremyeder deleted the fix/sdk-version-bump-exit-code branch April 21, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant