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

[BUG] thirdPartyAudit task fails when copying duplicate files #16840

Closed
finnegancarroll opened this issue Dec 12, 2024 · 0 comments · Fixed by #16844
Closed

[BUG] thirdPartyAudit task fails when copying duplicate files #16840

finnegancarroll opened this issue Dec 12, 2024 · 0 comments · Fixed by #16844
Labels
bug Something isn't working Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. untriaged

Comments

@finnegancarroll
Copy link
Contributor

finnegancarroll commented Dec 12, 2024

Describe the bug

Plugin dependencies which use identical file names for their metadata will cause the thirdPartyAudit task to fail for the plugin with the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':plugins:transport-grpc:thirdPartyAudit'.
> Could not copy zip entry '/Users/carrofin/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/33.2.1-jre/818e780da2c66c63bbb6480fef1f3855eeafa3e4/guava-33.2.1-jre.jar!META-INF/LICENSE' to '/Users/carrofin/fdev/tmp/OpenSearch/plugins/transport-grpc/build/precommit/thirdPartyAudit/thirdPartyAudit/META-INF/LICENSE'.
   > /Users/carrofin/fdev/tmp/OpenSearch/plugins/transport-grpc/build/precommit/thirdPartyAudit/thirdPartyAudit/META-INF/LICENSE (Is a directory)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.

In this case dependency 1 attempts to write a LICENSE file to plugins/<my-plugin>/build/precommit/thirdPartyAudit/thirdPartyAudit/META-INF while dependency 2 populates a LICENSE directory at the same location.

Related component

Build

To Reproduce

Note: It appears this specific minimal example does not reproduce on case sensitive file systems. At some point gradle normalizes the capitalization of LICENSE the file which in actuality is lowercase when written to disk.

Branch with minimal example: https://github.com/finnegancarroll/OpenSearch/tree/dbg-plugin-3prtyaud

Reproduce with:

./gradlew precommit -x :plugins:transport-grpc:testingConventions

Expected behavior

thirdPartyAudit task should handle this collision gracefully and pass.
Proposed solution - Create sub directories for each dependency: #16844

@finnegancarroll finnegancarroll added bug Something isn't working untriaged labels Dec 12, 2024
@github-actions github-actions bot added the Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. label Dec 12, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Performance Roadmap Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. untriaged
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant