Skip to content

fix(ci): Avoid release artifact collision#915

Open
canercidam wants to merge 3 commits intodevelopfrom
caner/avoid-release-artifact-collision
Open

fix(ci): Avoid release artifact collision#915
canercidam wants to merge 3 commits intodevelopfrom
caner/avoid-release-artifact-collision

Conversation

@canercidam
Copy link
Copy Markdown
Member

📝 Summary

Separate jobs/steps are writing the same rbuilder artifact. Previously the end result was a linux binary. And lately, it is a macOS binary.

This PR separates artifact writes by OS and arch, in *.tar.gz format.

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 13, 2026

Claude finished @canercidam's task in 2m 16s —— View job


Review of PR #915

  • Read the diff and changed file
  • Analyze for bugs, edge cases, and best practices
  • Post review feedback

The approach is sound — packaging each binary into a {bin}-{VERSION}-{TARGET}{features}.tar.gz and including target in the artifact name correctly eliminates the collision between Linux and macOS jobs.

Two inline comments posted:

  1. Loose glob in extraction step (line 307) — tar xzf rbuilder-*.tar.gz works today but is fragile. Suggested using the fully qualified filename instead.

  2. Inconsistent features suffix idiom (line 186) — the name fields use ${{ matrix.features && '-' }}${{ matrix.features }} while the new path fields use ${{ matrix.features && format('-{0}', matrix.features) || '' }}. These compute the same thing but maintaining two patterns increases the risk of a future mismatch. Consider unifying.

No blocking issues found.

if: steps.platform-check.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: rbuilder-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && '-' }}${{ matrix.features }}
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.

Nit: the artifact name field uses ${{ matrix.features && '-' }}${{ matrix.features }} (pre-existing pattern), while the new path fields use ${{ matrix.features && format('-{0}', matrix.features) || '' }}. These are functionally equivalent but maintaining two idioms for the same suffix is a readability/maintenance hazard. Consider unifying the name fields to also use format() for consistency.

@canercidam canercidam changed the title Avoid release artifact collision fix(ci): Avoid release artifact collision Apr 13, 2026
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 13, 2026

Claude finished @canercidam's task in 1m 30s —— View job


Review of PR #915 (re-review after new commits)

  • Read the updated diff and changed file
  • Analyze for bugs, edge cases, and best practices
  • Post review feedback

The second commit (6ccac13) addresses the glob concern from the first review — the extraction step now uses the fully qualified tarball filename instead of rbuilder-*.tar.gz. Good fix.

Remaining nit from first review (still applicable): The name fields still use ${{ matrix.features && '-' }}${{ matrix.features }} while the new path / env fields use ${{ matrix.features && format('-{0}', matrix.features) || '' }}. Functionally equivalent, but maintaining two idioms for the same suffix is a readability hazard. Not blocking.

No new issues found. The approach is correct — tarballs per {bin}-{VERSION}-{TARGET} eliminate the artifact collision, and downstream consumers (draft-release, docker build) are properly updated.

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 13, 2026

Claude finished @canercidam's task in 1m 53s —— View job


Review of PR #915 (re-review after latest commit)

  • Read the updated diff and changed file
  • Analyze for bugs, edge cases, and best practices
  • Post review feedback

The third commit (225ba57) simplifies the approach nicely — instead of creating .tar.gz archives, it renames the binaries in-place with {bin}-{VERSION}-{TARGET}{features} suffixes. This is cleaner and avoids the tar/extract ceremony.

The changes look correct:

  • The rename step properly handles missing binaries with [ -f "$bin" ] && mv (defensive, since the build step produces all 6).
  • The downstream build-docker-linux-amd64 job correctly resolves the renamed binary and renames it back to rbuilder before the Docker COPY.
  • The draft-release job with merge-multiple: true will now produce release assets with descriptive names (e.g., rbuilder-v1.0.0-x86_64-unknown-linux-gnu), which is an improvement.

One inline comment posted: the inconsistent features suffix idiom between name and path fields (carried forward from first review). Not blocking.

No new issues found.

if: steps.platform-check.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: rbuilder-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && '-' }}${{ matrix.features }}
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.

Nit (carried forward): The name fields still use the ${{ matrix.features && '-' }}${{ matrix.features }} idiom while path / env fields use ${{ matrix.features && format('-{0}', matrix.features) || '' }}. These are functionally equivalent but maintaining two patterns is a readability hazard. Consider unifying the name fields to also use format():

Suggested change
name: rbuilder-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && '-' }}${{ matrix.features }}
name: rbuilder-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && format('-{0}', matrix.features) || '' }}

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.

1 participant