-
Notifications
You must be signed in to change notification settings - Fork 49
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
Revert "Upgrade Artifact actions v4" #6917
Conversation
This reverts commit 97c1625.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know nothing, but if you need a stamp, here's one :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we will have to solve this problem again when we switch this back to v4, I have an idea that you may want to try.
The failure you linked showed that it failed to download the artifact.
Looking at the release notes for the upload-artifact action, I see the following text:
Artifacts created with versions v3 and below are not compatible with the v4 actions. Uploads and downloads must use the same major actions versions.
I wonder if we should instead take a look at the download logic that looks to be outdated:
wpt-metadata/.github/workflows/auto-approve.yml
Lines 31 to 53 in 45bb848
uses: actions/github-script@v3.1.0 | |
with: | |
script: | | |
console.log("Starting to list artifacts"); | |
var artifacts = await github.actions.listWorkflowRunArtifacts({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
run_id: context.payload.workflow_run.id, | |
}); | |
console.log("Filtering artifacts"); | |
var matchArtifact = artifacts.data.artifacts.filter((artifact) => { | |
return artifact.name == "pr_number" | |
})[0]; | |
console.log("Downloading artifacts"); | |
var download = await github.actions.downloadArtifact({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
artifact_id: matchArtifact.id, | |
archive_format: 'zip', | |
}); | |
console.log("Writing artifacts to disk"); | |
var fs = require('fs'); | |
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data)); |
It is using actions/github-script@v3.1.0, which I suspect is using artifact API v1 vs artifact API v2. (not 100% sure though).
Could you instead create a separate PR that adjusts auto-approve.yml to use actions/github-script@v7?
You can see an example of another repository doing it: https://github.com/platisd/clang-tidy-pr-comments/blob/88780c4ca5471b97de8f228219d1e39b1a472142/README.md?plain=1#L265-L283
Reverts #6910. Looks like it broke the auto approve:
https://github.com/web-platform-tests/wpt-metadata/actions/runs/11733818725/job/32688788109