From 83030635d78a5037cc3c19272469f09c321911cd Mon Sep 17 00:00:00 2001 From: Quentin Monnet Date: Mon, 2 Dec 2024 14:36:06 +0000 Subject: [PATCH 1/3] ci: Fix apt-get command in bump.yml The bump.yml workflow, running on a schedule, has always failed to complete so far [0]. This is because an "apt-get" command is missing the "install" subcommand, resulting in apt trying to interpret the name of the package we want to install as a subcommand, making the workflow fail. Fix the command, to hopefully make the workflow succeed. [0] https://github.com/githedgehog/dataplane/actions/workflows/bump.yml Fixes: 08ac167a5e01 ("build: Rework many parts of the build framework") Signed-off-by: Quentin Monnet --- .github/workflows/bump.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 066fd5d9..f5c54f69 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -51,7 +51,7 @@ jobs: - name: "install envsubst" run: | sudo apt-get update - sudo apt-get --yes --no-install-recommends gettext + sudo apt-get install --yes --no-install-recommends gettext - run: | ./scripts/update-versions.sh - name: "Create Pull Request" From 3bb74678b484aff229997b84eef9569059e8f1f4 Mon Sep 17 00:00:00 2001 From: Quentin Monnet Date: Tue, 3 Dec 2024 13:34:21 +0000 Subject: [PATCH 2/3] Revert "ci: Remove summary steps" This reverts commit 6d69a4e55096fd1034d361d6f584c098b5853dea. I thought we could have the individual jobs marked as required. But we hit the following issue: Individual jobs (build, test, push in dev.yml and sterile.yml) use a matrix to run with multiple Rust toolchains (stable/nightly). The Rust toolchain appears in the job name, whether we specify it or not. Then when trying to fill the list of required checks in GitHub's interface, we've got to use these names and as far as I can tell this must be an exact match, so we need to specify the toolchain. So far this looks good because ideally we'd like to have the checks using the stable toolchain, not nightly, as required. However, when the job is skipped, because no relevant files are touched in the Pull Request, the matrix is not generated, and the toolchain name is not appended to the job name as one might expect. In such a case, it's no longer possible to match the required checks with the titles of the status checks for the Pull Request, and the Pull Request is blocked. Let's re-add the summaries so we can mark them as required. Signed-off-by: Quentin Monnet --- .github/workflows/dev.yml | 13 +++++++++++++ .github/workflows/sterile.yml | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 93c329d3..308a3c11 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -175,3 +175,16 @@ jobs: timeout-minutes: 60 with: limit-access-to-actor: true + + summary: + name: "summary" + runs-on: "ubuntu-latest" + needs: + - build + if: ${{ always() && needs.build.result != 'skipped' }} + steps: + - name: "Flag any build matrix failures" + if: ${{ needs.build.result != 'success' }} + run: | + >&2 echo "A critical step failed!" + exit 1 diff --git a/.github/workflows/sterile.yml b/.github/workflows/sterile.yml index 44364ca5..a47a47db 100644 --- a/.github/workflows/sterile.yml +++ b/.github/workflows/sterile.yml @@ -229,3 +229,22 @@ jobs: timeout-minutes: 60 with: limit-access-to-actor: true + + summary: + name: "summary" + runs-on: "ubuntu-latest" + needs: + - test + - push + if: ${{ always() && needs.test.result != 'skipped' && needs.push.result != 'skipped' }} + steps: + - name: "Flag any test failures" + if: ${{ needs.test.result != 'success' }} + run: | + >&2 echo "One or more required tests failed" + exit 1 + - name: "Flag any push failures" + if: ${{ needs.push.result != 'success' }} + run: | + >&2 echo "One or more required pushes failed" + exit 1 From db3ab74e89b032c5aaad6cf6f2c2687fbfefe30b Mon Sep 17 00:00:00 2001 From: Quentin Monnet Date: Tue, 3 Dec 2024 13:42:25 +0000 Subject: [PATCH 3/3] ci: Remove manual insertion of matrix value from job titles GitHub adds the values from the matrix to the job titles by default if they're similar between concurrent jobs, there is no need to specify them manually. Signed-off-by: Quentin Monnet --- .github/workflows/dev.yml | 4 ++-- .github/workflows/sterile.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 308a3c11..14b84de2 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -68,7 +68,7 @@ jobs: - "stable" - "beta" - "nightly" - name: "Developer build (Rust ${{ matrix.rust }})" + name: "Developer build" runs-on: "lab" timeout-minutes: 45 steps: @@ -177,7 +177,7 @@ jobs: limit-access-to-actor: true summary: - name: "summary" + name: "Summary" runs-on: "ubuntu-latest" needs: - build diff --git a/.github/workflows/sterile.yml b/.github/workflows/sterile.yml index a47a47db..c28f5ebd 100644 --- a/.github/workflows/sterile.yml +++ b/.github/workflows/sterile.yml @@ -59,7 +59,7 @@ jobs: rust: - "stable" - "nightly" - name: "Sterile test run (Rust ${{ matrix.rust }})" + name: "Sterile test run" steps: - name: "login to ghcr.io" uses: "docker/login-action@v3" @@ -180,7 +180,7 @@ jobs: rust: - "stable" - "nightly" - name: "Push containers (Rust ${{ matrix.rust }})" + name: "Push containers" steps: - name: "login to ghcr.io" uses: "docker/login-action@v3" @@ -231,7 +231,7 @@ jobs: limit-access-to-actor: true summary: - name: "summary" + name: "Summary" runs-on: "ubuntu-latest" needs: - test