Repository navigation
add the redis catalog plugin - #106
Conversation
Signed-off-by: AbdullahT01 <abdullahtahad30@gmail.com>
|
@claude Fix the merge issues aight? |
|
Claude finished @adssib's task in 33s —— View job Merge conflicts with
|
| 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"
)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 pushI 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.
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 abreakingpackage_releaseevent (change: removed_symbol) per removed name.Why a new format plugin, not an existing one: checked all five first.
openapichangelogredis-py'sCHANGESandnode-redis'sCHANGELOG.mdboth exist, but neither writes a plain "RemovedX" sentence with a backtick'd name anywhere in their history — checked every version heading in both files against the realClassify()function, zero matchesremovedmembersmigrationguidechangelog: Redis's client libraries don't write per-parameter removal tablesretirements/feedredis-doc'scommands.jsonis 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 anddocs/plugins.md's column key both got a row for it.The demo change, and an honest caveat:
FUNCTION CREATEandFUNCTION INFOare 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 ownsrc/commands/*.json— the real source of truth — neither command ever existed in a tagged release, not even7.0-rc1, the first public release candidate (tagged a week after the catalog commit that dropped them). And diffing the full command list between7.0.0and8.2.0GA 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 otheropenapi-based providers' demo changes.providers/redis.mdsays 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
docs/plugins.md: one row, plus acatalogentry in the format-plugin keykittest.Replay's output, the same patternplugins/openapi's Datadog/GitHub/GitLab providers already use in this repo for a two-snapshot source, rather than a singletestdata/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.mdlists each file: URL, commit, license, quoteGET(unchanged) andFUNCTION LOAD(added) must produce nothing, asserted in the same replay testproviders/redis.mdwritten from the template, including Why this source and the alternatives ruled outenv.Getgo build ./... && go vet ./... && gofmt -l . && go test -race ./...pass locally;python3 scripts/leak_guard.py --allcleanNotes for the reviewer
commands.jsonlives on a repo with no tags at all, so refs are commit SHAs (cc0427b.../06f3598...), not releases —Catalog.URLjust formats whichever ref string it's given.FUNCTION LOADreplacingFUNCTION CREATEis read as one plain removal, not a rename.deprecated_since/replaced_byfields on still-present commands aren't read at all yet — flagged as a known gap, not silently dropped.