Skip to content

Commit 2229943

Browse files
runningcodeclaude
andauthored
fix: lower log level for missing base ref detection (EME-369) (#2813)
## Summary Lowers the logging level from `warn` to `info` when failing to detect base branch reference in build uploads. ## Why The warning message confuses users as it appears even in cases where we don't expect there to be a base reference (detached HEAD states, main/master builds, etc.). Changing to info level keeps the message available for debugging while hiding it by default. ## Changes - Changed `warn!` to `info!` in base ref detection error handling - Removed `--log-level=error` from build upload tests to ensure info messages work correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Lower base-ref detection logging to info and update build upload trycmd tests to remove log-level flag and assert experimental warning output. > > - **Build upload**: > - Lower log level from `warn!` to `info!` when failing to detect base branch reference in `src/commands/build/upload.rs`. > - **Tests**: > - Update `trycmd` cases (`tests/integration/_cases/build/*`) to remove `--log-level=error` and expect the experimental warning line in output. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a0961a1. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 087d7f8 commit 2229943

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

src/commands/build/upload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
192192
Some(base_ref_name)
193193
}
194194
Err(e) => {
195-
warn!("Could not detect base branch reference: {}", e);
195+
info!("Could not detect base branch reference: {}", e);
196196
None
197197
}
198198
})

tests/integration/_cases/build/build-upload-apk-all-uploaded.trycmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
```
2-
$ sentry-cli build upload tests/integration/_fixtures/build/apk.apk --log-level=error
2+
$ sentry-cli build upload tests/integration/_fixtures/build/apk.apk
33
? success
4+
WARN [..] EXPERIMENTAL: The build subcommand is experimental. The command is subject to breaking changes and may be removed without notice in any release.
45
Successfully uploaded 1 file to Sentry
56
- tests/integration/_fixtures/build/apk.apk (http[..]/wat-org/preprod/wat-project/42)
67

tests/integration/_cases/build/build-upload-apk-no-token.trycmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
```
2-
$ sentry-cli build upload tests/integration/_fixtures/build/apk.apk --log-level=error
2+
$ sentry-cli build upload tests/integration/_fixtures/build/apk.apk
33
? failed
4+
WARN [..] EXPERIMENTAL: The build subcommand is experimental. The command is subject to breaking changes and may be removed without notice in any release.
45
error: Auth token is required for this request. Please run `sentry-cli login` and try again!
56

67
Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.

tests/integration/_cases/build/build-upload-apk.trycmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
```
2-
$ sentry-cli build upload tests/integration/_fixtures/build/apk.apk --head-sha test_head_sha --log-level=error
2+
$ sentry-cli build upload tests/integration/_fixtures/build/apk.apk --head-sha test_head_sha
33
? success
4+
WARN [..] EXPERIMENTAL: The build subcommand is experimental. The command is subject to breaking changes and may be removed without notice in any release.
45
Successfully uploaded 1 file to Sentry
56
- tests/integration/_fixtures/build/apk.apk (http[..]/wat-org/preprod/wat-project/42)
67

tests/integration/_cases/build/build-upload-ipa.trycmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
```
2-
$ sentry-cli build upload tests/integration/_fixtures/build/ipa.ipa --head-sha test_head_sha --log-level=error
2+
$ sentry-cli build upload tests/integration/_fixtures/build/ipa.ipa --head-sha test_head_sha
33
? success
4+
WARN [..] EXPERIMENTAL: The build subcommand is experimental. The command is subject to breaking changes and may be removed without notice in any release.
45
Successfully uploaded 1 file to Sentry
56
- tests/integration/_fixtures/build/ipa.ipa (http[..]/wat-org/preprod/wat-project/some-text-id)
67

0 commit comments

Comments
 (0)