bitflicker64 opened a new pull request, #3269:
URL: https://github.com/apache/hugegraph/pull/3269

   ## Purpose of the PR
   
   - No linked issue; this is a small CI change.
   
   When the shared Maven build stage fails in `Docker Build CI`, the job log 
does not say why. The `docker-build` step runs `docker build -q`, and `-q` 
drops the BuildKit log, so the only thing left is the Dockerfile snippet and 
`exit code: 1`.
   
   Example: [hugegraph/hugegraph run 37190820888, job `docker-build 
(hugegraph-pd/Dockerfile)`](https://github.com/hugegraph/hugegraph/actions/runs/37190820888/job/111402423475)
 on commit `cb458ba2c`. The PD job failed about 16 s into `mvn install`, while 
the store and both server jobs passed in about 3 min on the same commit and the 
same build stage. The same commit passed on apache/hugegraph (run 37190787162), 
so it was most likely a one-off dependency download failure, but the log cannot 
confirm it:
   
   ```text
   Dockerfile:31
   >>> RUN 
--mount=type=cache,id=hugegraph-maven-${SOURCE_REVISION},target=/root/.m2,sharing=locked
 \
   >>>     mvn install -pl "$MAVEN_PROJECTS" \
   ERROR: failed to build: failed to solve: process "/bin/sh -c mvn install 
..." did not complete successfully: exit code: 1
   ```
   
   ![Before: docker build -q hides the Maven error and leaves only exit code 1. 
After: --progress=plain prints the Maven log and the image ID is read from 
--iidfile](https://raw.githubusercontent.com/bitflicker64/hugegraph/images/docker-build-log/.github/images/docker-build-log-visibility.svg)
   
   ## Main Changes
   
   In `.github/workflows/docker-build-ci.yml`, the `Build ${{ matrix.dockerfile 
}}` step now:
   
   - builds with `docker build --progress=plain`, so the full build log, 
including Maven's output, goes to the job log;
   - writes the image ID with `--iidfile "$RUNNER_TEMP/iid"` and reads 
`IMAGE_ID` from that file, since stdout no longer carries only the ID.
   
   `IMAGE_ID`, the `GITHUB_ENV` export, the HEALTHCHECK assertion and every 
later step are unchanged. The step still runs under the default `bash -e`, so a 
failed build stops it before `IMAGE_ID` is read.
   
   ## Verifying these changes
   
   - [ ] Trivial rework / code cleanup without any test coverage. (No Need)
   - [ ] Already covered by existing tests, such as *(please modify tests 
here)*.
   - [x] Need tests and can be verified as follows:
       - Checked the flags on Docker 29.5.3 with two throwaway Dockerfiles 
(2026-10-04). A failing `RUN` printed its stdout and stderr lines and stopped a 
`bash -e` step before the next command. A passing build wrote `sha256:...` to 
the iid file, and `docker inspect` on that ID returned the image's HEALTHCHECK.
       - This PR's own `Docker Build CI` run builds all four images through the 
changed step.
   
   ## Does this PR potentially affect the following parts?
   
   - [ ]  Dependencies ([add/update 
license](https://hugegraph.apache.org/docs/contribution-guidelines/contribute/#321-check-licenses)
 info & 
[regenerate_known_dependencies.sh](../install-dist/scripts/dependency/regenerate_known_dependencies.sh))
   - [ ]  Modify configurations
   - [ ]  The public API
   - [x]  Other affects (typed here): CI only, the `docker-build` job log is 
longer
   - [ ]  Nope
   
   ## Documentation Status
   
   - [ ] `Doc - TODO`: required documentation is pending; complete it before 
merging.
   - [ ] `Doc - Done`: documentation is included here or linked below.
   - [x] `Doc - No Need`: no user-visible documentation is affected.
   
   Documentation files in this PR or paired hugegraph-doc PR:
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to