Skip to content

Commit 8ad27a9

Browse files
chore(sourcemaps): Deprecate release bundle uploads (#2844)
### Description Deprecate release bundle uploads; new Sentry versions only have artifact bundles. While uploading release bundles is still possible, the server converts these to artifact bundles. More context on #2831. From Sentry CLI 3.0, Sentry CLI will only support uploading artifact bundles (see #2842). ### Issues - Resolves #2843 - Resolves [CLI-189](https://linear.app/getsentry/issue/CLI-189/deprecate-release-bundle-uploads) <!-- #### Reminders - Add GH Issue ID _&_ Linear ID (if applicable) - PR title should use [conventional commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type) style (`feat:`, `fix:`, `ref:`, `meta:`) - For external contributors: [CONTRIBUTING.md](https://github.com/getsentry/sentry-cli/blob/master/CONTRIBUTING.md), [Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord community](https://discord.gg/Ww9hbqr) -->
1 parent b867302 commit 8ad27a9

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
"You know what they say. Fool me once, strike one, but fool me twice... strike three." — Michael Scott
44

5+
## Unreleased
6+
7+
### Deprecations
8+
9+
- Added a deprecation notice for release bundle uploads, a legacy method for uploading sourcemaps ([#2844](https://github.com/getsentry/sentry-cli/pull/2844)). Release bundle uploads will be removed in Sentry CLI 3.x in favor of artifact bundles, the newer sourcemap upload method [introduced in Sentry version 23.6.2](https://github.com/getsentry/sentry/commit/f90f764fda09575f3f94caf32d04589098384616). **Self-hosted users**: You must upgrade to Sentry 23.6.2 or later before upgrading to Sentry CLI 3.x.
10+
511
## 2.56.1
612

713
### Deprecations

src/api/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,7 @@ impl<'a> AuthenticatedApi<'a> {
992992
.convert_rnf(ApiErrorKind::ProjectNotFound)
993993
}
994994

995+
#[deprecated = "release bundle uploads are deprecated in favor of artifact bundle uploads"]
995996
pub fn assemble_release_artifacts(
996997
&self,
997998
org: &str,

src/utils/file_upload.rs

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -538,12 +538,31 @@ fn poll_assemble(
538538

539539
let api = Api::current();
540540
let authenticated_api = api.authenticated()?;
541-
let artifact_bundle_projects = {
542-
(options.supports(ChunkUploadCapability::ArtifactBundles)
543-
|| options.supports(ChunkUploadCapability::ArtifactBundlesV2))
541+
542+
let server_supports_artifact_bundles = options.supports(ChunkUploadCapability::ArtifactBundles)
543+
|| options.supports(ChunkUploadCapability::ArtifactBundlesV2);
544+
545+
if !server_supports_artifact_bundles {
546+
log::warn!(
547+
"[DEPRECATION NOTICE] Your Sentry server does not support artifact bundle \
548+
uploads. Falling back to deprecated release bundle upload. Support for this \
549+
deprecated upload method will be removed in Sentry CLI 3.0.0. Please upgrade your \
550+
Sentry server, or if you cannot upgrade, pin your Sentry CLI version to 2.x, so \
551+
you don't get upgraded to 3.x when it is released."
552+
);
553+
}
554+
555+
// We fall back to legacy release upload if server lacks artifact bundle support, or if
556+
// no projects are specified. context.projects has Some(projects) in all cases, besides
557+
// the following:
558+
// - For `files upload`, we can have None projects. We don't need a separate warning,
559+
// because `files upload` is already deprecated.
560+
// - For `debug-files bundle-jvm`, but although that codepath uses the `UploadContext`,
561+
// it does not actually use it to perform an upload, so we never hit this codepath.
562+
let artifact_bundle_projects = server_supports_artifact_bundles
544563
.then_some(context.projects)
545-
.flatten()
546-
};
564+
.flatten();
565+
547566
let response = loop {
548567
// prefer standalone artifact bundle upload over legacy release based upload
549568
let response = if let Some(projects) = artifact_bundle_projects {
@@ -556,6 +575,7 @@ fn poll_assemble(
556575
context.dist,
557576
)?
558577
} else {
578+
#[expect(deprecated, reason = "fallback to legacy upload")]
559579
authenticated_api.assemble_release_artifacts(
560580
context.org,
561581
context.release()?,

0 commit comments

Comments
 (0)