Skip to content

chore: bust stale Camo cache showing v0.1.0 PyPI badge#9

Merged
OussemaFr merged 1 commit into
mainfrom
chore/bust-pypi-badge-v0.1.1
Jun 22, 2026
Merged

chore: bust stale Camo cache showing v0.1.0 PyPI badge#9
OussemaFr merged 1 commit into
mainfrom
chore/bust-pypi-badge-v0.1.1

Conversation

@OussemaFr

@OussemaFr OussemaFr commented Jun 22, 2026

Copy link
Copy Markdown
Member

What

Forces GitHub's image proxy (Camo) to re-fetch the PyPI version badge by changing the URL to one it hasn't seen before.

Why

PyPI has v0.1.1 live:

```
$ curl -s https://pypi.org/pypi/socialapis-sdk/json | jq .info.version
"0.1.1"

$ curl -sL https://img.shields.io/pypi/v/socialapis-sdk.json | jq .message
"v0.1.1"
```

But the README badge still renders as `v0.1.0`. Cause: Camo cached the SVG fetched before v0.1.1 published and refuses to revalidate for hours.

Fix

Swap the badge URL from `badge.fury.io/py/socialapis-sdk.svg` to `img.shields.io/pypi/v/socialapis-sdk?cacheSeconds=300&label=PyPI&logo=pypi&logoColor=white`. The new URL:

  • Is a different bytes-string → Camo treats as fresh image → re-fetches
  • `cacheSeconds=300` tells shields.io to cache its own response for only 5 min, limiting future drift after v0.1.2 lands
  • Adds the PyPI logo for visual weight

Test plan

After merging:

PyPI has v0.1.1 published; shields.io + badge.fury both correctly
return v0.1.1 when queried directly. GitHub's image proxy (Camo)
cached the badge.fury SVG that was first fetched before v0.1.1
landed — and Camo doesn't revalidate for hours.

Fix: swap the badge URL to one Camo has never seen. New URL adds
`?cacheSeconds=300` (so shields.io itself caches for only 5 min
going forward, which limits future drift) plus the PyPI logo for
better visual weight.

No README content change beyond the badge — clicking still routes
to https://pypi.org/project/socialapis-sdk/.
@OussemaFr OussemaFr merged commit 3a79911 into main Jun 22, 2026
6 checks passed
@OussemaFr OussemaFr deleted the chore/bust-pypi-badge-v0.1.1 branch June 22, 2026 22: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