Skip to content

feat(iOS): Add sentry plugin to Gemfile + use debug upload - #1113

Open
itaybre wants to merge 5 commits into
masterfrom
itay/add_gemfile_dependency
Open

feat(iOS): Add sentry plugin to Gemfile + use debug upload#1113
itaybre wants to merge 5 commits into
masterfrom
itay/add_gemfile_dependency

Conversation

@itaybre

@itaybre itaybre commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

Changes:

  • Uses sentry_debug_files_upload instead of sentry_cli in fastlane as per our guides
  • Adds Sentry plugin to Gemfile after adding it to fastlane.

@github-actions

github-actions Bot commented Nov 14, 2025

Copy link
Copy Markdown
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against a0561cf

@codecov

codecov Bot commented Nov 14, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.31579% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.67%. Comparing base (62c6868) to head (a1af87a).

Files with missing lines Patch % Lines
src/apple/configure-fastlane.ts 0.00% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1113      +/-   ##
==========================================
+ Coverage   32.47%   32.67%   +0.20%     
==========================================
  Files         133      134       +1     
  Lines       15695    15769      +74     
  Branches     1106     1120      +14     
==========================================
+ Hits         5097     5153      +56     
- Misses      10581    10599      +18     
  Partials       17       17              
Flag Coverage Δ
unit-tests 32.67% <76.31%> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cursor cursor Bot left a comment

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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3415c60. Configure here.

const shouldAddGemfile = await clack.confirm({
message:
'Found a Gemfile in your project. Do you want to add the fastlane-plugin-sentry gem to your Gemfile?',
});

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.

Missing Gemfile existence check

Medium Severity

The Gemfile prompt always claims a Gemfile was found and asks to edit it, but never checks with gemFile first. Unlike the Fastfile flow above, projects without a Gemfile get a misleading prompt; accepting it then hits the failure path in addSentryPluginToGemfile.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3415c60. Configure here.

Comment on lines 44 to +50
if (added) {
debug(`Gemfile found, asking user if they want to configure Gemfile`);
const shouldAddGemfile = await clack.confirm({
message:
'Found a Gemfile in your project. Do you want to add the fastlane-plugin-sentry gem to your Gemfile?',
});
debug(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The Gemfile prompt is shown without checking if a Gemfile exists and does not correctly handle cancellation, leading to misleading messages and unexpected behavior.
Severity: MEDIUM

Suggested Fix

First, check for the existence of a Gemfile using gemFile(projectDir) before showing the prompt. Only prompt the user if a Gemfile is found. Second, wrap the clack.confirm call with the abortIfCancelled utility to ensure that user cancellation (e.g., via Ctrl+C) correctly terminates the wizard instead of proceeding with a faulty truthy value.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: src/apple/configure-fastlane.ts#L44-L50

Potential issue: The wizard unconditionally prompts the user with 'Found a Gemfile in
your project...' without first verifying that a `Gemfile` actually exists. If the user
agrees to add the gem but no `Gemfile` is present, the process fails and displays a
misleading warning: 'Could not edit your Gemfile...'. Additionally, if the user cancels
this prompt (e.g., by pressing Ctrl+C), the cancellation is not handled correctly. The
`clack.confirm` call is not wrapped in `abortIfCancelled`, causing its `Symbol` return
value to be treated as `true`, which leads to an unintended attempt to modify the
non-existent file.

Did we get this right? 👍 / 👎 to inform future reviews.

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