From da6e8757ec34c8e0b74c6cc9d18ca26b022a5154 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 5 Sep 2023 13:23:33 +0200 Subject: [PATCH 1/7] ci: update github actions to latest stable Signed-off-by: CrazyMax (cherry picked from commit 70a270ac699dd2ce825bc1facda0bcc119867da6) # Conflicts: # .github/workflows/test-os.yml --- .github/workflows/.test.yml | 6 +++--- .github/workflows/buildkit.yml | 6 +++--- .github/workflows/dockerd.yml | 4 ++-- .github/workflows/frontend.yml | 2 +- .github/workflows/test-os.yml | 5 ++--- .github/workflows/validate.yml | 6 +++--- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/.test.yml b/.github/workflows/.test.yml index 224b23dab87c..6a50b9e70f60 100644 --- a/.github/workflows/.test.yml +++ b/.github/workflows/.test.yml @@ -44,7 +44,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Expose GitHub Runtime uses: crazy-max/ghaction-github-runtime@v2 @@ -91,7 +91,7 @@ jobs: }); - name: Build - uses: docker/bake-action@v2 + uses: docker/bake-action@v3 with: targets: integration-tests-base set: | @@ -126,7 +126,7 @@ jobs: done - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Expose GitHub Runtime uses: crazy-max/ghaction-github-runtime@v2 diff --git a/.github/workflows/buildkit.yml b/.github/workflows/buildkit.yml index 9d2ab5867eb3..61b47bc43950 100644 --- a/.github/workflows/buildkit.yml +++ b/.github/workflows/buildkit.yml @@ -62,7 +62,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare id: prep @@ -105,7 +105,7 @@ jobs: echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - @@ -152,7 +152,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Expose GitHub Runtime uses: crazy-max/ghaction-github-runtime@v2 diff --git a/.github/workflows/dockerd.yml b/.github/workflows/dockerd.yml index dde81e64cce4..347d4881b0f0 100644 --- a/.github/workflows/dockerd.yml +++ b/.github/workflows/dockerd.yml @@ -42,7 +42,7 @@ jobs: - name: Build if: ${{ env.DOCKER_BUILD == 'true' }} - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: ${{ env.DOCKER_VERSION }} target: binary @@ -93,7 +93,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Expose GitHub Runtime uses: crazy-max/ghaction-github-runtime@v2 diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index e04ccbf90c6c..792c22208c28 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -93,7 +93,7 @@ jobs: fi - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Expose GitHub Runtime uses: crazy-max/ghaction-github-runtime@v2 diff --git a/.github/workflows/test-os.yml b/.github/workflows/test-os.yml index de7ed663ecb5..e25de9c8df54 100644 --- a/.github/workflows/test-os.yml +++ b/.github/workflows/test-os.yml @@ -37,13 +37,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: "${{ env.GO_VERSION }}" - cache: true - name: Install gotestsum run: | diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 12838d6832df..017b90e4ae1e 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Matrix id: targets @@ -45,7 +45,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -55,6 +55,6 @@ jobs: buildkitd-flags: --debug - name: Validate - uses: docker/bake-action@v2 + uses: docker/bake-action@v3 with: targets: ${{ matrix.target }} From 2896fef0effd530b126f160028966bae660f4524 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 1 Feb 2024 08:58:43 +0100 Subject: [PATCH 2/7] ci(dockerd): bump docker to 25.0.2 Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> (cherry picked from commit 96890b5e1ae172f3349224b5ccdb36db6658397a) --- .github/workflows/dockerd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerd.yml b/.github/workflows/dockerd.yml index 347d4881b0f0..b56c1a19b85a 100644 --- a/.github/workflows/dockerd.yml +++ b/.github/workflows/dockerd.yml @@ -7,7 +7,7 @@ on: version: description: 'Docker version' required: true - default: '23.0.1' + default: '25.0.2' env: SETUP_BUILDX_VERSION: "latest" @@ -23,7 +23,7 @@ jobs: uses: actions/github-script@v6 with: script: | - const version = `${{ inputs.version }}` || '23.0.1'; + const version = `${{ inputs.version }}` || '25.0.2'; let build = 'true'; try { new URL(version); From 44a211f6848acb564072db612e06d237c2488041 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 1 Feb 2024 08:58:00 +0100 Subject: [PATCH 3/7] ci: bump actions/github-script to v7 Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> (cherry picked from commit dd2c59691ad783dcffbac82d3ebbcd29e986ef9c) --- .github/workflows/.test.yml | 2 +- .github/workflows/dockerd.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/.test.yml b/.github/workflows/.test.yml index 6a50b9e70f60..4e4274573142 100644 --- a/.github/workflows/.test.yml +++ b/.github/workflows/.test.yml @@ -65,7 +65,7 @@ jobs: - name: Set outputs id: set - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const yaml = require('js-yaml'); diff --git a/.github/workflows/dockerd.yml b/.github/workflows/dockerd.yml index b56c1a19b85a..8170e0b0d70d 100644 --- a/.github/workflows/dockerd.yml +++ b/.github/workflows/dockerd.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Prepare - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const version = `${{ inputs.version }}` || '25.0.2'; From c34f9ba2264724904a2f217576ed7fee7be83b15 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 1 Feb 2024 08:59:39 +0100 Subject: [PATCH 4/7] ci: bump codecov/codecov-action to v4 Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> (cherry picked from commit cae40f9c2b81d167ed9c2f31038a27a63d15a58e) --- .github/workflows/.test.yml | 2 +- .github/workflows/test-os.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/.test.yml b/.github/workflows/.test.yml index 4e4274573142..0e5f849b9df4 100644 --- a/.github/workflows/.test.yml +++ b/.github/workflows/.test.yml @@ -161,7 +161,7 @@ jobs: - name: Send to Codecov if: always() - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: directory: ./bin/testreports flags: ${{ matrix.codecov_flags }} diff --git a/.github/workflows/test-os.yml b/.github/workflows/test-os.yml index e25de9c8df54..232c712a125e 100644 --- a/.github/workflows/test-os.yml +++ b/.github/workflows/test-os.yml @@ -66,7 +66,7 @@ jobs: - name: Send to Codecov if: always() - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: directory: ./bin/testreports env_vars: RUNNER_OS From 4b3e70d6d23b91e088e659b87c1f332a2c63ea2b Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 1 Feb 2024 09:08:02 +0100 Subject: [PATCH 5/7] ci: bump actions/upload-artifact and actions/download-artifact to 4 Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> (cherry picked from commit 3ea25b7ae91029c77d03c43c6b590d2d343411ce) # Conflicts: # .github/workflows/.test.yml # .github/workflows/test-os.yml --- .github/workflows/.test.yml | 24 +++++++++++++----------- .github/workflows/buildkit.yml | 9 +++++---- .github/workflows/dockerd.yml | 4 ++-- .github/workflows/test-os.yml | 4 ++-- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/.github/workflows/.test.yml b/.github/workflows/.test.yml index 0e5f849b9df4..41b5ac240593 100644 --- a/.github/workflows/.test.yml +++ b/.github/workflows/.test.yml @@ -119,11 +119,20 @@ jobs: include: ${{ fromJson(needs.prepare.outputs.includes) }} steps: - - name: Environment variables + name: Prepare run: | for l in "${{ inputs.env }}"; do echo "${l?}" >> $GITHUB_ENV done + echo "TEST_REPORT_NAME=${{ github.job }}-$(echo "${{ matrix.pkg }}-${{ matrix.skip-integration-tests }}-${{ matrix.kind }}-${{ matrix.worker }}-${{ matrix.tags }}" | tr -dc '[:alnum:]-\n\r' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV + testFlags="${{ env.TESTFLAGS }}" + if [ -n "${{ matrix.tags }}" ]; then + testFlags="${testFlags} --tags=${{ matrix.tags }}" + fi + if [ -n "${{ matrix.worker }}" ]; then + testFlags="${testFlags} --run=//worker=${{ matrix.worker }}$" + fi + echo "TESTFLAGS=${testFlags}" >> $GITHUB_ENV - name: Checkout uses: actions/checkout@v4 @@ -144,16 +153,9 @@ jobs: name: Test continue-on-error: ${{ matrix.tags == 'nydus' }} run: | - export TEST_REPORT_SUFFIX=-${{ github.job }}-$(echo "${{ matrix.pkg }}-${{ matrix.skip-integration-tests }}-${{ matrix.kind }}-${{ matrix.worker }}-${{ matrix.tags }}" | tr -dc '[:alnum:]-\n\r' | tr '[:upper:]' '[:lower:]') - if [ -n "${{ matrix.tags }}" ]; then - TESTFLAGS="${TESTFLAGS} --tags=${{ matrix.tags }}" - export BUILDKITD_TAGS="${{ matrix.tags }}" - fi - if [ -n "${{ matrix.worker }}" ]; then - export TESTFLAGS="${TESTFLAGS} --run=//worker=${{ matrix.worker }}$" - fi ./hack/test ${{ matrix.kind }} env: + TEST_REPORT_SUFFIX: -${{ env.TEST_REPORT_NAME }} TEST_COVERAGE: 1 TESTPKGS: ${{ matrix.pkg }} SKIP_INTEGRATION_TESTS: ${{ matrix.skip-integration-tests }} @@ -174,7 +176,7 @@ jobs: - name: Upload test reports if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: test-reports + name: test-reports-${{ env.TEST_REPORT_NAME }} path: ./bin/testreports diff --git a/.github/workflows/buildkit.yml b/.github/workflows/buildkit.yml index 61b47bc43950..3889c0203a8e 100644 --- a/.github/workflows/buildkit.yml +++ b/.github/workflows/buildkit.yml @@ -132,9 +132,9 @@ jobs: CACHE_TO: type=gha,scope=binaries-${{ env.PLATFORM_PAIR }} - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: buildkit + name: buildkit-${{ env.PLATFORM_PAIR }} path: ${{ env.DESTDIR }}/* if-no-files-found: error @@ -193,10 +193,11 @@ jobs: steps: - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: buildkit path: ${{ env.DESTDIR }} + pattern: buildkit-* + merge-multiple: true - name: List artifacts run: | diff --git a/.github/workflows/dockerd.yml b/.github/workflows/dockerd.yml index 8170e0b0d70d..6d4c354bd8a0 100644 --- a/.github/workflows/dockerd.yml +++ b/.github/workflows/dockerd.yml @@ -63,7 +63,7 @@ jobs: wget -qO- "https://download.docker.com/linux/static/stable/x86_64/docker-${{ env.DOCKER_VERSION }}.tgz" | tar xvz --strip 1 - name: Upload dockerd - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dockerd path: /tmp/moby/dockerd @@ -109,7 +109,7 @@ jobs: buildkitd-flags: --debug - name: Download dockerd - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: dockerd path: ./build/ diff --git a/.github/workflows/test-os.yml b/.github/workflows/test-os.yml index 232c712a125e..9de7da33dad6 100644 --- a/.github/workflows/test-os.yml +++ b/.github/workflows/test-os.yml @@ -80,7 +80,7 @@ jobs: - name: Upload test reports if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: test-reports + name: test-reports-${{ matrix.os }} path: ./bin/testreports From 295439b99a9b758eb267a2d03f833cec2390dbad Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 1 Feb 2024 09:00:32 +0100 Subject: [PATCH 6/7] ci: bump gotest-annotations to fa6141aedf23596fb8bdcceab9cce8dadaa31bd9 Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> (cherry picked from commit 7cc77e471c120cd61cde74a79a05d5762e485491) --- .github/workflows/.test.yml | 2 +- .github/workflows/test-os.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/.test.yml b/.github/workflows/.test.yml index 41b5ac240593..ac53795df267 100644 --- a/.github/workflows/.test.yml +++ b/.github/workflows/.test.yml @@ -170,7 +170,7 @@ jobs: - name: Generate annotations if: always() - uses: crazy-max/.github/.github/actions/gotest-annotations@5af0882e0496d2f7e98a53ae4048e3d86682496f + uses: crazy-max/.github/.github/actions/gotest-annotations@fa6141aedf23596fb8bdcceab9cce8dadaa31bd9 with: directory: ./bin/testreports - diff --git a/.github/workflows/test-os.yml b/.github/workflows/test-os.yml index 9de7da33dad6..287b1b349d2f 100644 --- a/.github/workflows/test-os.yml +++ b/.github/workflows/test-os.yml @@ -74,7 +74,7 @@ jobs: - name: Generate annotations if: always() - uses: crazy-max/.github/.github/actions/gotest-annotations@5af0882e0496d2f7e98a53ae4048e3d86682496f + uses: crazy-max/.github/.github/actions/gotest-annotations@fa6141aedf23596fb8bdcceab9cce8dadaa31bd9 with: directory: ./bin/testreports - From 9d9334b7140346700c7715441907197ef4a00686 Mon Sep 17 00:00:00 2001 From: Andrey Epifanov Date: Thu, 17 Apr 2025 17:41:09 -0700 Subject: [PATCH 7/7] ci: skip testBasicGhaCacheImportExport test Skip `testBasicGhaCacheImportExport` due to GitHub Actions legacy cache service deprecation The legacy GitHub Actions cache service has been shut down as of April 15, 2025. Reference: https://gh.io/gha-cache-sunset As a result, the `testBasicGhaCacheImportExport` test fails on CI for the `v0.12` branch. To maintain CI stability, the test is skipped for `v0.12` branch Signed-off-by: Andrey Epifanov --- client/client_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/client/client_test.go b/client/client_test.go index 4765d1dd67dd..271612b359a9 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -5404,6 +5404,7 @@ func testBasicInlineCacheImportExport(t *testing.T, sb integration.Sandbox) { } func testBasicGhaCacheImportExport(t *testing.T, sb integration.Sandbox) { + t.Skipf("Unsupported GHA cache v2 (v1 is EOL)") integration.CheckFeatureCompat(t, sb, integration.FeatureCacheExport, integration.FeatureCacheImport,