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): Unwind info in dif candidates #324

Merged
merged 6 commits into from
Dec 23, 2020
Merged

Conversation

flub
Copy link
Contributor

@flub flub commented Dec 22, 2020

This adds the unwind info to dif candidates. For this the cficache actor
also exposes DIF info and the symbolication actor now correctly merges
the various DIF candidates info together.

sentry snapshots do not need updating

@flub flub requested a review from a team December 22, 2020 16:37
@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2020

Fails
🚫 Please consider adding a changelog entry for the next release.
Warnings
⚠️ Snapshot changes likely affect Sentry tests. Please check the symbolicator test suite in Sentry and update snapshots as needed.
Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section under the following heading:

  1. Features: For new user-visible functionality.
  2. Bug Fixes: For user-visible bug fixes.
  3. Internal: For features and bug fixes in internal operation.

To the changelog entry, please add a link to this PR (consider a more descriptive message):

- Unwind info in dif candidates. ([#324](https://github.com/getsentry/symbolicator/pull/324))

If none of the above apply, you can opt out by adding #skip-changelog to the PR description.

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 666c3ac

@flub flub changed the base branch from master to freeze December 23, 2020 09:24
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.

A number of small suggestions below, but overall G2G from my end.

CacheStatus::Malformed
}
},
cache_status => cache_status,
Copy link
Member

Choose a reason for hiding this comment

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

I preferred the former structure as it was easier to read and had less indentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See the comment above, replacing the old code again.

The extra level of indentation was because the entire thing is wrapped in another async move as the replacement of the normal async fn body. But anyway.

.await
{
Ok(result) => result,
Err(_) => Err(CfiCacheError::Canceled),
Copy link
Member

Choose a reason for hiding this comment

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

nit: Rewrite this match statement as .map_err(|_| CfiCacheError::Canceled).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

.unwrap_or_else() really. The threadpool returns the return of the spawned future wrapped in a result with cancellation in the error case. But this was reverted.

};

Ok(status)
Copy link
Member

Choose a reason for hiding this comment

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

This future does not have to return a result, you should be able to return status directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Err, yes this needs to be a result? It's the final result in the return type.

src/actors/cficaches.rs Outdated Show resolved Hide resolved
src/actors/symbolication.rs Outdated Show resolved Hide resolved
let result = async move {
let object_handle = objects_actor
.fetch(meta_handle.clone())
.await
Copy link
Member

Choose a reason for hiding this comment

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

this await here is the reason you have two nested futures. Only the inner one runs in the threadpool. Is that intentional? Maybe add a comment explaining the reasoning here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the idea was that the outer async move is essentially the body of the async fn that this actually is, but it isn't because it's a trait method. But this is all muddled because we need to spawn onto a new threadpool which means everything needs to be 'static, plus the future_metrics! macro doesn't yet have an idiomatic replacement.

Given that there are two reviews saying this all got more complicated I'm revering this back to the old code, only replacing future::lazy with async move instead.

Floris Bruynooghe added 3 commits December 23, 2020 17:27
Seems like no-one (other than me) found the new code more readable.
It's a bit unfortunate that everything needs to be owned because it is
all spawned on a new threadpool, thus the new code doesn't become much
nicer.  Plust the future_metrics! macro didn't have an idiomatic
async-await substitute yet which doesn't help as it leaves everything
still in a half-way state.
It's part more confusing, part less confusing.  Oh well.
@flub flub requested a review from jan-auer December 23, 2020 17:18
@flub flub merged commit 5a08a40 into freeze Dec 23, 2020
@flub flub deleted the feat/dif-info-unwind branch December 23, 2020 17:20
@jan-auer jan-auer changed the title Feat/dif info unwind feat(difs): Unwind info in dif candidates Dec 23, 2020
jan-auer pushed a commit that referenced this pull request Jan 5, 2021
This adds the unwind info to dif candidates. For this the cficache actor
also exposes DIF info and the symbolication actor now correctly merges
the various DIF candidates info together.
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.

3 participants