-
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Use checksum to dedupe uploaded release artifacts (#1275)
* feat: Use checksum to dedupe uploaded release artifacts
- Loading branch information
1 parent
5987271
commit 14a8aa5
Showing
10 changed files
with
291 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
tests/integration/_cases/sourcemaps/sourcemaps-upload-help.trycmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
``` | ||
$ sentry-cli sourcemaps upload --help | ||
? success | ||
sentry-cli[EXE]-sourcemaps-upload | ||
Upload sourcemaps for a release. | ||
|
||
USAGE: | ||
sentry-cli[EXE] sourcemaps upload [OPTIONS] [PATHS]... | ||
|
||
ARGS: | ||
<PATHS>... The files to upload. | ||
|
||
OPTIONS: | ||
--auth-token <AUTH_TOKEN> | ||
Use the given Sentry auth token. | ||
|
||
--bundle <BUNDLE> | ||
Path to the application bundle (indexed, file, or regular) | ||
|
||
--bundle-sourcemap <BUNDLE_SOURCEMAP> | ||
Path to the bundle sourcemap | ||
|
||
-d, --dist <DISTRIBUTION> | ||
Optional distribution identifier for the sourcemaps. | ||
|
||
-h, --help | ||
Print help information | ||
|
||
--header <KEY:VALUE> | ||
Custom headers that should be attached to all requests | ||
in key:value format. | ||
|
||
-i, --ignore <IGNORE> | ||
Ignores all files and folders matching the given glob | ||
|
||
-I, --ignore-file <IGNORE_FILE> | ||
Ignore all files and folders specified in the given ignore file, e.g. .gitignore. | ||
|
||
--log-level <LOG_LEVEL> | ||
Set the log output verbosity. [possible values: trace, debug, info, warn, error] | ||
|
||
--no-rewrite | ||
Disables rewriting of matching sourcemaps. By default the tool will rewrite sources, so | ||
that indexed maps are flattened and missing sources are inlined if possible. | ||
This fundamentally changes the upload process to be based on sourcemaps and minified | ||
files exclusively and comes in handy for setups like react-native that generate | ||
sourcemaps that would otherwise not work for sentry. | ||
|
||
--no-sourcemap-reference | ||
Disable emitting of automatic sourcemap references. | ||
By default the tool will store a 'Sourcemap' header with minified files so that | ||
sourcemaps are located automatically if the tool can detect a link. If this causes | ||
issues it can be disabled. | ||
|
||
-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] | ||
|
||
-r, --release <RELEASE> | ||
The release slug. | ||
|
||
--strip-common-prefix | ||
Similar to --strip-prefix but strips the most common prefix on all sources references. | ||
|
||
--strip-prefix <PREFIX> | ||
Strips the given prefix from all sources references inside the upload sourcemaps (paths | ||
used within the sourcemap content, to map minified code to it's original source). Only | ||
sources that start with the given prefix will be stripped. | ||
This will not modify the uploaded sources paths. To do that, point the upload or | ||
upload-sourcemaps command to a more precise directory instead. | ||
|
||
-u, --url-prefix <PREFIX> | ||
The URL prefix to prepend to all filenames. | ||
|
||
--url-suffix <SUFFIX> | ||
The URL suffix to append to all filenames. | ||
|
||
--validate | ||
Enable basic sourcemap validation. | ||
|
||
--wait | ||
Wait for the server to fully process uploaded files. | ||
|
||
-x, --ext <EXT> | ||
Set the file extensions that are considered for upload. This overrides the default | ||
extensions. To add an extension, all default extensions must be repeated. Specify once | ||
per extension. | ||
Defaults to: `--ext=js --ext=map --ext=jsbundle --ext=bundle` | ||
|
||
``` |
20 changes: 20 additions & 0 deletions
20
tests/integration/_cases/sourcemaps/sourcemaps-upload-skip-already-uploaded.trycmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
``` | ||
$ sentry-cli sourcemaps upload tests/integration/_fixtures/bundle.min.js.map --release=wat-release | ||
? success | ||
> Found 1 release file | ||
> Analyzing 1 sources | ||
> Rewriting sources | ||
> Adding source map references | ||
> Bundled 1 file for upload | ||
> Uploaded release files to Sentry | ||
> File upload complete (processing pending on server) | ||
> Organization: wat-org | ||
> Project: wat-project | ||
> Release: wat-release | ||
> Dist: None | ||
|
||
Source Map Upload Report | ||
Source Maps | ||
~/bundle.min.js.map (skipped; already uploaded) | ||
|
||
``` |
20 changes: 20 additions & 0 deletions
20
tests/integration/_cases/sourcemaps/sourcemaps-upload-successfully-upload-file.trycmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
``` | ||
$ sentry-cli sourcemaps upload tests/integration/_fixtures/bundle.min.js.map --release=wat-release | ||
? success | ||
> Found 1 release file | ||
> Analyzing 1 sources | ||
> Rewriting sources | ||
> Adding source map references | ||
> Bundled 1 file for upload | ||
> Uploaded release files to Sentry | ||
> File upload complete (processing pending on server) | ||
> Organization: wat-org | ||
> Project: wat-project | ||
> Release: wat-release | ||
> Dist: None | ||
|
||
Source Map Upload Report | ||
Source Maps | ||
~/bundle.min.js.map | ||
|
||
``` |
12 changes: 12 additions & 0 deletions
12
tests/integration/_cases/sourcemaps/sourcemaps-upload.trycmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
``` | ||
$ sentry-cli sourcemaps upload | ||
? failed | ||
error: The following required arguments were not provided: | ||
<PATHS>... | ||
|
||
USAGE: | ||
sentry-cli[EXE] sourcemaps upload <PATHS>... | ||
|
||
For more information try --help | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.