Repository navigation
Conversation
|
Claude finished @wezell's task in 2m 57s —— View job Review: perf(ci) publish releases from build artifacts (Part B)
New Issues
Everything else checks out:
No security, SQL, or secret-handling concerns in this diff. |
510995a to
95cb4a3
Compare
95cb4a3 to
13ea91c
Compare
ac42187 to
f79302f
Compare
f79302f to
2b6d641
Compare
…mpiling Depends on the preceding PR (#37617), which adds the inputs with no-op defaults. This flips them on for the two release workflows: release-build, reuse-build-artifacts, generate-test-image: false, generate-build-classes: false, docker-cache-scope-prefix: release. Held apart from that PR because it cannot be validated without an actual release: release-prepare commits and pushes a release branch and creates the GitHub release, so there is no dry run. Two hardening items the review surfaced, both here: - cicd_7 gains a reuse-build-artifacts dispatch input (default true) instead of hardcoding true. Releasing a tag cut before release-build existed otherwise has no way back to rebuild-then-publish without editing the workflow: the tag's own maven-job has no release-build input, so it installs unsuffixed coordinates and the new validation blocks the publish. - cicd_comp_build-phase gains a coordinate tripwire. Validation in the release phase runs AFTER the deployment job has pushed Docker images, so on its own it blocks the Maven publish but not the images. The tripwire asserts the exact expected <revision>[-suffix] coordinate was installed, in the build job, where nothing has been pushed yet.
2b6d641 to
404cfcc
Compare
Part B of 2, depends on #37617 (Part A). Base is Part A's branch so the diff below is only Part B's; retarget to
mainonce Part A merges.Refs #37607.
Part A adds the inputs with no-op defaults. This flips them on for the two release workflows:
4 files, +112/−5, 1 commit.Why this is a separate PR
It cannot be validated without an actual release.
release-preparecommits and pushes a release branch and creates the GitHub release (cicd_comp_release-prepare-phase.yml:347-348), so there is no dry run ofcicd_6. Splitting means Part A can land on review + green CI while this half waits for a deliberately chosen release.The section-7 test assertions for these flags moved here with them — asserting a flag is set is only meaningful next to the change that sets it.
Two hardening items the review surfaced
1.
cicd_7escape hatch.reuse-build-artifacts: truewas hardcoded, so the only way back to rebuild-then-publish was editing the workflow. That matters concretely: releasing a tag cut beforerelease-buildexisted runs the tag's ownmaven-job(composite actions resolve from the checked-out ref, andcicd_comp_build-phase.ymlchecks outref: release_tagbeforeuses: ./.github/actions/core-cicd/maven-job). That action has norelease-buildinput, so it installs unsuffixed coordinates, while the new release phase expects suffixed ones and blocks the publish. It is now aworkflow_dispatchinput defaulting totrue, sofalseis a supported fallback.cicd_6deliberately does not get an input: it creates its tag frommainduring the run, so its build phase is always current. It also already declares 11workflow_dispatchinputs against a documented maximum of 10 — adding a twelfth would make that pre-existing problem worse. (See Part A's notes.)2. An earlier coordinate tripwire. This is the more interesting one. The order is:
So
Validate Release Artifactsfails closed for the Maven publish but runs after deployment has already pushed images. A build that produced the wrong coordinates would ship images and only then block. "Validation gates the irreversible step" is only half true.The build job has no such split — nothing is pushed from there — so it now asserts the exact expected
<revision>[-<suffix>]coordinate (dotcms-core-<version>.pomand.jar) is present in~/.m2/repository, gated onrelease-build == true. Reading the version from.mvn/maven.config's-Drevision=rather than re-deriving it, so a mismatch between what the release branch pins and what the build installed fails here instead of after images are out.Still needed before merge
dotcms-core, not every modulepublish.shuploads.cicd_7can overwrite the primary release if bothjava_versionandRELEASE_JAVA_VARIANT_VERSIONresolve empty (pre-existing; wants a guard inextract-version). Kept out to hold this diff small and reviewable.Implementation-Version/ OSGi versions become<version>-java-25.ReleaseInfo.getVersion()is read byAutoUpdaterAjax,SdkVersionWebInterceptor,MetricsConfigandHealthStateManager.Checks
Test suites— 90 assertions across both suites, green.actionlint— clean. The new assertions cover the tripwire's gate and that it matches the exact primary artifact, and thatcicd_7reads the input rather than hardcoding it.