Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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

## Unreleased

### Deprecations

- 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.

## 2.56.1

### Deprecations
Expand Down
1 change: 1 addition & 0 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,7 @@ impl<'a> AuthenticatedApi<'a> {
.convert_rnf(ApiErrorKind::ProjectNotFound)
}

#[deprecated = "release bundle uploads are deprecated in favor of artifact bundle uploads"]
pub fn assemble_release_artifacts(
&self,
org: &str,
Expand Down
30 changes: 25 additions & 5 deletions src/utils/file_upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,12 +538,31 @@ fn poll_assemble(

let api = Api::current();
let authenticated_api = api.authenticated()?;
let artifact_bundle_projects = {
(options.supports(ChunkUploadCapability::ArtifactBundles)
|| options.supports(ChunkUploadCapability::ArtifactBundlesV2))

let server_supports_artifact_bundles = options.supports(ChunkUploadCapability::ArtifactBundles)
|| options.supports(ChunkUploadCapability::ArtifactBundlesV2);

if !server_supports_artifact_bundles {
log::warn!(
"[DEPRECATION NOTICE] Your Sentry server does not support artifact bundle \
uploads. Falling back to deprecated release bundle upload. Support for this \
deprecated upload method will be removed in Sentry CLI 3.0.0. Please upgrade your \
Sentry server, or if you cannot upgrade, pin your Sentry CLI version to 2.x, so \
you don't get upgraded to 3.x when it is released."
);
}

// We fall back to legacy release upload if server lacks artifact bundle support, or if
// no projects are specified. context.projects has Some(projects) in all cases, besides
// the following:
// - For `files upload`, we can have None projects. We don't need a separate warning,
// because `files upload` is already deprecated.
// - For `debug-files bundle-jvm`, but although that codepath uses the `UploadContext`,
// it does not actually use it to perform an upload, so we never hit this codepath.
let artifact_bundle_projects = server_supports_artifact_bundles
.then_some(context.projects)
.flatten()
};
.flatten();

let response = loop {
// prefer standalone artifact bundle upload over legacy release based upload
let response = if let Some(projects) = artifact_bundle_projects {
Expand All @@ -556,6 +575,7 @@ fn poll_assemble(
context.dist,
)?
} else {
#[expect(deprecated, reason = "fallback to legacy upload")]
authenticated_api.assemble_release_artifacts(
context.org,
context.release()?,
Expand Down