forked from getsentry/sentry-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[pull] master from getsentry:master #2
Open
pull
wants to merge
1,108
commits into
Mattlk13:master
Choose a base branch
from
getsentry:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
The Sentry CLI is not a library, and we probably don't need a comment for our 1-line main function.
This change will allow us to split logic off from src/api/mod.rs into separate files. Eventually, the src/api/mod.rs file should contain only mod statements and re-exports from submodules, which we will create in future PRs. ref #2008
Simplifies pagination logic by removing result that never results in error, and introducing new next_pagination_cursor convenience method. Tests added in #2015. ref #2008 Co-authored-by: Arpad Borsos <[email protected]>
By using Infallible, the type signature guarantees an error can never occur ref #2008
This commit adds a new submodule to the API module, errors, which contains error types. Future PRs will split the errors module into submodules for each error type. ref #2008
This change maintains consistency with other submodule imports
When a user sets up a project in xcode, e.g., by using the wizard, the .sentryclirc config is created in the project folder. However, when this file isn't included in the Input Files of the Xcode script for uploading debug files, an error is thrown in Xcode which isn't very clear. This commit improves that error message by specifying what the user needs to do. Fixes GH-1924
This test verifies that the `sentry-cli debug-files check` command results in an error with a meaningful message when the path passed leads to a directory.
Delete the old bug report template, so it can be replaced with an issue form. See #2037.
If the `--no-upload` flag is provided, the CLI should not require an auth token to be provided. This change fixes the behavior and adds a test to verify that the command works without an auth token, when called with `--no-upload`. Fixes #2046
Remove mention of refactoring, test, and documentation changes from the changelog (version 2.31.1)
Also, remove duplicate unnecessary check. Information about this new lint [here](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check).
There is no need to first open the file metadata. All the information we get from the metadata is the length, which we can already get from the `ByteView`.
Create a new `proguard` submodule in `utils`, and move the `proguard_upload` module into that new module. This change is being made in preparation of adding more proguard-related code to `utils`
The new `ProguardMapping` type directly references the `ByteView` of the Proguard file, rather than simply storing the path to the file. This change will enable us to replace `ChunkedMapping` with `Chunked<ProguardMapping>`. ref #2196
Also, update the `Assemblable` trait, so the `name` function returns `Cow<'_, str>` This refactor will allow `ChunkedDifRequest` to also store owned types for the `name`, making the type more flexible. We will use this ability when implementing `Assemblable` for `ProguardMapping`
…erver This rename makes it clearer that the server sets the `ChunkedServerOptions`. It also will allow `ChunkedUploadOptions` to be used to store options that are user-configured
Introduce new `ChunkOptions` trait which defines an interface for types that store chunk uploading options, and use this trait for the `try_assemble` function's `options` parameter. This change is needed to enable Proguard chunk uploads to use the `try_assemble` function, since Proguard uploads will not be able to use the existing `DifUpload` struct to configure upload options. Refactoring the `DifUpload` struct to also support Proguard uploads would be more complex than having a separate struct for storing Proguard upload options, and having both the `DifUpload` and the Proguard upload struct implement `ChunkOptions`. In the future, we might consider refactoring so that we have one struct that can store upload options for any kind of upload.
The leading `/` is [required](https://github.com/getsentry/sentry/blob/e5a117971a55245eadbc2f525dde11f93f10ef57/src/sentry/models/debugfile.py#L51) for Sentry to identify an uploaded file as a Proguard file. This bug was initially created in #2296, which has fortunately not been released yet.
This requires adding `should_wait` and `max_wait` functions to the `ChunkOptions` trait.
Owned string is not necesary here, and having it will make it harder to convert `DifUpload` into `ChunkOptions`
Previously, `ChunkOptions` was implemented as a trait, but we realized it makes more sense to have it be a struct, instead. Now, as a struct, we also have `ChunkOptions` store the `ChunkServerOptions`, which will eventually allow us to simplify some API's, since we can take `ChunkOptions` only, rather than `DIFUpload` and `ChunkServerOptions` for methods such as `upload_difs_chunked`.
I am planning to create a new `upload` module to contain a function which actually performs chunked uploading on generic objects. The `ChunkOptions` struct should stay in a separate module, hence moving it to the `options` module.
The `upload_difs_chunked` function contains logic specific to uploading DIFs, in addition to logic general to chunked uploads. This change extracts the general chunked upload logic, so it can be reused for other types of chunked uploads.
Previously, this function took as its first argument an `&Option<String>`. `Option<&str>` is typically preferred over this. This change also allows us to simplify the logic for computing the detail string. Co-authored-by: Sebastian Zivota <[email protected]>
We should not mention `upload-dif` in this error message because (1) `upload-dif` is a soft-deprecated hidden alias to `debug-files upload` and (2) `poll_assemble` has now been generalized and could be used with other commands in the future. For reason (2), this change makes the error message general rather than referring to the `debug-files upload` command.
Add tests for chunk uploading Proguard mappings. Test the following scenarios: - Uploading a single Proguard mapping, where the file is already on the server. - Uploading a single Proguard mapping, where the file is not on the server. - Uploading two Proguard mappings, where neither is on the server.
Instead, this message now reads "no sourcemap found," which is hopefully clearer to users. Fixes #1964
Having `strip = "symbols"` and omitting `-C force-unwind-tables` makes backtraces generated with `RUST_BACKTRACE=1` completely useless in release builds. By adding the `-C force-unwind-tables` flag and setting `strip = "debuginfo"`, we make backtraces usable in release builds. This will help us debug issues we are unable to reproduce, since we can ask users to set `RUST_BACKTRACE=1` and provide the logs with this option.
On my system, I obtained the smallest binary size with `opt-level = 2` (11.8 MB, versus 12.2 MB with `opt-level = "z"`).
Since we only use the `Vec` created by the `collect` in the loop below, there is no reason for the collect. Removing the collect prevents an unnecessary allocation of the `Vec`, and allows the loop instead to lazily compute the stringified chunks during iteration
Having a type for DIF validation errors will give us more flexible error handling abilities.
This will make redundant the existing warning in the funciton used to validate a DIF's size, allowing us to delete that warning. This change will help make the code more readable and maintainable.
Previously, we only logged an easy-to-miss warning when we had to skip uploading a debug file because it was too big. Now, we instead fail the entire upload loudly, to ensure users do not miss this important information. Resolves #2313
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See Commits and Changes for more details.
Created by pull[bot]. Want to support this open source service? Please star it : )