From e5af4c97bdfc395bc9fb9cc142001b66a6361e48 Mon Sep 17 00:00:00 2001 From: Mauro Ezequiel Moltrasio Date: Wed, 17 Sep 2025 16:13:28 +0200 Subject: [PATCH] Always rebuild builder and test container on PRs to release branches By nature, the release branches can drift from the master branch, this includes differences to the dependencies installed to the builder image and the tests the collector binary is run against. Because the builder and integration tests images both take a pretty long time to build, we originally settled on only rebuilding these when it was absolutely necessary and added a couple PR labels to have them rebuilt on demand. Since we now have Power and Z runners for faster builds and the integration tests are being built in a faster manner too, we should just rebuild these on PRs targeting the release branch to reduce any potential confusion on colleagues that may not be aware of this intricate configuration. --- .github/workflows/collector-builder.yml | 3 ++- .github/workflows/integration-test-containers.yml | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/collector-builder.yml b/.github/workflows/collector-builder.yml index ae1aa487c8..d2cac9c9bd 100644 --- a/.github/workflows/collector-builder.yml +++ b/.github/workflows/collector-builder.yml @@ -51,7 +51,8 @@ jobs: github.ref_type == 'tag' || startsWith(github.ref_name, 'release-') )) || contains(github.event.pull_request.labels.*.name, 'build-builder-image') || - github.event_name == 'schedule' + github.event_name == 'schedule' || + (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release-')) run: | COLLECTOR_BUILDER_TAG="${DEFAULT_BUILDER_TAG}" if [[ "${{ github.event_name }}" == 'pull_request' || \ diff --git a/.github/workflows/integration-test-containers.yml b/.github/workflows/integration-test-containers.yml index a13bef7a2d..6b9f4adec6 100644 --- a/.github/workflows/integration-test-containers.yml +++ b/.github/workflows/integration-test-containers.yml @@ -55,11 +55,13 @@ jobs: needs: - should-build-test-image if: | - ( + (( github.event_name != 'pull_request' || needs.should-build-test-image.outputs.build-image == 'true' || contains(github.event.pull_request.labels.*.name, 'rebuild-test-container') - ) && + ) || ( + github.event_name == 'pull_request' && startsWith(github.base_ref, 'release-') + )) && !contains(github.event.pull_request.labels.*.name, 'skip-integration-tests') outputs: