From 001bd6f361e112a535859d03277d44921718f107 Mon Sep 17 00:00:00 2001 From: Andoni Duarte Pintado Date: Mon, 15 Dec 2025 13:08:44 +0100 Subject: [PATCH 01/10] Rename the "precheck" stage in CI to "quick-checks" Most jobs in the "precheck" stage spend more time setting up their environment than running the script (seconds), this allows us to add a small always on dedicated runner instead of the autoscaled ones. Hence, the stage is renamed to "quick-checks", and a tag "smalljob" is added to the anchor so that these jobs are picked by the dedicated runner. (cherry picked from commit 9aa5041a88e20ab24559091494bbd20944723225) --- .gitlab-ci.yml | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 33f877a56c..c182b3d25e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,7 +101,7 @@ default: stages: - autoconf - - precheck + - quick-checks - build - unit - system @@ -357,10 +357,12 @@ stages: - *rule_source_other_than_mr - *rule_mr_system_tests -.precheck: &precheck_job +.quick-check: &quick_checks_job <<: *default_triggering_rules <<: *base_image - stage: precheck + stage: quick-checks + tags: + - smalljob .autoconf: &autoconf_job <<: *default_triggering_rules @@ -665,13 +667,13 @@ stages: ### Job Definitions -# Jobs in the precheck stage +# Jobs in the quick-checks stage autoreconf: <<: *autoconf_job misc: - <<: *precheck_job + <<: *quick_checks_job script: - sh util/checklibs.sh > checklibs.out - sh util/check-categories.sh @@ -688,7 +690,7 @@ misc: when: on_failure black: - <<: *precheck_job + <<: *quick_checks_job <<: *python_triggering_rules needs: [] script: @@ -702,14 +704,14 @@ black: when: on_failure vulture: - <<: *precheck_job + <<: *quick_checks_job <<: *python_triggering_rules needs: [] script: - vulture --exclude "*ans.py,conftest.py,re_compile_checker.py,isctest" --ignore-names "after_servers_start,bootstrap,pytestmark,autouse_*" bin/tests/system/ ci-variables: - <<: *precheck_job + <<: *quick_checks_job script: - export BIND_BASELINE_BRANCH="$(sed -n -E "s|^m4_define\(\[bind_VERSION_MINOR\], ([0-9]+)\)dnl$|\1|p" configure.ac)" # When testing a .0 release, compare it against the previous development @@ -725,7 +727,7 @@ ci-variables: dotenv: ci_vars.env ci-orphaned-anchors: - <<: *precheck_job + <<: *quick_checks_job script: - *git_clone_bind9-qa - bind9-qa/ci-orphaned-anchors/check-orphaned-anchors-ci.py .gitlab-ci.yml @@ -736,7 +738,7 @@ ci-orphaned-anchors: - .gitlab-ci.yml clang-format: - <<: *precheck_job + <<: *quick_checks_job rules: - if: '$CI_MERGE_REQUEST_DIFF_BASE_SHA != null' changes: @@ -759,7 +761,7 @@ clang-format: when: on_failure coccinelle: - <<: *precheck_job + <<: *quick_checks_job rules: - if: '$CI_MERGE_REQUEST_DIFF_BASE_SHA != null' changes: @@ -776,7 +778,7 @@ coccinelle: - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi doctest: - <<: *precheck_job + <<: *quick_checks_job # This script needs to: 1) fail if the doctest fails, 2) fail if # the junit.xml file is broken, 3) produce the junit.xml file even if # the doctest fails. Therefore, $RET is used to "cache" the @@ -805,7 +807,7 @@ doctest: - junit.xml pylint: - <<: *precheck_job + <<: *quick_checks_job <<: *python_triggering_rules needs: [] variables: @@ -816,7 +818,7 @@ pylint: - pylint --rcfile $CI_PROJECT_DIR/.pylintrc --load-plugins re_compile_checker --disable=wrong-import-position $(git ls-files 'bin/tests/system/*.py' | grep -vE '(ans\.py|vulture_ignore_list\.py)') reuse: - <<: *precheck_job + <<: *quick_checks_job needs: [] image: name: docker.io/fsfe/reuse:latest @@ -825,7 +827,7 @@ reuse: - reuse lint shfmt: - <<: *precheck_job + <<: *quick_checks_job <<: *shell_triggering_rules needs: [] script: @@ -839,7 +841,7 @@ shfmt: when: on_failure danger: - <<: *precheck_job + <<: *quick_checks_job needs: [] script: - pip install git+https://gitlab.isc.org/isc-projects/hazard.git @@ -848,20 +850,20 @@ danger: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' checkbashisms: - <<: *precheck_job + <<: *quick_checks_job <<: *shell_triggering_rules needs: [] script: - checkbashisms $(find . -path './.git' -prune -o -type f -exec sh -c 'head -n 1 "{}" | grep -qsF "#!/bin/sh"' \; -print) mypy: - <<: *precheck_job + <<: *quick_checks_job <<: *python_triggering_rules script: - mypy "bin/tests/system/isctest/" tarball-create: - stage: precheck + stage: quick-checks <<: *base_image <<: *default_triggering_rules script: @@ -2275,9 +2277,7 @@ shotgun:doh-get: # - *shotgun_rule_other generate-stress-test-configs: - <<: *base_image - <<: *default_triggering_rules - stage: precheck + <<: *quick_checks_job script: - *git_clone_bind9-qa - bind9-qa/stress/generate-stress-test-configs.py > stress-test-configs.yml From 18b85173502bbdafef7631b75d7ea1173d45666a Mon Sep 17 00:00:00 2001 From: Andoni Duarte Pintado Date: Mon, 15 Dec 2025 14:49:59 +0100 Subject: [PATCH 02/10] Rename the "postcheck" stage to "other-checks" in CI Rename the "postcheck" CI stage to the more generic "other-checks". Slower jobs that still run in autoscaled runners belong here, as opposed to the lightweight ones in "quick-checks". (cherry picked from commit 6d442c4a06a35b6551a75e31e30254e47af2339f) --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c182b3d25e..a532df6f02 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -107,7 +107,7 @@ stages: - system - performance - docs - - postcheck + - other-checks - postmerge - release @@ -1328,7 +1328,7 @@ gcc:trixie:amd64cross32: scan-build: <<: *default_triggering_rules <<: *base_image - stage: postcheck + stage: other-checks variables: CC: "${CLANG}" CFLAGS: "${CFLAGS_COMMON}" @@ -1684,7 +1684,7 @@ generate-tsan-stress-test-configs: tsan:stress: <<: *default_triggering_rules - stage: postcheck + stage: other-checks variables: PARENT_PIPELINE_ID: $CI_PIPELINE_ID trigger: @@ -2139,7 +2139,7 @@ customer-git:tag: coverity: <<: *base_image - stage: postcheck + stage: other-checks variables: CC: gcc CFLAGS: "${CFLAGS_COMMON} -Og" @@ -2312,7 +2312,7 @@ stress-test-child-pipeline: # from using the "bind9" repo clone; we need to clone it ourselves. fsck: <<: *base_image - stage: postcheck + stage: other-checks variables: GIT_STRATEGY: none script: @@ -2326,7 +2326,7 @@ fsck: gcov: <<: *base_image <<: *default_triggering_rules - stage: postcheck + stage: other-checks needs: - job: system:gcc:trixie:amd64 artifacts: true From d2b983195061bbef892a27fb4cc532e73f609b55 Mon Sep 17 00:00:00 2001 From: Andoni Duarte Pintado Date: Mon, 15 Dec 2025 14:47:08 +0100 Subject: [PATCH 03/10] Create "other_checks_job" anchor in CI yaml Use an anchor for the common parts of "other-checks" jobs in CI yaml. (cherry picked from commit e61bc3ad72d65b57ae2a96c25c944a04fa447454) --- .gitlab-ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a532df6f02..c980a82a78 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -364,6 +364,12 @@ stages: tags: - smalljob +.other-check: &other_checks_job + <<: *default_triggering_rules + <<: *base_image + stage: other-checks + needs: [] + .autoconf: &autoconf_job <<: *default_triggering_rules <<: *base_image @@ -1326,9 +1332,7 @@ gcc:trixie:amd64cross32: -o scan-build.reports make -j${BUILD_PARALLEL_JOBS:-1} all V=1 scan-build: - <<: *default_triggering_rules - <<: *base_image - stage: other-checks + <<: *other_checks_job variables: CC: "${CLANG}" CFLAGS: "${CFLAGS_COMMON}" @@ -2138,8 +2142,7 @@ customer-git:tag: - grep -q 'Build successfully submitted' curl-response.txt coverity: - <<: *base_image - stage: other-checks + <<: *other_checks_job variables: CC: gcc CFLAGS: "${CFLAGS_COMMON} -Og" @@ -2311,8 +2314,7 @@ stress-test-child-pipeline: # only in one branch, preferably "main". GitLab's clone strategy prevents us # from using the "bind9" repo clone; we need to clone it ourselves. fsck: - <<: *base_image - stage: other-checks + <<: *other_checks_job variables: GIT_STRATEGY: none script: @@ -2324,9 +2326,7 @@ fsck: needs: [] gcov: - <<: *base_image - <<: *default_triggering_rules - stage: other-checks + <<: *other_checks_job needs: - job: system:gcc:trixie:amd64 artifacts: true From 00e7621cd117bb0bea84f254c3f8385d3f6a0f41 Mon Sep 17 00:00:00 2001 From: Andoni Duarte Pintado Date: Mon, 15 Dec 2025 15:50:28 +0100 Subject: [PATCH 04/10] Move slower CI jobs out of "quick-checks" stage Jobs with more than one minute of runtime are not considered for the small VM. The "tarball-create" job goes to the more appropriate "build" stage. "coccinelle" and "checkbashisms" are moved to the generic "other-checks". (cherry picked from commit ba5844a1de9a8ede9396112ae78e22d7dcfb95b7) --- .gitlab-ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c980a82a78..8f9d8cf249 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -767,7 +767,7 @@ clang-format: when: on_failure coccinelle: - <<: *quick_checks_job + <<: *other_checks_job rules: - if: '$CI_MERGE_REQUEST_DIFF_BASE_SHA != null' changes: @@ -856,7 +856,7 @@ danger: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' checkbashisms: - <<: *quick_checks_job + <<: *other_checks_job <<: *shell_triggering_rules needs: [] script: @@ -869,9 +869,8 @@ mypy: - mypy "bin/tests/system/isctest/" tarball-create: - stage: quick-checks + <<: *build_job <<: *base_image - <<: *default_triggering_rules script: - ./configure --enable-maintainer-mode - make maintainer-clean From 9694a1a06e367110d7027f5bf44fe8ffa634c8e2 Mon Sep 17 00:00:00 2001 From: Andoni Duarte Pintado Date: Mon, 15 Dec 2025 17:01:58 +0100 Subject: [PATCH 05/10] Move CI stage "other-checks" right after "quick-checks" Move CI stage "other-checks" right after "quick-checks" and get the jobs in it as close to each other as possible in .gitlab-ci.yml. Since no job is allowed to depend (via "needs") on any job that is assigned to a stage later than its own, move the "tsan:stress" and "gcov" jobs to the "system" stage. (cherry picked from commit 4f89d32bff81935e9688b9664a68e517fb585194) --- .gitlab-ci.yml | 240 +++++++++++++++++++++++++------------------------ 1 file changed, 122 insertions(+), 118 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8f9d8cf249..0608c247a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -102,12 +102,12 @@ default: stages: - autoconf - quick-checks + - other-checks - build - unit - system - performance - docs - - other-checks - postmerge - release @@ -766,23 +766,6 @@ clang-format: expire_in: "1 week" when: on_failure -coccinelle: - <<: *other_checks_job - rules: - - if: '$CI_MERGE_REQUEST_DIFF_BASE_SHA != null' - changes: - - '**/*.c' - - '**/*.h' - - 'cocci/**' - - 'util/check-cocci.sh' - - *rule_mr_manual - - *rule_tag - - *rule_source_other_than_mr - needs: [] - script: - - util/check-cocci.sh - - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi - doctest: <<: *quick_checks_job # This script needs to: 1) fail if the doctest fails, 2) fail if @@ -855,6 +838,14 @@ danger: rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' +mypy: + <<: *quick_checks_job + <<: *python_triggering_rules + script: + - mypy "bin/tests/system/isctest/" + +# Jobs in the other-checks stage + checkbashisms: <<: *other_checks_job <<: *shell_triggering_rules @@ -862,11 +853,116 @@ checkbashisms: script: - checkbashisms $(find . -path './.git' -prune -o -type f -exec sh -c 'head -n 1 "{}" | grep -qsF "#!/bin/sh"' \; -print) -mypy: - <<: *quick_checks_job - <<: *python_triggering_rules +coccinelle: + <<: *other_checks_job + rules: + - if: '$CI_MERGE_REQUEST_DIFF_BASE_SHA != null' + changes: + - '**/*.c' + - '**/*.h' + - 'cocci/**' + - 'util/check-cocci.sh' + - *rule_mr_manual + - *rule_tag + - *rule_source_other_than_mr + needs: [] script: - - mypy "bin/tests/system/isctest/" + - util/check-cocci.sh + - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi + +# Jobs for scan-build builds on Debian 13 "trixie" (amd64) + +.scan_build: &scan_build + - ${SCAN_BUILD} --html-title="BIND 9 ($CI_COMMIT_SHORT_SHA)" + --keep-cc + --status-bugs + --keep-going + -o scan-build.reports make -j${BUILD_PARALLEL_JOBS:-1} all V=1 + +scan-build: + <<: *other_checks_job + variables: + CC: "${CLANG}" + CFLAGS: "${CFLAGS_COMMON}" + CONFIGURE: "${SCAN_BUILD} ./configure" + EXTRA_CONFIGURE: "--with-libidn2" + before_script: + - *list_installed_package_versions + script: + - *configure + - *scan_build + needs: + - job: autoreconf + artifacts: true + artifacts: + paths: + - scan-build.reports/ + when: on_failure + +# Coverity Scan analysis upload + +.coverity_prep: &coverity_prep + - curl --output /tmp/cov-analysis-linux64.md5 https://scan.coverity.com/download/linux64 + --form project=$COVERITY_SCAN_PROJECT_NAME + --form token=$COVERITY_SCAN_TOKEN + --form md5=1 + - curl --output /tmp/cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64 + --form project=$COVERITY_SCAN_PROJECT_NAME + --form token=$COVERITY_SCAN_TOKEN + - test "$(md5sum /tmp/cov-analysis-linux64.tgz | awk '{ print $1 }')" = "$(cat /tmp/cov-analysis-linux64.md5)" + - tar --extract --gzip --file=/tmp/cov-analysis-linux64.tgz --directory=/tmp + - test -d /tmp/cov-analysis-linux64-* + +.coverity_build: &coverity_build + - /tmp/cov-analysis-linux64-*/bin/cov-build --dir /tmp/cov-int sh -c 'make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1' + - tar --create --gzip --file=/tmp/cov-int.tar.gz --directory /tmp cov-int + - curl -v https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME + --form token=$COVERITY_SCAN_TOKEN + --form email=bind-changes@isc.org + --form file=@/tmp/cov-int.tar.gz + --form version="$(git rev-parse --short HEAD)" + --form description="$(git rev-parse --short HEAD) / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID" 2>&1 + | tee curl-response.txt + - grep -q 'Build successfully submitted' curl-response.txt + +coverity: + <<: *other_checks_job + variables: + CC: gcc + CFLAGS: "${CFLAGS_COMMON} -Og" + EXTRA_CONFIGURE: "--with-libidn2" + script: + - *coverity_prep + - *configure + - *coverity_build + after_script: + - mv -v /tmp/cov-int.tar.gz ${CI_PROJECT_DIR}/ + needs: + - job: autoreconf + artifacts: true + artifacts: + paths: + - curl-response.txt + - cov-int.tar.gz + expire_in: "1 week" + when: on_failure + rules: + - if: '$COVERITY_SCAN_PROJECT_NAME != null && $COVERITY_SCAN_TOKEN != null' + +# git fsck operates over the whole repository and is sufficient to schedule it +# only in one branch, preferably "main". GitLab's clone strategy prevents us +# from using the "bind9" repo clone; we need to clone it ourselves. +fsck: + <<: *other_checks_job + variables: + GIT_STRATEGY: none + script: + - git clone https://gitlab.isc.org/isc-projects/bind9.git bind9-full-clone + - cd bind9-full-clone/ + - git fsck + rules: + - if: '$CI_PIPELINE_SOURCE == "schedule"' + needs: [] tarball-create: <<: *build_job @@ -1321,35 +1417,6 @@ gcc:trixie:amd64cross32: <<: *debian_trixie_amd64cross32_image <<: *build_job -# Jobs for scan-build builds on Debian 13 "trixie" (amd64) - -.scan_build: &scan_build - - ${SCAN_BUILD} --html-title="BIND 9 ($CI_COMMIT_SHORT_SHA)" - --keep-cc - --status-bugs - --keep-going - -o scan-build.reports make -j${BUILD_PARALLEL_JOBS:-1} all V=1 - -scan-build: - <<: *other_checks_job - variables: - CC: "${CLANG}" - CFLAGS: "${CFLAGS_COMMON}" - CONFIGURE: "${SCAN_BUILD} ./configure" - EXTRA_CONFIGURE: "--with-libidn2" - before_script: - - *list_installed_package_versions - script: - - *configure - - *scan_build - needs: - - job: autoreconf - artifacts: true - artifacts: - paths: - - scan-build.reports/ - when: on_failure - # Jobs for strict OpenSSL 3.x (no deprecated) GCC builds on Debian "trixie" (amd64) # Run with pkcs11-provider tests @@ -1687,7 +1754,7 @@ generate-tsan-stress-test-configs: tsan:stress: <<: *default_triggering_rules - stage: other-checks + stage: system variables: PARENT_PIPELINE_ID: $CI_PIPELINE_ID trigger: @@ -2114,56 +2181,6 @@ customer-git:tag: script: - bind9-qa/releng/push_to_customer_repository.py --tag "$CI_COMMIT_TAG" --entitlements isc-customer-settings/entitlements.yaml --force -# Coverity Scan analysis upload - -.coverity_prep: &coverity_prep - - curl --output /tmp/cov-analysis-linux64.md5 https://scan.coverity.com/download/linux64 - --form project=$COVERITY_SCAN_PROJECT_NAME - --form token=$COVERITY_SCAN_TOKEN - --form md5=1 - - curl --output /tmp/cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64 - --form project=$COVERITY_SCAN_PROJECT_NAME - --form token=$COVERITY_SCAN_TOKEN - - test "$(md5sum /tmp/cov-analysis-linux64.tgz | awk '{ print $1 }')" = "$(cat /tmp/cov-analysis-linux64.md5)" - - tar --extract --gzip --file=/tmp/cov-analysis-linux64.tgz --directory=/tmp - - test -d /tmp/cov-analysis-linux64-* - -.coverity_build: &coverity_build - - /tmp/cov-analysis-linux64-*/bin/cov-build --dir /tmp/cov-int sh -c 'make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1' - - tar --create --gzip --file=/tmp/cov-int.tar.gz --directory /tmp cov-int - - curl -v https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME - --form token=$COVERITY_SCAN_TOKEN - --form email=bind-changes@isc.org - --form file=@/tmp/cov-int.tar.gz - --form version="$(git rev-parse --short HEAD)" - --form description="$(git rev-parse --short HEAD) / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID" 2>&1 - | tee curl-response.txt - - grep -q 'Build successfully submitted' curl-response.txt - -coverity: - <<: *other_checks_job - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON} -Og" - EXTRA_CONFIGURE: "--with-libidn2" - script: - - *coverity_prep - - *configure - - *coverity_build - after_script: - - mv -v /tmp/cov-int.tar.gz ${CI_PROJECT_DIR}/ - needs: - - job: autoreconf - artifacts: true - artifacts: - paths: - - curl-response.txt - - cov-int.tar.gz - expire_in: "1 week" - when: on_failure - rules: - - if: '$COVERITY_SCAN_PROJECT_NAME != null && $COVERITY_SCAN_TOKEN != null' - # Respdiff tests respdiff: @@ -2309,23 +2326,10 @@ stress-test-child-pipeline: - job: generate-stress-test-configs artifacts: true -# git fsck operates over the whole repository and is sufficient to schedule it -# only in one branch, preferably "main". GitLab's clone strategy prevents us -# from using the "bind9" repo clone; we need to clone it ourselves. -fsck: - <<: *other_checks_job - variables: - GIT_STRATEGY: none - script: - - git clone https://gitlab.isc.org/isc-projects/bind9.git bind9-full-clone - - cd bind9-full-clone/ - - git fsck - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - needs: [] - gcov: - <<: *other_checks_job + <<: *default_triggering_rules + <<: *base_image + stage: system needs: - job: system:gcc:trixie:amd64 artifacts: true From 292951be907443ec00aa55304123b297921b9b3b Mon Sep 17 00:00:00 2001 From: Andoni Duarte Pintado Date: Mon, 15 Dec 2025 17:19:28 +0100 Subject: [PATCH 06/10] Add faster CI jobs to the "quick-checks" stage Given the short runtime (<1min) of the "linkcheck" and "generate-tsan-stress-test-configs" CI jobs, move them to the "quick-checks" stage. (cherry picked from commit ae7682915712e7abbfb3cbfefc837f0505b68bd0) --- .gitlab-ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0608c247a9..595f93fc2f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1010,8 +1010,7 @@ changelog: untracked: true linkcheck: - <<: *base_image - stage: docs + <<: *quick_checks_job script: # Some domains tested by linkchecker may think that we connect to them too # often and will refuse connection or reply with and error code, which @@ -1741,9 +1740,7 @@ unit:clang:tsan: artifacts: true generate-tsan-stress-test-configs: - <<: *base_image - <<: *default_triggering_rules - stage: system + <<: *quick_checks_job script: - util/generate-tsan-stress-jobs.py > tsan-stress-test-configs.yml artifacts: From 5044be551c4ea973a80c171fc10d8cef1b56dd6d Mon Sep 17 00:00:00 2001 From: Andoni Duarte Pintado Date: Mon, 15 Dec 2025 17:21:27 +0100 Subject: [PATCH 07/10] Group CI jobs in "quick-checks" stage together Move the jobs in the "quick-checks" stage to the same place in .gitlab-ci.yml. (cherry picked from commit b3ac6b47d9bd347a2a008cd834a8553d585e9308) --- .gitlab-ci.yml | 70 +++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 595f93fc2f..30734d6888 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -844,6 +844,41 @@ mypy: script: - mypy "bin/tests/system/isctest/" +linkcheck: + <<: *quick_checks_job + script: + # Some domains tested by linkchecker may think that we connect to them too + # often and will refuse connection or reply with and error code, which + # makes this job fail. Let's check links only on Wednesdays. + - if [ "$(date +%w)" != "3" ]; then exit 0; fi + - pushd doc/arm/ > /dev/null && sphinx-build -b linkcheck . linkcheck_output/ + artifacts: + paths: + - doc/arm/linkcheck_output/ + rules: + - if: '$CI_PIPELINE_SOURCE == "schedule"' + needs: [] + +generate-stress-test-configs: + <<: *quick_checks_job + script: + - *git_clone_bind9-qa + - bind9-qa/stress/generate-stress-test-configs.py > stress-test-configs.yml + artifacts: + paths: + - stress-test-configs.yml + needs: [] + +generate-tsan-stress-test-configs: + <<: *quick_checks_job + script: + - util/generate-tsan-stress-jobs.py > tsan-stress-test-configs.yml + artifacts: + paths: + - tsan-stress-test-configs.yml + needs: [] + when: manual + # Jobs in the other-checks stage checkbashisms: @@ -1009,21 +1044,6 @@ changelog: artifacts: untracked: true -linkcheck: - <<: *quick_checks_job - script: - # Some domains tested by linkchecker may think that we connect to them too - # often and will refuse connection or reply with and error code, which - # makes this job fail. Let's check links only on Wednesdays. - - if [ "$(date +%w)" != "3" ]; then exit 0; fi - - pushd doc/arm/ > /dev/null && sphinx-build -b linkcheck . linkcheck_output/ - artifacts: - paths: - - doc/arm/linkcheck_output/ - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - needs: [] - docs: <<: *default_triggering_rules <<: *base_image @@ -1739,16 +1759,6 @@ unit:clang:tsan: - job: clang:tsan artifacts: true -generate-tsan-stress-test-configs: - <<: *quick_checks_job - script: - - util/generate-tsan-stress-jobs.py > tsan-stress-test-configs.yml - artifacts: - paths: - - tsan-stress-test-configs.yml - needs: [] - when: manual - tsan:stress: <<: *default_triggering_rules stage: system @@ -2292,16 +2302,6 @@ shotgun:doh-get: # - *shotgun_rule_tag # - *shotgun_rule_other -generate-stress-test-configs: - <<: *quick_checks_job - script: - - *git_clone_bind9-qa - - bind9-qa/stress/generate-stress-test-configs.py > stress-test-configs.yml - artifacts: - paths: - - stress-test-configs.yml - needs: [] - stress-test-child-pipeline: <<: *default_triggering_rules stage: performance From 5b087d8964259f4f2b67bc0e5d6170e73d7279ec Mon Sep 17 00:00:00 2001 From: Andoni Duarte Pintado Date: Fri, 19 Dec 2025 11:55:30 +0100 Subject: [PATCH 08/10] Move "needs: []" to the "quick_checks_job" anchor Most jobs in this stage have it by default, so it makes sense to add it to their common anchor. Jobs with different "needs:" will override it. (cherry picked from commit 432b7d7954bc37175c5db20c2f5894214ca0661d) --- .gitlab-ci.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 30734d6888..3f8450a101 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -361,6 +361,7 @@ stages: <<: *default_triggering_rules <<: *base_image stage: quick-checks + needs: [] tags: - smalljob @@ -689,7 +690,6 @@ misc: - bash util/unused-headers.sh # Check dangling symlinks in the repository - if find . -xtype l | grep .; then exit 1; fi - needs: [] artifacts: paths: - checklibs.out @@ -698,7 +698,6 @@ misc: black: <<: *quick_checks_job <<: *python_triggering_rules - needs: [] script: - black $(git ls-files '*.py') - git diff > black.patch @@ -712,7 +711,6 @@ black: vulture: <<: *quick_checks_job <<: *python_triggering_rules - needs: [] script: - vulture --exclude "*ans.py,conftest.py,re_compile_checker.py,isctest" --ignore-names "after_servers_start,bootstrap,pytestmark,autouse_*" bin/tests/system/ @@ -737,7 +735,6 @@ ci-orphaned-anchors: script: - *git_clone_bind9-qa - bind9-qa/ci-orphaned-anchors/check-orphaned-anchors-ci.py .gitlab-ci.yml - needs: [] rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' changes: @@ -755,7 +752,6 @@ clang-format: - *rule_mr_manual - *rule_tag - *rule_source_other_than_mr - needs: [] script: - if [ -r .clang-format ]; then "${CLANG_FORMAT}" -i -style=file $(git ls-files '*.c' '*.h'); fi - git diff > clang-format.patch @@ -798,7 +794,6 @@ doctest: pylint: <<: *quick_checks_job <<: *python_triggering_rules - needs: [] variables: PYTHONPATH: "${CI_PROJECT_DIR}/bin/tests/system" script: @@ -808,7 +803,6 @@ pylint: reuse: <<: *quick_checks_job - needs: [] image: name: docker.io/fsfe/reuse:latest entrypoint: [""] @@ -818,7 +812,6 @@ reuse: shfmt: <<: *quick_checks_job <<: *shell_triggering_rules - needs: [] script: - shfmt -w -i 2 -ci -bn . $(find . -name "*.sh.in") - git diff > shfmt.patch @@ -831,7 +824,6 @@ shfmt: danger: <<: *quick_checks_job - needs: [] script: - pip install git+https://gitlab.isc.org/isc-projects/hazard.git - hazard @@ -857,7 +849,6 @@ linkcheck: - doc/arm/linkcheck_output/ rules: - if: '$CI_PIPELINE_SOURCE == "schedule"' - needs: [] generate-stress-test-configs: <<: *quick_checks_job @@ -867,7 +858,6 @@ generate-stress-test-configs: artifacts: paths: - stress-test-configs.yml - needs: [] generate-tsan-stress-test-configs: <<: *quick_checks_job @@ -876,7 +866,6 @@ generate-tsan-stress-test-configs: artifacts: paths: - tsan-stress-test-configs.yml - needs: [] when: manual # Jobs in the other-checks stage From 760f95bafa9e771ab65795b4eb9c0aed9df91245 Mon Sep 17 00:00:00 2001 From: Andoni Duarte Pintado Date: Tue, 13 Jan 2026 16:32:45 +0100 Subject: [PATCH 09/10] De-duplicate yaml for "other-checks" jobs In .gitlab-ci.yml, since "&other_checks_job" has "needs: []", remove that line from the jobs that use that anchor. (cherry picked from commit 66175b448cbc0db5b26095dae47333549e82c325) --- .gitlab-ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f8450a101..9927d8f46b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -873,7 +873,6 @@ generate-tsan-stress-test-configs: checkbashisms: <<: *other_checks_job <<: *shell_triggering_rules - needs: [] script: - checkbashisms $(find . -path './.git' -prune -o -type f -exec sh -c 'head -n 1 "{}" | grep -qsF "#!/bin/sh"' \; -print) @@ -889,7 +888,6 @@ coccinelle: - *rule_mr_manual - *rule_tag - *rule_source_other_than_mr - needs: [] script: - util/check-cocci.sh - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi @@ -986,7 +984,6 @@ fsck: - git fsck rules: - if: '$CI_PIPELINE_SOURCE == "schedule"' - needs: [] tarball-create: <<: *build_job From b9106402cb61c264ad4d336b205f01df35bcb9f0 Mon Sep 17 00:00:00 2001 From: Andoni Duarte Pintado Date: Thu, 15 Jan 2026 12:16:30 +0100 Subject: [PATCH 10/10] Add smalljob tag to small jobs not in the quick-checks stage Jobs using the "post_merge" and "manual_release_job_qa" anchors also complete in less than a minute, so they now include the "smalljob" tag. Since the "release" job is also a fast one, but without an anchor, the "smalljob" tag is added to its definition. The "autoconf_job" definion also includes the tag and it is kept in its own stage. (cherry picked from commit e9f2b7944e6d9ad3e93357046828e92d61e15108) --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9927d8f46b..1521d11760 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -375,6 +375,8 @@ stages: <<: *default_triggering_rules <<: *base_image stage: autoconf + tags: + - smalljob script: - autoreconf -fi artifacts: @@ -1909,6 +1911,8 @@ release: artifacts: true - job: docs artifacts: true + tags: + - smalljob rules: - *rule_tag artifacts: @@ -2039,6 +2043,8 @@ publish: needs: - job: staging artifacts: false + tags: + - smalljob # Setting the FORCE_CVE_IDS environment variable to a comma-separated # list of CVE IDs enables overriding the autodetected ones. @@ -2365,6 +2371,8 @@ pairwise: <<: *base_image stage: postmerge needs: [] + tags: + - smalljob # post-merge processes should run even if another MR was merged while the job was running (or queued) interruptible: false variables: