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

feat(difs): Add dif candidates info to module list #309

Merged
merged 24 commits into from
Dec 16, 2020
Merged

Conversation

flub
Copy link
Contributor

@flub flub commented Nov 27, 2020

This adds new information about which DIF candidates were considered
to be used for modules. So far only part of all the information we
want to expose is present.

sentry snapshot updates: getsentry/sentry#22395

Floris Bruynooghe added 2 commits November 27, 2020 14:31
This adds new information about which DIF candidates were considered
to be used for modules.  So far only part of all the information we
want to expose is present.
- Describe things properly.
- Make sure the type names make sense and are sanely used.
- Optimise some Vec sharing.
- Scope future work better.
Copy link
Member

@jan-auer jan-auer left a comment

Choose a reason for hiding this comment

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

Let's please put all the candidate information behind a config flag. That is, we can compute all the information internally, but only serialize it when the flag is given. This allows us to iterate on this feature and make releases without impacting any users -- including Sentry.

src/actors/cficaches.rs Show resolved Hide resolved
src/actors/objects/mod.rs Outdated Show resolved Hide resolved
src/actors/objects/mod.rs Outdated Show resolved Hide resolved
src/actors/objects/mod.rs Outdated Show resolved Hide resolved
src/actors/objects/mod.rs Outdated Show resolved Hide resolved
src/types.rs Outdated Show resolved Hide resolved
src/types.rs Outdated Show resolved Hide resolved
src/types.rs Outdated Show resolved Hide resolved
Floris Bruynooghe and others added 4 commits November 30, 2020 11:05
Co-authored-by: Jan Michael Auer <mail@jauer.org>
It is possible for the meta (and data) caches to return transient
errors.  This extends the diagnostics built up with this information
as well.
Floris Bruynooghe added 4 commits December 1, 2020 17:10
Providing details on malformed requires a lot more refactoring,
probably not for this PR.
At least for now, there's a followup work note on the doc.
src/types.rs Show resolved Hide resolved
Floris Bruynooghe added 6 commits December 2, 2020 12:12
That says a bit better what it actually is.
Wouldn't it be nice if this would be statically enforced?  Removing
deserialisation was also an option, but we'll need it later.
Adding details will require a lot of caching refactoring.
@flub
Copy link
Contributor Author

flub commented Dec 2, 2020

This PR only covers the download info, the debug and unwind info will follow in followup PRs.

@flub flub marked this pull request as ready for review December 2, 2020 14:02
@flub flub requested a review from a team December 2, 2020 14:02
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2020

Warnings
⚠️ Snapshot changes likely affect Sentry tests. 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. Stop the symbolicator devservice using sentry devservices down symbolicator.
  3. Run your development symbolicator on port 3021.
  4. Export SENTRY_SNAPSHOTS_WRITEBACK=1 and run symbolicator tests with pytest.
  5. Review snapshot changes locally, then create a PR to Sentry.
  6. Merge the Symbolicator PR, then merge the Sentry PR.

Generated by 🚫 dangerJS against 6c64d66

flub pushed a commit to getsentry/sentry that referenced this pull request Dec 2, 2020
Symbolicator snapshots need updating for the new download info
available from getsentry/symbolicator#309.
src/actors/symbolication.rs Show resolved Hide resolved
src/actors/symcaches.rs Show resolved Hide resolved
src/types.rs Outdated Show resolved Hide resolved
Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

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

lets do it. Since you will solve some of the things I mentioned in the followup

Co-authored-by: Arpad Borsos <arpad.borsos@sentry.io>
@flub
Copy link
Contributor Author

flub commented Dec 9, 2020

@Swatinem @jan-auer PTAL, I realised it didn't include a config setting to disable it yet. Last commit adds this. No other changes.

src/config.rs Outdated Show resolved Hide resolved
Copy link
Member

@jan-auer jan-auer left a comment

Choose a reason for hiding this comment

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

After discussing offline, two final change requests:

  • Please move the flag to the request struct (for all request types)
  • Please default it to off

This requires the request to opt into the dif candidates info.  It
introduces a new options field that could be extended further in the
future.
@flub
Copy link
Contributor Author

flub commented Dec 15, 2020

Apologies for the force-pushing. I hard resetted the last config commit without realising that's probably not the best way for the PR. Anyway, the DIF info is now only enabled if in the request as can be seen in the integration tests.

This also means the matching PR for the sentry snapshot tests doesn't need to happen as those responses should not change at all.

@@ -46,3 +47,11 @@ pub fn read_multipart_sources(
.and_then(|data| Ok(serde_json::from_slice(&data)?)),
)
}

pub fn read_multipart_request_data(
Copy link
Member

Choose a reason for hiding this comment

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

This + read_multipart_sources can be one generic fn

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that would seem sane but it appears I'm not smart enough to understand serde's lifetimes. I'm just living with this for now instead of wasting loads of time. I'd appreciate any hints though.

src/endpoints/symbolicate.rs Outdated Show resolved Hide resolved
Copy link
Member

@jan-auer jan-auer left a comment

Choose a reason for hiding this comment

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

I clicked approve too quickly again.

src/endpoints/applecrashreport.rs Outdated Show resolved Hide resolved
@flub flub requested a review from jan-auer December 16, 2020 14:42
Copy link
Member

@jan-auer jan-auer left a comment

Choose a reason for hiding this comment

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

Now for real.

@flub flub merged commit eb9b262 into master Dec 16, 2020
@flub flub deleted the feat/dif-info branch December 16, 2020 14:56
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.

4 participants