Skip to content

chore: adjust download-maven-plugin usages to reduce release flakiness#13272

Open
whowes wants to merge 3 commits into
mainfrom
whowes/issue-13026-maven
Open

chore: adjust download-maven-plugin usages to reduce release flakiness#13272
whowes wants to merge 3 commits into
mainfrom
whowes/issue-13026-maven

Conversation

@whowes
Copy link
Copy Markdown

@whowes whowes commented May 26, 2026

As observed in issue #13026, the download-maven-plugin's wget goal is currently flaky in release jobs.

This change

  • checks in protos for gapic-generator-java instead of downloading them
  • adjusts the plugin configuration for showcase to skip caching to prevent parallel jobs from trying to acquire the same lock

Fixes #13026

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request configures a custom cacheDirectory for the download-maven-plugin across several POM files. The reviewer pointed out that because <overwrite>true</overwrite> is already set in these configurations, caching is redundant. It is recommended to use <skipCache>true</skipCache> instead of setting a custom cache directory to simplify the configuration and avoid potential cache locking issues.

Comment thread java-showcase/gapic-showcase/pom.xml Outdated
Comment on lines +71 to +73
<cacheDirectory>
${project.build.directory}/download-cache
</cacheDirectory>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since <overwrite>true</overwrite> is configured, the plugin is already instructed to always download the latest version and overwrite the existing file, making caching completely redundant. Instead of configuring a custom cacheDirectory (which is deleted on mvn clean anyway), you can completely disable caching for this execution using <skipCache>true</skipCache>. This avoids any cache locking issues and simplifies the configuration.

              <skipCache>true</skipCache>

Comment on lines +63 to +65
<cacheDirectory>
${project.build.directory}/download-cache
</cacheDirectory>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since <overwrite>true</overwrite> is configured, the plugin is already instructed to always download the latest version and overwrite the existing file, making caching completely redundant. Instead of configuring a custom cacheDirectory (which is deleted on mvn clean anyway), you can completely disable caching for this execution using <skipCache>true</skipCache>. This avoids any cache locking issues and simplifies the configuration.

              <skipCache>true</skipCache>

Comment on lines +71 to +73
<cacheDirectory>
${project.build.directory}/download-cache
</cacheDirectory>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since <overwrite>true</overwrite> is configured, the plugin is already instructed to always download the latest version and overwrite the existing file, making caching completely redundant. Instead of configuring a custom cacheDirectory (which is deleted on mvn clean anyway), you can completely disable caching for this execution using <skipCache>true</skipCache>. This avoids any cache locking issues and simplifies the configuration.

              <skipCache>true</skipCache>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

/gemini PTAL after changes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes look correct and effectively address the cache locking issue by setting <skipCache>true</skipCache> while maintaining the necessary overwrite behavior. This configuration is cleaner and avoids potential issues with shared cache directories in parallel build environments.

@whowes whowes changed the title chore: add cacheDirectory configuration for download-maven-plugin usages chore: disable cache for download-maven-plugin usages May 26, 2026
@whowes whowes changed the title chore: disable cache for download-maven-plugin usages chore: skip cache for download-maven-plugin usages May 26, 2026
@whowes whowes force-pushed the whowes/issue-13026-maven branch from a7189e4 to ba94110 Compare May 26, 2026 23:28
@whowes whowes changed the title chore: skip cache for download-maven-plugin usages chore: adjust download-maven-plugin usages to reduce release flakiness May 26, 2026
@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

@whowes whowes requested a review from blakeli0 May 27, 2026 02:10
@whowes whowes marked this pull request as ready for review May 27, 2026 02:11
@whowes whowes requested a review from a team as a code owner May 27, 2026 02:11
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.

[sdk-platform-java] maven-download-plugin is flaky when building in parallel.

1 participant