Skip to content

fix: Build should not depend on prepare#23925

Merged
mcollovati merged 19 commits intomainfrom
issues/17354-build-frontend-without-prepare
Mar 23, 2026
Merged

fix: Build should not depend on prepare#23925
mcollovati merged 19 commits intomainfrom
issues/17354-build-frontend-without-prepare

Conversation

@caalador
Copy link
Contributor

Running the build frontend task
should not depend on the prepare
task so that the tasks do not
break each others caching.

part of #17354

Running the build frontend task
should not depend on the prepare
task so that the tasks do not
break each others caching.

part of #17354
@caalador caalador requested a review from mcollovati March 18, 2026 07:16
@github-actions
Copy link

github-actions bot commented Mar 18, 2026

Test Results

 1 386 files  ±0   1 386 suites  ±0   1h 30m 7s ⏱️ + 1m 23s
 9 911 tests ±0   9 840 ✅ ±0  71 💤 ±0  0 ❌ ±0 
10 384 runs  ±0  10 304 ✅ ±0  80 💤 ±0  0 ❌ ±0 

Results for commit 9d3a212. ± Comparison against base commit 7163d37.

♻️ This comment has been updated with latest results.

@mcollovati
Copy link
Collaborator

Works as expected with Gradle daemon, but it causes issues without.
Without the daemon, the flow-build-info.json file is deleted after the first build; the next build will not run vaadinBuildFrontend and produce an artifact without flow-build-info.json causing issues at runtime, since the app starts in development mode.

@caalador
Copy link
Contributor Author

Seems we would need to come up with a new clean up strategy for the token file after a production build as this will not work as expected for the incremental build.

@caalador
Copy link
Contributor Author

Moved the token clean up to the respective plugins to handle.

@mcollovati
Copy link
Collaborator

For Maven, I pushed #23945, that postpones the delete to the end of the build session. It works only if the plugin is configured as an extension, but it should help when using mvnd.

For Gradle, my concern is that using doLast could impact incremental build on our or other plugins (e.g. Jar), causing the next run to not be up to date. But let's try and see how this goes.

@sonarqubecloud
Copy link

@github-actions github-actions bot added +0.1.0 and removed +0.0.1 labels Mar 19, 2026
copy token file instead of recreation.
@github-actions github-actions bot added +1.0.0 and removed +0.1.0 labels Mar 20, 2026
Persist build-info hash from first hash onwards
@sonarqubecloud
Copy link

@mcollovati mcollovati merged commit 61f2dce into main Mar 23, 2026
32 checks passed
@mcollovati mcollovati deleted the issues/17354-build-frontend-without-prepare branch March 23, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants