Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build summary feature doesn't work with GitHub Enterprise Server #1154

Closed
3 tasks done
ponkio-o opened this issue Jun 24, 2024 · 9 comments
Closed
3 tasks done

Build summary feature doesn't work with GitHub Enterprise Server #1154

ponkio-o opened this issue Jun 24, 2024 · 9 comments

Comments

@ponkio-o
Copy link

ponkio-o commented Jun 24, 2024

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

Build Summary introduced in v6.0.0 doesn't work with GHES v3.11.7.

My guess is that it is because the artifact v2 library used internally does not support GHES.

@actions/artifact v2+, upload-artifact@v4+, and download-artifact@v4+ are not currently supported on GHES yet. The previous version of this package can be found at this tag and on npm.

Expected behaviour

Correctly working build summary.

Actual behaviour

The following error message on Post Build and push step.

Warning: Failed to get backend IDs: The provided JWT token is invalid and/or missing claims

Repository URL

No response

Workflow run URL

No response

YAML workflow

name: build test

on:
  pull_request:

env:
  ACTIONS_STEP_DEBUG: true

jobs:
  checkout:
    runs-on:
      group: mygroup
      labels: instance-medium
    steps:
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3.0.0
        id: buildx
        with:
          driver: remote
          endpoint: tcp://127.0.0.1:1234
      - name: Create simple Dockerfile
        run: |
          echo -e "FROM busybox\nRUN echo foobar > /hello.txt\nRUN cat /hello.txt" > Dockerfile
      - name: Build and push
        uses: docker/build-push-action@v6.1.0
        with:
          builder: ${{ steps.buildx.outputs.name }}
          push: false
          load: true
          context: "."
          tags: build-test
          cache-from: type=gha
          cache-to: type=gha,mode=max
      - name: Test
        run: |
          docker run --rm build-test
      - name: List docker images
        run: docker images
      - name: Test container action
        uses: actions/hello-world-docker-action@main
        with:
          who-to-greet: "Mona the Octocat"

Workflow logs

Post job cleanup.
Generating build summary
  exporting build record to /_work/test-my-ecs-43Kn2kkJfG1Eb/_temp/docker-actions-toolkit-Jl9ozK/export
  /usr/bin/mkfifo /_work/test-my-ecs-43Kn2kkJfG1Eb/_temp/docker-actions-toolkit-Jl9ozK/buildx-in-78BHfW.fifo
  /usr/bin/mkfifo /_work/test-my-ecs-43Kn2kkJfG1Eb/_temp/docker-actions-toolkit-Jl9ozK/buildx-out-ufKka9.fifo
  docker buildx --builder builder-fe924839-4148-4c33-97ad-128ab332049b dial-stdio
  docker run --rm -i -v /home/runner/.docker/buildx/refs:/buildx-refs -v /_work/test-my-ecs-43Kn2kkJfG1Eb/_temp/docker-actions-toolkit-Jl9ozK/export:/out docker.io/dockereng/export-build:latest --ref-state-dir=/buildx-refs --node=builder-fe924839-4148-4c33-97ad-128ab332049b/builder-fe924839-4148-4c33-97ad-128ab332049b0 --ref=n70x36273vnv08m7yqecabwos --uid=1000 --gid=121
  Unable to find image 'dockereng/export-build:latest' locally
  latest: Pulling from dockereng/export-build
  bb431e31f450: Pulling fs layer
  03f1761d02d6: Pulling fs layer
  03f1761d02d6: Verifying Checksum
  03f1761d02d6: Download complete
  bb431e31f450: Verifying Checksum
  bb431e31f450: Download complete
  bb431e31f450: Pull complete
  03f1761d02d6: Pull complete
  Digest: sha256:3dfedea3148487c108965dede834f22e81528fc5b2f3989e4b8ecec2f8fe10ae
  Status: Downloaded newer image for dockereng/export-build:latest
  Parsing /_work/test-my-ecs-43Kn2kkJfG1Eb/_temp/docker-actions-toolkit-Jl9ozK/export/summary.json
  Build record exported to /_work/test-my-ecs-43Kn2kkJfG1Eb/_temp/docker-actions-toolkit-Jl9ozK/export/my~actions-sandbox~N70X36.dockerbuild (17 KB)
  Warning: Failed to get backend IDs: The provided JWT token is invalid and/or missing claims
Removing temp folder /_work/test-my-ecs-43Kn2kkJfG1Eb/_temp/docker-actions-toolkit-YvYQtJ
Post cache
  State not set

BuildKit logs

No response

Additional info

GitHub Enterprise Server: v3.11.7
actions/runner: v2.317.0

@crazy-max crazy-max added kind/bug Something isn't working and removed status/triage labels Jun 24, 2024
@crazy-max
Copy link
Member

Build Summary introduced in v6.0.0 doesn't work with GHES v3.11.7.

My guess is that it is because the artifact v2 library used internally does not support GHES.

@actions/artifact v2+, upload-artifact@v4+, and download-artifact@v4+ are not currently supported on GHES yet. The previous version of this package can be found at this tag and on npm.

Yes this seems to be the issue, I will look if we can downgrade to v1.

@crazy-max
Copy link
Member

crazy-max commented Jun 26, 2024

Downgrading to v1 does not look promising as we can't interact with azure blob storage API anymore, which is needed in our case to set appropriate content-disposition header when uploading the artifact: https://github.com/docker/actions-toolkit/blob/2e70a0cac6b3a7fad73b736a8fc017036b1b082f/src/github.ts#L154-L173

In the meantime we will print a better error message for GHES users: docker/actions-toolkit#382

@dvdksn Could we add a callout in https://docs.docker.com/build/ci/github-actions/build-summary/ page saying that Build summary is not yet supported on GHES?

@ponkio-o
Copy link
Author

ponkio-o commented Jul 3, 2024

@crazy-max Thank you for your work!!
When running v6.3.0 on GHES, the message "Build summary is not yet supported on GHES" is displayed. I believe this is the intended behaviour. But I feel little noisy...
CleanShot 2024-07-03 at 18 16 56

Setting "DOCKER_BUILD_SUMMARY" would help, but it is cumbersome to set it for our all workflows. Stop using Annotations and just show them in the actions log. What do you think of this?

@crazy-max
Copy link
Member

When running v6.3.0 on GHES, the message "Build summary is not yet supported on GHES" is displayed. I believe this is the intended behaviour. But I feel little noisy...

@ponkio-o Should be good with latest release https://github.com/docker/build-push-action/releases/tag/v6.7.0

@timmjd
Copy link

timmjd commented Aug 20, 2024

Not 100% sure - but Build Summary is working on GHES - at least I'm on 3.12.x and a simple hello world is possible.

image

Looking at the changelog, the build summary was introduced in GHES 3.6 - so it's there since 2022-07-26.

So while the last version without Build Summary (3.5) was retired on 2023-09-25, the Build Summary should be seen as general available also on GHES.

@crazy-max
Copy link
Member

crazy-max commented Aug 20, 2024

Not 100% sure - but Build Summary is working on GHES

It's not about the build summary itself but the actions artifact lib v2 that is not supported on GHES: https://github.com/actions/toolkit/tree/main/packages/artifact#v2---whats-new

@actions/artifact v2+, upload-artifact@v4+, and download-artifact@v4+ are not currently supported on GHES yet. The previous version of this package can be found at this tag and on npm.

@dvdksn
Copy link
Contributor

dvdksn commented Aug 20, 2024

Could we make it work if DOCKER_BUILD_RECORD_UPLOAD is disabled?

@crazy-max
Copy link
Member

crazy-max commented Aug 20, 2024

This is tracked in github/roadmap#930 (Q4 2024)

@crazy-max
Copy link
Member

crazy-max commented Aug 20, 2024

Could we make it work if DOCKER_BUILD_RECORD_UPLOAD is disabled?

Yes but then only summary will be available without the .dockerbuild artifact. @colinhemmings @sharonchang1 Could this be a way to mitigate this issue in the meantime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants