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

Invalidate instrumentation cache when changing instrumentation features #753

Merged
merged 6 commits into from
Sep 3, 2024

Conversation

lbloder
Copy link
Collaborator

@lbloder lbloder commented Aug 12, 2024

📜 Description

Add features, logcatEnabled and appStartEnabled params to SpanAddingClassVisitorFactory parameters to make sure that if these change, the instrumentation is run again and the cache is invalidated.

💡 Motivation and Context

Currently, when instrumentation parameters features, logcatEnabled or appStartEnabled change, instrumentation is not run again and the cached instrumentation result is used. I.e. it is not possible to change the feature set without deleting the gradle cache in the home directory.

Fixes #3595

💚 How did you test it?

Added automated test

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

@lbloder lbloder marked this pull request as ready for review August 20, 2024 07:46
@adinauer
Copy link
Member

@romtsn do you wanna review this one?

Copy link
Member

@markushi markushi left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

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

LGTM, nice work!

@romtsn romtsn changed the title add features, logcat and startup flags to SpanAddingClassVisitorFacto… Invalidate instrumentation cache when changing instrumentation features Sep 3, 2024
@romtsn romtsn merged commit 367444c into main Sep 3, 2024
22 of 23 checks passed
@romtsn romtsn deleted the fix/run-instrumentation-if-feature-set-changes branch September 3, 2024 10:04
Copy link
Contributor

github-actions bot commented Sep 3, 2024

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Invalidate instrumentation cache when changing instrumentation features ([#753](https://github.com/getsentry/sentry-android-gradle-plugin/pull/753))

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

Generated by 🚫 dangerJS against e0a4173

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.

Android - Disabling SentryOkHttp doesn't seem to work
4 participants