Skip to content

Commit

Permalink
Remove references/calls to legacy Reprocessing (#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem authored Jul 4, 2024
1 parent 9cf9afb commit a165aa7
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 230 deletions.
18 changes: 0 additions & 18 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1076,24 +1076,6 @@ impl<'a> AuthenticatedApi<'a> {
}
}

/// Triggers reprocessing for a project
pub fn trigger_reprocessing(&self, org: &str, project: &str) -> ApiResult<bool> {
let path = format!(
"/projects/{}/{}/reprocessing/",
PathArg(org),
PathArg(project)
);
let resp = self
.request(Method::Post, &path)?
.with_header("Content-Length", "0")?
.send()?;
if resp.status() == 404 {
Ok(false)
} else {
resp.into_result().map(|_| true)
}
}

/// List all organizations associated with the authenticated token
/// in the given `Region`. If no `Region` is provided, we assume
/// we're issuing a request to a monolith deployment.
Expand Down
18 changes: 1 addition & 17 deletions src/commands/debug_files/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use log::info;
use symbolic::common::DebugId;
use symbolic::debuginfo::FileFormat;

use crate::api::Api;
use crate::config::Config;
use crate::constants::DEFAULT_MAX_WAIT;
use crate::utils::args::ArgExt;
Expand Down Expand Up @@ -141,20 +140,13 @@ pub fn make_command(command: Command) -> Command {
explicitly it must already be processed.",
),
)
.arg(
Arg::new("no_reprocessing")
.long("no-reprocessing")
.action(ArgAction::SetTrue)
.help("Do not trigger reprocessing after uploading."),
)
.arg(
Arg::new("no_upload")
.long("no-upload")
.action(ArgAction::SetTrue)
.help(
"Disable the actual upload.{n}This runs all steps for the \
processing but does not trigger the upload (this also \
automatically disables reprocessing). This is useful if you \
processing but does not trigger the upload. This is useful if you \
just want to verify the setup or skip the upload in tests.",
),
)
Expand Down Expand Up @@ -322,14 +314,6 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {

// Execute the upload
let (uploaded, has_processing_errors) = upload.upload()?;
let api = Api::current();

// Trigger reprocessing only if requested by user
if matches.get_flag("no_reprocessing") {
println!("{} skipped reprocessing", style(">").dim());
} else if !api.authenticated()?.trigger_reprocessing(&org, &project)? {
println!("{} Server does not support reprocessing.", style(">").dim());
}

// Did we miss explicitly requested symbols?
if matches.get_flag("require_all") {
Expand Down
21 changes: 1 addition & 20 deletions src/commands/upload_proguard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,13 @@ pub fn make_command(command: Command) -> Command {
[defaults to 'android']",
),
)
.arg(
Arg::new("no_reprocessing")
.long("no-reprocessing")
.action(ArgAction::SetTrue)
.help("Do not trigger reprocessing after upload."),
)
.arg(
Arg::new("no_upload")
.long("no-upload")
.action(ArgAction::SetTrue)
.help(
"Disable the actual upload.{n}This runs all steps for the \
processing but does not trigger the upload (this also \
automatically disables reprocessing). This is useful if you \
processing but does not trigger the upload. This is useful if you \
just want to verify the mapping files and write the \
proguard UUIDs into a properties file.",
),
Expand Down Expand Up @@ -287,17 +280,5 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
}
}

// If wanted trigger reprocessing
if !matches.get_flag("no_reprocessing") && !matches.get_flag("no_upload") {
if !authenticated_api.trigger_reprocessing(&org, &project)? {
println!(
"{} Server does not support reprocessing. Not triggering.",
style(">").dim()
);
}
} else {
println!("{} skipped reprocessing", style(">").dim());
}

Ok(())
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ Options:
Providing this information will associate the debug symbols with a
specific ITC application and build in Sentry. Note that if you
provide the plist explicitly it must already be processed.
--no-reprocessing Do not trigger reprocessing after uploading.
--no-upload Disable the actual upload.
This runs all steps for the processing but does not trigger the
upload (this also automatically disables reprocessing). This is
useful if you just want to verify the setup or skip the upload in
tests.
upload. This is useful if you just want to verify the setup or
skip the upload in tests.
--force-foreground Wait for the process to finish.
By default, the upload process will detach and continue in the
background when triggered from Xcode. When an error happens, a
Expand Down

This file was deleted.

6 changes: 2 additions & 4 deletions tests/integration/_cases/upload_dif/upload_dif-help.trycmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ Options:
Providing this information will associate the debug symbols with a
specific ITC application and build in Sentry. Note that if you
provide the plist explicitly it must already be processed.
--no-reprocessing Do not trigger reprocessing after uploading.
--no-upload Disable the actual upload.
This runs all steps for the processing but does not trigger the
upload (this also automatically disables reprocessing). This is
useful if you just want to verify the setup or skip the upload in
tests.
upload. This is useful if you just want to verify the setup or
skip the upload in tests.
--force-foreground Wait for the process to finish.
By default, the upload process will detach and continue in the
background when triggered from Xcode. When an error happens, a
Expand Down
129 changes: 64 additions & 65 deletions tests/integration/_cases/upload_dsym/upload_dsym-help.trycmd
Original file line number Diff line number Diff line change
@@ -1,74 +1,73 @@
```
$ sentry-cli upload-dsym --help
? success
sentry-cli[EXE]-upload-dsym
Upload debugging information files.

USAGE:
sentry-cli[EXE] upload-dsym [OPTIONS] [PATH]...
Usage: sentry-cli upload-dsym [OPTIONS] [PATH]...

ARGS:
<PATH>... A path to search recursively for symbol files.
Arguments:
[PATH]... A path to search recursively for symbol files.

OPTIONS:
--auth-token <AUTH_TOKEN> Use the given Sentry auth token.
--derived-data Search for debug symbols in Xcode's derived data.
--force-foreground Wait for the process to finish.
By default, the upload process will detach and continue in the
background when triggered from Xcode. When an error happens, a
dialog is shown. If this parameter is passed Xcode will wait
for the process to finish before the build finishes and output
will be shown in the Xcode build output.
-h, --help Print help information
--id <ID> Search for specific debug identifiers.
--include-sources Include sources from the local file system and upload them as
source bundles.
--info-plist <PATH> Optional path to the Info.plist.
We will try to find this automatically if run from Xcode.
Providing this information will associate the debug symbols
with a specific ITC application and build in Sentry. Note that
if you provide the plist explicitly it must already be
processed.
--log-level <LOG_LEVEL> Set the log output verbosity. [possible values: trace, debug,
info, warn, error]
--no-debug Do not scan for debugging information. This will usually
exclude debug companion files. They might still be uploaded, if
they contain additional processable information (see other
flags).
--no-reprocessing Do not trigger reprocessing after uploading.
--no-sources Do not scan for source information. This will usually exclude
source bundle files. They might still be uploaded, if they
contain additional processable information (see other flags).
--no-unwind Do not scan for stack unwinding information. Specify this flag
for builds with disabled FPO, or when stackwalking occurs on
the device. This usually excludes executables and dynamic
libraries. They might still be uploaded, if they contain
additional processable information (see other flags).
--no-upload Disable the actual upload.
This runs all steps for the processing but does not trigger the
upload (this also automatically disables reprocessing). This
is useful if you just want to verify the setup or skip the
upload in tests.
--no-zips Do not search in ZIP files.
-o, --org <ORG> The organization slug
-p, --project <PROJECT> The project slug.
--quiet Do not print any output while preserving correct exit code.
This flag is currently implemented only for selected
subcommands. [aliases: silent]
--require-all Errors if not all identifiers specified with --id could be
found.
--symbol-maps <PATH> Optional path to BCSymbolMap files which are used to resolve
hidden symbols in dSYM files downloaded from iTunes Connect.
This requires the dsymutil tool to be available. This should
not be used when using the App Store Connect integration, the
.bcsymbolmap files needed for the integration are uploaded
without this option if they are found in the PATH searched for
symbol files.
-t, --type <TYPE> Only consider debug information files of the given type. By
default, all types are considered. [possible values: dsym, elf,
breakpad, pdb, pe, sourcebundle, bcsymbolmap]
--wait Wait for the server to fully process uploaded files. Errors can
only be displayed if --wait is specified, but this will
significantly slow down the upload process.
Options:
-o, --org <ORG> The organization slug
--header <KEY:VALUE> Custom headers that should be attached to all requests
in key:value format.
-p, --project <PROJECT> The project slug.
--auth-token <AUTH_TOKEN> Use the given Sentry auth token.
-t, --type <TYPE> Only consider debug information files of the given type. By
default, all types are considered. [possible values: bcsymbolmap,
breakpad, dsym, elf, jvm, pdb, pe, portablepdb, sourcebundle, wasm]
--no-unwind Do not scan for stack unwinding information. Specify this flag for
builds with disabled FPO, or when stackwalking occurs on the
device. This usually excludes executables and dynamic libraries.
They might still be uploaded, if they contain additional
processable information (see other flags).
--log-level <LOG_LEVEL> Set the log output verbosity. [possible values: trace, debug, info,
warn, error]
--no-debug Do not scan for debugging information. This will usually exclude
debug companion files. They might still be uploaded, if they
contain additional processable information (see other flags).
--no-sources Do not scan for source information. This will usually exclude
source bundle files. They might still be uploaded, if they contain
additional processable information (see other flags).
--quiet Do not print any output while preserving correct exit code. This
flag is currently implemented only for selected subcommands.
[aliases: silent]
--id <ID> Search for specific debug identifiers.
--require-all Errors if not all identifiers specified with --id could be found.
--symbol-maps <PATH> Optional path to BCSymbolMap files which are used to resolve hidden
symbols in dSYM files downloaded from iTunes Connect. This
requires the dsymutil tool to be available. This should not be
used when using the App Store Connect integration, the .bcsymbolmap
files needed for the integration are uploaded without this option
if they are found in the PATH searched for symbol files.
--derived-data Search for debug symbols in Xcode's derived data.
--no-zips Do not search in ZIP files.
--info-plist <PATH> Optional path to the Info.plist.
We will try to find this automatically if run from Xcode.
Providing this information will associate the debug symbols with a
specific ITC application and build in Sentry. Note that if you
provide the plist explicitly it must already be processed.
--no-upload Disable the actual upload.
This runs all steps for the processing but does not trigger the
upload. This is useful if you just want to verify the setup or
skip the upload in tests.
--force-foreground Wait for the process to finish.
By default, the upload process will detach and continue in the
background when triggered from Xcode. When an error happens, a
dialog is shown. If this parameter is passed Xcode will wait for
the process to finish before the build finishes and output will be
shown in the Xcode build output.
--include-sources Include sources from the local file system and upload them as
source bundles.
--wait Wait for the server to fully process uploaded files. Errors can
only be displayed if --wait or --wait-for is specified, but this
will significantly slow down the upload process.
--wait-for <SECS> Wait for the server to fully process uploaded files, but at most
for the given number of seconds. Errors can only be displayed if
--wait or --wait-for is specified, but this will significantly slow
down the upload process.
--il2cpp-mapping Compute il2cpp line mappings and upload them along with sources.
-h, --help Print help

```
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ Options:
--quiet Do not print any output while preserving correct exit code.
This flag is currently implemented only for selected
subcommands. [aliases: silent]
--no-reprocessing Do not trigger reprocessing after upload.
--no-upload Disable the actual upload.
This runs all steps for the processing but does not trigger the
upload (this also automatically disables reprocessing). This
is useful if you just want to verify the mapping files and
write the proguard UUIDs into a properties file.
upload. This is useful if you just want to verify the mapping
files and write the proguard UUIDs into a properties file.
--write-properties <PATH> Write the UUIDs for the processed mapping files into the given
properties file.
--require-one Requires at least one file to upload or the command will error.
Expand Down

This file was deleted.

Loading

0 comments on commit a165aa7

Please sign in to comment.