Skip to content

Commit 9918aaa

Browse files
feat(proguard): Remove release association arguments
Remove the `--app-id`, `--version`, and `--version-code` arguments to the `sentry-cli upload-proguard` command. Users currently using these arguments should simply stop using them. This change also removes any code that had been called when these flags were specified. Resolves #2868 Resolves [CLI-197](https://linear.app/getsentry/issue/CLI-197/remove-flags-for-setting-release)
1 parent 8a1bb73 commit 9918aaa

File tree

4 files changed

+8
-128
lines changed

4 files changed

+8
-128
lines changed

CHANGELOG.md

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

33
## Unreleased
44

5+
### Breaking changes
6+
7+
- Removed the `upload-proguard` subcommand's `--app-id`, `--version`, and `--version-code` arguments ([#2876](https://github.com/getsentry/sentry-cli/pull/2876)). Users using these arguments should stop using them, as they are unnecessary. The information passed to these arguments is no longer visible in Sentry.
8+
59
### Improvements
610

711
- The `sentry-cli debug-files bundle-jvm` no longer makes any HTTP requests to Sentry, meaning auth tokenms are no longer needed, and the command can be run offline ([#2926](https://github.com/getsentry/sentry-cli/pull/2926)).

src/api/mod.rs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,36 +1059,6 @@ impl<'a> AuthenticatedApi<'a> {
10591059
.convert_rnf(ApiErrorKind::ProjectNotFound)
10601060
}
10611061

1062-
pub fn associate_proguard_mappings(
1063-
&self,
1064-
org: &str,
1065-
project: &str,
1066-
data: &AssociateProguard,
1067-
) -> ApiResult<()> {
1068-
let path = format!(
1069-
"/projects/{}/{}/files/proguard-artifact-releases",
1070-
PathArg(org),
1071-
PathArg(project)
1072-
);
1073-
let resp: ApiResponse = self
1074-
.request(Method::Post, &path)?
1075-
.with_json_body(data)?
1076-
.send()?;
1077-
if resp.status() == 201 {
1078-
Ok(())
1079-
} else if resp.status() == 409 {
1080-
info!(
1081-
"Release association for release '{}', UUID '{}' already exists.",
1082-
data.release_name, data.proguard_uuid
1083-
);
1084-
Ok(())
1085-
} else if resp.status() == 404 {
1086-
Err(ApiErrorKind::ResourceNotFound.into())
1087-
} else {
1088-
resp.convert()
1089-
}
1090-
}
1091-
10921062
/// List all organizations associated with the authenticated token
10931063
/// in the given `Region`. If no `Region` is provided, we assume
10941064
/// we're issuing a request to a monolith deployment.
@@ -2244,12 +2214,6 @@ impl DebugInfoFile {
22442214
}
22452215
}
22462216

2247-
#[derive(Debug, Serialize)]
2248-
pub struct AssociateProguard {
2249-
pub release_name: String,
2250-
pub proguard_uuid: String,
2251-
}
2252-
22532217
#[derive(Deserialize)]
22542218
struct MissingChecksumsResponse {
22552219
missing: HashSet<Digest>,

src/commands/upload_proguard.rs

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use symbolic::common::ByteView;
99
use uuid::Uuid;
1010

1111
use crate::api::Api;
12-
use crate::api::AssociateProguard;
1312
use crate::config::Config;
1413
use crate::utils::android::dump_proguard_uuids_as_properties;
1514
use crate::utils::args::ArgExt as _;
@@ -33,62 +32,11 @@ pub fn make_command(command: Command) -> Command {
3332
.num_args(1..)
3433
.action(ArgAction::Append),
3534
)
36-
.arg(
37-
Arg::new("version")
38-
.hide(true)
39-
.long("version")
40-
.value_name("VERSION")
41-
.requires("app_id")
42-
.help(
43-
"[DEPRECATED] Optionally associate the mapping files \
44-
with a human readable version.{n}This helps you \
45-
understand which ProGuard files go with which version \
46-
of your app.\n\
47-
Sentry SaaS and self-hosted version 25.9.0 and later no \
48-
longer display this association, as it has no effect on \
49-
deobfuscation. This flag is scheduled for removal in \
50-
Sentry CLI 3.0.0.",
51-
),
52-
)
53-
.arg(
54-
Arg::new("version_code")
55-
.hide(true)
56-
.long("version-code")
57-
.value_name("VERSION_CODE")
58-
.requires("app_id")
59-
.requires("version")
60-
.help(
61-
"[DEPRECATED] Optionally associate the mapping files with a version \
62-
code.{n}This helps you understand which ProGuard files \
63-
go with which version of your app.\n\
64-
Sentry SaaS and self-hosted version 25.9.0 and later no \
65-
longer display this association, as it has no effect on \
66-
deobfuscation. This flag is scheduled for removal in \
67-
Sentry CLI 3.0.0.",
68-
),
69-
)
70-
.arg(
71-
Arg::new("app_id")
72-
.hide(true)
73-
.long("app-id")
74-
.value_name("APP_ID")
75-
.requires("version")
76-
.help(
77-
"[DEPRECATED] Optionally associate the mapping files with an application \
78-
ID.{n}If you have multiple apps in one sentry project, you can \
79-
then easily tell them apart.\n\
80-
Sentry SaaS and self-hosted version 25.9.0 and later no \
81-
longer display this association, as it has no effect on \
82-
deobfuscation. This flag is scheduled for removal in \
83-
Sentry CLI 3.0.0.",
84-
),
85-
)
8635
.arg(
8736
Arg::new("platform")
8837
.hide(true)
8938
.long("platform")
9039
.value_name("PLATFORM")
91-
.requires("app_id")
9240
.help(
9341
"[DEPRECATED] This flag is a no-op, scheduled \
9442
for removal in Sentry CLI 3.0.0.",
@@ -109,7 +57,6 @@ pub fn make_command(command: Command) -> Command {
10957
Arg::new("android_manifest")
11058
.long("android-manifest")
11159
.value_name("PATH")
112-
.conflicts_with("app_id")
11360
.hide(true)
11461
.help(
11562
"[DEPRECATED] This flag is a no-op, scheduled \
@@ -304,40 +251,5 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
304251
}
305252
}
306253

307-
// if values are given associate
308-
if let Some(app_id) = matches.get_one::<String>("app_id") {
309-
log::warn!(
310-
"[DEPRECATION NOTICE] The --app-id, --version, and --version-code flags are deprecated. \
311-
and scheduled for removal in Sentry CLI 3.0.0. \
312-
These values have no effect on deobfuscation, and are no longer displayed anywhere \
313-
in the Sentry UI (neither in SaaS nor in self-hosted versions 25.9.0 and later)."
314-
);
315-
316-
#[expect(clippy::unwrap_used, reason = "legacy code")]
317-
let version = matches.get_one::<String>("version").unwrap().to_owned();
318-
let build: Option<String> = matches.get_one::<String>("version_code").cloned();
319-
320-
let mut release_name = app_id.to_owned();
321-
release_name.push('@');
322-
release_name.push_str(&version);
323-
324-
if let Some(build_str) = build {
325-
release_name.push('+');
326-
release_name.push_str(&build_str);
327-
}
328-
329-
for mapping in &mappings {
330-
let uuid = forced_uuid.copied().unwrap_or(mapping.uuid());
331-
authenticated_api.associate_proguard_mappings(
332-
&org,
333-
&project,
334-
&AssociateProguard {
335-
release_name: release_name.to_owned(),
336-
proguard_uuid: uuid.to_string(),
337-
},
338-
)?;
339-
}
340-
}
341-
342254
Ok(())
343255
}

tests/integration/_cases/upload_proguard/upload_proguard-help.trycmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Options:
1414
in key:value format.
1515
-p, --project <PROJECT> The project ID or slug.
1616
--auth-token <AUTH_TOKEN> Use the given Sentry auth token.
17+
--no-upload Disable the actual upload.
18+
This runs all steps for the processing but does not trigger the
19+
upload. This is useful if you just want to verify the mapping
20+
files and write the proguard UUIDs into a properties file.
1721
--log-level <LOG_LEVEL> Set the log output verbosity. [possible values: trace, debug, info,
1822
warn, error]
1923
--quiet Do not print any output while preserving correct exit code. This
2024
flag is currently implemented only for selected subcommands.
2125
[aliases: --silent]
22-
--no-upload Disable the actual upload.
23-
This runs all steps for the processing but does not trigger the
24-
upload. This is useful if you just want to verify the mapping
25-
files and write the proguard UUIDs into a properties file.
2626
--write-properties <PATH> Write the UUIDs for the processed mapping files into the given
2727
properties file.
2828
--require-one Requires at least one file to upload or the command will error.

0 commit comments

Comments
 (0)