Skip to content

Commit a0961a1

Browse files
runningcodeclaude
andcommitted
fix: lower log level for missing base ref detection (EME-369)
Changes the logging level from warn to info when failing to detect base branch reference in build uploads. This reduces noise in build logs for common scenarios including detached HEAD states in PRs and main/master branch builds where base ref detection failures are expected. Also removes --log-level=error from all build upload tests and updates test expectations to include the experimental warning that is now visible. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5b1fb22 commit a0961a1

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)