Skip to content

fix(github): Filter artifacts by name when fetching revision artifact - #880

Merged
BYK merged 2 commits into
masterfrom
itaybre/fix/github-artifacts-filter-by-name
Sep 25, 2026
Merged

BYK merged 2 commits into
masterfrom
itaybre/fix/github-artifacts-filter-by-name

Conversation

@itaybre

@itaybre itaybre commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

The legacy GitHub artifact lookup (artifact name equals the revision SHA) listed every artifact in the repository and scanned pages client-side. On repositories with many artifacts, that unfiltered listing is slow and fails with HTTP 500, which breaks releases. The artifact list request now passes the revision as the name filter so GitHub only returns the matching artifacts.

Server-side name filter

The GET /repos/{owner}/{repo}/actions/artifacts request now includes name=<revision>. Verified against the repository from the issue: the unfiltered request fails, while the filtered request returns the single matching artifact. The existing paging and date-based cutoff are unchanged and act as a fallback if the API ever returns more than one page.

Fixes #879

🤖 Generated with Claude Code

Listing all artifacts of a repository via the GitHub API is slow and
fails with HTTP 500 on repositories with many artifacts, which breaks
releases for projects using the legacy artifact lookup where the
artifact name equals the revision SHA.

Pass the revision as the name filter so GitHub only returns matching
artifacts. This avoids the failing unfiltered listing and removes the
need to page through unrelated artifacts.

Fixes GH-879
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The legacy lookup now requests a single artifact by name, so make the
debug, trace, and info messages say which artifact name is being
fetched instead of implying all artifacts of the repository are listed.

Refs GH-879
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@itaybre
itaybre marked this pull request as ready for review September 25, 2026 17:35

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the exact head 79d7f89 against master. The documented GitHub artifact name filter preserves Craft's legacy exact-SHA contract, and the full test suite, typecheck, build, formatting, and required CI checks pass.

@BYK
BYK merged commit 7137f20 into master Sep 25, 2026
22 checks passed
@BYK
BYK deleted the itaybre/fix/github-artifacts-filter-by-name branch September 25, 2026 20:32

This branch was successfully deployed

1 active deployment
false — 79d7f89a Deployed Sep 25, 2026 by itaybre via Build #2936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Releases fail due to error 500 when fetching artifacts

2 participants