sentry-cli icon indicating copy to clipboard operation
sentry-cli copied to clipboard

Improve CLI default for auto uploading commits

Open smeubank opened this issue 10 months ago • 0 comments

Problem Statement

Currently, when setting commits via sentry-cli, and related tools [webpack-plugin], users must explicitly enable commit-tracking functionality by calling set-commits --auto, or by manually specifying commit ranges. This leads to several issues:

Not On by Default: users miss features like suspect commits and PR comments Inconsistent Error Handling: cli does not fail gracefully when there is a failure in uploading commits Not prio'd in docs: if it is a config feature then we must promote it in docs and our wizards to set the config for users more clearly

Suggested Solution

Enable Commit Auto-Association by Default

Modify the default behavior of sentry-cli (or each Sentry integration) to attempt to upload commits automatically. If no Git repository is detected, gracefully log a warning and continue rather than exiting with an error code. Improve Error Messaging

Plugin & CI/CD Integration

Each official Sentry build plugin (Xcode, Gradle, Java, Kotlin, Flutter, React Native, etc.) should inherit improved error handling and default to automatic commit uploads. If the tool detects an environment that is missing .git (e.g., certain Docker or serverless environments), it should log a warning rather than fail. Checklist of Tools/Plugins and Next Steps

  • [ ] https://github.com/getsentry/sentry-react-native/issues/4611
  • [ ] Maven
  • [ ] Gradle
  • [ ] Xcode
  • [x] Webpack
  • [x] Vite
  • [x] Rollup
  • [x] Esbuild
  • [ ] GitHub Action

smeubank avatar Mar 06 '25 09:03 smeubank