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

Open
finnegancarroll opened this issue Dec 12, 2024 · 0 comments · May be fixed by #16844
Open

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

finnegancarroll opened this issue Dec 12, 2024 · 0 comments · May be 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

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
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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant