Skip to content

chore(ci): fix closed PR cache cleanup - #813

Draft
ytallo wants to merge 1 commit into
mainfrom
chore/cache-cleanup-api-method
Draft

chore(ci): fix closed PR cache cleanup#813
ytallo wants to merge 1 commit into
mainfrom
chore/cache-cleanup-api-method

Conversation

@ytallo

@ytallo ytallo commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • force the cache-list request to use the GitHub Actions cache endpoint with GET
  • propagate list-request failures before attempting cache deletion
  • handle closed pull requests that have no matching caches
  • add workflow contract coverage for the request method and failure behavior

Root cause

Passing -f and -F fields to gh api without an explicit method switched the request to POST. The cache-list endpoint rejected that request with 404. Because the request ran inside process substitution, the failure did not stop mapfile, and the error response was later treated as a cache ID.

Impact

Closed pull request caches can be enumerated and deleted again, reducing stale cache accumulation without attempting malformed deletion URLs.

Validation

  • python3 -m pytest -q .github/scripts/tests/ - 188 passed, 3 subtests passed
  • actionlint 1.7.12
  • extracted cleanup shell validated with bash -n
  • git diff --check
  • live read-only GET against refs/pull/811/merge returned 8 matching caches

@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview Aug 15, 2026 9:48am
workers-tech-spec Building Building Preview Aug 15, 2026 9:48am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 63a5d7b0-bf2c-4a2e-9920-7ff35d03dc73

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 60 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

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

Labels

no-ticket PR deliberately has no Linear ticket (bump/typo/CI-only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant