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

ref: Target upstream rust-minidump #673

Merged
merged 14 commits into from
Feb 23, 2022

Conversation

flub
Copy link
Contributor

@flub flub commented Feb 11, 2022

This adapts to the async API of rust-minidump but also does a few other things:

  • Changes the FrameTrust mapping to our own struct so we can impl Default etc we need for it.
  • Completely ignores registers for now, this is a regression

Apart from the obvious there are still a few test failures that I haven't gotten to the bottom off.

#skip-changelog

Comment on lines -45 to -46
# Uncomment the line below for local development
# symbolic = { path = "../../../symbolic/symbolic", features = ["common-serde", "debuginfo", "demangle", "minidump-serde", "symcache"] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you keep this? I consider this quite useful, I often need to switch to a local symbolic version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be done in a patch.crates-io section? Having that here makes sorting a lot harder :)

https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#working-with-an-unpublished-minor-version

crates/symbolicator/src/services/symbolication.rs Outdated Show resolved Hide resolved
crates/symbolicator/src/services/symbolication.rs Outdated Show resolved Hide resolved
crates/symbolicator/src/services/symbolication.rs Outdated Show resolved Hide resolved
@flub flub mentioned this pull request Feb 18, 2022
@flub flub force-pushed the flub/upstream-master branch from be52d4b to ae9f90f Compare February 18, 2022 15:10
@flub flub marked this pull request as ready for review February 22, 2022 16:05
@flub flub requested a review from a team February 22, 2022 16:05
@github-actions
Copy link
Contributor

github-actions bot commented Feb 22, 2022

Warnings
⚠️ Snapshot changes likely affect Sentry tests. If the Sentry-Symbolicator Integration Tests in CI are failing for your PR, please check the symbolicator test suite in Sentry and update snapshots as needed.
Instructions for snapshot changes

Sentry runs a symbolicator integration test suite located at tests/symbolicator/. Changes in this PR will likely result in snapshot diffs in Sentry, which will break the master branch and in-progress PRs.

Follow these steps to update snapshots in Sentry:

  1. Check out latest Sentry master and enable the virtualenv.
  2. Enable symbolicator (symbolicator: true) in sentry via ~/.sentry/config.yml.
  3. Make sure your other devservices are running via sentry devservices up --exclude symbolicator. If
    they're already running, stop symbolicator with sentry devservices down symbolicator. You want to use your
    own development symbolicator to update the snapshots.
  4. Run your development symbolicator on port 3021, or whatever port symbolicator is configured to use
    in ~/.sentry/config.yml.
  5. Export SENTRY_SNAPSHOTS_WRITEBACK=1 to automatically update the existing snapshots with your new
    results and run symbolicator tests with pytest (pytest tests/symbolicator).
  6. Review snapshot changes locally, then create a PR to Sentry.
  7. Merge the Symbolicator PR, then merge the Sentry PR.

Generated by 🚫 dangerJS against a24ecc0

@codecov-commenter
Copy link

codecov-commenter commented Feb 22, 2022

Codecov Report

Merging #673 (a24ecc0) into release/rust-minidump (f6a0e32) will decrease coverage by 0.13%.
The diff coverage is 7.54%.

Impacted file tree graph

@@                    Coverage Diff                    @@
##           release/rust-minidump     #673      +/-   ##
=========================================================
- Coverage                  71.38%   71.25%   -0.14%     
=========================================================
  Files                         48       48              
  Lines                      11038    11024      -14     
=========================================================
- Hits                        7880     7855      -25     
- Misses                      3158     3169      +11     
Impacted Files Coverage Δ
crates/symbolicator/src/services/minidump.rs 93.12% <ø> (ø)
...olicator/src/services/symbolication/comparisons.rs 0.00% <ø> (ø)
crates/symbolicator/src/services/symbolication.rs 66.38% <2.43%> (-0.15%) ⬇️
crates/symbolicator/src/types/mod.rs 55.30% <25.00%> (-5.11%) ⬇️
crates/symbolicator/src/metrics.rs 52.05% <0.00%> (-1.37%) ⬇️
...es/symbolicator/src/services/download/locations.rs 80.54% <0.00%> (-0.55%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6a0e32...a24ecc0. Read the comment docs.

Comment on lines -11 to +12
os_version: 0.0.0
os_build: "Linux 4.9.60-linuxkit-aufs #1 SMP Mon Nov 6 16:00:12 UTC 2017 x86_64"
os_version: 4.9.60-linuxkit-aufs
os_build: "#1 SMP Mon Nov 6 16:00:12 UTC 2017"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing this up!


RawObjectInfo {
ty,
// TODO: shouldn't this be None if code_id is empty?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is for my own personal curiosity, but what was the answer to this question?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code_id can't be empty because of the new API which guarantees to give you one. But, hum, good question. Maybe this isn't true because you can still create those to be empty. I'll do this as a followup up though because this could be messy.

Comment on lines 1510 to 1513
match module
.debug_identifier()
.map(|debug_id| self.files.contains_key(&debug_id))
.unwrap_or_default()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed feelings seeing this change because I think it makes it more difficult to see the main operation being acted upon here (self.files.contains_key), but I don't think it's a dealbreaker. Looks like logically this is the same, so this is more of a readability nit than anything else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hum, i see what you mean though the previous code ended up calling .contains_key() with a nil DebugId (the _or_default() part) which is really what I'd like to avoid. Combinators like this are pretty standard rust style I think, what I like about this is there's only one exit point in the function, though your argument of making .contains_key() stand out also makes sense.

Copy link
Contributor

@relaxolotl relaxolotl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for including the changes coming from my recent PR in rust-minidump! Left some nitpicky thoughts but overall I don't think any of them should block this, which removes one of the big barriers when it comes to testing rust-minidump changes.

@loewenheim loewenheim merged commit 4d88520 into release/rust-minidump Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants