Skip to content

fix(ci): harden setup-env uv sync retry path - #371

Merged
c-vigo merged 3 commits into
release/0.3.1from
bugfix/370-release-test-image-uv-sync-segfault
Mar 19, 2026
Merged

c-vigo merged 3 commits into
release/0.3.1from
bugfix/370-release-test-image-uv-sync-segfault

Conversation

@c-vigo

@c-vigo c-vigo commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Description

Fix release pipeline instability where uv sync --frozen --all-extras crashes with exit 139 during test-image setup after a prior setup run in the same job.

Type of Change

  • fix -- Bug fix
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • .github/actions/setup-env/action.yml
    • Replace one-shot uv sync with guarded execution that captures failure exit code
    • On failure, clear uv cache and remove stale .venv, then retry uv sync once
  • CHANGELOG.md
    • Add 0.3.1 Fixed entry for issue #370
  • assets/workspace/.devcontainer/CHANGELOG.md
    • Sync generated changelog copy via manifest hook

Changelog Entry

Fixed

  • Release test-image setup now recovers from uv sync crashes (#370)
    • Harden .github/actions/setup-env/action.yml to retry uv sync --frozen --all-extras once after clearing uv cache and removing stale .venv
    • Prevent repeat release test failures when setup-env is executed multiple times in the same job

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

N/A

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Target base branch for this PR is release/0.3.1.

Refs: #370

@c-vigo c-vigo self-assigned this Mar 19, 2026
@c-vigo
c-vigo requested a review from Copilot March 19, 2026 11:23

Copilot AI 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.

Pull request overview

This PR hardens the CI setup-env composite action to reduce release pipeline flakiness caused by intermittent uv sync --frozen --all-extras crashes when setup-env is executed multiple times in the same job (issue #370), and documents the fix in the changelog for the 0.3.1 release branch.

Changes:

  • Add a guarded uv sync execution path that retries once after clearing uv cache and removing .venv on failure.
  • Add a 0.3.1 changelog entry documenting the release pipeline stabilization for test-image setup.
  • Mirror the changelog entry into the workspace template’s synced .devcontainer/CHANGELOG.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/actions/setup-env/action.yml Adds a one-time retry path for uv sync after cache + venv cleanup to mitigate exit-139 crashes.
CHANGELOG.md Documents the fix under 0.3.1 (Fixed) with reference to #370.
assets/workspace/.devcontainer/CHANGELOG.md Keeps the workspace-template changelog copy in sync with the root changelog entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/actions/setup-env/action.yml Resolved
@c-vigo
c-vigo merged commit 298e397 into release/0.3.1 Mar 19, 2026
12 checks passed
@c-vigo
c-vigo deleted the bugfix/370-release-test-image-uv-sync-segfault branch March 19, 2026 12:41
c-vigo added a commit that referenced this pull request Mar 19, 2026
## Description

Fixes a release pipeline regression where `setup-env` could crash with
exit 139 when invoked multiple times in the same job.
The retry-helper `BASH_ENV` merge now avoids self-referencing recursion,
and changelogs are updated for issue tracking on release `0.3.1`.

## Type of Change

- [ ] `feat` -- New feature
- [x] `fix` -- Bug fix
- [ ] `docs` -- Documentation only
- [ ] `chore` -- Maintenance task (deps, config, etc.)
- [ ] `refactor` -- Code restructuring (no behavior change)
- [ ] `test` -- Adding or updating tests
- [ ] `ci` -- CI/CD pipeline changes
- [ ] `build` -- Build system or dependency changes
- [ ] `revert` -- Reverts a previous commit
- [ ] `style` -- Code style (formatting, whitespace)

### Modifiers

- [ ] Breaking change (`!`) -- This change breaks backward compatibility

## Changes Made

- `.github/actions/setup-env/action.yml`
- Add guard to skip retry-helper merge when `PREV_BASH_ENV` already
equals `RETRY_HELPER`
- Prevent `setup-env-retry.sh` from sourcing itself recursively on
repeated setup invocations
- `CHANGELOG.md`
  - Add `Fixed` entry for issue `#374` in `## [0.3.1] - TBD`
- `assets/workspace/.devcontainer/CHANGELOG.md`
  - Sync mirrored changelog entry for issue `#374`

## Changelog Entry

### Fixed

- **Release setup-env no longer self-sources retry helper via BASH_ENV**
([#374](#374))
- Guard the retry-helper merge logic in
`.github/actions/setup-env/action.yml` to skip merging when
`PREV_BASH_ENV` already equals `RETRY_HELPER`
- Prevent infinite `source` recursion and exit 139 crashes when
`setup-env` is invoked multiple times in one job

## Testing

- [ ] Tests pass locally (`just test`)
- [ ] Manual testing performed (describe below)

### Manual Testing Details

N/A

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly (edit
`docs/templates/`, then run `just docs`)
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and
pasted the entry above)
- [x] My changes generate no new warnings or errors
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Additional Notes

This addresses a regression chain related to the earlier `uv sync`
stabilization work in `#370`/`#371`; root cause and implementation plan
were documented on issue `#374` comments before this patch.

Refs: #374, #370
@c-vigo c-vigo mentioned this pull request Aug 13, 2026
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