upload-debug-info-to-sentry.py: Upload binaries in addition to debug files#462
Conversation
…files This should provide better stack unwinding in Sentry.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe ELF processing loop now appends each discovered non‑Darwin binary to the upload list immediately, then attempts build-id extraction and debuginfo lookup. If no separate debuginfo is found, the script logs that and proceeds (the binary is already queued). ChangesBinary upload timing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
maintainers/upload-debug-info-to-sentry.py (1)
134-137:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winRemove duplicate append to prevent uploading the same binary twice.
Line 131 now unconditionally appends every library to the upload list. Line 136 appends the library again when there's no build ID, creating a duplicate entry in
files_to_upload. The duplicate will cause the same file to be uploaded twice to Sentry.🐛 Proposed fix to remove duplicate append
build_id = get_build_id(lib) if build_id is None: print(f" {lib} (no build ID, uploading binary)", file=sys.stderr) - debug_files.append(lib) continue🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@maintainers/upload-debug-info-to-sentry.py` around lines 134 - 137, The code is appending the same library twice to the upload list: one unconditional append earlier (files_to_upload or debug_files) and a second append in the no-build-id branch (debug_files.append(lib)); remove the duplicate by deleting the conditional append inside the if build_id is None block (or move the unconditional append into the else branch) so each library is added exactly once; update references to build_id, debug_files and files_to_upload accordingly to ensure only a single append happens per library.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@maintainers/upload-debug-info-to-sentry.py`:
- Around line 134-137: The code is appending the same library twice to the
upload list: one unconditional append earlier (files_to_upload or debug_files)
and a second append in the no-build-id branch (debug_files.append(lib)); remove
the duplicate by deleting the conditional append inside the if build_id is None
block (or move the unconditional append into the else branch) so each library is
added exactly once; update references to build_id, debug_files and
files_to_upload accordingly to ensure only a single append happens per library.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3801a0e4-70f4-4cab-8c96-fd25b69d6170
📒 Files selected for processing (1)
maintainers/upload-debug-info-to-sentry.py
Motivation
This should provide better stack unwinding in Sentry.
Context
Summary by CodeRabbit