Skip to content

add the redis catalog plugin - #106

Merged
adssib merged 2 commits into
mainfrom
redis-source
Nov 19, 2026
Merged

adssib merged 2 commits into
mainfrom
redis-source

Conversation

@AbdullahT01

Copy link
Copy Markdown
Contributor

What this changes

A new provider, Redis, and a new format plugin, plugins/catalog, to read it: a provider's whole command/endpoint surface as one flat JSON object keyed by name, diffed between two snapshots for names that disappeared entirely. Reports a breaking package_release event (change: removed_symbol) per removed name.

Why a new format plugin, not an existing one: checked all five first.

Format plugin Why it doesn't fit
openapi Redis has no OpenAPI spec (it's a binary protocol, not REST); Redis Cloud's management API has one, but only behind a live Swagger UI, no git-pinned spec repo to diff between releases
changelog redis-py's CHANGES and node-redis's CHANGELOG.md both exist, but neither writes a plain "Removed X" sentence with a backtick'd name anywhere in their history — checked every version heading in both files against the real Classify() function, zero matches
removedmembers Hardcoded to NumPy's RST table shape; nothing Redis publishes is an RST table
migrationguide Same shape problem as changelog: Redis's client libraries don't write per-parameter removal tables
retirements / feed Both require a literal calendar date ("retired on 2026-10-23"); Redis commands are deprecated by server version, never actually removed, and never carry a shutdown date

redis-doc's commands.json is the one genuinely machine-readable source Redis's own docs are generated from, but its shape (a flat map, no release tags, no per-row date) didn't fit anything else either. docs/writing-a-plugin.md's format-plugin table and docs/plugins.md's column key both got a row for it.

The demo change, and an honest caveat: FUNCTION CREATE and FUNCTION INFO are the only two names ever removed from the catalog's full history (checked by diffing every commit touching the file). But checked against redis/redis's own src/commands/*.json — the real source of truth — neither command ever existed in a tagged release, not even 7.0-rc1, the first public release candidate (tagged a week after the catalog commit that dropped them). And diffing the full command list between 7.0.0 and 8.2.0 GA removes zero commands: Redis's backward-compatibility stance means nothing shipped has ever actually broken this way. This is a real, verifiable removal in the repo's history, not an invented one, but it never reached production, unlike the other openapi-based providers' demo changes. providers/redis.md says this plainly rather than overstating it; see its "Known gaps" for the client-library breaking changes (RESP3 defaults, argument shapes) this plugin deliberately doesn't watch either, and why.

Checklist

  • Added to docs/plugins.md: one row, plus a catalog entry in the format-plugin key
  • Every commit is signed off (DCO)
  • Golden test over the real saved commits — as inline assertions on kittest.Replay's output, the same pattern plugins/openapi's Datadog/GitHub/GitLab providers already use in this repo for a two-snapshot source, rather than a single testdata/golden/<api>.json (there's no one baseline snapshot to diff a live run against here, so no single Golden file makes sense until a daily run has accumulated real history)
  • testdata/README.md lists each file: URL, commit, license, quote
  • One pinned drop test: GET (unchanged) and FUNCTION LOAD (added) must produce nothing, asserted in the same replay test
  • providers/redis.md written from the template, including Why this source and the alternatives ruled out
  • Fetches only through env.Get
  • go build ./... && go vet ./... && gofmt -l . && go test -race ./... pass locally; python3 scripts/leak_guard.py --all clean
  • Nothing private

Notes for the reviewer

  • commands.json lives on a repo with no tags at all, so refs are commit SHAs (cc0427b... / 06f3598...), not releases — Catalog.URL just formats whichever ref string it's given.
  • I didn't attempt to detect a rename (a disappearance and an appearance in the same diff): nothing in the catalog says they're the same command, and guessing would trade precision for recall. FUNCTION LOAD replacing FUNCTION CREATE is read as one plain removal, not a rename.
  • The live deprecated_since / replaced_by fields on still-present commands aren't read at all yet — flagged as a known gap, not silently dropped.

Signed-off-by: AbdullahT01 <abdullahtahad30@gmail.com>
@AbdullahT01
AbdullahT01 requested a review from adssib as a code owner November 19, 2026 04:47
@adssib

adssib commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

@claude Fix the merge issues aight?

@claude

claude Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Claude finished @adssib's task in 33s —— View job


Merge conflicts with main: how to resolve them

I can't push to this repo or run commands that change files, so I didn't resolve these myself. Below is exactly what to change, and it's quick. I also couldn't do a real merge here because the checkout is shallow and has no merge base. Instead I compared the four shared files between this branch and origin/main (now at c39fd3a, after #113 algolia).

  • Find which files conflict
  • Work out how to resolve each one
  • Apply and push (this needs the author or a maintainer)

Why it conflicts: since this branch was cut, main added vercel, supabase, algolia-*, cloudflare and mongodb-atlas, plus a new format plugin, apichangelog. Both sides appended to the same four lists, so every conflict comes out as keep both:

File Resolution
plugins/all/all.go Keep both imports in alphabetical order (gofmt): apichangelog, catalog, changelog, feed, …
docs/plugins.md, the table Keep all of main's rows and add the redis row after cloudflare, just before ``
docs/plugins.md, the "Format plugin" column key Keep both entries: … \feed` (an RSS or Atom feed), `apichangelog` (a vendor's machine-readable API changelog, in JSON), `catalog` (a structured JSON catalog of names, diffed between two snapshots).`
docs/writing-a-plugin.md, the format-plugin table Keep the plugins/apichangelog row and add the plugins/catalog row after it
providers/README.md Keep main's rows and add | [redis.md](redis.md) | \redis` | `catalog` |aftermongodb-atlas`

plugins/all/all.go should end up as:

import (
	_ "github.com/patch-it-dev/patch-it-plugins/plugins/apichangelog"
	_ "github.com/patch-it-dev/patch-it-plugins/plugins/catalog"
	_ "github.com/patch-it-dev/patch-it-plugins/plugins/changelog"
	_ "github.com/patch-it-dev/patch-it-plugins/plugins/feed"
	_ "github.com/patch-it-dev/patch-it-plugins/plugins/migrationguide"
	_ "github.com/patch-it-dev/patch-it-plugins/plugins/openapi"
	_ "github.com/patch-it-dev/patch-it-plugins/plugins/removedmembers"
	_ "github.com/patch-it-dev/patch-it-plugins/plugins/retirements"
)

⚠️ One more change while you're in docs/plugins.md: every plugin merged since the last release is listed on main as paused: merged, not in a tagged release yet, so patch-it's hosted ingestion service doesn't run it. The redis row says live, which would be wrong once this merges. Please use the same paused: … status so the docs site doesn't list Redis as running before it's released.

Steps for @AbdullahT01:

git fetch origin
git checkout redis-source
git merge origin/main        # or rebase; either is fine
# fix the 4 files as above, then:
gofmt -l . && go build ./... && go vet ./... && go test -race ./...
git add -A && git commit -s  # DCO sign-off
git push

I couldn't run the tests here; CI_go will run them after the push. After merging, TestEveryPluginIsImported and go build will show whether the all.go imports are right.

@adssib
adssib merged commit 428a1d8 into main Nov 19, 2026
3 of 4 checks passed
@adssib
adssib deleted the redis-source branch November 19, 2026 20:06
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.

2 participants