From 0ca1e7cdfad44a0316ad89a6040aef260065d88d Mon Sep 17 00:00:00 2001 From: adssib <75389300+adssib@users.noreply.github.com> Date: Fri, 20 Nov 2026 21:00:07 -0500 Subject: [PATCH] redis: read the commands at each release tag of redis/redis Co-Authored-By: Claude Opus 5.5 Signed-off-by: adssib <75389300+adssib@users.noreply.github.com> --- cmd/new-plugin/formats.go | 46 +++-- docs/which-kind.md | 2 +- docs/writing-a-plugin.md | 12 +- plugins/catalog/catalog.go | 185 ++--------------- plugins/catalog/catalog_test.go | 155 ++++++-------- plugins/catalog/redis.go | 193 ++++++++++++++++++ plugins/catalog/registered_test.go | 2 +- plugins/catalog/testdata/README.md | 13 +- plugins/catalog/testdata/commits-master.json | 1 - .../testdata/golden/redis-commands.json | 48 +++++ .../catalog/testdata/redis-8.8-m03-gcra.json | 92 +++++++++ .../testdata/redis-8.8-m03-gcrasetvalue.json | 52 +++++ .../redis-contents-src-commands-8.10.0.json | 1 + .../redis-contents-src-commands-8.8-m03.json | 1 + .../redis-contents-src-commands-8.8-rc1.json | 1 + .../redis-contents-src-commands-8.8.0.json | 1 + .../catalog/testdata/redis-doc-06f3598.json | 92 --------- .../catalog/testdata/redis-doc-cc0427b.json | 112 ---------- .../testdata/redis-releases-excerpt.json | 7 + providers/redis.md | 37 ++-- 20 files changed, 544 insertions(+), 509 deletions(-) create mode 100644 plugins/catalog/redis.go delete mode 100644 plugins/catalog/testdata/commits-master.json create mode 100644 plugins/catalog/testdata/golden/redis-commands.json create mode 100644 plugins/catalog/testdata/redis-8.8-m03-gcra.json create mode 100644 plugins/catalog/testdata/redis-8.8-m03-gcrasetvalue.json create mode 100644 plugins/catalog/testdata/redis-contents-src-commands-8.10.0.json create mode 100644 plugins/catalog/testdata/redis-contents-src-commands-8.8-m03.json create mode 100644 plugins/catalog/testdata/redis-contents-src-commands-8.8-rc1.json create mode 100644 plugins/catalog/testdata/redis-contents-src-commands-8.8.0.json delete mode 100644 plugins/catalog/testdata/redis-doc-06f3598.json delete mode 100644 plugins/catalog/testdata/redis-doc-cc0427b.json create mode 100644 plugins/catalog/testdata/redis-releases-excerpt.json diff --git a/cmd/new-plugin/formats.go b/cmd/new-plugin/formats.go index ba98dc1..5982874 100644 --- a/cmd/new-plugin/formats.go +++ b/cmd/new-plugin/formats.go @@ -427,40 +427,46 @@ func {{.Lower}}Ingest(t *testing.T, file string) []event.Event { defDir: "plugins/catalog", def: `package catalog -// {{.Ident}} is {{.Provider}}'s catalog: one JSON object, one key per command -// or endpoint, at a git ref. +import "regexp" + +// {{.Ident}} is {{.Provider}}'s command catalog: one JSON file per command in a +// directory of its repo, read at each release tag, as Redis's is (redis.go). // // ` + todo + `: the ecosystem and package for the events' subject, the repo, -// the catalog's path and the commits API URL for the newest ref. Say what you -// checked, with the date, as catalog.go does for Redis. -var {{.Ident}} = Catalog{ +// the directory and the release tags' shape. Say what you checked, with the +// date, as redis.go does for Redis. +var {{.Ident}} = Commands{ API: "{{.ID}}", Ecosystem: "{{.ProviderID}}", Package: "{{.ProviderID}}", - Repo: "TODO-owner/TODO-repo", Path: "TODO/commands.json", - RefsURL: "https://api.github.com/repos/TODO-owner/TODO-repo/commits/main", + Repo: "TODO-owner/TODO-repo", Dir: "TODO/commands", + Release: regexp.MustCompile(` + "`" + `^v?(\d+\.\d+\.\d+)$` + "`" + `), } `, - register: `plugin.Register(Plugin{Catalog: {{.Ident}}})`, - pluginOf: `Plugin{Catalog: {{.Ident}}}`, + register: `plugin.Register({{.Ident}})`, + pluginOf: `{{.Ident}}`, fixtures: map[string]string{ - "{{.File}}-old.json": "{\"PLACEHOLDER\": {}}\n", - "{{.File}}-new.json": "{\"PLACEHOLDER\": {}}\n", + "{{.File}}-old.json": "[{\"name\": \"placeholder.json\", \"type\": \"file\"}, {\"name\": \"kept.json\", \"type\": \"file\"}]\n", + "{{.File}}-new.json": "[{\"name\": \"kept.json\", \"type\": \"file\"}]\n", + "{{.File}}-placeholder.json": "{\"PLACEHOLDER\": {\"summary\": \"a placeholder\"}}\n", }, - source: "{{.File}}-new.json", - ingest: `// The two refs the saved snapshots are at. -// ` + todo + `: the real commits, oldest first. + dropFile: "[{\"name\": \"placeholder.json\", \"type\": \"file\"}, {\"name\": \"kept.json\", \"type\": \"file\"}, {\"name\": \"added.json\", \"type\": \"file\"}]\n", + source: "{{.File}}-new.json", + ingest: `// The two releases the saved listings are at. +// ` + todo + `: the real tags, oldest first. const ( - {{.Lower}}OldRef = "0000000000000000000000000000000000000000" - {{.Lower}}NewRef = "1111111111111111111111111111111111111111" + {{.Lower}}OldRef = "v1.0.0" + {{.Lower}}NewRef = "v2.0.0" ) -// {{.Lower}}Ingest extracts the change from the saved old snapshot to file. +// {{.Lower}}Ingest is the version pair from the saved old listing to file, +// the newer release's listing; a file gone from it is read at the old tag. func {{.Lower}}Ingest(t *testing.T, file string) []event.Event { t.Helper() env := kittest.Env(t, kittest.Pages{ - {{.Ident}}.URL({{.Lower}}OldRef): "testdata/{{.File}}-old.json", - {{.Ident}}.URL({{.Lower}}NewRef): file, + {{.Ident}}.listingURL({{.Lower}}OldRef): "testdata/{{.File}}-old.json", + {{.Ident}}.listingURL({{.Lower}}NewRef): file, + {{.Ident}}.FileURL({{.Lower}}OldRef, "placeholder.json"): "testdata/{{.File}}-placeholder.json", }) - return kittest.Versions(t, env, Plugin{Catalog: {{.Ident}}}, + return kittest.Versions(t, env, {{.Ident}}, plugin.Version{ID: {{.Lower}}OldRef, Ref: {{.Lower}}OldRef}, plugin.Version{ID: {{.Lower}}NewRef, Ref: {{.Lower}}NewRef}) } `, diff --git a/docs/which-kind.md b/docs/which-kind.md index f2f67c9..fd39bf2 100644 --- a/docs/which-kind.md +++ b/docs/which-kind.md @@ -12,7 +12,7 @@ Every kind is one of two shapes ([writing-a-plugin.md, step 4](writing-a-plugin. | Is there a **guide that lists what a release removed**, one per major or per release, in a table? | `migrationguide` | The guide at the release's tag: removed request parameters (reader `sdk`) or removed members of a module (reader `members`, RST or Markdown tables) | `MIGRATION.md` per major; "removed members" tables in a 2.0 migration guide; an API version removal guide | | Is there a **changelog**: a file per release (`CHANGELOG.md`, `CHANGES.rst`, `HISTORY.rst`), or a machine-readable JSON changelog? | `changelog` | The release's section at its tag (reader `markdown`), or the life-cycle entries a JSON changelog adds commit by commit (reader `json`) | Keep a Changelog files; reStructuredText release notes; an API changelog JSON in a repo; a Terraform provider's changelog | | Is there a **live page of dated notices**: a deprecations or shutdown table, an end-of-life table, or an **RSS/Atom feed** of announcements? | `notices` | The page as it is now, cited through a Web Archive snapshot, against the snapshot kept from the read before: a living page, with no versions of its own (reader `deprecations`, `feed`, or an end-of-life table) | A model deprecations page; an API end-of-life policy table; a changelog feed with a "deprecation" label; a Kubernetes API removals page | -| Is there a **flat catalog**, one JSON entry per name (a command, an endpoint), with no release tags? | `catalog` | Two snapshots, compared for names that disappeared entirely | A list of commands a server accepts, kept in a repo | +| Is there a **structured catalog** in the provider's repo: one JSON file per command, or one file of upcoming removals? | `catalog` | Each release (or commit) of the catalog, compared with the one before: names that disappeared entirely, or removals newly announced | The command definitions a server is built from, at each release tag | | Is it a **published package** with no changelog worth reading? | `apisurface` | Each release's files from the registry (PyPI first), compared: removed or renamed classes, functions, methods, and parameters removed or newly required | An SDK generated from a spec, released often, whose changelog says "chore: update types" | Still no "yes"? Open a [discussion](https://github.com/patch-it-dev/patch-it-plugins/discussions) with the source's link: a new kind is a new package under `plugins/`, and the questions above get one more row. diff --git a/docs/writing-a-plugin.md b/docs/writing-a-plugin.md index 1c41f91..73967c6 100644 --- a/docs/writing-a-plugin.md +++ b/docs/writing-a-plugin.md @@ -86,7 +86,7 @@ Write the numbers on the provider page, as `providers/vercel.md` does for its sp | `plugins/notices` | A live page of dated notices: a model provider's deprecations page (a table of date, model, replacement), a vendor's RSS or Atom feed, a vendor's table of whole API version ranges and their support status | A `retire.Page` in `plugins/notices/retire/providers.go`, a `feed.Feed` with a reader for that vendor's entries in `plugins/notices/feed/`, or an `eol.Page` in `plugins/notices/eol/` (`new-plugin` doesn't scaffold this reader yet) | | `plugins/migrationguide` | A guide that lists what a release removed, at the release's tag: an SDK's migration guide per new major (removed request parameters), or a package's table of removed members (an RST simple table or a Markdown pipe table) | A `sdkguide.Guide` in `plugins/migrationguide/sdkguide/`, or a `members.Guide` in `plugins/migrationguide/members/` | | `plugins/changelog` | A changelog: a `CHANGELOG.md` / `CHANGES.rst` / `HISTORY.rst`, each release's section at its tag (releases from PyPI or npm), or a vendor's machine-readable API changelog in JSON (per day, endpoint and API version, oasdiff change codes), commit by commit | A `changelog.File` with its `TagPrefix`, or a `changelog.Log` | -| `plugins/catalog` | A flat JSON catalog, one entry per name, with no release tags to pin — a commit SHA stands in | A `catalog.Catalog`, diffed between two snapshots for names that disappeared entirely | +| `plugins/catalog` | A provider's own structured list of what it offers: a command catalog kept as one JSON file per command in its repo, read at each release tag and compared for commands that disappeared entirely | A `catalog.Commands` (repo, directory, release tag pattern); a catalog of another shape is a new reader type in the package | | `plugins/apisurface` | A published package's public API, compared between two releases: the classes, functions, methods and parameters in each release's files (Python first: the wheel or sdist from PyPI) | A `apisurface.Package` (registry name, ecosystem, top-level module) and its `plugin.RegisterProvider` block | ## 4. The interface @@ -204,11 +204,13 @@ The test kit, `core/kit/kittest`, runs the plugin with no network, no database a ```go func TestGolden(t *testing.T) { env := kittest.Env(t, kittest.Pages{ - Redis.URL(oldRef): "testdata/redis-doc-cc0427b.json", - Redis.URL(newRef): "testdata/redis-doc-06f3598.json", + Redis.listingURL("8.8-m03"): "testdata/redis-contents-src-commands-8.8-m03.json", + Redis.listingURL("8.8-rc1"): "testdata/redis-contents-src-commands-8.8-rc1.json", + Redis.FileURL("8.8-m03", "gcra.json"): "testdata/redis-8.8-m03-gcra.json", + Redis.FileURL("8.8-m03", "gcrasetvalue.json"): "testdata/redis-8.8-m03-gcrasetvalue.json", }) - got := kittest.Versions(t, env, Plugin{Catalog: Redis}, - plugin.Version{ID: oldRef, Ref: oldRef}, plugin.Version{ID: newRef, Ref: newRef}) + got := kittest.Versions(t, env, Redis, + plugin.Version{ID: "8.8-m03", Ref: "8.8-m03"}, plugin.Version{ID: "8.8-rc1", Ref: "8.8-rc1"}) kittest.Golden(t, "testdata/golden/redis-commands.json", got) } ``` diff --git a/plugins/catalog/catalog.go b/plugins/catalog/catalog.go index 164ed96..3e62488 100644 --- a/plugins/catalog/catalog.go +++ b/plugins/catalog/catalog.go @@ -1,28 +1,20 @@ -// Package catalog is the source plugin for a provider that publishes its -// whole command or endpoint surface as one structured JSON file, one entry -// keyed by name: read it at a commit, compare it with the one read before, -// and report -// every name that disappeared entirely between them. Unlike openapi's typed -// spec, an entry here is opaque: no request or response shape to walk, just -// whether the name is still there. Redis first: its command surface has no -// OpenAPI spec, but redis-doc's commands.json is the real, machine-readable -// file redis.io's own command reference is generated from. +// Package catalog is the kind for a provider's own structured list of what +// it offers or is about to take away: a command catalog, a file of upcoming +// removals. Unlike openapi's typed spec, an entry here is opaque beyond its +// name (and, for a list of upcoming changes, its date and what to use +// instead). Each reader is a plugin of its own in this package, read +// version by version (plugin.Versioned): Redis's commands at each release +// tag (redis.go). // -// Precision over recall: a name that moves to a different key (a genuine -// rename) reads as one removal and one addition, same as any other. This -// never guesses a rename from two disappearances and appearances landing in -// the same diff; it only ever reports what's gone. +// Precision over recall: a name that moves (a genuine rename) reads as one +// removal and one addition, same as any other. A reader never guesses a +// rename from a disappearance and an appearance landing in the same diff. package catalog import ( - "context" - "encoding/json" "fmt" - "sort" - "time" "github.com/patch-it-dev/patch-it-plugins/core/event" - "github.com/patch-it-dev/patch-it-plugins/core/github" "github.com/patch-it-dev/patch-it-plugins/core/plugin" ) @@ -31,162 +23,29 @@ func init() { ID: "redis", Name: "Redis", Category: plugin.CategoryDatabases, Homepage: "https://redis.io", Sources: []plugin.Source{{ ID: "commands", Layer: plugin.LayerRuntime, Page: "providers/redis.md", - Watches: "Commands removed entirely from Redis's own command catalog between two snapshots", - URLs: []string{"https://github.com/redis/redis-doc/blob/master/commands.json"}, - Plugin: Plugin{Catalog: Redis}, + Watches: "Commands removed entirely between two Redis releases, from the command definitions in the server's own source (src/commands/) at each release tag", + URLs: []string{"https://github.com/redis/redis/tree/unstable/src/commands", "https://github.com/redis/redis/releases"}, + Plugin: Redis, }}, }) } -// Catalog is one provider's command or endpoint catalog: a single JSON -// object, one key per entry, fetched at a git ref. -type Catalog struct { - API string // the source id the events carry: "redis/commands" - Ecosystem string // the package_release subject's ecosystem: "redis" - Package string // the package_release subject's package: "redis" - Repo string // owner/name on GitHub the catalog lives in - Path string // the catalog's path in the repo - RefsURL string // GitHub's commits API, for the newest ref: .../commits/ -} - -// Redis is redis-doc's commands.json, regenerated from each real Redis -// release and read by redis.io's own command reference (checked 2026-11-18). -// The repo has no tags, so a ref here is a commit SHA, not a release. -var Redis = Catalog{ - API: "redis/commands", Ecosystem: "redis", Package: "redis", - Repo: "redis/redis-doc", Path: "commands.json", - RefsURL: "https://api.github.com/repos/redis/redis-doc/commits/master", -} - -// URL is the catalog as it was at ref: its own provenance. -func (c Catalog) URL(ref string) string { - return fmt.Sprintf("https://raw.githubusercontent.com/%s/%s/%s", c.Repo, ref, c.Path) -} - -// parse reads the catalog as a flat map of name to its raw entry: every -// field of an entry (arity, complexity, ACL categories...) is unread, except -// where an entry's own bytes become an event's excerpt. -func parse(data []byte) (map[string]json.RawMessage, error) { - var out map[string]json.RawMessage - if err := json.Unmarshal(data, &out); err != nil { - return nil, fmt.Errorf("parsing catalog: %w", err) - } - return out, nil -} - -// removed is every name of old that new doesn't have, sorted so the result -// (and the fingerprints built from it) don't depend on map order. -func removed(old, new map[string]json.RawMessage) []string { - var out []string - for name := range old { - if _, ok := new[name]; !ok { - out = append(out, name) - } - } - sort.Strings(out) - return out -} - -// Plugin reads one catalog. -type Plugin struct { - Catalog Catalog -} - -func (p Plugin) Name() string { return p.Catalog.API } - -// ListVersions is the catalog repo's newest commit: the catalog has no -// releases, so each commit read is a version, and the change into it is -// extracted against the one read before. -func (p Plugin) ListVersions(ctx context.Context, env plugin.Env) ([]plugin.Version, error) { - ref, err := p.latestRef(ctx, env) - if err != nil { - return nil, err - } - return []plugin.Version{{ID: ref, Ref: ref}}, nil -} - -// ReadAt fetches the catalog at v's commit. -func (p Plugin) ReadAt(ctx context.Context, env plugin.Env, v plugin.Version) (plugin.Snapshot, error) { - url := p.Catalog.URL(v.Ref) - body, err := env.Get(ctx, url) - if err != nil { - return plugin.Snapshot{}, fmt.Errorf("fetching %s: %w", url, err) - } - return plugin.Snapshot{Version: v, Content: body, SourceURL: url}, nil -} - -// Extract is an event per command in from's catalog that isn't in to's, -// with previous_version from's commit. A zero from has nothing to compare. -func (p Plugin) Extract(_ context.Context, env plugin.Env, from, to plugin.Snapshot) (plugin.Result, error) { - events, rejected, err := p.events(from.Content, to.Content, from.Version.Ref, to.Version.Ref, env.Now()) - if err != nil { - return plugin.Result{}, err - } - return plugin.Result{Events: events, Rejected: rejected}, nil -} - -var _ plugin.Versioned = Plugin{} - -// latestRef asks GitHub for the catalog repo's newest commit. -func (p Plugin) latestRef(ctx context.Context, env plugin.Env) (string, error) { - sha, err := github.Head(ctx, env.Get, p.Catalog.RefsURL) - if err != nil { - return "", fmt.Errorf("looking up the newest commit: %w", err) - } - return sha, nil -} - -// events diffs two parsed snapshots into events. oldContent is empty for -// the first version read (nothing before it): diffing against no snapshot -// reports nothing, the same as an unchanged one. -func (p Plugin) events(oldContent, newContent []byte, from, to string, now time.Time) ([]event.Event, []error, error) { - c := p.Catalog - newEntries, err := parse(newContent) - if err != nil { - return nil, nil, fmt.Errorf("parsing %s: %w", c.URL(to), err) - } - var oldEntries map[string]json.RawMessage - if len(oldContent) > 0 { - oldEntries, err = parse(oldContent) - if err != nil { - return nil, nil, fmt.Errorf("parsing %s: %w", c.URL(from), err) - } - } - - var events []event.Event - var rejected []error - for _, name := range removed(oldEntries, newEntries) { - subject := event.Subject{ - Type: event.SubjectPackageRelease, Ecosystem: c.Ecosystem, Package: c.Package, - Change: event.PackageRemovedSymbol, Symbols: []string{name}, - } - e := event.Event{ - API: c.API, Version: to, PreviousVersion: from, - ChangeType: event.ChangeTypeBreaking, - Breaking: true, - Subject: subject, - Description: fmt.Sprintf("%s no longer exists: calling it now fails.", name), - SourceURL: c.URL(from), - SourceExcerpt: excerpt(name, oldEntries[name]), - Confidence: 1.0, - DetectedAt: now, - } - e.Fingerprint = event.Fingerprint(e.API, e.Version, e.ChangeType, subject, "") +// finish fingerprints and validates the events a reader made, keeping the +// valid ones and the reasons the others failed. +func finish(api string, made []event.Event) (events []event.Event, rejected []error) { + for _, e := range made { + e.Fingerprint = event.Fingerprint(e.API, e.Version, e.ChangeType, e.Subject, "") if err := e.Validate(); err != nil { - rejected = append(rejected, fmt.Errorf("%s: %w", name, err)) + rejected = append(rejected, fmt.Errorf("%s %s: %w", api, e.Description, err)) continue } events = append(events, e) } - return events, rejected, nil + return events, rejected } -// excerpt quotes the entry exactly as the old snapshot had it: the evidence -// that name existed, in the catalog's own shape. Capped at the contract's -// 2000-character limit, the entry's closing braces never cut off: nested -// command-line arguments can run long. -func excerpt(name string, raw json.RawMessage) string { - s := fmt.Sprintf("%q: %s", name, string(raw)) +// excerpt caps a quote at the contract's 2000 characters. +func excerpt(s string) string { if r := []rune(s); len(r) > 2000 { s = string(r[:1999]) + "…" } diff --git a/plugins/catalog/catalog_test.go b/plugins/catalog/catalog_test.go index e34f31f..1e5ba88 100644 --- a/plugins/catalog/catalog_test.go +++ b/plugins/catalog/catalog_test.go @@ -2,118 +2,91 @@ package catalog import ( "context" + "errors" + "slices" + "strings" "testing" - "time" "github.com/patch-it-dev/patch-it-plugins/core/event" + "github.com/patch-it-dev/patch-it-plugins/core/fetch" "github.com/patch-it-dev/patch-it-plugins/core/kit/kittest" "github.com/patch-it-dev/patch-it-plugins/core/plugin" ) -// The two commits redis-doc's own history shows the removal happen between: -// PR #1697 dropped FUNCTION CREATE and FUNCTION INFO from commands.json on -// 2022-01-24 (checked 2026-11-18), replacing the single-function CREATE with -// a whole-library LOAD. Neither command ever reached a tagged Redis release -// (not even 7.0's first release candidate, which shipped a week later with -// neither in its own src/commands/): a real removal, but one that happened -// before any user could depend on it, not a production break. -const ( - oldRef = "cc0427b3c3671e90b92f1ad2fe4e835fd32cd3c9" - newRef = "06f3598f39c7ca86dbdb0aa1668cfdd1b82b908d" -) - -func env(pages kittest.Pages, t *testing.T) plugin.Env { - return plugin.Env{Get: pages.Get(t), Now: time.Now} -} - -func fixturePages() kittest.Pages { - return kittest.Pages{ - Redis.URL(oldRef): "testdata/redis-doc-cc0427b.json", - Redis.URL(newRef): "testdata/redis-doc-06f3598.json", +// redisPair is the version pair from -> to over the saved listings (and the +// removed files at from's tag), as the hosted ingestion service extracts it. +func redisPair(t *testing.T, from, to string, files ...string) []event.Event { + t.Helper() + pages := kittest.Pages{ + Redis.listingURL(from): "testdata/redis-contents-src-commands-" + from + ".json", + Redis.listingURL(to): "testdata/redis-contents-src-commands-" + to + ".json", } -} - -// The golden test and the pair fixture in one: testdata/redis-doc-cc0427b.json -// and redis-doc-06f3598.json are real, trimmed excerpts of redis-doc's -// commands.json at those two commits (checked 2026-11-18). Between them, -// FUNCTION CREATE and FUNCTION INFO disappear, FUNCTION LOAD appears, and GET -// (an unrelated, long-lived command) is unchanged: the version pair -// oldRef → newRef, read with ReadAt and Extract. -func TestPairRecreatesTheRealFunctionCommandRemoval(t *testing.T) { - ctx := context.Background() - s := kittest.NewMem() - e := env(fixturePages(), t) - - rejected, err := kittest.Pair(ctx, e, s, Plugin{Catalog: Redis}, oldRef, newRef) - if err != nil || rejected { - t.Fatalf("pair: rejected=%v err=%v", rejected, err) + for _, f := range files { + pages[Redis.FileURL(from, f)] = "testdata/redis-" + from + "-" + f } + return kittest.Versions(t, kittest.Env(t, pages), Redis, plugin.Version{ID: from, Ref: from}, plugin.Version{ID: to, Ref: to}) +} - events, err := s.All() - if err != nil { - t.Fatalf("reading events: %v", err) - } - // Precision over recall: GET (unchanged) and FUNCTION LOAD (added, not - // removed) must produce nothing. Only the two real removals should. - got := map[string]bool{} - for _, ev := range events { - if len(ev.Subject.Symbols) != 1 { - t.Fatalf("event with %d symbols, want exactly 1: %+v", len(ev.Subject.Symbols), ev) +// The one removal in redis/redis's src/commands/ between any two tags from +// 7.0 to 8.12 (checked 2026-11-20): GCRA and GCRASETVALUE, added in the +// 8.8 milestone builds, are gone at 8.8-rc1. Final releases never removed a +// command in that span, so the golden pins this pre-release pair: the real +// files, the real listings. +func TestGolden(t *testing.T) { + got := redisPair(t, "8.8-m03", "8.8-rc1", "gcra.json", "gcrasetvalue.json") + var names []string + for _, e := range got { + names = append(names, e.Subject.Symbols[0]) + if e.SourceURL != Redis.FileURL("8.8-m03", strings.ToLower(e.Subject.Symbols[0])+".json") || !strings.Contains(e.SourceExcerpt, `"since":"8.8.0"`) { + t.Errorf("%s: cites %s, quoting %.80q", e.Subject.Symbols[0], e.SourceURL, e.SourceExcerpt) } - got[ev.Subject.Symbols[0]] = true } - want := map[string]bool{"FUNCTION CREATE": true, "FUNCTION INFO": true} - if len(got) != len(want) { - t.Fatalf("stored %v, want exactly %v (GET and FUNCTION LOAD must drop silently)", got, want) - } - for name := range want { - if !got[name] { - t.Errorf("missing an event for %s", name) - } + if !slices.Equal(names, []string{"GCRA", "GCRASETVALUE"}) { + t.Errorf("removed %v, want GCRA and GCRASETVALUE", names) } + kittest.Golden(t, "testdata/golden/redis-commands.json", got) +} - // Acceptance criteria: every event carries source_url and a non-empty - // source_excerpt, is marked breaking, and is placed on the real refs. - for _, ev := range events { - if ev.API != "redis/commands" || ev.Version != newRef || ev.PreviousVersion != oldRef { - t.Errorf("event %v: api=%s version=%s previous_version=%s, want redis/commands %s from %s", - ev.Subject.Symbols, ev.API, ev.Version, ev.PreviousVersion, newRef, oldRef) - } - if ev.ChangeType != event.ChangeTypeBreaking || !ev.Breaking { - t.Errorf("event %v: change_type=%s breaking=%v, want breaking", ev.Subject.Symbols, ev.ChangeType, ev.Breaking) - } - if ev.SourceURL != Redis.URL(oldRef) { - t.Errorf("event %v: source_url=%s, want the old snapshot, where the removed command is still evidenced", ev.Subject.Symbols, ev.SourceURL) - } - if ev.SourceExcerpt == "" { - t.Errorf("event %v: missing source_excerpt", ev.Subject.Symbols) - } +// The pinned drop test: 8.8.0 -> 8.10.0 adds 17 command files (the array +// commands, INCREX…) and removes none. Nothing is an event, and nothing +// past the two listings is fetched. +func TestReleasesThatOnlyAddCommandsHaveNoEvents(t *testing.T) { + if got := redisPair(t, "8.8.0", "8.10.0"); len(got) != 0 { + t.Errorf("%d events, want 0", len(got)) } +} - // Reading the same pair again must not duplicate the events. - if _, err := kittest.Pair(ctx, e, s, Plugin{Catalog: Redis}, oldRef, newRef); err != nil { - t.Fatalf("second read of the pair: %v", err) +// A subcommand is named with its container, as code sends it. +func TestASubcommandIsNamedWithItsContainer(t *testing.T) { + name, _, err := command([]byte(`{"KILL": {"summary": "x", "container": "CLIENT"}}`)) + if err != nil || name != "CLIENT KILL" { + t.Errorf("%q, %v", name, err) } - if again, _ := s.All(); len(again) != len(events) { - t.Errorf("reading the pair again added events: %d -> %d", len(events), len(again)) + if _, _, err := command([]byte(`{"A": {}, "B": {}}`)); err == nil { + t.Error("two commands in one file must be an error, not a guess") } } -// The catalog's versions are its newest commit, looked up on GitHub; that -// version read with nothing before it has nothing to compare, so no events. -// kittest extracts it twice, so a second extract that found anything new -// would fail it too. -func TestTheNewestCommitAloneHasNoEvents(t *testing.T) { - pages := kittest.Pages{ - Redis.RefsURL: "testdata/commits-master.json", - Redis.URL(newRef): "testdata/redis-doc-06f3598.json", +// Versions are the final releases on GitHub, by version number (a patch to +// an older line published later stays in its place), each read at its tag. +// A release before src/commands/ existed has nothing to read. +func TestVersionsAreFinalReleasesByVersion(t *testing.T) { + env := kittest.Env(t, kittest.Pages{ + "https://api.github.com/repos/redis/redis/releases?per_page=100&page=1": "testdata/redis-releases-excerpt.json", + }) + vs, err := Redis.ListVersions(context.Background(), env) + if err != nil { + t.Fatal(err) + } + var ids []string + for _, v := range vs { + ids = append(ids, v.ID+"@"+v.Ref) } - e, p := kittest.Env(t, pages), Plugin{Catalog: Redis} - vs, err := p.ListVersions(context.Background(), e) - if err != nil || len(vs) != 1 || vs[0].Ref != newRef { - t.Fatalf("versions %v, %v; want the newest commit, %s", vs, err, newRef) + if got := strings.Join(ids, " "); got != "6.2.20@6.2.20 7.2.10@7.2.10 8.0.0@8.0.0 8.0.1@8.0.1" { + t.Errorf("versions %s", got) } - if events := kittest.Versions(t, e, p, plugin.Version{}, vs[0]); len(events) != 0 { - t.Errorf("found %d events, want 0: there is nothing yet to diff against", len(events)) + notFound := plugin.Env{Get: func(context.Context, string) ([]byte, error) { return nil, &fetch.StatusError{StatusCode: 404} }} + if _, err := Redis.ReadAt(context.Background(), notFound, plugin.Version{ID: "6.2.20", Ref: "6.2.20"}); !errors.Is(err, plugin.ErrNothingToRead) { + t.Errorf("no src/commands/ at the tag: %v, want plugin.ErrNothingToRead", err) } } diff --git a/plugins/catalog/redis.go b/plugins/catalog/redis.go new file mode 100644 index 0000000..452245b --- /dev/null +++ b/plugins/catalog/redis.go @@ -0,0 +1,193 @@ +package catalog + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "net/url" + "regexp" + "slices" + "sort" + "strings" + + "github.com/patch-it-dev/patch-it-plugins/core/event" + "github.com/patch-it-dev/patch-it-plugins/core/fetch" + "github.com/patch-it-dev/patch-it-plugins/core/github" + "github.com/patch-it-dev/patch-it-plugins/core/plugin" + "github.com/patch-it-dev/patch-it-plugins/core/versions" +) + +// Commands is a server's command catalog kept as one JSON file per command +// in a directory of its own repo, read at each release tag: Redis's +// src/commands/, which the server's command table (and redis.io's command +// reference) is generated from. Each file is one object, keyed by the +// command's name, a subcommand naming its parent as "container" +// ({"KILL": {"container": "CLIENT", ...}} is CLIENT KILL). +// +// A version is a release: its tag lists the directory (one GitHub API +// call), and a command whose file is gone from the next release's listing +// is removed. Only a removed file is fetched, at the older tag, for the +// command's name and the entry quoted as evidence. +type Commands struct { + API string // the source id the events carry: "redis/commands" + Ecosystem string // the package_release subject's ecosystem: "redis" + Package string // the package_release subject's package: "redis" + Repo string // owner/name on GitHub + Dir string // the directory of command files in the repo + // Release matches a final release's tag; its first submatch is the + // version. + Release *regexp.Regexp +} + +// Redis is redis/redis's src/commands/ (checked 2026-11-20: 460 files at +// 8.10.0, every final release a GitHub release tagged X.Y.Z). The directory +// exists from 7.0.0; an older release has nothing to read. +var Redis = Commands{ + API: "redis/commands", Ecosystem: "redis", Package: "redis", + Repo: "redis/redis", Dir: "src/commands", + Release: regexp.MustCompile(`^(\d+\.\d+\.\d+)$`), +} + +func (c Commands) Name() string { return c.API } + +// listingURL is GitHub's listing of the directory at a ref. +func (c Commands) listingURL(ref string) string { + return fmt.Sprintf("%s/repos/%s/contents/%s?ref=%s", github.API, c.Repo, c.Dir, url.QueryEscape(ref)) +} + +// FileURL is one command's file at a ref: its own provenance, as a tag +// never changes. +func (c Commands) FileURL(ref, file string) string { + return fmt.Sprintf("%s/%s/%s/%s/%s", github.Raw, c.Repo, ref, c.Dir, file) +} + +// ListVersions is every final release on GitHub, ordered by version, not by +// publication date: Redis patches older lines after a newer one ships +// (7.2.10 after 8.0.0), and a pair across lines would read the older line's +// missing commands as removals. +func (c Commands) ListVersions(ctx context.Context, env plugin.Env) ([]plugin.Version, error) { + vs, err := versions.GitHubReleases(ctx, env.Get, c.Repo, c.Release.MatchString) + if err != nil { + return nil, err + } + for i := range vs { + vs[i].ID = c.Release.FindStringSubmatch(vs[i].Ref)[1] + } + slices.SortStableFunc(vs, func(a, b plugin.Version) int { return versions.Compare(a.ID, b.ID) }) + return vs, nil +} + +// ReadAt lists the command files at v's tag, as a sorted JSON array of file +// names. A release without the directory (before 7.0.0) has nothing to +// read. +func (c Commands) ReadAt(ctx context.Context, env plugin.Env, v plugin.Version) (plugin.Snapshot, error) { + u := c.listingURL(v.Ref) + body, err := env.Get(ctx, u) + var se *fetch.StatusError + if errors.As(err, &se) && se.StatusCode == 404 { + return plugin.Snapshot{}, fmt.Errorf("no %s at %s: %w", c.Dir, v.Ref, plugin.ErrNothingToRead) + } + if err != nil { + return plugin.Snapshot{}, fmt.Errorf("listing %s at %s: %w", c.Dir, v.Ref, err) + } + var entries []struct { + Name string `json:"name"` + Type string `json:"type"` + } + if err := json.Unmarshal(body, &entries); err != nil { + return plugin.Snapshot{}, fmt.Errorf("parsing the listing of %s at %s: %w", c.Dir, v.Ref, err) + } + var files []string + for _, e := range entries { + if e.Type == "file" && strings.HasSuffix(e.Name, ".json") { + files = append(files, e.Name) + } + } + if len(files) == 0 { + return plugin.Snapshot{}, fmt.Errorf("no command files in %s at %s: %w", c.Dir, v.Ref, plugin.ErrNothingToRead) + } + sort.Strings(files) + content, _ := json.Marshal(files) + return plugin.Snapshot{Version: v, Content: content, SourceURL: fmt.Sprintf("https://github.com/%s/tree/%s/%s", c.Repo, v.Ref, c.Dir)}, nil +} + +// Extract is an event per command whose file is in from's listing and not +// in to's, citing the file at from's tag, with previous_version from's +// release. A zero from has nothing to compare. +func (c Commands) Extract(ctx context.Context, env plugin.Env, from, to plugin.Snapshot) (plugin.Result, error) { + if from.IsZero() { + return plugin.Result{}, nil + } + var before, after []string + if err := json.Unmarshal(from.Content, &before); err != nil { + return plugin.Result{}, fmt.Errorf("reading %s: %w", from.SourceURL, err) + } + if err := json.Unmarshal(to.Content, &after); err != nil { + return plugin.Result{}, fmt.Errorf("reading %s: %w", to.SourceURL, err) + } + var made []event.Event + for _, file := range before { + if slices.Contains(after, file) { + continue + } + u := c.FileURL(from.Version.Ref, file) + body, err := env.Get(ctx, u) + if err != nil { + return plugin.Result{}, fmt.Errorf("fetching %s: %w", u, err) + } + name, entry, err := command(body) + if err != nil { + return plugin.Result{}, fmt.Errorf("reading %s: %w", u, err) + } + made = append(made, event.Event{ + API: c.API, Version: to.Version.ID, PreviousVersion: from.Version.ID, + ChangeType: event.ChangeTypeBreaking, Breaking: true, + Subject: event.Subject{ + Type: event.SubjectPackageRelease, Ecosystem: c.Ecosystem, Package: c.Package, + Change: event.PackageRemovedSymbol, Symbols: []string{name}, + }, + Description: fmt.Sprintf("%s is gone in Redis %s (it was in %s): calling it fails.", name, to.Version.ID, from.Version.ID), + SourceURL: u, + SourceExcerpt: excerpt(entry), + Confidence: 1.0, + DetectedAt: env.Now().UTC(), + }) + } + events, rejected := finish(c.API, made) + return plugin.Result{Events: events, Rejected: rejected}, nil +} + +// command reads one command file: its name ("CLIENT KILL" for a subcommand) +// and the file's entry, quoted as the file writes it, whitespace between +// tokens left out. +func command(body []byte) (name, entry string, err error) { + var file map[string]json.RawMessage + if err := json.Unmarshal(body, &file); err != nil { + return "", "", err + } + if len(file) != 1 { + return "", "", fmt.Errorf("%d commands in one file, want 1", len(file)) + } + for key, raw := range file { + var meta struct { + Container string `json:"container"` + } + if err := json.Unmarshal(raw, &meta); err != nil { + return "", "", err + } + name = key + if meta.Container != "" { + name = meta.Container + " " + key + } + var compact bytes.Buffer + if err := json.Compact(&compact, body); err != nil { + return "", "", err + } + entry = compact.String() + } + return name, entry, nil +} + +var _ plugin.Versioned = Commands{} diff --git a/plugins/catalog/registered_test.go b/plugins/catalog/registered_test.go index 66cb74d..653b731 100644 --- a/plugins/catalog/registered_test.go +++ b/plugins/catalog/registered_test.go @@ -7,5 +7,5 @@ import ( ) func TestRegistersItself(t *testing.T) { - kittest.Registered(t, Plugin{Catalog: Redis}) + kittest.Registered(t, Redis) } diff --git a/plugins/catalog/testdata/README.md b/plugins/catalog/testdata/README.md index eea3aac..f7f1f6b 100644 --- a/plugins/catalog/testdata/README.md +++ b/plugins/catalog/testdata/README.md @@ -1,9 +1,12 @@ # Saved catalog snapshots +The golden file, `golden/redis-commands.json`, is what the catalog kind stores from the pair below (`go test ./plugins/catalog -update`). + | File | URL | Fetched | License | Quote | |---|---|---|---|---| -| `redis-doc-cc0427b.json` | https://github.com/redis/redis-doc/blob/cc0427b3c3671e90b92f1ad2fe4e835fd32cd3c9/commands.json | 2026-11-18 | BSD-3-Clause (redis-doc); trimmed to `FUNCTION CREATE`, `FUNCTION INFO` and `GET` | `"FUNCTION CREATE": {"summary": "Create a function with the given arguments (name, code, description)", "since": "7.0.0", ...}` | -| `redis-doc-06f3598.json` | https://github.com/redis/redis-doc/blob/06f3598f39c7ca86dbdb0aa1668cfdd1b82b908d/commands.json | 2026-11-18 | BSD-3-Clause (redis-doc); trimmed to `FUNCTION LOAD` and `GET` | `"FUNCTION LOAD": {"summary": "Create a function with the given arguments (name, code, description)", "since": "7.0.0", ...}` | -| `commits-master.json` | n/a: a stand-in for `GET https://api.github.com/repos/redis/redis-doc/commits/master`'s response shape, not a saved page. The plugin never cites this lookup as an event's evidence, only the two files above. | — | — | — | - -Both `commands.json` snapshots are real, un-invented excerpts: `06f3598` ([PR #1697](https://github.com/redis/redis-doc/pull/1697), 2022-01-24) is the actual commit that removed `FUNCTION CREATE` and `FUNCTION INFO` and added `FUNCTION LOAD`; `cc0427b` is its immediate parent. `GET` is kept whole and unmodified in both as the drop-test fixture: an unrelated, decades-old command that must never produce an event just because the file around it changed. +| `redis-contents-src-commands-8.8-m03.json` | https://api.github.com/repos/redis/redis/contents/src/commands?ref=8.8-m03 | 2026-11-20 | BSD-3-Clause / RSALv2 / SSPLv1 / AGPLv3 (redis/redis); the listing cut to the two fields read, `name` and `type`, every entry kept | `{"name": "gcra.json", "type": "file"}` | +| `redis-contents-src-commands-8.8-rc1.json` | https://api.github.com/repos/redis/redis/contents/src/commands?ref=8.8-rc1 | 2026-11-20 | as above | no `gcra.json`, no `gcrasetvalue.json` | +| `redis-contents-src-commands-8.8.0.json`, `redis-contents-src-commands-8.10.0.json` | https://api.github.com/repos/redis/redis/contents/src/commands?ref=8.8.0 and `?ref=8.10.0` | 2026-11-20 | as above | the drop test: 17 files added, none removed | +| `redis-8.8-m03-gcra.json` | https://raw.githubusercontent.com/redis/redis/8.8-m03/src/commands/gcra.json | 2026-11-20 | as above, kept whole, byte for byte | `"GCRA": {"summary": "Rate limit via GCRA (Generic Cell Rate Algorithm).", … "since": "8.8.0"` | +| `redis-8.8-m03-gcrasetvalue.json` | https://raw.githubusercontent.com/redis/redis/8.8-m03/src/commands/gcrasetvalue.json | 2026-11-20 | as above, kept whole, byte for byte | `"GCRASETVALUE": {"summary": "An internal command for recording a GCRA TAT value during AOF rewrite and replication."` | +| `redis-releases-excerpt.json` | https://api.github.com/repos/redis/redis/releases (shape only) | written for the test, 2026-11-20 | not a saved copy: five entries in the shape of GitHub's releases API (`tag_name`, `draft`, `prerelease`, `published_at`, `html_url`), dates approximate, a pre-release and a patch to an older line published later among them | for the version-listing test only | diff --git a/plugins/catalog/testdata/commits-master.json b/plugins/catalog/testdata/commits-master.json deleted file mode 100644 index 68ec6b0..0000000 --- a/plugins/catalog/testdata/commits-master.json +++ /dev/null @@ -1 +0,0 @@ -{"sha": "06f3598f39c7ca86dbdb0aa1668cfdd1b82b908d"} diff --git a/plugins/catalog/testdata/golden/redis-commands.json b/plugins/catalog/testdata/golden/redis-commands.json new file mode 100644 index 0000000..3aefa65 --- /dev/null +++ b/plugins/catalog/testdata/golden/redis-commands.json @@ -0,0 +1,48 @@ +[ + { + "id": 1, + "fingerprint": "sha256:e615435aafad455137331aa8fb2365fc29c10fa75180a3129404c937ad9994d5", + "api": "redis/commands", + "version": "8.8-rc1", + "previous_version": "8.8-m03", + "change_type": "breaking", + "breaking": true, + "subject": { + "type": "package_release", + "ecosystem": "redis", + "package": "redis", + "change": "removed_symbol", + "symbols": [ + "GCRA" + ] + }, + "description": "GCRA is gone in Redis 8.8-rc1 (it was in 8.8-m03): calling it fails.", + "source_url": "https://raw.githubusercontent.com/redis/redis/8.8-m03/src/commands/gcra.json", + "source_excerpt": "{\"GCRA\":{\"summary\":\"Rate limit via GCRA (Generic Cell Rate Algorithm).\",\"complexity\":\"O(1)\",\"group\":\"rate_limit\",\"since\":\"8.8.0\",\"arity\":-5,\"function\":\"gcraCommand\",\"command_flags\":[\"WRITE\",\"DENYOOM\",\"FAST\"],\"acl_categories\":[\"RATE_LIMIT\"],\"key_specs\":[{\"flags\":[\"RW\",\"ACCESS\",\"UPDATE\"],\"begin_search\":{\"index\":{\"pos\":1}},\"find_keys\":{\"range\":{\"lastkey\":0,\"step\":1,\"limit\":0}}}],\"reply_schema\":{\"type\":\"array\",\"minItems\":5,\"maxItems\":5,\"description\":\"Rate limiting result\",\"items\":[{\"type\":\"integer\",\"description\":\"Limited: 0 if allowed, 1 if rate limited\"},{\"type\":\"integer\",\"description\":\"Max request tokens: always equal to max_burst+1\"},{\"type\":\"integer\",\"description\":\"Number of tokens available immediately\"},{\"type\":\"integer\",\"description\":\"Retry after: seconds after which the caller should retry. Always -1 if not limited\"},{\"type\":\"integer\",\"description\":\"Full burst after: seconds after which a full burst will be allowed\"}]},\"arguments\":[{\"name\":\"key\",\"type\":\"key\",\"key_spec_index\":0},{\"name\":\"max-burst\",\"type\":\"integer\"},{\"name\":\"tokens-per-period\",\"type\":\"integer\"},{\"name\":\"period\",\"type\":\"double\"},{\"name\":\"count\",\"type\":\"integer\",\"token\":\"TOKENS\",\"optional\":true}]}}", + "confidence": 1, + "detected_at": "2026-11-14T12:00:00Z" + }, + { + "id": 2, + "fingerprint": "sha256:b7bde4fd1e7978df475e23dfa7e283350ca4b63d17f88f7196930742bd24aecf", + "api": "redis/commands", + "version": "8.8-rc1", + "previous_version": "8.8-m03", + "change_type": "breaking", + "breaking": true, + "subject": { + "type": "package_release", + "ecosystem": "redis", + "package": "redis", + "change": "removed_symbol", + "symbols": [ + "GCRASETVALUE" + ] + }, + "description": "GCRASETVALUE is gone in Redis 8.8-rc1 (it was in 8.8-m03): calling it fails.", + "source_url": "https://raw.githubusercontent.com/redis/redis/8.8-m03/src/commands/gcrasetvalue.json", + "source_excerpt": "{\"GCRASETVALUE\":{\"summary\":\"An internal command for recording a GCRA TAT value during AOF rewrite and replication.\",\"complexity\":\"O(1)\",\"group\":\"rate_limit\",\"since\":\"8.8.0\",\"arity\":3,\"function\":\"gcraSetValueCommand\",\"command_flags\":[\"WRITE\",\"DENYOOM\",\"FAST\"],\"acl_categories\":[\"RATE_LIMIT\"],\"key_specs\":[{\"flags\":[\"OW\",\"UPDATE\"],\"begin_search\":{\"index\":{\"pos\":1}},\"find_keys\":{\"range\":{\"lastkey\":0,\"step\":1,\"limit\":0}}}],\"reply_schema\":{\"const\":\"OK\"},\"arguments\":[{\"name\":\"key\",\"type\":\"key\",\"key_spec_index\":0},{\"name\":\"tat\",\"type\":\"integer\"}]}}", + "confidence": 1, + "detected_at": "2026-11-14T12:00:00Z" + } +] diff --git a/plugins/catalog/testdata/redis-8.8-m03-gcra.json b/plugins/catalog/testdata/redis-8.8-m03-gcra.json new file mode 100644 index 0000000..6980af1 --- /dev/null +++ b/plugins/catalog/testdata/redis-8.8-m03-gcra.json @@ -0,0 +1,92 @@ +{ + "GCRA": { + "summary": "Rate limit via GCRA (Generic Cell Rate Algorithm).", + "complexity": "O(1)", + "group": "rate_limit", + "since": "8.8.0", + "arity": -5, + "function": "gcraCommand", + "command_flags": [ + "WRITE", + "DENYOOM", + "FAST" + ], + "acl_categories": [ + "RATE_LIMIT" + ], + "key_specs": [ + { + "flags": [ + "RW", + "ACCESS", + "UPDATE" + ], + "begin_search": { + "index": { + "pos": 1 + } + }, + "find_keys": { + "range": { + "lastkey": 0, + "step": 1, + "limit": 0 + } + } + } + ], + "reply_schema": { + "type": "array", + "minItems": 5, + "maxItems": 5, + "description": "Rate limiting result", + "items": [ + { + "type": "integer", + "description": "Limited: 0 if allowed, 1 if rate limited" + }, + { + "type": "integer", + "description": "Max request tokens: always equal to max_burst+1" + }, + { + "type": "integer", + "description": "Number of tokens available immediately" + }, + { + "type": "integer", + "description": "Retry after: seconds after which the caller should retry. Always -1 if not limited" + }, + { + "type": "integer", + "description": "Full burst after: seconds after which a full burst will be allowed" + } + ] + }, + "arguments": [ + { + "name": "key", + "type": "key", + "key_spec_index": 0 + }, + { + "name": "max-burst", + "type": "integer" + }, + { + "name": "tokens-per-period", + "type": "integer" + }, + { + "name": "period", + "type": "double" + }, + { + "name": "count", + "type": "integer", + "token": "TOKENS", + "optional": true + } + ] + } +} diff --git a/plugins/catalog/testdata/redis-8.8-m03-gcrasetvalue.json b/plugins/catalog/testdata/redis-8.8-m03-gcrasetvalue.json new file mode 100644 index 0000000..5cce15c --- /dev/null +++ b/plugins/catalog/testdata/redis-8.8-m03-gcrasetvalue.json @@ -0,0 +1,52 @@ +{ + "GCRASETVALUE": { + "summary": "An internal command for recording a GCRA TAT value during AOF rewrite and replication.", + "complexity": "O(1)", + "group": "rate_limit", + "since": "8.8.0", + "arity": 3, + "function": "gcraSetValueCommand", + "command_flags": [ + "WRITE", + "DENYOOM", + "FAST" + ], + "acl_categories": [ + "RATE_LIMIT" + ], + "key_specs": [ + { + "flags": [ + "OW", + "UPDATE" + ], + "begin_search": { + "index": { + "pos": 1 + } + }, + "find_keys": { + "range": { + "lastkey": 0, + "step": 1, + "limit": 0 + } + } + } + ], + "reply_schema": { + "const": "OK" + }, + "arguments": [ + { + "name": "key", + "type": "key", + "key_spec_index": 0 + }, + { + "name": "tat", + "type": "integer" + } + ] + } +} diff --git a/plugins/catalog/testdata/redis-contents-src-commands-8.10.0.json b/plugins/catalog/testdata/redis-contents-src-commands-8.10.0.json new file mode 100644 index 0000000..b4f3e4d --- /dev/null +++ b/plugins/catalog/testdata/redis-contents-src-commands-8.10.0.json @@ -0,0 +1 @@ +[{"name":"README.md","type":"file"},{"name":"acl-cat.json","type":"file"},{"name":"acl-deluser.json","type":"file"},{"name":"acl-dryrun.json","type":"file"},{"name":"acl-genpass.json","type":"file"},{"name":"acl-getuser.json","type":"file"},{"name":"acl-help.json","type":"file"},{"name":"acl-list.json","type":"file"},{"name":"acl-load.json","type":"file"},{"name":"acl-log.json","type":"file"},{"name":"acl-save.json","type":"file"},{"name":"acl-setuser.json","type":"file"},{"name":"acl-users.json","type":"file"},{"name":"acl-whoami.json","type":"file"},{"name":"acl.json","type":"file"},{"name":"append.json","type":"file"},{"name":"arcount.json","type":"file"},{"name":"ardel.json","type":"file"},{"name":"ardelrange.json","type":"file"},{"name":"arget.json","type":"file"},{"name":"argetrange.json","type":"file"},{"name":"argrep.json","type":"file"},{"name":"arinfo.json","type":"file"},{"name":"arinsert.json","type":"file"},{"name":"arlastitems.json","type":"file"},{"name":"arlen.json","type":"file"},{"name":"armget.json","type":"file"},{"name":"armset.json","type":"file"},{"name":"arnext.json","type":"file"},{"name":"arop.json","type":"file"},{"name":"arring.json","type":"file"},{"name":"arscan.json","type":"file"},{"name":"arseek.json","type":"file"},{"name":"arset.json","type":"file"},{"name":"asking.json","type":"file"},{"name":"auth.json","type":"file"},{"name":"backup-abort.json","type":"file"},{"name":"backup-cleanup.json","type":"file"},{"name":"backup-help.json","type":"file"},{"name":"backup-list.json","type":"file"},{"name":"backup-seal.json","type":"file"},{"name":"backup-start.json","type":"file"},{"name":"backup-status.json","type":"file"},{"name":"backup.json","type":"file"},{"name":"bgrewriteaof.json","type":"file"},{"name":"bgsave.json","type":"file"},{"name":"bitcount.json","type":"file"},{"name":"bitfield.json","type":"file"},{"name":"bitfield_ro.json","type":"file"},{"name":"bitop.json","type":"file"},{"name":"bitpos.json","type":"file"},{"name":"blmove.json","type":"file"},{"name":"blmovem.json","type":"file"},{"name":"blmpop.json","type":"file"},{"name":"blpop.json","type":"file"},{"name":"brpop.json","type":"file"},{"name":"brpoplpush.json","type":"file"},{"name":"bzmpop.json","type":"file"},{"name":"bzpopmax.json","type":"file"},{"name":"bzpopmin.json","type":"file"},{"name":"client-caching.json","type":"file"},{"name":"client-getname.json","type":"file"},{"name":"client-getredir.json","type":"file"},{"name":"client-help.json","type":"file"},{"name":"client-id.json","type":"file"},{"name":"client-info.json","type":"file"},{"name":"client-kill.json","type":"file"},{"name":"client-list.json","type":"file"},{"name":"client-no-evict.json","type":"file"},{"name":"client-no-touch.json","type":"file"},{"name":"client-pause.json","type":"file"},{"name":"client-reply.json","type":"file"},{"name":"client-setinfo.json","type":"file"},{"name":"client-setname.json","type":"file"},{"name":"client-tracking.json","type":"file"},{"name":"client-trackinginfo.json","type":"file"},{"name":"client-unblock.json","type":"file"},{"name":"client-unpause.json","type":"file"},{"name":"client.json","type":"file"},{"name":"cluster-addslots.json","type":"file"},{"name":"cluster-addslotsrange.json","type":"file"},{"name":"cluster-bumpepoch.json","type":"file"},{"name":"cluster-count-failure-reports.json","type":"file"},{"name":"cluster-countkeysinslot.json","type":"file"},{"name":"cluster-delslots.json","type":"file"},{"name":"cluster-delslotsrange.json","type":"file"},{"name":"cluster-failover.json","type":"file"},{"name":"cluster-flushslots.json","type":"file"},{"name":"cluster-forget.json","type":"file"},{"name":"cluster-getkeysinslot.json","type":"file"},{"name":"cluster-help.json","type":"file"},{"name":"cluster-info.json","type":"file"},{"name":"cluster-keyslot.json","type":"file"},{"name":"cluster-links.json","type":"file"},{"name":"cluster-meet.json","type":"file"},{"name":"cluster-migration.json","type":"file"},{"name":"cluster-myid.json","type":"file"},{"name":"cluster-myshardid.json","type":"file"},{"name":"cluster-nodes.json","type":"file"},{"name":"cluster-replicas.json","type":"file"},{"name":"cluster-replicate.json","type":"file"},{"name":"cluster-reset.json","type":"file"},{"name":"cluster-saveconfig.json","type":"file"},{"name":"cluster-set-config-epoch.json","type":"file"},{"name":"cluster-setslot.json","type":"file"},{"name":"cluster-shards.json","type":"file"},{"name":"cluster-slaves.json","type":"file"},{"name":"cluster-slot-stats.json","type":"file"},{"name":"cluster-slots.json","type":"file"},{"name":"cluster-syncslots.json","type":"file"},{"name":"cluster.json","type":"file"},{"name":"command-count.json","type":"file"},{"name":"command-docs.json","type":"file"},{"name":"command-getkeys.json","type":"file"},{"name":"command-getkeysandflags.json","type":"file"},{"name":"command-help.json","type":"file"},{"name":"command-info.json","type":"file"},{"name":"command-list.json","type":"file"},{"name":"command.json","type":"file"},{"name":"config-get.json","type":"file"},{"name":"config-help.json","type":"file"},{"name":"config-resetstat.json","type":"file"},{"name":"config-rewrite.json","type":"file"},{"name":"config-set.json","type":"file"},{"name":"config.json","type":"file"},{"name":"copy.json","type":"file"},{"name":"dbsize.json","type":"file"},{"name":"debug.json","type":"file"},{"name":"decr.json","type":"file"},{"name":"decrby.json","type":"file"},{"name":"del.json","type":"file"},{"name":"delex.json","type":"file"},{"name":"digest.json","type":"file"},{"name":"discard.json","type":"file"},{"name":"dump.json","type":"file"},{"name":"echo.json","type":"file"},{"name":"eval.json","type":"file"},{"name":"eval_ro.json","type":"file"},{"name":"evalsha.json","type":"file"},{"name":"evalsha_ro.json","type":"file"},{"name":"exec.json","type":"file"},{"name":"exists.json","type":"file"},{"name":"expire.json","type":"file"},{"name":"expireat.json","type":"file"},{"name":"expiretime.json","type":"file"},{"name":"failover.json","type":"file"},{"name":"fcall.json","type":"file"},{"name":"fcall_ro.json","type":"file"},{"name":"flushall.json","type":"file"},{"name":"flushdb.json","type":"file"},{"name":"function-delete.json","type":"file"},{"name":"function-dump.json","type":"file"},{"name":"function-flush.json","type":"file"},{"name":"function-help.json","type":"file"},{"name":"function-kill.json","type":"file"},{"name":"function-list.json","type":"file"},{"name":"function-load.json","type":"file"},{"name":"function-restore.json","type":"file"},{"name":"function-stats.json","type":"file"},{"name":"function.json","type":"file"},{"name":"geoadd.json","type":"file"},{"name":"geodist.json","type":"file"},{"name":"geohash.json","type":"file"},{"name":"geopos.json","type":"file"},{"name":"georadius.json","type":"file"},{"name":"georadius_ro.json","type":"file"},{"name":"georadiusbymember.json","type":"file"},{"name":"georadiusbymember_ro.json","type":"file"},{"name":"geosearch.json","type":"file"},{"name":"geosearchstore.json","type":"file"},{"name":"get.json","type":"file"},{"name":"getbit.json","type":"file"},{"name":"getdel.json","type":"file"},{"name":"getex.json","type":"file"},{"name":"getrange.json","type":"file"},{"name":"getset.json","type":"file"},{"name":"hdel.json","type":"file"},{"name":"hello.json","type":"file"},{"name":"hexists.json","type":"file"},{"name":"hexpire.json","type":"file"},{"name":"hexpireat.json","type":"file"},{"name":"hexpiretime.json","type":"file"},{"name":"hget.json","type":"file"},{"name":"hgetall.json","type":"file"},{"name":"hgetdel.json","type":"file"},{"name":"hgetex.json","type":"file"},{"name":"himport-discard.json","type":"file"},{"name":"himport-discardall.json","type":"file"},{"name":"himport-prepare.json","type":"file"},{"name":"himport-set.json","type":"file"},{"name":"himport.json","type":"file"},{"name":"hincrby.json","type":"file"},{"name":"hincrbyfloat.json","type":"file"},{"name":"hkeys.json","type":"file"},{"name":"hlen.json","type":"file"},{"name":"hmget.json","type":"file"},{"name":"hmset.json","type":"file"},{"name":"hotkeys-get.json","type":"file"},{"name":"hotkeys-help.json","type":"file"},{"name":"hotkeys-reset.json","type":"file"},{"name":"hotkeys-start.json","type":"file"},{"name":"hotkeys-stop.json","type":"file"},{"name":"hotkeys.json","type":"file"},{"name":"hpersist.json","type":"file"},{"name":"hpexpire.json","type":"file"},{"name":"hpexpireat.json","type":"file"},{"name":"hpexpiretime.json","type":"file"},{"name":"hpttl.json","type":"file"},{"name":"hrandfield.json","type":"file"},{"name":"hscan.json","type":"file"},{"name":"hset.json","type":"file"},{"name":"hsetex.json","type":"file"},{"name":"hsetnx.json","type":"file"},{"name":"hstrlen.json","type":"file"},{"name":"httl.json","type":"file"},{"name":"hvals.json","type":"file"},{"name":"incr.json","type":"file"},{"name":"incrby.json","type":"file"},{"name":"incrbyfloat.json","type":"file"},{"name":"increx.json","type":"file"},{"name":"info.json","type":"file"},{"name":"keys.json","type":"file"},{"name":"lastsave.json","type":"file"},{"name":"latency-doctor.json","type":"file"},{"name":"latency-graph.json","type":"file"},{"name":"latency-help.json","type":"file"},{"name":"latency-histogram.json","type":"file"},{"name":"latency-history.json","type":"file"},{"name":"latency-latest.json","type":"file"},{"name":"latency-reset.json","type":"file"},{"name":"latency.json","type":"file"},{"name":"lcs.json","type":"file"},{"name":"lindex.json","type":"file"},{"name":"linsert.json","type":"file"},{"name":"llen.json","type":"file"},{"name":"lmove.json","type":"file"},{"name":"lmovem.json","type":"file"},{"name":"lmpop.json","type":"file"},{"name":"lolwut.json","type":"file"},{"name":"lpop.json","type":"file"},{"name":"lpos.json","type":"file"},{"name":"lpush.json","type":"file"},{"name":"lpushx.json","type":"file"},{"name":"lrange.json","type":"file"},{"name":"lrem.json","type":"file"},{"name":"lset.json","type":"file"},{"name":"ltrim.json","type":"file"},{"name":"memory-doctor.json","type":"file"},{"name":"memory-help.json","type":"file"},{"name":"memory-malloc-stats.json","type":"file"},{"name":"memory-purge.json","type":"file"},{"name":"memory-stats.json","type":"file"},{"name":"memory-usage.json","type":"file"},{"name":"memory.json","type":"file"},{"name":"mget.json","type":"file"},{"name":"migrate.json","type":"file"},{"name":"module-help.json","type":"file"},{"name":"module-list.json","type":"file"},{"name":"module-load.json","type":"file"},{"name":"module-loadex.json","type":"file"},{"name":"module-unload.json","type":"file"},{"name":"module.json","type":"file"},{"name":"monitor.json","type":"file"},{"name":"move.json","type":"file"},{"name":"mset.json","type":"file"},{"name":"msetex.json","type":"file"},{"name":"msetnx.json","type":"file"},{"name":"multi.json","type":"file"},{"name":"object-encoding.json","type":"file"},{"name":"object-freq.json","type":"file"},{"name":"object-help.json","type":"file"},{"name":"object-idletime.json","type":"file"},{"name":"object-refcount.json","type":"file"},{"name":"object.json","type":"file"},{"name":"persist.json","type":"file"},{"name":"pexpire.json","type":"file"},{"name":"pexpireat.json","type":"file"},{"name":"pexpiretime.json","type":"file"},{"name":"pfadd.json","type":"file"},{"name":"pfcount.json","type":"file"},{"name":"pfdebug.json","type":"file"},{"name":"pfmerge.json","type":"file"},{"name":"pfselftest.json","type":"file"},{"name":"ping.json","type":"file"},{"name":"psetex.json","type":"file"},{"name":"psubscribe.json","type":"file"},{"name":"psync.json","type":"file"},{"name":"pttl.json","type":"file"},{"name":"publish.json","type":"file"},{"name":"pubsub-channels.json","type":"file"},{"name":"pubsub-help.json","type":"file"},{"name":"pubsub-numpat.json","type":"file"},{"name":"pubsub-numsub.json","type":"file"},{"name":"pubsub-shardchannels.json","type":"file"},{"name":"pubsub-shardnumsub.json","type":"file"},{"name":"pubsub.json","type":"file"},{"name":"punsubscribe.json","type":"file"},{"name":"quit.json","type":"file"},{"name":"randomkey.json","type":"file"},{"name":"readonly.json","type":"file"},{"name":"readwrite.json","type":"file"},{"name":"rename.json","type":"file"},{"name":"renamenx.json","type":"file"},{"name":"replconf.json","type":"file"},{"name":"replicaof.json","type":"file"},{"name":"reset.json","type":"file"},{"name":"restore-asking.json","type":"file"},{"name":"restore.json","type":"file"},{"name":"role.json","type":"file"},{"name":"rpop.json","type":"file"},{"name":"rpoplpush.json","type":"file"},{"name":"rpush.json","type":"file"},{"name":"rpushx.json","type":"file"},{"name":"sadd.json","type":"file"},{"name":"save.json","type":"file"},{"name":"scan.json","type":"file"},{"name":"scard.json","type":"file"},{"name":"script-debug.json","type":"file"},{"name":"script-exists.json","type":"file"},{"name":"script-flush.json","type":"file"},{"name":"script-help.json","type":"file"},{"name":"script-kill.json","type":"file"},{"name":"script-load.json","type":"file"},{"name":"script.json","type":"file"},{"name":"sdiff.json","type":"file"},{"name":"sdiffcard.json","type":"file"},{"name":"sdiffstore.json","type":"file"},{"name":"select.json","type":"file"},{"name":"sentinel-ckquorum.json","type":"file"},{"name":"sentinel-config.json","type":"file"},{"name":"sentinel-debug.json","type":"file"},{"name":"sentinel-failover.json","type":"file"},{"name":"sentinel-flushconfig.json","type":"file"},{"name":"sentinel-get-master-addr-by-name.json","type":"file"},{"name":"sentinel-help.json","type":"file"},{"name":"sentinel-info-cache.json","type":"file"},{"name":"sentinel-is-master-down-by-addr.json","type":"file"},{"name":"sentinel-master.json","type":"file"},{"name":"sentinel-masters.json","type":"file"},{"name":"sentinel-monitor.json","type":"file"},{"name":"sentinel-myid.json","type":"file"},{"name":"sentinel-pending-scripts.json","type":"file"},{"name":"sentinel-remove.json","type":"file"},{"name":"sentinel-replicas.json","type":"file"},{"name":"sentinel-reset.json","type":"file"},{"name":"sentinel-sentinels.json","type":"file"},{"name":"sentinel-set.json","type":"file"},{"name":"sentinel-simulate-failure.json","type":"file"},{"name":"sentinel-slaves.json","type":"file"},{"name":"sentinel.json","type":"file"},{"name":"set.json","type":"file"},{"name":"setbit.json","type":"file"},{"name":"setex.json","type":"file"},{"name":"setnx.json","type":"file"},{"name":"setrange.json","type":"file"},{"name":"sflush.json","type":"file"},{"name":"shutdown.json","type":"file"},{"name":"sinter.json","type":"file"},{"name":"sintercard.json","type":"file"},{"name":"sinterstore.json","type":"file"},{"name":"sismember.json","type":"file"},{"name":"slaveof.json","type":"file"},{"name":"slowlog-get.json","type":"file"},{"name":"slowlog-help.json","type":"file"},{"name":"slowlog-len.json","type":"file"},{"name":"slowlog-reset.json","type":"file"},{"name":"slowlog.json","type":"file"},{"name":"smembers.json","type":"file"},{"name":"smismember.json","type":"file"},{"name":"smove.json","type":"file"},{"name":"sort.json","type":"file"},{"name":"sort_ro.json","type":"file"},{"name":"spop.json","type":"file"},{"name":"spublish.json","type":"file"},{"name":"srandmember.json","type":"file"},{"name":"srem.json","type":"file"},{"name":"sscan.json","type":"file"},{"name":"ssubscribe.json","type":"file"},{"name":"strlen.json","type":"file"},{"name":"subscribe.json","type":"file"},{"name":"substr.json","type":"file"},{"name":"sunion.json","type":"file"},{"name":"sunioncard.json","type":"file"},{"name":"sunionstore.json","type":"file"},{"name":"sunsubscribe.json","type":"file"},{"name":"swapdb.json","type":"file"},{"name":"sync.json","type":"file"},{"name":"time.json","type":"file"},{"name":"touch.json","type":"file"},{"name":"trimslots.json","type":"file"},{"name":"ttl.json","type":"file"},{"name":"type.json","type":"file"},{"name":"unlink.json","type":"file"},{"name":"unsubscribe.json","type":"file"},{"name":"unwatch.json","type":"file"},{"name":"wait.json","type":"file"},{"name":"waitaof.json","type":"file"},{"name":"watch.json","type":"file"},{"name":"xack.json","type":"file"},{"name":"xackdel.json","type":"file"},{"name":"xadd.json","type":"file"},{"name":"xautoclaim.json","type":"file"},{"name":"xcfgset.json","type":"file"},{"name":"xclaim.json","type":"file"},{"name":"xdel.json","type":"file"},{"name":"xdelex.json","type":"file"},{"name":"xgroup-create.json","type":"file"},{"name":"xgroup-createconsumer.json","type":"file"},{"name":"xgroup-delconsumer.json","type":"file"},{"name":"xgroup-destroy.json","type":"file"},{"name":"xgroup-help.json","type":"file"},{"name":"xgroup-setid.json","type":"file"},{"name":"xgroup.json","type":"file"},{"name":"xidmprecord.json","type":"file"},{"name":"xinfo-consumers.json","type":"file"},{"name":"xinfo-groups.json","type":"file"},{"name":"xinfo-help.json","type":"file"},{"name":"xinfo-stream.json","type":"file"},{"name":"xinfo.json","type":"file"},{"name":"xlen.json","type":"file"},{"name":"xnack.json","type":"file"},{"name":"xpending.json","type":"file"},{"name":"xrange.json","type":"file"},{"name":"xread.json","type":"file"},{"name":"xreadgroup.json","type":"file"},{"name":"xrevrange.json","type":"file"},{"name":"xsetid.json","type":"file"},{"name":"xtrim.json","type":"file"},{"name":"zadd.json","type":"file"},{"name":"zcard.json","type":"file"},{"name":"zcount.json","type":"file"},{"name":"zdiff.json","type":"file"},{"name":"zdiffstore.json","type":"file"},{"name":"zincrby.json","type":"file"},{"name":"zinter.json","type":"file"},{"name":"zintercard.json","type":"file"},{"name":"zinterstore.json","type":"file"},{"name":"zlexcount.json","type":"file"},{"name":"zmpop.json","type":"file"},{"name":"zmscore.json","type":"file"},{"name":"zpopmax.json","type":"file"},{"name":"zpopmin.json","type":"file"},{"name":"zrandmember.json","type":"file"},{"name":"zrange.json","type":"file"},{"name":"zrangebylex.json","type":"file"},{"name":"zrangebyscore.json","type":"file"},{"name":"zrangestore.json","type":"file"},{"name":"zrank.json","type":"file"},{"name":"zrem.json","type":"file"},{"name":"zremrangebylex.json","type":"file"},{"name":"zremrangebyrank.json","type":"file"},{"name":"zremrangebyscore.json","type":"file"},{"name":"zrevrange.json","type":"file"},{"name":"zrevrangebylex.json","type":"file"},{"name":"zrevrangebyscore.json","type":"file"},{"name":"zrevrank.json","type":"file"},{"name":"zscan.json","type":"file"},{"name":"zscore.json","type":"file"},{"name":"zunion.json","type":"file"},{"name":"zunionstore.json","type":"file"}] diff --git a/plugins/catalog/testdata/redis-contents-src-commands-8.8-m03.json b/plugins/catalog/testdata/redis-contents-src-commands-8.8-m03.json new file mode 100644 index 0000000..2e9a1c1 --- /dev/null +++ b/plugins/catalog/testdata/redis-contents-src-commands-8.8-m03.json @@ -0,0 +1 @@ +[{"name":"README.md","type":"file"},{"name":"acl-cat.json","type":"file"},{"name":"acl-deluser.json","type":"file"},{"name":"acl-dryrun.json","type":"file"},{"name":"acl-genpass.json","type":"file"},{"name":"acl-getuser.json","type":"file"},{"name":"acl-help.json","type":"file"},{"name":"acl-list.json","type":"file"},{"name":"acl-load.json","type":"file"},{"name":"acl-log.json","type":"file"},{"name":"acl-save.json","type":"file"},{"name":"acl-setuser.json","type":"file"},{"name":"acl-users.json","type":"file"},{"name":"acl-whoami.json","type":"file"},{"name":"acl.json","type":"file"},{"name":"append.json","type":"file"},{"name":"asking.json","type":"file"},{"name":"auth.json","type":"file"},{"name":"bgrewriteaof.json","type":"file"},{"name":"bgsave.json","type":"file"},{"name":"bitcount.json","type":"file"},{"name":"bitfield.json","type":"file"},{"name":"bitfield_ro.json","type":"file"},{"name":"bitop.json","type":"file"},{"name":"bitpos.json","type":"file"},{"name":"blmove.json","type":"file"},{"name":"blmpop.json","type":"file"},{"name":"blpop.json","type":"file"},{"name":"brpop.json","type":"file"},{"name":"brpoplpush.json","type":"file"},{"name":"bzmpop.json","type":"file"},{"name":"bzpopmax.json","type":"file"},{"name":"bzpopmin.json","type":"file"},{"name":"client-caching.json","type":"file"},{"name":"client-getname.json","type":"file"},{"name":"client-getredir.json","type":"file"},{"name":"client-help.json","type":"file"},{"name":"client-id.json","type":"file"},{"name":"client-info.json","type":"file"},{"name":"client-kill.json","type":"file"},{"name":"client-list.json","type":"file"},{"name":"client-no-evict.json","type":"file"},{"name":"client-no-touch.json","type":"file"},{"name":"client-pause.json","type":"file"},{"name":"client-reply.json","type":"file"},{"name":"client-setinfo.json","type":"file"},{"name":"client-setname.json","type":"file"},{"name":"client-tracking.json","type":"file"},{"name":"client-trackinginfo.json","type":"file"},{"name":"client-unblock.json","type":"file"},{"name":"client-unpause.json","type":"file"},{"name":"client.json","type":"file"},{"name":"cluster-addslots.json","type":"file"},{"name":"cluster-addslotsrange.json","type":"file"},{"name":"cluster-bumpepoch.json","type":"file"},{"name":"cluster-count-failure-reports.json","type":"file"},{"name":"cluster-countkeysinslot.json","type":"file"},{"name":"cluster-delslots.json","type":"file"},{"name":"cluster-delslotsrange.json","type":"file"},{"name":"cluster-failover.json","type":"file"},{"name":"cluster-flushslots.json","type":"file"},{"name":"cluster-forget.json","type":"file"},{"name":"cluster-getkeysinslot.json","type":"file"},{"name":"cluster-help.json","type":"file"},{"name":"cluster-info.json","type":"file"},{"name":"cluster-keyslot.json","type":"file"},{"name":"cluster-links.json","type":"file"},{"name":"cluster-meet.json","type":"file"},{"name":"cluster-migration.json","type":"file"},{"name":"cluster-myid.json","type":"file"},{"name":"cluster-myshardid.json","type":"file"},{"name":"cluster-nodes.json","type":"file"},{"name":"cluster-replicas.json","type":"file"},{"name":"cluster-replicate.json","type":"file"},{"name":"cluster-reset.json","type":"file"},{"name":"cluster-saveconfig.json","type":"file"},{"name":"cluster-set-config-epoch.json","type":"file"},{"name":"cluster-setslot.json","type":"file"},{"name":"cluster-shards.json","type":"file"},{"name":"cluster-slaves.json","type":"file"},{"name":"cluster-slot-stats.json","type":"file"},{"name":"cluster-slots.json","type":"file"},{"name":"cluster-syncslots.json","type":"file"},{"name":"cluster.json","type":"file"},{"name":"command-count.json","type":"file"},{"name":"command-docs.json","type":"file"},{"name":"command-getkeys.json","type":"file"},{"name":"command-getkeysandflags.json","type":"file"},{"name":"command-help.json","type":"file"},{"name":"command-info.json","type":"file"},{"name":"command-list.json","type":"file"},{"name":"command.json","type":"file"},{"name":"config-get.json","type":"file"},{"name":"config-help.json","type":"file"},{"name":"config-resetstat.json","type":"file"},{"name":"config-rewrite.json","type":"file"},{"name":"config-set.json","type":"file"},{"name":"config.json","type":"file"},{"name":"copy.json","type":"file"},{"name":"dbsize.json","type":"file"},{"name":"debug.json","type":"file"},{"name":"decr.json","type":"file"},{"name":"decrby.json","type":"file"},{"name":"del.json","type":"file"},{"name":"delex.json","type":"file"},{"name":"digest.json","type":"file"},{"name":"discard.json","type":"file"},{"name":"dump.json","type":"file"},{"name":"echo.json","type":"file"},{"name":"eval.json","type":"file"},{"name":"eval_ro.json","type":"file"},{"name":"evalsha.json","type":"file"},{"name":"evalsha_ro.json","type":"file"},{"name":"exec.json","type":"file"},{"name":"exists.json","type":"file"},{"name":"expire.json","type":"file"},{"name":"expireat.json","type":"file"},{"name":"expiretime.json","type":"file"},{"name":"failover.json","type":"file"},{"name":"fcall.json","type":"file"},{"name":"fcall_ro.json","type":"file"},{"name":"flushall.json","type":"file"},{"name":"flushdb.json","type":"file"},{"name":"function-delete.json","type":"file"},{"name":"function-dump.json","type":"file"},{"name":"function-flush.json","type":"file"},{"name":"function-help.json","type":"file"},{"name":"function-kill.json","type":"file"},{"name":"function-list.json","type":"file"},{"name":"function-load.json","type":"file"},{"name":"function-restore.json","type":"file"},{"name":"function-stats.json","type":"file"},{"name":"function.json","type":"file"},{"name":"gcra.json","type":"file"},{"name":"gcrasetvalue.json","type":"file"},{"name":"geoadd.json","type":"file"},{"name":"geodist.json","type":"file"},{"name":"geohash.json","type":"file"},{"name":"geopos.json","type":"file"},{"name":"georadius.json","type":"file"},{"name":"georadius_ro.json","type":"file"},{"name":"georadiusbymember.json","type":"file"},{"name":"georadiusbymember_ro.json","type":"file"},{"name":"geosearch.json","type":"file"},{"name":"geosearchstore.json","type":"file"},{"name":"get.json","type":"file"},{"name":"getbit.json","type":"file"},{"name":"getdel.json","type":"file"},{"name":"getex.json","type":"file"},{"name":"getrange.json","type":"file"},{"name":"getset.json","type":"file"},{"name":"hdel.json","type":"file"},{"name":"hello.json","type":"file"},{"name":"hexists.json","type":"file"},{"name":"hexpire.json","type":"file"},{"name":"hexpireat.json","type":"file"},{"name":"hexpiretime.json","type":"file"},{"name":"hget.json","type":"file"},{"name":"hgetall.json","type":"file"},{"name":"hgetdel.json","type":"file"},{"name":"hgetex.json","type":"file"},{"name":"hincrby.json","type":"file"},{"name":"hincrbyfloat.json","type":"file"},{"name":"hkeys.json","type":"file"},{"name":"hlen.json","type":"file"},{"name":"hmget.json","type":"file"},{"name":"hmset.json","type":"file"},{"name":"hotkeys-get.json","type":"file"},{"name":"hotkeys-help.json","type":"file"},{"name":"hotkeys-reset.json","type":"file"},{"name":"hotkeys-start.json","type":"file"},{"name":"hotkeys-stop.json","type":"file"},{"name":"hotkeys.json","type":"file"},{"name":"hpersist.json","type":"file"},{"name":"hpexpire.json","type":"file"},{"name":"hpexpireat.json","type":"file"},{"name":"hpexpiretime.json","type":"file"},{"name":"hpttl.json","type":"file"},{"name":"hrandfield.json","type":"file"},{"name":"hscan.json","type":"file"},{"name":"hset.json","type":"file"},{"name":"hsetex.json","type":"file"},{"name":"hsetnx.json","type":"file"},{"name":"hstrlen.json","type":"file"},{"name":"httl.json","type":"file"},{"name":"hvals.json","type":"file"},{"name":"incr.json","type":"file"},{"name":"incrby.json","type":"file"},{"name":"incrbyfloat.json","type":"file"},{"name":"info.json","type":"file"},{"name":"keys.json","type":"file"},{"name":"lastsave.json","type":"file"},{"name":"latency-doctor.json","type":"file"},{"name":"latency-graph.json","type":"file"},{"name":"latency-help.json","type":"file"},{"name":"latency-histogram.json","type":"file"},{"name":"latency-history.json","type":"file"},{"name":"latency-latest.json","type":"file"},{"name":"latency-reset.json","type":"file"},{"name":"latency.json","type":"file"},{"name":"lcs.json","type":"file"},{"name":"lindex.json","type":"file"},{"name":"linsert.json","type":"file"},{"name":"llen.json","type":"file"},{"name":"lmove.json","type":"file"},{"name":"lmpop.json","type":"file"},{"name":"lolwut.json","type":"file"},{"name":"lpop.json","type":"file"},{"name":"lpos.json","type":"file"},{"name":"lpush.json","type":"file"},{"name":"lpushx.json","type":"file"},{"name":"lrange.json","type":"file"},{"name":"lrem.json","type":"file"},{"name":"lset.json","type":"file"},{"name":"ltrim.json","type":"file"},{"name":"memory-doctor.json","type":"file"},{"name":"memory-help.json","type":"file"},{"name":"memory-malloc-stats.json","type":"file"},{"name":"memory-purge.json","type":"file"},{"name":"memory-stats.json","type":"file"},{"name":"memory-usage.json","type":"file"},{"name":"memory.json","type":"file"},{"name":"mget.json","type":"file"},{"name":"migrate.json","type":"file"},{"name":"module-help.json","type":"file"},{"name":"module-list.json","type":"file"},{"name":"module-load.json","type":"file"},{"name":"module-loadex.json","type":"file"},{"name":"module-unload.json","type":"file"},{"name":"module.json","type":"file"},{"name":"monitor.json","type":"file"},{"name":"move.json","type":"file"},{"name":"mset.json","type":"file"},{"name":"msetex.json","type":"file"},{"name":"msetnx.json","type":"file"},{"name":"multi.json","type":"file"},{"name":"object-encoding.json","type":"file"},{"name":"object-freq.json","type":"file"},{"name":"object-help.json","type":"file"},{"name":"object-idletime.json","type":"file"},{"name":"object-refcount.json","type":"file"},{"name":"object.json","type":"file"},{"name":"persist.json","type":"file"},{"name":"pexpire.json","type":"file"},{"name":"pexpireat.json","type":"file"},{"name":"pexpiretime.json","type":"file"},{"name":"pfadd.json","type":"file"},{"name":"pfcount.json","type":"file"},{"name":"pfdebug.json","type":"file"},{"name":"pfmerge.json","type":"file"},{"name":"pfselftest.json","type":"file"},{"name":"ping.json","type":"file"},{"name":"psetex.json","type":"file"},{"name":"psubscribe.json","type":"file"},{"name":"psync.json","type":"file"},{"name":"pttl.json","type":"file"},{"name":"publish.json","type":"file"},{"name":"pubsub-channels.json","type":"file"},{"name":"pubsub-help.json","type":"file"},{"name":"pubsub-numpat.json","type":"file"},{"name":"pubsub-numsub.json","type":"file"},{"name":"pubsub-shardchannels.json","type":"file"},{"name":"pubsub-shardnumsub.json","type":"file"},{"name":"pubsub.json","type":"file"},{"name":"punsubscribe.json","type":"file"},{"name":"quit.json","type":"file"},{"name":"randomkey.json","type":"file"},{"name":"readonly.json","type":"file"},{"name":"readwrite.json","type":"file"},{"name":"rename.json","type":"file"},{"name":"renamenx.json","type":"file"},{"name":"replconf.json","type":"file"},{"name":"replicaof.json","type":"file"},{"name":"reset.json","type":"file"},{"name":"restore-asking.json","type":"file"},{"name":"restore.json","type":"file"},{"name":"role.json","type":"file"},{"name":"rpop.json","type":"file"},{"name":"rpoplpush.json","type":"file"},{"name":"rpush.json","type":"file"},{"name":"rpushx.json","type":"file"},{"name":"sadd.json","type":"file"},{"name":"save.json","type":"file"},{"name":"scan.json","type":"file"},{"name":"scard.json","type":"file"},{"name":"script-debug.json","type":"file"},{"name":"script-exists.json","type":"file"},{"name":"script-flush.json","type":"file"},{"name":"script-help.json","type":"file"},{"name":"script-kill.json","type":"file"},{"name":"script-load.json","type":"file"},{"name":"script.json","type":"file"},{"name":"sdiff.json","type":"file"},{"name":"sdiffstore.json","type":"file"},{"name":"select.json","type":"file"},{"name":"sentinel-ckquorum.json","type":"file"},{"name":"sentinel-config.json","type":"file"},{"name":"sentinel-debug.json","type":"file"},{"name":"sentinel-failover.json","type":"file"},{"name":"sentinel-flushconfig.json","type":"file"},{"name":"sentinel-get-master-addr-by-name.json","type":"file"},{"name":"sentinel-help.json","type":"file"},{"name":"sentinel-info-cache.json","type":"file"},{"name":"sentinel-is-master-down-by-addr.json","type":"file"},{"name":"sentinel-master.json","type":"file"},{"name":"sentinel-masters.json","type":"file"},{"name":"sentinel-monitor.json","type":"file"},{"name":"sentinel-myid.json","type":"file"},{"name":"sentinel-pending-scripts.json","type":"file"},{"name":"sentinel-remove.json","type":"file"},{"name":"sentinel-replicas.json","type":"file"},{"name":"sentinel-reset.json","type":"file"},{"name":"sentinel-sentinels.json","type":"file"},{"name":"sentinel-set.json","type":"file"},{"name":"sentinel-simulate-failure.json","type":"file"},{"name":"sentinel-slaves.json","type":"file"},{"name":"sentinel.json","type":"file"},{"name":"set.json","type":"file"},{"name":"setbit.json","type":"file"},{"name":"setex.json","type":"file"},{"name":"setnx.json","type":"file"},{"name":"setrange.json","type":"file"},{"name":"sflush.json","type":"file"},{"name":"shutdown.json","type":"file"},{"name":"sinter.json","type":"file"},{"name":"sintercard.json","type":"file"},{"name":"sinterstore.json","type":"file"},{"name":"sismember.json","type":"file"},{"name":"slaveof.json","type":"file"},{"name":"slowlog-get.json","type":"file"},{"name":"slowlog-help.json","type":"file"},{"name":"slowlog-len.json","type":"file"},{"name":"slowlog-reset.json","type":"file"},{"name":"slowlog.json","type":"file"},{"name":"smembers.json","type":"file"},{"name":"smismember.json","type":"file"},{"name":"smove.json","type":"file"},{"name":"sort.json","type":"file"},{"name":"sort_ro.json","type":"file"},{"name":"spop.json","type":"file"},{"name":"spublish.json","type":"file"},{"name":"srandmember.json","type":"file"},{"name":"srem.json","type":"file"},{"name":"sscan.json","type":"file"},{"name":"ssubscribe.json","type":"file"},{"name":"strlen.json","type":"file"},{"name":"subscribe.json","type":"file"},{"name":"substr.json","type":"file"},{"name":"sunion.json","type":"file"},{"name":"sunionstore.json","type":"file"},{"name":"sunsubscribe.json","type":"file"},{"name":"swapdb.json","type":"file"},{"name":"sync.json","type":"file"},{"name":"time.json","type":"file"},{"name":"touch.json","type":"file"},{"name":"trimslots.json","type":"file"},{"name":"ttl.json","type":"file"},{"name":"type.json","type":"file"},{"name":"unlink.json","type":"file"},{"name":"unsubscribe.json","type":"file"},{"name":"unwatch.json","type":"file"},{"name":"wait.json","type":"file"},{"name":"waitaof.json","type":"file"},{"name":"watch.json","type":"file"},{"name":"xack.json","type":"file"},{"name":"xackdel.json","type":"file"},{"name":"xadd.json","type":"file"},{"name":"xautoclaim.json","type":"file"},{"name":"xcfgset.json","type":"file"},{"name":"xclaim.json","type":"file"},{"name":"xdel.json","type":"file"},{"name":"xdelex.json","type":"file"},{"name":"xgroup-create.json","type":"file"},{"name":"xgroup-createconsumer.json","type":"file"},{"name":"xgroup-delconsumer.json","type":"file"},{"name":"xgroup-destroy.json","type":"file"},{"name":"xgroup-help.json","type":"file"},{"name":"xgroup-setid.json","type":"file"},{"name":"xgroup.json","type":"file"},{"name":"xidmprecord.json","type":"file"},{"name":"xinfo-consumers.json","type":"file"},{"name":"xinfo-groups.json","type":"file"},{"name":"xinfo-help.json","type":"file"},{"name":"xinfo-stream.json","type":"file"},{"name":"xinfo.json","type":"file"},{"name":"xlen.json","type":"file"},{"name":"xnack.json","type":"file"},{"name":"xpending.json","type":"file"},{"name":"xrange.json","type":"file"},{"name":"xread.json","type":"file"},{"name":"xreadgroup.json","type":"file"},{"name":"xrevrange.json","type":"file"},{"name":"xsetid.json","type":"file"},{"name":"xtrim.json","type":"file"},{"name":"zadd.json","type":"file"},{"name":"zcard.json","type":"file"},{"name":"zcount.json","type":"file"},{"name":"zdiff.json","type":"file"},{"name":"zdiffstore.json","type":"file"},{"name":"zincrby.json","type":"file"},{"name":"zinter.json","type":"file"},{"name":"zintercard.json","type":"file"},{"name":"zinterstore.json","type":"file"},{"name":"zlexcount.json","type":"file"},{"name":"zmpop.json","type":"file"},{"name":"zmscore.json","type":"file"},{"name":"zpopmax.json","type":"file"},{"name":"zpopmin.json","type":"file"},{"name":"zrandmember.json","type":"file"},{"name":"zrange.json","type":"file"},{"name":"zrangebylex.json","type":"file"},{"name":"zrangebyscore.json","type":"file"},{"name":"zrangestore.json","type":"file"},{"name":"zrank.json","type":"file"},{"name":"zrem.json","type":"file"},{"name":"zremrangebylex.json","type":"file"},{"name":"zremrangebyrank.json","type":"file"},{"name":"zremrangebyscore.json","type":"file"},{"name":"zrevrange.json","type":"file"},{"name":"zrevrangebylex.json","type":"file"},{"name":"zrevrangebyscore.json","type":"file"},{"name":"zrevrank.json","type":"file"},{"name":"zscan.json","type":"file"},{"name":"zscore.json","type":"file"},{"name":"zunion.json","type":"file"},{"name":"zunionstore.json","type":"file"}] diff --git a/plugins/catalog/testdata/redis-contents-src-commands-8.8-rc1.json b/plugins/catalog/testdata/redis-contents-src-commands-8.8-rc1.json new file mode 100644 index 0000000..d269361 --- /dev/null +++ b/plugins/catalog/testdata/redis-contents-src-commands-8.8-rc1.json @@ -0,0 +1 @@ +[{"name":"README.md","type":"file"},{"name":"acl-cat.json","type":"file"},{"name":"acl-deluser.json","type":"file"},{"name":"acl-dryrun.json","type":"file"},{"name":"acl-genpass.json","type":"file"},{"name":"acl-getuser.json","type":"file"},{"name":"acl-help.json","type":"file"},{"name":"acl-list.json","type":"file"},{"name":"acl-load.json","type":"file"},{"name":"acl-log.json","type":"file"},{"name":"acl-save.json","type":"file"},{"name":"acl-setuser.json","type":"file"},{"name":"acl-users.json","type":"file"},{"name":"acl-whoami.json","type":"file"},{"name":"acl.json","type":"file"},{"name":"append.json","type":"file"},{"name":"arcount.json","type":"file"},{"name":"ardel.json","type":"file"},{"name":"ardelrange.json","type":"file"},{"name":"arget.json","type":"file"},{"name":"argetrange.json","type":"file"},{"name":"argrep.json","type":"file"},{"name":"arinfo.json","type":"file"},{"name":"arinsert.json","type":"file"},{"name":"arlastitems.json","type":"file"},{"name":"arlen.json","type":"file"},{"name":"armget.json","type":"file"},{"name":"armset.json","type":"file"},{"name":"arnext.json","type":"file"},{"name":"arop.json","type":"file"},{"name":"arring.json","type":"file"},{"name":"arscan.json","type":"file"},{"name":"arseek.json","type":"file"},{"name":"arset.json","type":"file"},{"name":"asking.json","type":"file"},{"name":"auth.json","type":"file"},{"name":"bgrewriteaof.json","type":"file"},{"name":"bgsave.json","type":"file"},{"name":"bitcount.json","type":"file"},{"name":"bitfield.json","type":"file"},{"name":"bitfield_ro.json","type":"file"},{"name":"bitop.json","type":"file"},{"name":"bitpos.json","type":"file"},{"name":"blmove.json","type":"file"},{"name":"blmpop.json","type":"file"},{"name":"blpop.json","type":"file"},{"name":"brpop.json","type":"file"},{"name":"brpoplpush.json","type":"file"},{"name":"bzmpop.json","type":"file"},{"name":"bzpopmax.json","type":"file"},{"name":"bzpopmin.json","type":"file"},{"name":"client-caching.json","type":"file"},{"name":"client-getname.json","type":"file"},{"name":"client-getredir.json","type":"file"},{"name":"client-help.json","type":"file"},{"name":"client-id.json","type":"file"},{"name":"client-info.json","type":"file"},{"name":"client-kill.json","type":"file"},{"name":"client-list.json","type":"file"},{"name":"client-no-evict.json","type":"file"},{"name":"client-no-touch.json","type":"file"},{"name":"client-pause.json","type":"file"},{"name":"client-reply.json","type":"file"},{"name":"client-setinfo.json","type":"file"},{"name":"client-setname.json","type":"file"},{"name":"client-tracking.json","type":"file"},{"name":"client-trackinginfo.json","type":"file"},{"name":"client-unblock.json","type":"file"},{"name":"client-unpause.json","type":"file"},{"name":"client.json","type":"file"},{"name":"cluster-addslots.json","type":"file"},{"name":"cluster-addslotsrange.json","type":"file"},{"name":"cluster-bumpepoch.json","type":"file"},{"name":"cluster-count-failure-reports.json","type":"file"},{"name":"cluster-countkeysinslot.json","type":"file"},{"name":"cluster-delslots.json","type":"file"},{"name":"cluster-delslotsrange.json","type":"file"},{"name":"cluster-failover.json","type":"file"},{"name":"cluster-flushslots.json","type":"file"},{"name":"cluster-forget.json","type":"file"},{"name":"cluster-getkeysinslot.json","type":"file"},{"name":"cluster-help.json","type":"file"},{"name":"cluster-info.json","type":"file"},{"name":"cluster-keyslot.json","type":"file"},{"name":"cluster-links.json","type":"file"},{"name":"cluster-meet.json","type":"file"},{"name":"cluster-migration.json","type":"file"},{"name":"cluster-myid.json","type":"file"},{"name":"cluster-myshardid.json","type":"file"},{"name":"cluster-nodes.json","type":"file"},{"name":"cluster-replicas.json","type":"file"},{"name":"cluster-replicate.json","type":"file"},{"name":"cluster-reset.json","type":"file"},{"name":"cluster-saveconfig.json","type":"file"},{"name":"cluster-set-config-epoch.json","type":"file"},{"name":"cluster-setslot.json","type":"file"},{"name":"cluster-shards.json","type":"file"},{"name":"cluster-slaves.json","type":"file"},{"name":"cluster-slot-stats.json","type":"file"},{"name":"cluster-slots.json","type":"file"},{"name":"cluster-syncslots.json","type":"file"},{"name":"cluster.json","type":"file"},{"name":"command-count.json","type":"file"},{"name":"command-docs.json","type":"file"},{"name":"command-getkeys.json","type":"file"},{"name":"command-getkeysandflags.json","type":"file"},{"name":"command-help.json","type":"file"},{"name":"command-info.json","type":"file"},{"name":"command-list.json","type":"file"},{"name":"command.json","type":"file"},{"name":"config-get.json","type":"file"},{"name":"config-help.json","type":"file"},{"name":"config-resetstat.json","type":"file"},{"name":"config-rewrite.json","type":"file"},{"name":"config-set.json","type":"file"},{"name":"config.json","type":"file"},{"name":"copy.json","type":"file"},{"name":"dbsize.json","type":"file"},{"name":"debug.json","type":"file"},{"name":"decr.json","type":"file"},{"name":"decrby.json","type":"file"},{"name":"del.json","type":"file"},{"name":"delex.json","type":"file"},{"name":"digest.json","type":"file"},{"name":"discard.json","type":"file"},{"name":"dump.json","type":"file"},{"name":"echo.json","type":"file"},{"name":"eval.json","type":"file"},{"name":"eval_ro.json","type":"file"},{"name":"evalsha.json","type":"file"},{"name":"evalsha_ro.json","type":"file"},{"name":"exec.json","type":"file"},{"name":"exists.json","type":"file"},{"name":"expire.json","type":"file"},{"name":"expireat.json","type":"file"},{"name":"expiretime.json","type":"file"},{"name":"failover.json","type":"file"},{"name":"fcall.json","type":"file"},{"name":"fcall_ro.json","type":"file"},{"name":"flushall.json","type":"file"},{"name":"flushdb.json","type":"file"},{"name":"function-delete.json","type":"file"},{"name":"function-dump.json","type":"file"},{"name":"function-flush.json","type":"file"},{"name":"function-help.json","type":"file"},{"name":"function-kill.json","type":"file"},{"name":"function-list.json","type":"file"},{"name":"function-load.json","type":"file"},{"name":"function-restore.json","type":"file"},{"name":"function-stats.json","type":"file"},{"name":"function.json","type":"file"},{"name":"geoadd.json","type":"file"},{"name":"geodist.json","type":"file"},{"name":"geohash.json","type":"file"},{"name":"geopos.json","type":"file"},{"name":"georadius.json","type":"file"},{"name":"georadius_ro.json","type":"file"},{"name":"georadiusbymember.json","type":"file"},{"name":"georadiusbymember_ro.json","type":"file"},{"name":"geosearch.json","type":"file"},{"name":"geosearchstore.json","type":"file"},{"name":"get.json","type":"file"},{"name":"getbit.json","type":"file"},{"name":"getdel.json","type":"file"},{"name":"getex.json","type":"file"},{"name":"getrange.json","type":"file"},{"name":"getset.json","type":"file"},{"name":"hdel.json","type":"file"},{"name":"hello.json","type":"file"},{"name":"hexists.json","type":"file"},{"name":"hexpire.json","type":"file"},{"name":"hexpireat.json","type":"file"},{"name":"hexpiretime.json","type":"file"},{"name":"hget.json","type":"file"},{"name":"hgetall.json","type":"file"},{"name":"hgetdel.json","type":"file"},{"name":"hgetex.json","type":"file"},{"name":"hincrby.json","type":"file"},{"name":"hincrbyfloat.json","type":"file"},{"name":"hkeys.json","type":"file"},{"name":"hlen.json","type":"file"},{"name":"hmget.json","type":"file"},{"name":"hmset.json","type":"file"},{"name":"hotkeys-get.json","type":"file"},{"name":"hotkeys-help.json","type":"file"},{"name":"hotkeys-reset.json","type":"file"},{"name":"hotkeys-start.json","type":"file"},{"name":"hotkeys-stop.json","type":"file"},{"name":"hotkeys.json","type":"file"},{"name":"hpersist.json","type":"file"},{"name":"hpexpire.json","type":"file"},{"name":"hpexpireat.json","type":"file"},{"name":"hpexpiretime.json","type":"file"},{"name":"hpttl.json","type":"file"},{"name":"hrandfield.json","type":"file"},{"name":"hscan.json","type":"file"},{"name":"hset.json","type":"file"},{"name":"hsetex.json","type":"file"},{"name":"hsetnx.json","type":"file"},{"name":"hstrlen.json","type":"file"},{"name":"httl.json","type":"file"},{"name":"hvals.json","type":"file"},{"name":"incr.json","type":"file"},{"name":"incrby.json","type":"file"},{"name":"incrbyfloat.json","type":"file"},{"name":"increx.json","type":"file"},{"name":"info.json","type":"file"},{"name":"keys.json","type":"file"},{"name":"lastsave.json","type":"file"},{"name":"latency-doctor.json","type":"file"},{"name":"latency-graph.json","type":"file"},{"name":"latency-help.json","type":"file"},{"name":"latency-histogram.json","type":"file"},{"name":"latency-history.json","type":"file"},{"name":"latency-latest.json","type":"file"},{"name":"latency-reset.json","type":"file"},{"name":"latency.json","type":"file"},{"name":"lcs.json","type":"file"},{"name":"lindex.json","type":"file"},{"name":"linsert.json","type":"file"},{"name":"llen.json","type":"file"},{"name":"lmove.json","type":"file"},{"name":"lmpop.json","type":"file"},{"name":"lolwut.json","type":"file"},{"name":"lpop.json","type":"file"},{"name":"lpos.json","type":"file"},{"name":"lpush.json","type":"file"},{"name":"lpushx.json","type":"file"},{"name":"lrange.json","type":"file"},{"name":"lrem.json","type":"file"},{"name":"lset.json","type":"file"},{"name":"ltrim.json","type":"file"},{"name":"memory-doctor.json","type":"file"},{"name":"memory-help.json","type":"file"},{"name":"memory-malloc-stats.json","type":"file"},{"name":"memory-purge.json","type":"file"},{"name":"memory-stats.json","type":"file"},{"name":"memory-usage.json","type":"file"},{"name":"memory.json","type":"file"},{"name":"mget.json","type":"file"},{"name":"migrate.json","type":"file"},{"name":"module-help.json","type":"file"},{"name":"module-list.json","type":"file"},{"name":"module-load.json","type":"file"},{"name":"module-loadex.json","type":"file"},{"name":"module-unload.json","type":"file"},{"name":"module.json","type":"file"},{"name":"monitor.json","type":"file"},{"name":"move.json","type":"file"},{"name":"mset.json","type":"file"},{"name":"msetex.json","type":"file"},{"name":"msetnx.json","type":"file"},{"name":"multi.json","type":"file"},{"name":"object-encoding.json","type":"file"},{"name":"object-freq.json","type":"file"},{"name":"object-help.json","type":"file"},{"name":"object-idletime.json","type":"file"},{"name":"object-refcount.json","type":"file"},{"name":"object.json","type":"file"},{"name":"persist.json","type":"file"},{"name":"pexpire.json","type":"file"},{"name":"pexpireat.json","type":"file"},{"name":"pexpiretime.json","type":"file"},{"name":"pfadd.json","type":"file"},{"name":"pfcount.json","type":"file"},{"name":"pfdebug.json","type":"file"},{"name":"pfmerge.json","type":"file"},{"name":"pfselftest.json","type":"file"},{"name":"ping.json","type":"file"},{"name":"psetex.json","type":"file"},{"name":"psubscribe.json","type":"file"},{"name":"psync.json","type":"file"},{"name":"pttl.json","type":"file"},{"name":"publish.json","type":"file"},{"name":"pubsub-channels.json","type":"file"},{"name":"pubsub-help.json","type":"file"},{"name":"pubsub-numpat.json","type":"file"},{"name":"pubsub-numsub.json","type":"file"},{"name":"pubsub-shardchannels.json","type":"file"},{"name":"pubsub-shardnumsub.json","type":"file"},{"name":"pubsub.json","type":"file"},{"name":"punsubscribe.json","type":"file"},{"name":"quit.json","type":"file"},{"name":"randomkey.json","type":"file"},{"name":"readonly.json","type":"file"},{"name":"readwrite.json","type":"file"},{"name":"rename.json","type":"file"},{"name":"renamenx.json","type":"file"},{"name":"replconf.json","type":"file"},{"name":"replicaof.json","type":"file"},{"name":"reset.json","type":"file"},{"name":"restore-asking.json","type":"file"},{"name":"restore.json","type":"file"},{"name":"role.json","type":"file"},{"name":"rpop.json","type":"file"},{"name":"rpoplpush.json","type":"file"},{"name":"rpush.json","type":"file"},{"name":"rpushx.json","type":"file"},{"name":"sadd.json","type":"file"},{"name":"save.json","type":"file"},{"name":"scan.json","type":"file"},{"name":"scard.json","type":"file"},{"name":"script-debug.json","type":"file"},{"name":"script-exists.json","type":"file"},{"name":"script-flush.json","type":"file"},{"name":"script-help.json","type":"file"},{"name":"script-kill.json","type":"file"},{"name":"script-load.json","type":"file"},{"name":"script.json","type":"file"},{"name":"sdiff.json","type":"file"},{"name":"sdiffstore.json","type":"file"},{"name":"select.json","type":"file"},{"name":"sentinel-ckquorum.json","type":"file"},{"name":"sentinel-config.json","type":"file"},{"name":"sentinel-debug.json","type":"file"},{"name":"sentinel-failover.json","type":"file"},{"name":"sentinel-flushconfig.json","type":"file"},{"name":"sentinel-get-master-addr-by-name.json","type":"file"},{"name":"sentinel-help.json","type":"file"},{"name":"sentinel-info-cache.json","type":"file"},{"name":"sentinel-is-master-down-by-addr.json","type":"file"},{"name":"sentinel-master.json","type":"file"},{"name":"sentinel-masters.json","type":"file"},{"name":"sentinel-monitor.json","type":"file"},{"name":"sentinel-myid.json","type":"file"},{"name":"sentinel-pending-scripts.json","type":"file"},{"name":"sentinel-remove.json","type":"file"},{"name":"sentinel-replicas.json","type":"file"},{"name":"sentinel-reset.json","type":"file"},{"name":"sentinel-sentinels.json","type":"file"},{"name":"sentinel-set.json","type":"file"},{"name":"sentinel-simulate-failure.json","type":"file"},{"name":"sentinel-slaves.json","type":"file"},{"name":"sentinel.json","type":"file"},{"name":"set.json","type":"file"},{"name":"setbit.json","type":"file"},{"name":"setex.json","type":"file"},{"name":"setnx.json","type":"file"},{"name":"setrange.json","type":"file"},{"name":"sflush.json","type":"file"},{"name":"shutdown.json","type":"file"},{"name":"sinter.json","type":"file"},{"name":"sintercard.json","type":"file"},{"name":"sinterstore.json","type":"file"},{"name":"sismember.json","type":"file"},{"name":"slaveof.json","type":"file"},{"name":"slowlog-get.json","type":"file"},{"name":"slowlog-help.json","type":"file"},{"name":"slowlog-len.json","type":"file"},{"name":"slowlog-reset.json","type":"file"},{"name":"slowlog.json","type":"file"},{"name":"smembers.json","type":"file"},{"name":"smismember.json","type":"file"},{"name":"smove.json","type":"file"},{"name":"sort.json","type":"file"},{"name":"sort_ro.json","type":"file"},{"name":"spop.json","type":"file"},{"name":"spublish.json","type":"file"},{"name":"srandmember.json","type":"file"},{"name":"srem.json","type":"file"},{"name":"sscan.json","type":"file"},{"name":"ssubscribe.json","type":"file"},{"name":"strlen.json","type":"file"},{"name":"subscribe.json","type":"file"},{"name":"substr.json","type":"file"},{"name":"sunion.json","type":"file"},{"name":"sunionstore.json","type":"file"},{"name":"sunsubscribe.json","type":"file"},{"name":"swapdb.json","type":"file"},{"name":"sync.json","type":"file"},{"name":"time.json","type":"file"},{"name":"touch.json","type":"file"},{"name":"trimslots.json","type":"file"},{"name":"ttl.json","type":"file"},{"name":"type.json","type":"file"},{"name":"unlink.json","type":"file"},{"name":"unsubscribe.json","type":"file"},{"name":"unwatch.json","type":"file"},{"name":"wait.json","type":"file"},{"name":"waitaof.json","type":"file"},{"name":"watch.json","type":"file"},{"name":"xack.json","type":"file"},{"name":"xackdel.json","type":"file"},{"name":"xadd.json","type":"file"},{"name":"xautoclaim.json","type":"file"},{"name":"xcfgset.json","type":"file"},{"name":"xclaim.json","type":"file"},{"name":"xdel.json","type":"file"},{"name":"xdelex.json","type":"file"},{"name":"xgroup-create.json","type":"file"},{"name":"xgroup-createconsumer.json","type":"file"},{"name":"xgroup-delconsumer.json","type":"file"},{"name":"xgroup-destroy.json","type":"file"},{"name":"xgroup-help.json","type":"file"},{"name":"xgroup-setid.json","type":"file"},{"name":"xgroup.json","type":"file"},{"name":"xidmprecord.json","type":"file"},{"name":"xinfo-consumers.json","type":"file"},{"name":"xinfo-groups.json","type":"file"},{"name":"xinfo-help.json","type":"file"},{"name":"xinfo-stream.json","type":"file"},{"name":"xinfo.json","type":"file"},{"name":"xlen.json","type":"file"},{"name":"xnack.json","type":"file"},{"name":"xpending.json","type":"file"},{"name":"xrange.json","type":"file"},{"name":"xread.json","type":"file"},{"name":"xreadgroup.json","type":"file"},{"name":"xrevrange.json","type":"file"},{"name":"xsetid.json","type":"file"},{"name":"xtrim.json","type":"file"},{"name":"zadd.json","type":"file"},{"name":"zcard.json","type":"file"},{"name":"zcount.json","type":"file"},{"name":"zdiff.json","type":"file"},{"name":"zdiffstore.json","type":"file"},{"name":"zincrby.json","type":"file"},{"name":"zinter.json","type":"file"},{"name":"zintercard.json","type":"file"},{"name":"zinterstore.json","type":"file"},{"name":"zlexcount.json","type":"file"},{"name":"zmpop.json","type":"file"},{"name":"zmscore.json","type":"file"},{"name":"zpopmax.json","type":"file"},{"name":"zpopmin.json","type":"file"},{"name":"zrandmember.json","type":"file"},{"name":"zrange.json","type":"file"},{"name":"zrangebylex.json","type":"file"},{"name":"zrangebyscore.json","type":"file"},{"name":"zrangestore.json","type":"file"},{"name":"zrank.json","type":"file"},{"name":"zrem.json","type":"file"},{"name":"zremrangebylex.json","type":"file"},{"name":"zremrangebyrank.json","type":"file"},{"name":"zremrangebyscore.json","type":"file"},{"name":"zrevrange.json","type":"file"},{"name":"zrevrangebylex.json","type":"file"},{"name":"zrevrangebyscore.json","type":"file"},{"name":"zrevrank.json","type":"file"},{"name":"zscan.json","type":"file"},{"name":"zscore.json","type":"file"},{"name":"zunion.json","type":"file"},{"name":"zunionstore.json","type":"file"}] diff --git a/plugins/catalog/testdata/redis-contents-src-commands-8.8.0.json b/plugins/catalog/testdata/redis-contents-src-commands-8.8.0.json new file mode 100644 index 0000000..d269361 --- /dev/null +++ b/plugins/catalog/testdata/redis-contents-src-commands-8.8.0.json @@ -0,0 +1 @@ +[{"name":"README.md","type":"file"},{"name":"acl-cat.json","type":"file"},{"name":"acl-deluser.json","type":"file"},{"name":"acl-dryrun.json","type":"file"},{"name":"acl-genpass.json","type":"file"},{"name":"acl-getuser.json","type":"file"},{"name":"acl-help.json","type":"file"},{"name":"acl-list.json","type":"file"},{"name":"acl-load.json","type":"file"},{"name":"acl-log.json","type":"file"},{"name":"acl-save.json","type":"file"},{"name":"acl-setuser.json","type":"file"},{"name":"acl-users.json","type":"file"},{"name":"acl-whoami.json","type":"file"},{"name":"acl.json","type":"file"},{"name":"append.json","type":"file"},{"name":"arcount.json","type":"file"},{"name":"ardel.json","type":"file"},{"name":"ardelrange.json","type":"file"},{"name":"arget.json","type":"file"},{"name":"argetrange.json","type":"file"},{"name":"argrep.json","type":"file"},{"name":"arinfo.json","type":"file"},{"name":"arinsert.json","type":"file"},{"name":"arlastitems.json","type":"file"},{"name":"arlen.json","type":"file"},{"name":"armget.json","type":"file"},{"name":"armset.json","type":"file"},{"name":"arnext.json","type":"file"},{"name":"arop.json","type":"file"},{"name":"arring.json","type":"file"},{"name":"arscan.json","type":"file"},{"name":"arseek.json","type":"file"},{"name":"arset.json","type":"file"},{"name":"asking.json","type":"file"},{"name":"auth.json","type":"file"},{"name":"bgrewriteaof.json","type":"file"},{"name":"bgsave.json","type":"file"},{"name":"bitcount.json","type":"file"},{"name":"bitfield.json","type":"file"},{"name":"bitfield_ro.json","type":"file"},{"name":"bitop.json","type":"file"},{"name":"bitpos.json","type":"file"},{"name":"blmove.json","type":"file"},{"name":"blmpop.json","type":"file"},{"name":"blpop.json","type":"file"},{"name":"brpop.json","type":"file"},{"name":"brpoplpush.json","type":"file"},{"name":"bzmpop.json","type":"file"},{"name":"bzpopmax.json","type":"file"},{"name":"bzpopmin.json","type":"file"},{"name":"client-caching.json","type":"file"},{"name":"client-getname.json","type":"file"},{"name":"client-getredir.json","type":"file"},{"name":"client-help.json","type":"file"},{"name":"client-id.json","type":"file"},{"name":"client-info.json","type":"file"},{"name":"client-kill.json","type":"file"},{"name":"client-list.json","type":"file"},{"name":"client-no-evict.json","type":"file"},{"name":"client-no-touch.json","type":"file"},{"name":"client-pause.json","type":"file"},{"name":"client-reply.json","type":"file"},{"name":"client-setinfo.json","type":"file"},{"name":"client-setname.json","type":"file"},{"name":"client-tracking.json","type":"file"},{"name":"client-trackinginfo.json","type":"file"},{"name":"client-unblock.json","type":"file"},{"name":"client-unpause.json","type":"file"},{"name":"client.json","type":"file"},{"name":"cluster-addslots.json","type":"file"},{"name":"cluster-addslotsrange.json","type":"file"},{"name":"cluster-bumpepoch.json","type":"file"},{"name":"cluster-count-failure-reports.json","type":"file"},{"name":"cluster-countkeysinslot.json","type":"file"},{"name":"cluster-delslots.json","type":"file"},{"name":"cluster-delslotsrange.json","type":"file"},{"name":"cluster-failover.json","type":"file"},{"name":"cluster-flushslots.json","type":"file"},{"name":"cluster-forget.json","type":"file"},{"name":"cluster-getkeysinslot.json","type":"file"},{"name":"cluster-help.json","type":"file"},{"name":"cluster-info.json","type":"file"},{"name":"cluster-keyslot.json","type":"file"},{"name":"cluster-links.json","type":"file"},{"name":"cluster-meet.json","type":"file"},{"name":"cluster-migration.json","type":"file"},{"name":"cluster-myid.json","type":"file"},{"name":"cluster-myshardid.json","type":"file"},{"name":"cluster-nodes.json","type":"file"},{"name":"cluster-replicas.json","type":"file"},{"name":"cluster-replicate.json","type":"file"},{"name":"cluster-reset.json","type":"file"},{"name":"cluster-saveconfig.json","type":"file"},{"name":"cluster-set-config-epoch.json","type":"file"},{"name":"cluster-setslot.json","type":"file"},{"name":"cluster-shards.json","type":"file"},{"name":"cluster-slaves.json","type":"file"},{"name":"cluster-slot-stats.json","type":"file"},{"name":"cluster-slots.json","type":"file"},{"name":"cluster-syncslots.json","type":"file"},{"name":"cluster.json","type":"file"},{"name":"command-count.json","type":"file"},{"name":"command-docs.json","type":"file"},{"name":"command-getkeys.json","type":"file"},{"name":"command-getkeysandflags.json","type":"file"},{"name":"command-help.json","type":"file"},{"name":"command-info.json","type":"file"},{"name":"command-list.json","type":"file"},{"name":"command.json","type":"file"},{"name":"config-get.json","type":"file"},{"name":"config-help.json","type":"file"},{"name":"config-resetstat.json","type":"file"},{"name":"config-rewrite.json","type":"file"},{"name":"config-set.json","type":"file"},{"name":"config.json","type":"file"},{"name":"copy.json","type":"file"},{"name":"dbsize.json","type":"file"},{"name":"debug.json","type":"file"},{"name":"decr.json","type":"file"},{"name":"decrby.json","type":"file"},{"name":"del.json","type":"file"},{"name":"delex.json","type":"file"},{"name":"digest.json","type":"file"},{"name":"discard.json","type":"file"},{"name":"dump.json","type":"file"},{"name":"echo.json","type":"file"},{"name":"eval.json","type":"file"},{"name":"eval_ro.json","type":"file"},{"name":"evalsha.json","type":"file"},{"name":"evalsha_ro.json","type":"file"},{"name":"exec.json","type":"file"},{"name":"exists.json","type":"file"},{"name":"expire.json","type":"file"},{"name":"expireat.json","type":"file"},{"name":"expiretime.json","type":"file"},{"name":"failover.json","type":"file"},{"name":"fcall.json","type":"file"},{"name":"fcall_ro.json","type":"file"},{"name":"flushall.json","type":"file"},{"name":"flushdb.json","type":"file"},{"name":"function-delete.json","type":"file"},{"name":"function-dump.json","type":"file"},{"name":"function-flush.json","type":"file"},{"name":"function-help.json","type":"file"},{"name":"function-kill.json","type":"file"},{"name":"function-list.json","type":"file"},{"name":"function-load.json","type":"file"},{"name":"function-restore.json","type":"file"},{"name":"function-stats.json","type":"file"},{"name":"function.json","type":"file"},{"name":"geoadd.json","type":"file"},{"name":"geodist.json","type":"file"},{"name":"geohash.json","type":"file"},{"name":"geopos.json","type":"file"},{"name":"georadius.json","type":"file"},{"name":"georadius_ro.json","type":"file"},{"name":"georadiusbymember.json","type":"file"},{"name":"georadiusbymember_ro.json","type":"file"},{"name":"geosearch.json","type":"file"},{"name":"geosearchstore.json","type":"file"},{"name":"get.json","type":"file"},{"name":"getbit.json","type":"file"},{"name":"getdel.json","type":"file"},{"name":"getex.json","type":"file"},{"name":"getrange.json","type":"file"},{"name":"getset.json","type":"file"},{"name":"hdel.json","type":"file"},{"name":"hello.json","type":"file"},{"name":"hexists.json","type":"file"},{"name":"hexpire.json","type":"file"},{"name":"hexpireat.json","type":"file"},{"name":"hexpiretime.json","type":"file"},{"name":"hget.json","type":"file"},{"name":"hgetall.json","type":"file"},{"name":"hgetdel.json","type":"file"},{"name":"hgetex.json","type":"file"},{"name":"hincrby.json","type":"file"},{"name":"hincrbyfloat.json","type":"file"},{"name":"hkeys.json","type":"file"},{"name":"hlen.json","type":"file"},{"name":"hmget.json","type":"file"},{"name":"hmset.json","type":"file"},{"name":"hotkeys-get.json","type":"file"},{"name":"hotkeys-help.json","type":"file"},{"name":"hotkeys-reset.json","type":"file"},{"name":"hotkeys-start.json","type":"file"},{"name":"hotkeys-stop.json","type":"file"},{"name":"hotkeys.json","type":"file"},{"name":"hpersist.json","type":"file"},{"name":"hpexpire.json","type":"file"},{"name":"hpexpireat.json","type":"file"},{"name":"hpexpiretime.json","type":"file"},{"name":"hpttl.json","type":"file"},{"name":"hrandfield.json","type":"file"},{"name":"hscan.json","type":"file"},{"name":"hset.json","type":"file"},{"name":"hsetex.json","type":"file"},{"name":"hsetnx.json","type":"file"},{"name":"hstrlen.json","type":"file"},{"name":"httl.json","type":"file"},{"name":"hvals.json","type":"file"},{"name":"incr.json","type":"file"},{"name":"incrby.json","type":"file"},{"name":"incrbyfloat.json","type":"file"},{"name":"increx.json","type":"file"},{"name":"info.json","type":"file"},{"name":"keys.json","type":"file"},{"name":"lastsave.json","type":"file"},{"name":"latency-doctor.json","type":"file"},{"name":"latency-graph.json","type":"file"},{"name":"latency-help.json","type":"file"},{"name":"latency-histogram.json","type":"file"},{"name":"latency-history.json","type":"file"},{"name":"latency-latest.json","type":"file"},{"name":"latency-reset.json","type":"file"},{"name":"latency.json","type":"file"},{"name":"lcs.json","type":"file"},{"name":"lindex.json","type":"file"},{"name":"linsert.json","type":"file"},{"name":"llen.json","type":"file"},{"name":"lmove.json","type":"file"},{"name":"lmpop.json","type":"file"},{"name":"lolwut.json","type":"file"},{"name":"lpop.json","type":"file"},{"name":"lpos.json","type":"file"},{"name":"lpush.json","type":"file"},{"name":"lpushx.json","type":"file"},{"name":"lrange.json","type":"file"},{"name":"lrem.json","type":"file"},{"name":"lset.json","type":"file"},{"name":"ltrim.json","type":"file"},{"name":"memory-doctor.json","type":"file"},{"name":"memory-help.json","type":"file"},{"name":"memory-malloc-stats.json","type":"file"},{"name":"memory-purge.json","type":"file"},{"name":"memory-stats.json","type":"file"},{"name":"memory-usage.json","type":"file"},{"name":"memory.json","type":"file"},{"name":"mget.json","type":"file"},{"name":"migrate.json","type":"file"},{"name":"module-help.json","type":"file"},{"name":"module-list.json","type":"file"},{"name":"module-load.json","type":"file"},{"name":"module-loadex.json","type":"file"},{"name":"module-unload.json","type":"file"},{"name":"module.json","type":"file"},{"name":"monitor.json","type":"file"},{"name":"move.json","type":"file"},{"name":"mset.json","type":"file"},{"name":"msetex.json","type":"file"},{"name":"msetnx.json","type":"file"},{"name":"multi.json","type":"file"},{"name":"object-encoding.json","type":"file"},{"name":"object-freq.json","type":"file"},{"name":"object-help.json","type":"file"},{"name":"object-idletime.json","type":"file"},{"name":"object-refcount.json","type":"file"},{"name":"object.json","type":"file"},{"name":"persist.json","type":"file"},{"name":"pexpire.json","type":"file"},{"name":"pexpireat.json","type":"file"},{"name":"pexpiretime.json","type":"file"},{"name":"pfadd.json","type":"file"},{"name":"pfcount.json","type":"file"},{"name":"pfdebug.json","type":"file"},{"name":"pfmerge.json","type":"file"},{"name":"pfselftest.json","type":"file"},{"name":"ping.json","type":"file"},{"name":"psetex.json","type":"file"},{"name":"psubscribe.json","type":"file"},{"name":"psync.json","type":"file"},{"name":"pttl.json","type":"file"},{"name":"publish.json","type":"file"},{"name":"pubsub-channels.json","type":"file"},{"name":"pubsub-help.json","type":"file"},{"name":"pubsub-numpat.json","type":"file"},{"name":"pubsub-numsub.json","type":"file"},{"name":"pubsub-shardchannels.json","type":"file"},{"name":"pubsub-shardnumsub.json","type":"file"},{"name":"pubsub.json","type":"file"},{"name":"punsubscribe.json","type":"file"},{"name":"quit.json","type":"file"},{"name":"randomkey.json","type":"file"},{"name":"readonly.json","type":"file"},{"name":"readwrite.json","type":"file"},{"name":"rename.json","type":"file"},{"name":"renamenx.json","type":"file"},{"name":"replconf.json","type":"file"},{"name":"replicaof.json","type":"file"},{"name":"reset.json","type":"file"},{"name":"restore-asking.json","type":"file"},{"name":"restore.json","type":"file"},{"name":"role.json","type":"file"},{"name":"rpop.json","type":"file"},{"name":"rpoplpush.json","type":"file"},{"name":"rpush.json","type":"file"},{"name":"rpushx.json","type":"file"},{"name":"sadd.json","type":"file"},{"name":"save.json","type":"file"},{"name":"scan.json","type":"file"},{"name":"scard.json","type":"file"},{"name":"script-debug.json","type":"file"},{"name":"script-exists.json","type":"file"},{"name":"script-flush.json","type":"file"},{"name":"script-help.json","type":"file"},{"name":"script-kill.json","type":"file"},{"name":"script-load.json","type":"file"},{"name":"script.json","type":"file"},{"name":"sdiff.json","type":"file"},{"name":"sdiffstore.json","type":"file"},{"name":"select.json","type":"file"},{"name":"sentinel-ckquorum.json","type":"file"},{"name":"sentinel-config.json","type":"file"},{"name":"sentinel-debug.json","type":"file"},{"name":"sentinel-failover.json","type":"file"},{"name":"sentinel-flushconfig.json","type":"file"},{"name":"sentinel-get-master-addr-by-name.json","type":"file"},{"name":"sentinel-help.json","type":"file"},{"name":"sentinel-info-cache.json","type":"file"},{"name":"sentinel-is-master-down-by-addr.json","type":"file"},{"name":"sentinel-master.json","type":"file"},{"name":"sentinel-masters.json","type":"file"},{"name":"sentinel-monitor.json","type":"file"},{"name":"sentinel-myid.json","type":"file"},{"name":"sentinel-pending-scripts.json","type":"file"},{"name":"sentinel-remove.json","type":"file"},{"name":"sentinel-replicas.json","type":"file"},{"name":"sentinel-reset.json","type":"file"},{"name":"sentinel-sentinels.json","type":"file"},{"name":"sentinel-set.json","type":"file"},{"name":"sentinel-simulate-failure.json","type":"file"},{"name":"sentinel-slaves.json","type":"file"},{"name":"sentinel.json","type":"file"},{"name":"set.json","type":"file"},{"name":"setbit.json","type":"file"},{"name":"setex.json","type":"file"},{"name":"setnx.json","type":"file"},{"name":"setrange.json","type":"file"},{"name":"sflush.json","type":"file"},{"name":"shutdown.json","type":"file"},{"name":"sinter.json","type":"file"},{"name":"sintercard.json","type":"file"},{"name":"sinterstore.json","type":"file"},{"name":"sismember.json","type":"file"},{"name":"slaveof.json","type":"file"},{"name":"slowlog-get.json","type":"file"},{"name":"slowlog-help.json","type":"file"},{"name":"slowlog-len.json","type":"file"},{"name":"slowlog-reset.json","type":"file"},{"name":"slowlog.json","type":"file"},{"name":"smembers.json","type":"file"},{"name":"smismember.json","type":"file"},{"name":"smove.json","type":"file"},{"name":"sort.json","type":"file"},{"name":"sort_ro.json","type":"file"},{"name":"spop.json","type":"file"},{"name":"spublish.json","type":"file"},{"name":"srandmember.json","type":"file"},{"name":"srem.json","type":"file"},{"name":"sscan.json","type":"file"},{"name":"ssubscribe.json","type":"file"},{"name":"strlen.json","type":"file"},{"name":"subscribe.json","type":"file"},{"name":"substr.json","type":"file"},{"name":"sunion.json","type":"file"},{"name":"sunionstore.json","type":"file"},{"name":"sunsubscribe.json","type":"file"},{"name":"swapdb.json","type":"file"},{"name":"sync.json","type":"file"},{"name":"time.json","type":"file"},{"name":"touch.json","type":"file"},{"name":"trimslots.json","type":"file"},{"name":"ttl.json","type":"file"},{"name":"type.json","type":"file"},{"name":"unlink.json","type":"file"},{"name":"unsubscribe.json","type":"file"},{"name":"unwatch.json","type":"file"},{"name":"wait.json","type":"file"},{"name":"waitaof.json","type":"file"},{"name":"watch.json","type":"file"},{"name":"xack.json","type":"file"},{"name":"xackdel.json","type":"file"},{"name":"xadd.json","type":"file"},{"name":"xautoclaim.json","type":"file"},{"name":"xcfgset.json","type":"file"},{"name":"xclaim.json","type":"file"},{"name":"xdel.json","type":"file"},{"name":"xdelex.json","type":"file"},{"name":"xgroup-create.json","type":"file"},{"name":"xgroup-createconsumer.json","type":"file"},{"name":"xgroup-delconsumer.json","type":"file"},{"name":"xgroup-destroy.json","type":"file"},{"name":"xgroup-help.json","type":"file"},{"name":"xgroup-setid.json","type":"file"},{"name":"xgroup.json","type":"file"},{"name":"xidmprecord.json","type":"file"},{"name":"xinfo-consumers.json","type":"file"},{"name":"xinfo-groups.json","type":"file"},{"name":"xinfo-help.json","type":"file"},{"name":"xinfo-stream.json","type":"file"},{"name":"xinfo.json","type":"file"},{"name":"xlen.json","type":"file"},{"name":"xnack.json","type":"file"},{"name":"xpending.json","type":"file"},{"name":"xrange.json","type":"file"},{"name":"xread.json","type":"file"},{"name":"xreadgroup.json","type":"file"},{"name":"xrevrange.json","type":"file"},{"name":"xsetid.json","type":"file"},{"name":"xtrim.json","type":"file"},{"name":"zadd.json","type":"file"},{"name":"zcard.json","type":"file"},{"name":"zcount.json","type":"file"},{"name":"zdiff.json","type":"file"},{"name":"zdiffstore.json","type":"file"},{"name":"zincrby.json","type":"file"},{"name":"zinter.json","type":"file"},{"name":"zintercard.json","type":"file"},{"name":"zinterstore.json","type":"file"},{"name":"zlexcount.json","type":"file"},{"name":"zmpop.json","type":"file"},{"name":"zmscore.json","type":"file"},{"name":"zpopmax.json","type":"file"},{"name":"zpopmin.json","type":"file"},{"name":"zrandmember.json","type":"file"},{"name":"zrange.json","type":"file"},{"name":"zrangebylex.json","type":"file"},{"name":"zrangebyscore.json","type":"file"},{"name":"zrangestore.json","type":"file"},{"name":"zrank.json","type":"file"},{"name":"zrem.json","type":"file"},{"name":"zremrangebylex.json","type":"file"},{"name":"zremrangebyrank.json","type":"file"},{"name":"zremrangebyscore.json","type":"file"},{"name":"zrevrange.json","type":"file"},{"name":"zrevrangebylex.json","type":"file"},{"name":"zrevrangebyscore.json","type":"file"},{"name":"zrevrank.json","type":"file"},{"name":"zscan.json","type":"file"},{"name":"zscore.json","type":"file"},{"name":"zunion.json","type":"file"},{"name":"zunionstore.json","type":"file"}] diff --git a/plugins/catalog/testdata/redis-doc-06f3598.json b/plugins/catalog/testdata/redis-doc-06f3598.json deleted file mode 100644 index 08e93d1..0000000 --- a/plugins/catalog/testdata/redis-doc-06f3598.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "FUNCTION LOAD": { - "acl_categories": [ - "@write", - "@slow", - "@scripting" - ], - "arguments": [ - { - "name": "engine-name", - "type": "string" - }, - { - "name": "library-name", - "type": "string" - }, - { - "name": "replace", - "optional": true, - "token": "REPLACE", - "type": "pure-token" - }, - { - "name": "library-description", - "optional": true, - "token": "DESC", - "type": "string" - }, - { - "name": "function-code", - "type": "string" - } - ], - "arity": -5, - "command_flags": [ - "write", - "denyoom", - "noscript" - ], - "complexity": "O(1) (considering compilation time is redundant)", - "group": "scripting", - "hints": [ - "request_policy:all_shards", - "response_policy:all_succeeded" - ], - "since": "7.0.0", - "summary": "Create a function with the given arguments (name, code, description)" - }, - "GET": { - "acl_categories": [ - "@read", - "@string", - "@fast" - ], - "arguments": [ - { - "key_spec_index": 0, - "name": "key", - "type": "key" - } - ], - "arity": 2, - "command_flags": [ - "readonly", - "fast" - ], - "complexity": "O(1)", - "group": "string", - "key_specs": [ - { - "RO": true, - "access": true, - "begin_search": { - "spec": { - "index": 1 - }, - "type": "index" - }, - "find_keys": { - "spec": { - "keystep": 1, - "lastkey": 0, - "limit": 0 - }, - "type": "range" - } - } - ], - "since": "1.0.0", - "summary": "Get the value of a key" - } -} \ No newline at end of file diff --git a/plugins/catalog/testdata/redis-doc-cc0427b.json b/plugins/catalog/testdata/redis-doc-cc0427b.json deleted file mode 100644 index 53fd757..0000000 --- a/plugins/catalog/testdata/redis-doc-cc0427b.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "FUNCTION CREATE": { - "acl_categories": [ - "@write", - "@slow", - "@scripting" - ], - "arguments": [ - { - "name": "engine-name", - "type": "string" - }, - { - "name": "function-name", - "type": "string" - }, - { - "name": "replace", - "optional": true, - "token": "REPLACE", - "type": "pure-token" - }, - { - "name": "function-description", - "optional": true, - "token": "DESC", - "type": "string" - }, - { - "name": "function-code", - "type": "string" - } - ], - "arity": -5, - "command_flags": [ - "write", - "noscript" - ], - "complexity": "O(1) (considering compilation time is redundant)", - "group": "scripting", - "since": "7.0.0", - "summary": "Create a function with the given arguments (name, code, description)" - }, - "FUNCTION INFO": { - "acl_categories": [ - "@slow", - "@scripting" - ], - "arguments": [ - { - "name": "function-name", - "type": "string" - }, - { - "name": "withcode", - "optional": true, - "token": "WITHCODE", - "type": "pure-token" - } - ], - "arity": -3, - "command_flags": [ - "noscript" - ], - "complexity": "O(1)", - "group": "scripting", - "since": "7.0.0", - "summary": "Return information about a function by function name" - }, - "GET": { - "acl_categories": [ - "@read", - "@string", - "@fast" - ], - "arguments": [ - { - "key_spec_index": 0, - "name": "key", - "type": "key" - } - ], - "arity": 2, - "command_flags": [ - "readonly", - "fast" - ], - "complexity": "O(1)", - "group": "string", - "key_specs": [ - { - "begin_search": { - "spec": { - "index": 1 - }, - "type": "index" - }, - "find_keys": { - "spec": { - "keystep": 1, - "lastkey": 0, - "limit": 0 - }, - "type": "range" - }, - "read": true - } - ], - "since": "1.0.0", - "summary": "Get the value of a key" - } -} \ No newline at end of file diff --git a/plugins/catalog/testdata/redis-releases-excerpt.json b/plugins/catalog/testdata/redis-releases-excerpt.json new file mode 100644 index 0000000..51c8948 --- /dev/null +++ b/plugins/catalog/testdata/redis-releases-excerpt.json @@ -0,0 +1,7 @@ +[ + {"tag_name": "8.0.1", "draft": false, "prerelease": false, "published_at": "2025-05-13T10:00:00Z", "html_url": "https://github.com/redis/redis/releases/tag/8.0.1"}, + {"tag_name": "7.2.10", "draft": false, "prerelease": false, "published_at": "2025-07-06T10:00:00Z", "html_url": "https://github.com/redis/redis/releases/tag/7.2.10"}, + {"tag_name": "8.0-rc1", "draft": false, "prerelease": true, "published_at": "2025-04-01T10:00:00Z", "html_url": "https://github.com/redis/redis/releases/tag/8.0-rc1"}, + {"tag_name": "8.0.0", "draft": false, "prerelease": false, "published_at": "2025-05-02T10:00:00Z", "html_url": "https://github.com/redis/redis/releases/tag/8.0.0"}, + {"tag_name": "6.2.20", "draft": false, "prerelease": false, "published_at": "2025-07-06T09:00:00Z", "html_url": "https://github.com/redis/redis/releases/tag/6.2.20"} +] diff --git a/providers/redis.md b/providers/redis.md index fb28c52..a954ff1 100644 --- a/providers/redis.md +++ b/providers/redis.md @@ -2,35 +2,36 @@ ## What it watches -Redis's command surface: commands that disappear entirely from `redis-doc`'s own catalog of every command, between two snapshots of it. +Redis's command surface: commands that disappear entirely between two Redis releases, read from the command definitions in the server's own source (`src/commands/`, one JSON file per command) at each release tag. -Kind: `catalog` (`plugins/catalog`), new in this change — no existing format plugin reads a flat JSON catalog keyed by name; see "Alternatives considered" for the formats checked and ruled out first. +Kind: `catalog` (`plugins/catalog`), the `Commands` reader (`plugins/catalog/redis.go`). ## Why this source -- **Source:** `commands.json` in [redis/redis-doc](https://github.com/redis/redis-doc), fetched at a commit (`https://raw.githubusercontent.com/redis/redis-doc//commands.json`); the newest commit from `GET https://api.github.com/repos/redis/redis-doc/commits/master`. Checked on 2026-11-18. -- **Why this one:** it's the real, machine-readable file redis.io's own command reference is generated from, one JSON object per command (370 of them as checked), each with the metadata (arity, flags, ACL categories, and for a few, `deprecated_since` / `replaced_by`) that drives the docs site. `redis-doc` has no tags, so a commit SHA stands in for a release; that SHA is still a permanent, immutable citation, the same property a tag gives elsewhere. +- **Source:** [`src/commands/`](https://github.com/redis/redis/tree/unstable/src/commands) in redis/redis, read at each final release's tag (`X.Y.Z`, listed from [GitHub releases](https://github.com/redis/redis/releases) and ordered by version). A release is one listing (`GET https://api.github.com/repos/redis/redis/contents/src/commands?ref=`); a file that is gone at the next release is fetched once, at the older tag (`https://raw.githubusercontent.com/redis/redis//src/commands/`), for the command's name and the entry quoted as evidence. Checked on 2026-11-20: 460 files at 8.10.0, the directory there from 7.0.0. +- **Why this one:** it is what the server is built from: `commands.def`, the server's command table, is generated from these files, and so is redis.io's command reference. A release tag maps an event to the server version a team runs, and a tag never changes, so the file's URL is its own citation. - **Alternatives considered:** - - **An OpenAPI spec.** Redis the database has none: it's a binary protocol, not a REST API. (Redis Cloud, the separate hosted-management product, does publish a REST API, but only behind a live Swagger UI at `api.redislabs.com`, not an official, git-pinned spec repo — no stable tag to diff between releases the way Stripe's or GitHub's are.) - - **The official client libraries' changelogs** (`redis-py`'s `CHANGES`, `node-redis`'s `CHANGELOG.md`): both exist, but both stopped being updated once each project moved past its early releases — `CHANGES` says outright "this file contains only the changes history before redis-py version 4.0.0 ... after ... all changes can be found in the Release notes published in GitHub"; `node-redis`'s file stops at v4.0.2 (Jan 2022) while the package itself is past v6. Checked their actual bullets against `plugins/changelog`'s classifier (which needs a plain "Removed `X`" sentence with a backtick'd name): across every version heading in both files, none matched — the prose names JS/Python arguments and config options, not Redis commands, and rarely in backticks. - - **Redis's own deprecations/sunset prose** (`docs.github.com`-style breaking-changes page): Redis has no equivalent single page; deprecation notes live per-command, in the catalog itself (see below). - - **An RSS/Atom feed:** none found for Redis's own release notes; `redis/redis`'s GitHub Releases has an Atom feed (`/releases.atom`), but its entries are prose changelogs with the same shape problem as the client libraries above, not a vendor-labelled "breaking" category the way `feed`'s existing readers (GitHub Actions, Vertex AI) depend on. -- **Quote:** `"FUNCTION INFO"` is in the catalog at commit `cc0427b`; by the very next commit touching the file, it and `FUNCTION CREATE` are gone, replaced by `FUNCTION LOAD` ([PR #1697](https://github.com/redis/redis-doc/pull/1697)). + - **`redis/redis-doc` `commands.json`** (what this source read before, until 2026-11-20): the repo is archived, the file last changed on 2023-10-24, 370 commands, so nothing from Redis 7.4 or 8.x was ever seen. + - **`redis/docs` `data/commands.json`** (redis.io's maintained docs repo, 678 commands on 2026-11-20): one file, but a docs artifact. Its history (5 commits since 2024-02) shows editorial churn that would read as removals: commit `2f513f2` (2024-06-06) dropped 126 module commands (`BF.*`, `CF.*`, `FT.*`…) that Redis never removed, and later commits put them back; commit `9740114` (2026-07-30) deleted the file outright. Its versions are commit dates, not server releases. Every one of those would be a false event, so it isn't read. + - **An OpenAPI spec.** Redis the database has none: it's a binary protocol, not a REST API. + - **The client libraries' changelogs** (`redis-py`'s `CHANGES`, `node-redis`'s `CHANGELOG.md`): both stopped being updated years ago, and their bullets name client arguments, not server commands. +- **Quote:** at tag `8.8-m03`, `src/commands/gcra.json` is `{"GCRA": {"summary": "Rate limit via GCRA (Generic Cell Rate Algorithm).", … "since": "8.8.0", …}}`; at `8.8-rc1` the file is gone, and so is `gcrasetvalue.json`. ## How the provider announces changes -- **No API version at all**: Redis is versioned by server release (`7.0.0`, `8.2.0`...), with no header, path or date scheme the way Stripe or GitHub have. A client picks a server to connect to; there is no "pin an API version" concept to gate against. -- **Commands are deprecated, essentially never removed.** Of the 370 commands in the live catalog, 21 carry `deprecated_since` (e.g. `HMSET` since 4.0.0, replaced by `HSET`); every one of them still works. Checked directly against the real source of truth, [redis/redis](https://github.com/redis/redis)'s own `src/commands/*.json`: diffing the full command file list between the `7.0.0` and `8.2.0` GA tags removed **zero** files. Redis's own backward-compatibility stance means a shipped command keeps working forever. -- **The one real removal found, `FUNCTION CREATE` / `FUNCTION INFO`, never shipped.** They existed only in `redis-doc`'s catalog during the pre-release design of the Functions feature; `src/commands/function-create.json` doesn't exist even at `7.0-rc1`, the first public release candidate, tagged a week *after* the catalog commit that dropped them. So this is a real, verifiable removal in the repo's history, but not one any real user's code could have depended on — unlike Stripe's, Datadog's or GitHub's demo changes, which all broke a real, shipped version. Recorded here rather than smoothed over: Redis's command surface, at least since 7.0 GA, has had no breaking removal to replay instead. +- **No API version**: Redis is versioned by server release (`7.4.0`, `8.10.0`). Several lines are patched at once (7.2.10 shipped after 8.0.0), which is why versions are ordered by number, not by date: a pair across lines would read the older line's missing commands as removals. +- **Commands are deprecated, essentially never removed.** Between every final release from 7.0.0 to 8.10.3, no command file was removed (checked 2026-11-20 across the tags); about twenty commands carry `deprecated_since` and still work. The one removal in that span is between pre-release tags: GCRA and GCRASETVALUE, added in the 8.8 milestone builds, gone at 8.8-rc1. The golden test pins that pair. ## What the plugin reads and ignores -- Reads: `commands.json` at the newest commit, compared with the commit read before it. A name present before and missing after becomes a `breaking` `package_release` event (`change: removed_symbol`); the excerpt quotes the entry's own JSON from the snapshot where it still existed. -- Ignores: everything else about a command (arguments, flags, complexity, ACL categories) — only presence is diffed. A name that's only *added* is not an event. A rename is read as one removal, since nothing in the catalog says a disappearance and an appearance are the same command; guessing that would trade precision for recall. -- The live `deprecated_since` / `replaced_by` fields on still-present commands aren't read yet (see "Known gaps"): they're deprecations, not removals, and every one of them already works forever regardless. -- Reads a historical pair (a version pair, commit `cc0427b` → `06f3598`) and recreates the real removal of `FUNCTION CREATE` and `FUNCTION INFO` (the golden test uses trimmed excerpts of both commits' `commands.json`, alongside `GET`, unchanged, as the drop-test fixture). +- Reads: the list of `*.json` files in `src/commands/` at each release. A file in the older release's list and not in the newer's becomes a `breaking` `package_release` event (`change: removed_symbol`), its symbol the command's name (a subcommand with its container: `CLIENT KILL`), its version the newer release and its `previous_version` the older. The excerpt quotes the file at the older tag. +- Ignores: what a command's file says (arguments, flags, complexity, ACL categories): only presence is compared. An added command is not an event. A file renamed with the same command in it would read as a removal; none was renamed in the span checked. +- A release from before 7.0.0 has no `src/commands/`: nothing to read (the pair is skipped). +- Pre-release tags (`-rc`, `-m`) aren't listed: they aren't releases a team runs. +- The pinned drop test: 8.8.0 → 8.10.0 adds 17 command files and removes none, so no event. ## Known gaps -- The 21 commands already marked `deprecated_since` in the live catalog aren't turned into `deprecation` events: there's no second snapshot showing the moment each one was marked that way conveniently paired with a trimmed fixture, and since none of them is ever actually removed, the user-facing urgency is low. A future change could diff for a command gaining `deprecated_since` between two snapshots the same way this one diffs for removal. -- `node-redis` and `redis-py`'s own breaking changes (argument shapes, defaults, RESP3 becoming the default response protocol) aren't watched: real breaking changes exist in both (checked: `node-redis` v4.0.0's "Breaking Changes" section, `redis-py` v8.0.0's RESP2/RESP3 unification), but neither client writes them as the plain, single-symbol sentences `plugins/changelog` already reads elsewhere. A client-library plugin for Redis would need its own, looser reader, not this one. +- Commands gaining `deprecated_since` between two releases aren't turned into `deprecation` events yet: that needs the changed files' contents, not only the list. +- Module commands (`FT.*`, `JSON.*`, `TS.*`…) live in the modules' own repos, not in `src/commands/`. +- `node-redis` and `redis-py`'s own breaking changes aren't watched here: they're client SDKs, a separate source.