-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Use checksum to dedupe uploaded release artifacts #1275
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this method return a result? It doesn't look like it can fail in any way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Forgot to change that after moving from
HashSet
which looked like overkill.