Skip to content

Purge the whole cache, report the cache tags not written - #431

Merged
mistraloz merged 2 commits into
thecodingmachine:v5from
mistraloz:fix/purge-all-versions
Nov 6, 2026
Merged

mistraloz merged 2 commits into
thecodingmachine:v5from
mistraloz:fix/purge-all-versions

Conversation

@mistraloz

Copy link
Copy Markdown
Collaborator

Summary

Fixes the purge of the layers cache, and reports the cache tags that a run did not write.

  • Bug
  • Feature
  • Breaking changes
  • The purge listed the versions of the cache page by page while deleting them: each deletion shifted the next pages,
    so some versions were never listed nor deleted (one remained after the first purge of thecodingmachine/php-cache).
    It now reads the whole list first, then deletes it, and prints the number of versions deleted.
  • The two cold runs of v5 this morning did not write 6 and 9 cache tags of slim images, without any error in the
    job: the cache export ignores its errors and the build was quiet. The build now writes its full output in
    build.log, kept 7 days as an artifact of the job, and the runs of v5 show a warning listing the cache tags not
    written. The published images were not affected: the next run rebuilds these targets and writes their cache.

The build log holds the output of the build steps, as the run of a pull request: no secret is passed to the build,
the registry logins only appear as [auth] … token for ghcr.io steps, without the token.

Test plan (required)

  • Purge on a fork with pages of 10 versions: the old purge listed 131 of the 140 versions and left the 9 others,
    the new one deleted all of them. On this repository, it deleted the 202 versions of the cache.
  • 4 cold runs since this morning (3 on a test branch of this repository with the build log, 1 of v5) wrote the
    161 cache tags: the missing tags were not reproduced.
  • The check of the cache tags was run against the cache of this repository (no tag missing), and with a fake
    expected tag (reported).

Checklist

  • I followed the guidelines in CONTRIBUTING guide
  • I have squashed any insignificant commits
  • This change has comments for package types, values, functions, and non-obvious lines of code

The purge deleted the versions while reading the next pages of their list, which the deletions shift: a version of the
cache was left after the purge of the main repository.
@mistraloz
mistraloz merged commit 584c8d5 into thecodingmachine:v5 Nov 6, 2026
9 checks passed
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.

1 participant