Skip to content

feat(code-mappings): Add code-mappings upload command scaffold#3207

Merged
romtsn merged 6 commits intomasterfrom
rz/feat/code-mappings-scaffold
Mar 20, 2026
Merged

feat(code-mappings): Add code-mappings upload command scaffold#3207
romtsn merged 6 commits intomasterfrom
rz/feat/code-mappings-scaffold

Conversation

@romtsn
Copy link
Member

@romtsn romtsn commented Mar 12, 2026

#skip-changelog

Add the sentry-cli code-mappings upload subcommand group and the upload
subcommand with file parsing and validation.

This is the first in a stack of 4 PRs to support bulk uploading code mappings
from a JSON file — useful for Java/Android multi-module projects that need
dozens of mappings.

This PR adds:

  • Command scaffold following the repos/deploys pattern
  • JSON file reading and validation (empty arrays, empty stackRoot/sourceRoot)
  • CLI args: positional PATH, --repo, --default-branch
  • Help and no-subcommand trycmd integration tests

Stack: #3207#3208#3209#3210

Backend PRs: getsentry/sentry#109783, getsentry/sentry#109785, getsentry/sentry#109786

Closes getsentry/sentry-android-gradle-plugin#1076
Closes getsentry/sentry-android-gradle-plugin#1077

@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

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

Generated by 🚫 dangerJS against 387d605

Add a new `code-mappings` subcommand group with an `upload` subcommand
that reads and validates a JSON file of code mappings. This is the first
step toward CLI support for bulk code mapping uploads to Sentry.
@romtsn romtsn marked this pull request as ready for review March 12, 2026 12:08
@romtsn romtsn requested review from a team and szokeasaurusrex as code owners March 12, 2026 12:08
Copy link
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

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

I think we may want some more detailed help texts

Add descriptive help text explaining what code mappings are and how they
work. Replace unwrap with expect for the required path argument.

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

@cursor cursor bot left a comment

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.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@romtsn romtsn requested a review from szokeasaurusrex March 18, 2026 17:15
Copy link
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

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

lgtm, see comments before merge

CodeMapping is only deserialized from the input JSON file in this PR.
Serialize will be added back when needed in the API integration PR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@romtsn romtsn merged commit d893c9d into master Mar 20, 2026
26 checks passed
@romtsn romtsn deleted the rz/feat/code-mappings-scaffold branch March 20, 2026 21:26
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.

Implement mappings.json parsing and validation Add code-mappings upload command structure

2 participants