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

[libc++] Adjust the docker-compose file for libc++ action builders #116366

Merged
merged 1 commit into from
Nov 16, 2024

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Nov 15, 2024

No description provided.

@ldionne
Copy link
Member Author

ldionne commented Nov 15, 2024

@tstellar @boomanaiden154 I am encountering this issue when the action tries pushing (here):

 Pushing ghcr.io/llvm/libcxx-linux-builder:e016be98755e751af0b0b0af84dbfc2ba0b1ff68: 3e5e74ba8df3 Layer already exists 
 Pushing ghcr.io/llvm/libcxx-linux-builder:e016be98755e751af0b0b0af84dbfc2ba0b1ff68: e3ea085120e9 Layer already exists 
denied: installation not allowed to Create organization package
Error: Process completed with exit code 1.

Is this something you've seen before and perhaps you remember how to fix it off the top of your head? I looked around and I made sure that the workflow had the packages: write permission but that doesn't seem to cut it.

@boomanaiden154
Copy link
Contributor

It looks like that run is on the pull_request trigger? Those will run in the context of the fork, so there probably isn't a secret called GITHUB_TOKEN, and they definitely would not be able to push to the monorepo package repository. In the Build CI container job, we have it setup to only push the container when the workflow was triggered by pushing to main where we are in the appropriate context to have access to secrets/proper write permissions for the llvm organization packages.

@ldionne
Copy link
Member Author

ldionne commented Nov 16, 2024

In the Build CI container job, we have it setup to only push the container when the workflow was triggered by pushing to main where we are in the appropriate context to have access to secrets/proper write permissions for the llvm organization packages.

Ack, I had changed it in this PR just for testing purposes, but that sounds good I'll try on main. Thanks!

@ldionne ldionne marked this pull request as ready for review November 16, 2024 10:58
@llvmbot llvmbot added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. github:workflow labels Nov 16, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 16, 2024

@llvm/pr-subscribers-libcxx

@llvm/pr-subscribers-github-workflow

Author: Louis Dionne (ldionne)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/116366.diff

1 Files Affected:

  • (modified) .github/workflows/libcxx-build-containers.yml (+6)
diff --git a/.github/workflows/libcxx-build-containers.yml b/.github/workflows/libcxx-build-containers.yml
index 92b2e3056da9ac..2d040f712ce592 100644
--- a/.github/workflows/libcxx-build-containers.yml
+++ b/.github/workflows/libcxx-build-containers.yml
@@ -29,6 +29,8 @@ jobs:
   build-and-push:
     runs-on: ubuntu-latest
     if: github.repository_owner == 'llvm'
+    permissions:
+      packages: write
 
     steps:
     - uses: actions/checkout@v4
@@ -36,10 +38,14 @@ jobs:
     - name: Build the Linux builder image
       working-directory: libcxx/utils/ci
       run: docker compose build actions-builder
+      env:
+        TAG: ${{ github.sha }}
 
     # - name: Build the Android builder image
     #   working-directory: libcxx/utils/ci
     #   run: docker compose build android-buildkite-builder
+    #   env:
+    #     TAG: ${{ github.sha }}
 
     - name: Log in to GitHub Container Registry
       uses: docker/login-action@v3

@ldionne ldionne merged commit 0fd6f68 into llvm:main Nov 16, 2024
11 checks passed
@ldionne ldionne deleted the review/adjust-docker-image branch November 16, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github:workflow libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants