Skip to content
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
wants to merge 1,108 commits into
base: master
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented May 26, 2020

See Commits and Changes for more details.


Created by pull[bot]. Want to support this open source service? Please star it : )

@pull pull bot added the ⤵️ pull label May 26, 2020
getsentry-bot and others added 29 commits March 27, 2024 15:58
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
See #2033. This is intended as a quick fix for the issue; we should still consider implementing the recursive check functionality suggested in #2033, since it would provide a better user experience.
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)
szokeasaurusrex and others added 30 commits December 3, 2024 15:21
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.
Use the existing chunked upload logic (already used for DIFs) when chunked-uploading Proguard mappings.

Closes #2195, #2196
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.