Skip to content

Fix CI release build failures in Sentry debug symbol steps#175

Merged
fernandotonon merged 2 commits intomasterfrom
fix/ci-release-and-review-fixes
Mar 6, 2026
Merged

Fix CI release build failures in Sentry debug symbol steps#175
fernandotonon merged 2 commits intomasterfrom
fix/ci-release-and-review-fixes

Conversation

@fernandotonon
Copy link
Owner

@fernandotonon fernandotonon commented Mar 6, 2026

Summary

  • Linux: Add sudo to objcopy/strip commands (binary is owned by root from sudo make install)
  • macOS: Add sudo to dsymutil/strip commands (same root ownership issue)
  • Windows: Download sentry-cli binary directly instead of npm install -g @sentry/cli (the PATH override excluded Node.js, causing npm: not recognized error)

These failures only occur on release events (tag creation) since the Sentry debug symbol upload steps are gated by if: github.event_name == 'release'.

Test plan

  • Merge and create a new release tag to verify all 3 platforms build successfully

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Streamlined deployment pipeline for Windows, Linux, and macOS.
    • More reliable debug-symbol extraction and upload flow.
    • Switched to a simpler, more robust CLI installation and invocation during deploy.
    • Ensured symbol handling runs with appropriate elevated permissions for consistent results across platforms.

- Linux: Add sudo to objcopy/strip (binary owned by root from sudo make)
- macOS: Add sudo to dsymutil/strip (same root ownership issue)
- Windows: Download sentry-cli binary directly instead of npm install
  (PATH override excluded Node.js, causing npm not found error)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

📝 Walkthrough

Walkthrough

The PR updates the CI/CD deploy workflow (.github/workflows/deploy.yml) to change how Sentry CLI is installed (curl/URL instead of npm), adjusts debug-symbol extraction/stripping commands across Windows, Linux, and macOS, and adds sudo where required for symbol tooling and cleanup.

Changes

Cohort / File(s) Summary
CI/CD Workflow
​.github/workflows/deploy.yml
Replaced npm-based sentry-cli install with curl/URL installers and bash/PowerShell variants; Windows uses mingw-specific strip and a direct copy path; Linux/macOS symbol tooling (objcopy, strip, dsymutil, add-gnu-debuglink) are invoked with sudo; cleanup commands updated to use rm/sudo rm and explicit removal of downloaded CLI.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions Runner
  participant Build as Build Environment (Windows/Linux/macOS)
  participant Sentry as Sentry (sentry-cli)
  participant Art as Artifact Storage

  GH->>Build: run build & produce binary + debug file
  Note right of Build: on Windows: use mingw-strip, copy\non Linux/macOS: objcopy/strip/dsymutil with sudo
  Build->>Build: install sentry-cli via curl (or PowerShell script)
  Build->>Sentry: upload debug symbols (sentry-cli)
  Sentry->>Art: store symbol artifact
  Build->>Build: cleanup (rm / sudo rm) and remove sentry-cli
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 I hopped through CI with a curl and a grin,

Stripped the symbols, tucked the debug in.
No npm fuss, just a nimble CLI,
Uploading secrets to Sentry sky—
A tiny rabbit's deploy delight. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing CI release build failures related to Sentry debug symbol steps.
Description check ✅ Passed The description follows the required template with Summary and Technical Details sections, clearly explaining the fixes for Linux, macOS, and Windows, including the root cause of each failure.
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
  • Commit unit tests in branch fix/ci-release-and-review-fixes

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

Copy link

@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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/deploy.yml:
- Around line 246-247: The workflow currently downloads an unpinned sentry-cli
binary and executes it (see the Invoke-WebRequest call and the subsequent call
to "${{github.workspace}}/sentry-cli.exe"); replace this with a safe install:
either install `@sentry/cli` via npm (use npm install -g `@sentry/cli` and invoke
sentry-cli from PATH) or use the official getsentry/action-release GitHub
Action, or if you must download a binary keep it pinned to a specific release
and add a checksum verification step against the GitHub release checksum before
executing the downloaded sentry-cli.exe to mitigate supply-chain risk.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a4375833-0d5c-4ed8-8166-2979fda084b0

📥 Commits

Reviewing files that changed from the base of the PR and between a9fda71 and 40e375a.

📒 Files selected for processing (1)
  • .github/workflows/deploy.yml

Address CodeRabbit review: replace unpinned binary download with the
same curl-based install used by Linux/macOS (via Git Bash on Windows).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@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.

♻️ Duplicate comments (1)
.github/workflows/deploy.yml (1)

243-248: ⚠️ Potential issue | 🟠 Major

Pin and verify sentry-cli instead of piping a remote installer script.

Line 245 still runs curl -sL https://sentry.io/get-cli/ | bash, which is unpinned and unverified. This is a supply-chain/reproducibility risk (same pattern also exists at Line 511, Line 1208, and Line 1440).

🔐 Proposed hardening (Windows step example)
-        curl -sL https://sentry.io/get-cli/ | bash
-        sentry-cli debug-files upload --include-sources "${{github.workspace}}/bin/QtMeshEditor.debug.exe"
+        SENTRY_CLI_VERSION="2.57.0"
+        SENTRY_CLI_ASSET="sentry-cli-Windows-x86_64.exe"
+        SENTRY_CLI_URL="https://github.com/getsentry/sentry-cli/releases/download/${SENTRY_CLI_VERSION}/${SENTRY_CLI_ASSET}"
+        curl -fsSL -o "${{github.workspace}}/sentry-cli.exe" "$SENTRY_CLI_URL"
+        echo "<sha256-from-release-page>  ${{github.workspace}}/sentry-cli.exe" | sha256sum --check -
+        "${{github.workspace}}/sentry-cli.exe" debug-files upload --include-sources "${{github.workspace}}/bin/QtMeshEditor.debug.exe"
Sentry CLI GitHub Actions installation: what is the recommended way to pin a specific version and verify SHA256 checksums for Windows, Linux, and macOS binaries?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy.yml around lines 243 - 248, Replace the unpinned
piped installer ("curl -sL https://sentry.io/get-cli/ | bash") with a pinned,
verified download of a specific sentry-cli release and checksum verification
before executing; specifically, fetch a named release artifact (or use
actions/download-release) for the desired version, verify its SHA256 against a
checked-in or upstream-trusted checksum, then unpack/install and ensure the
installed binary is on PATH so the subsequent sentry-cli debug-files upload call
still works; apply the same change for the other occurrences referenced (the
steps invoking curl | bash near the sentry-cli invocation and the uses of
sentry-cli debug-files upload).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @.github/workflows/deploy.yml:
- Around line 243-248: Replace the unpinned piped installer ("curl -sL
https://sentry.io/get-cli/ | bash") with a pinned, verified download of a
specific sentry-cli release and checksum verification before executing;
specifically, fetch a named release artifact (or use actions/download-release)
for the desired version, verify its SHA256 against a checked-in or
upstream-trusted checksum, then unpack/install and ensure the installed binary
is on PATH so the subsequent sentry-cli debug-files upload call still works;
apply the same change for the other occurrences referenced (the steps invoking
curl | bash near the sentry-cli invocation and the uses of sentry-cli
debug-files upload).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cf320bc4-034f-4423-9267-971b494c2325

📥 Commits

Reviewing files that changed from the base of the PR and between 40e375a and d0c3ffa.

📒 Files selected for processing (1)
  • .github/workflows/deploy.yml

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 6, 2026

@fernandotonon fernandotonon merged commit 6588ce5 into master Mar 6, 2026
15 checks passed
@fernandotonon fernandotonon deleted the fix/ci-release-and-review-fixes branch March 6, 2026 00:57
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