Skip to content

ci: purge the config-server cache when genesis artifacts change - #63

Open
qu0b wants to merge 1 commit into
masterfrom
qu0b/purge-config-cache
Open

ci: purge the config-server cache when genesis artifacts change#63
qu0b wants to merge 1 commit into
masterfrom
qu0b/purge-config-cache

Conversation

@qu0b

@qu0b qu0b commented Aug 10, 2026

Copy link
Copy Markdown
Member

Companion to ethpandaops/ethPandaOps#1540, which caches the genesis artifacts on config.<network>.ethpandaops.io for a day. This purges them when they change, so a regenerated genesis isn't served stale until the TTL expires.

Why a workflow, not an ansible task. The config server proxies raw.githubusercontent.com/<repo>/master/..., so what changes the bytes GitHub serves is the push, not the playbook. ethereum_genesis writes into the operator's local working tree and a human commits afterwards — a purge at playbook time would evict the entry before the new content existed and immediately re-cache the old object for a full day.

Purge by hostname. Every purge method is available on all Cloudflare plans, not Enterprise-only. Only the cache rule's paths are cacheable on these hosts, so purging the host is equivalent to listing the URLs and can't drift out of sync with the Terraform.

Why curl, not an action. The whole interaction is one POST. Of the marketplace options only NathanVaughn/actions-cloudflare-purge is credibly maintained (49 stars); the rest are 1–3. Not worth giving a Cloudflare token to a low-adoption third-party action to save a few lines.

Needs two secrets before it can do anything — neither exists at repo or org level:

  • CLOUDFLARE_CACHE_PURGE_TOKEN — Zone → Cache Purge on ethpandaops.io
  • CLOUDFLARE_ZONE_ID

Land #1540 first. Also belongs in template-devnets, with the hardcoded glamsterdam- adjusted.

@qu0b
qu0b force-pushed the qu0b/purge-config-cache branch 2 times, most recently from ec8c157 to 23575fd Compare August 10, 2026 13:44
Cloudflare caches the genesis artifacts on config.<network>.ethpandaops.io
for a day (ethpandaops/ethPandaOps cloudflare/terraform/cache-rules.tf),
so a regenerated genesis would otherwise be served stale until the TTL
expired.

Trigger on push to master rather than from the ansible run: the config
server proxies raw.githubusercontent.com/<repo>/master/..., so what
changes the bytes GitHub serves is the push, not the playbook. Ansible
writes network-configs into the operator's working tree and a human
commits afterwards, so purging at playbook time would evict the entry
before the new content existed and immediately re-cache the old object
for a full day.

Purge by hostname rather than by URL. Every purge method is available on
all Cloudflare plans, and only the paths matched by the cache rule are
cacheable on these hosts, so purging the host is equivalent to listing
them and cannot drift out of sync with the rule.
@qu0b
qu0b force-pushed the qu0b/purge-config-cache branch from 23575fd to e9dd6c3 Compare August 10, 2026 13:49
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