mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
## What this PR does A pull request stacked on another feature branch builds its images from its own diff against that branch, so one that changes only tests builds no images. The overlay then fills every package from main's or a release line's artifact, which has none of the stack's changes, and the stack's charts run on images that do not match them. In one stacked run cozystack-controller crash-looped on `flag provided but not defined: -enable-gpu`. With this change the build list of such a pull request comes from the fork point with the line whose artifact the overlay reads, so the images of the pull requests below it are built too. On main and the release lines nothing changes. When the fork point cannot be found, CI warns, builds every image, Talos included, and keeps the committed refs out of the overlay. #4460 already fixed the overlay tag for a feature-branch base; this is the build list beside it. #4911 applies the same fork-point rule to the Kairos worker disks only; this PR covers every image. The new hack/pr-changed-paths_test.bats and the existing overlay tests pass locally under Bats. I have not seen a stacked pull request run through this workflow yet. Closes #5444 ### Screenshots ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note fix(ci): build a stacked pull request's images from the fork point of the line its base belongs to, so a stack that changes only tests no longer runs e2e on main's images. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Build & Validation** * Pull request checks now account for renamed files when determining which builds and tests to run. * If changed-file detection fails, validation falls back to the full build matrix, gated tests, Talos builds, and package coverage. * Base-package overlays now select artifact references based on branch context, supporting stacked pull requests and release branches. * **Tests** * Added coverage for changed-file detection, rename handling, branch scenarios, and fallback validation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->