Skip to content

Commit c8921b9

Browse files
fix(sync+metadata): bypass CF on cache-invalidate, restore scatter-basic created dates
Cache invalidation via api.anyplot.ai was returning HTTP 403 because Cloudflare's bot-fight mode served a JS challenge to the GitHub Actions curl call. Workaround: point the sync-postgres invalidate step at the direct Cloud Run URL (https://anyplot-api-r3tvmejsmq-ez.a.run.app), which is not behind Cloudflare. The CF-fronted api.anyplot.ai stays unchanged for public reads. Also bound the CACHE_INVALIDATE_TOKEN Secret Manager entry to the anyplot-api Cloud Run service via `gcloud run services update --update-secrets`. Without that, the endpoint returned 503 ("not configured") even when the CF bypass worked. Verified: the direct URL now returns 401 on a wrong token and 200 on the real one. Separately, patched the 9 scatter-basic metadata YAMLs that were just regenerated — their `created` had been stomped with today's timestamp by the old impl-generate.yml behaviour (the immutable-created fix landed in 7a33c0d AFTER the regen ran). Restored them all to the original 2025-12-10 first-commit date pulled from git log. generated_by also switched from the frozen 'claude-opus-4-5-20251101' to the family alias 'claude-opus' so the metadata doesn't lie about which opus version actually ran. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7a33c0d commit c8921b9

10 files changed

Lines changed: 23 additions & 19 deletions

File tree

.github/workflows/sync-postgres.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ jobs:
7373

7474
- name: Invalidate API cache
7575
env:
76-
API_URL: ${{ vars.API_BASE_URL || 'https://api.anyplot.ai' }}
76+
# Hit the Cloud Run service directly — Cloudflare's bot challenge blocks
77+
# unauthenticated curl posts against api.anyplot.ai with a 403 HTML page,
78+
# so the CF-fronted hostname is not usable here. The direct *.run.app URL
79+
# is unprotected by CF and accepts the bearer token directly.
80+
API_URL: ${{ vars.API_DIRECT_URL || 'https://anyplot-api-r3tvmejsmq-ez.a.run.app' }}
7781
CACHE_INVALIDATE_TOKEN: ${{ secrets.CACHE_INVALIDATE_TOKEN }}
7882
run: |
7983
if [ -z "${CACHE_INVALIDATE_TOKEN}" ]; then

plots/scatter-basic/metadata/python/altair.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
library: altair
22
language: python
33
specification_id: scatter-basic
4-
created: '2026-04-23T19:26:44Z'
4+
created: '2025-12-10T20:55:10Z'
55
updated: '2026-04-23T19:32:11Z'
6-
generated_by: claude-opus-4-5-20251101
6+
generated_by: claude-opus
77
workflow_run: 24853800836
88
issue: 611
99
python_version: 3.14.4

plots/scatter-basic/metadata/python/bokeh.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
library: bokeh
22
language: python
33
specification_id: scatter-basic
4-
created: '2026-04-23T19:24:19Z'
4+
created: '2025-12-10T20:55:10Z'
55
updated: '2026-04-23T19:48:28Z'
6-
generated_by: claude-opus-4-5-20251101
6+
generated_by: claude-opus
77
workflow_run: 24853799686
88
issue: 611
99
python_version: 3.14.4

plots/scatter-basic/metadata/python/highcharts.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
library: highcharts
22
language: python
33
specification_id: scatter-basic
4-
created: '2026-04-23T19:25:39Z'
4+
created: '2025-12-10T20:55:10Z'
55
updated: '2026-04-23T19:31:49Z'
6-
generated_by: claude-opus-4-5-20251101
6+
generated_by: claude-opus
77
workflow_run: 24853810886
88
issue: 611
99
python_version: 3.14.4

plots/scatter-basic/metadata/python/letsplot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
library: letsplot
22
language: python
33
specification_id: scatter-basic
4-
created: '2026-04-23T19:18:59Z'
4+
created: '2025-12-10T20:55:10Z'
55
updated: '2026-04-23T19:25:04Z'
6-
generated_by: claude-opus-4-5-20251101
6+
generated_by: claude-opus
77
workflow_run: 24853816154
88
issue: 611
99
python_version: 3.14.4

plots/scatter-basic/metadata/python/matplotlib.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
library: matplotlib
22
language: python
33
specification_id: scatter-basic
4-
created: '2026-04-23T19:14:01Z'
4+
created: '2025-12-10T20:55:10Z'
55
updated: '2026-04-23T19:19:17Z'
6-
generated_by: claude-opus-4-5-20251101
6+
generated_by: claude-opus
77
workflow_run: 24853797063
88
issue: 611
99
python_version: 3.14.4

plots/scatter-basic/metadata/python/plotly.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
library: plotly
22
language: python
33
specification_id: scatter-basic
4-
created: '2026-04-23T19:20:55Z'
4+
created: '2025-12-10T20:55:10Z'
55
updated: '2026-04-23T19:26:44Z'
6-
generated_by: claude-opus-4-5-20251101
6+
generated_by: claude-opus
77
workflow_run: 24853790187
88
issue: 611
99
python_version: 3.14.4

plots/scatter-basic/metadata/python/plotnine.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
library: plotnine
22
language: python
33
specification_id: scatter-basic
4-
created: '2026-04-23T19:21:59Z'
4+
created: '2025-12-10T20:55:10Z'
55
updated: '2026-04-23T19:27:47Z'
6-
generated_by: claude-opus-4-5-20251101
6+
generated_by: claude-opus
77
workflow_run: 24853804820
88
issue: 611
99
python_version: 3.14.4

plots/scatter-basic/metadata/python/pygal.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
library: pygal
22
language: python
33
specification_id: scatter-basic
4-
created: '2026-04-23T19:26:47Z'
4+
created: '2025-12-10T20:55:10Z'
55
updated: '2026-04-23T19:43:30Z'
6-
generated_by: claude-opus-4-5-20251101
6+
generated_by: claude-opus
77
workflow_run: 24853810841
88
issue: 611
99
python_version: 3.14.4

plots/scatter-basic/metadata/python/seaborn.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
library: seaborn
22
language: python
33
specification_id: scatter-basic
4-
created: '2026-04-23T19:18:49Z'
4+
created: '2025-12-10T20:55:10Z'
55
updated: '2026-04-23T19:24:09Z'
6-
generated_by: claude-opus-4-5-20251101
6+
generated_by: claude-opus
77
workflow_run: 24853787271
88
issue: 611
99
python_version: 3.14.4

0 commit comments

Comments
 (0)