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

Bump ByteBuddy to 1.11.16, use TestKit in agent integration test #2776

Merged
merged 2 commits into from
Oct 4, 2021

Conversation

simonbasle
Copy link
Member

This commit bumps Byte-Buddy to 1.11.16, which makes the ad-hoc groovy
integration testing of the Byte Buddy gradle plugin feature non
functional due to breaking changes.

After much trial-and-error, the best way to fix that integration test
I found was to completely separate the test, as a inlined project in
resources. The entire project can then be copied in the buildDir and
executed using Gradle TestKit.

In order to get access to the snapshot of code under test, some token
replacement is used with the files(@TOKEN@) type of dependency.

This allowed to resurface the importance of using the reactor-tools
-original.jar version, as otherwise the ByteBuddy gradle plugin
will refuse to use the reactor Plugin (which implements the shaded
interface).

See raphw/byte-buddy#833 for the original
issue that lead to the previous code.

@simonbasle
Copy link
Member Author

simonbasle commented Sep 20, 2021

ready to review @reactor/team, but will need to be merged separately once #2775 is merged

@simonbasle simonbasle requested a review from a team September 20, 2021 14:15
@simonbasle simonbasle self-assigned this Sep 20, 2021
@simonbasle simonbasle added type/chores A task not related to code (build, formatting, process, ...) type/enhancement A general enhancement labels Sep 20, 2021
@simonbasle simonbasle added this to the 3.3.21.RELEASE milestone Sep 20, 2021
@simonbasle simonbasle force-pushed the bumpGradle7andPlugins branch from 193aa05 to cb988ef Compare September 24, 2021 12:18
Base automatically changed from bumpGradle7andPlugins to 3.3.x September 24, 2021 13:11
This commit bumps Byte-Buddy to 1.11.16, which makes the ad-hoc groovy
integration testing of the Byte Buddy gradle plugin feature non
functional due to breaking changes.

After much trial-and-error, the best way to fix that integration test
I found was to completely separate the test, as a inlined project in
resources. The entire project can then be copied in the `buildDir` and
executed using Gradle TestKit.

In order to get access to the snapshot of code under test, some token
replacement is used with the `files(@token@)` type of dependency.

This allowed to resurface the importance of using the `reactor-tools`
`-original.jar` version, as otherwise the ByteBuddy gradle plugin
will refuse to use the reactor Plugin (which implements the shaded
interface).

See raphw/byte-buddy#833 for the original
issue that lead to the previous code.
@simonbasle simonbasle force-pushed the reworkToolsByteBuddyGradleTest branch from f7d27f7 to 705a001 Compare September 24, 2021 13:28
@simonbasle simonbasle marked this pull request as ready for review September 24, 2021 13:28
@simonbasle simonbasle requested a review from a team as a code owner September 24, 2021 13:29
@simonbasle simonbasle changed the title Bump Byte Buddy to 1.11.16, fix integration test using TestKit Bump ByteBuddy to 1.11.16, use TestKit in agent integration test Oct 4, 2021
@simonbasle simonbasle merged commit f117f59 into 3.3.x Oct 4, 2021
@simonbasle simonbasle deleted the reworkToolsByteBuddyGradleTest branch October 4, 2021 14:00
@reactorbot
Copy link

@simonbasle this PR seems to have been merged on a maintenance branch, please ensure the change is merge-forwarded to intermediate maintenance branches and up to main 🙇

simonbasle added a commit that referenced this pull request Oct 4, 2021
@wilkinsona
Copy link
Contributor

I've just discovered that the debug agent doesn't work with Java 17 class files. Transformation fails as the shaded version of ByteBuddy uses a version of ASM that doesn't support Java 17 bytecode. I think this issue will fix it as the new version of ByteBuddy supports Java 17 via an ASM upgrade. I thought it worth mentioning here in case anyone else hits the same problem.

@simonbasle
Copy link
Member Author

simonbasle commented Oct 7, 2021

@wilkinsona were you able to verify that with snapshots by any chance? Also, byte-buddy has already had 3 new releases in the meantime. I'll upgrade again, today I hope.
edit: see #2803

@wilkinsona
Copy link
Contributor

I just verified with 3.4.11-SNAPSHOT (via the 2020.0.12-SNAPSHOT bom) and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chores A task not related to code (build, formatting, process, ...) type/enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants