Skip to content

Remove problematic ClasspathFingerprintingStrategy and ZipHasher fallback strategy#34150

Merged
asodja merged 4 commits into
masterfrom
asodja/ziphasher-fix
Jul 15, 2025
Merged

Remove problematic ClasspathFingerprintingStrategy and ZipHasher fallback strategy#34150
asodja merged 4 commits into
masterfrom
asodja/ziphasher-fix

Conversation

@asodja

@asodja asodja commented Jul 7, 2025

Copy link
Copy Markdown
Member

Relates to #32464

Due to a bug in ZipHasher it can happen that when we use a fallback ZipHasher we could potentially poison fingerprint cache. See #32464 (comment).
We could fix it, but since fallback is not used anymore we can just remove it.

This happens only with remote Kotlin libraries with inline function that are present on build script and Java compile classpath.

This PR also adds a test that fails with 8.14.3.

@asodja asodja self-assigned this Jul 7, 2025
@asodja

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@asodja asodja added in:input-normalization fingerprinting a:bug This doesn't work as expected labels Jul 7, 2025
@bot-gradle

This comment has been minimized.

@asodja asodja changed the title Fix ZipHasher configuration hash Remove problematic ZipHasher configuration Jul 8, 2025
@asodja asodja changed the title Remove problematic ZipHasher configuration Remove problematic ClasspathFingerprintingStrategy fallback strategy Jul 8, 2025
@asodja asodja changed the title Remove problematic ClasspathFingerprintingStrategy fallback strategy Remove problematic ClasspathFingerprintingStrategy and ZipHasher fallback strategy Jul 8, 2025
@asodja asodja force-pushed the asodja/ziphasher-fix branch 2 times, most recently from d674eb0 to 4513448 Compare July 8, 2025 14:05
@asodja

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@asodja

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@asodja asodja force-pushed the asodja/ziphasher-fix branch from 4513448 to dab88f2 Compare July 8, 2025 14:08
@asodja

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@asodja asodja force-pushed the asodja/ziphasher-fix branch 2 times, most recently from 1660e8f to edf433d Compare July 8, 2025 20:54
@asodja

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@asodja asodja marked this pull request as ready for review July 8, 2025 20:57
@asodja asodja requested a review from a team as a code owner July 8, 2025 20:57
@asodja asodja requested review from abstratt and octylFractal July 8, 2025 20:57

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this debug message still accurate?

@asodja asodja Jul 9, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, this message is still ok. We still fallback to full zip hash, we just don't use a fallback ZipHasher in some cases

@abstratt abstratt Jul 8, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you intend to call this fixture setup method it from other tests? Otherwise, I would inline it/merge with the setup code below

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That makes sense, inlined

@bot-gradle

Copy link
Copy Markdown
Collaborator

The following builds have passed:

@asodja

asodja commented Jul 9, 2025

Copy link
Copy Markdown
Member Author

@bot-gradle test this

@bot-gradle

This comment has been minimized.

@asodja asodja requested a review from abstratt July 9, 2025 15:13
@bot-gradle

Copy link
Copy Markdown
Collaborator

The following builds have failed:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@abstratt abstratt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, awesome job creating the reproducer

Comment on lines 129 to 132

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

💅 This seems like it was moved for no reason, to keep diffs clean I would prefer to keep it where it was. But it's not a huge deal.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reverted

asodja added 4 commits July 15, 2025 15:58
Due to a bug in ZipHasher when we use a fallback we could potentially poison fingerprint cache.
We could fix it, but since this method is not used anymore we can just remove it.
@asodja asodja force-pushed the asodja/ziphasher-fix branch from 8fedd8f to 98dc6ee Compare July 15, 2025 13:58
@asodja asodja enabled auto-merge July 15, 2025 13:58
@asodja asodja added this pull request to the merge queue Jul 15, 2025
@bot-gradle bot-gradle added this to the 9.1.0 RC1 milestone Jul 15, 2025
auto-merge was automatically disabled July 15, 2025 14:04

Pull Request is not mergeable

Merged via the queue into master with commit dab8348 Jul 15, 2025
26 checks passed
@asodja asodja deleted the asodja/ziphasher-fix branch July 15, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:bug This doesn't work as expected in:input-normalization fingerprinting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants