Repository navigation
add the flagsmith plugin - #136
Conversation
Signed-off-by: AbdullahT01 <[email protected]>
|
Claude finished @AbdullahT01's task in 2m 10s —— View job
Rules
Bugs
Verified
Non-blocking (optional)
Thanks for the thorough source research and the honest caveat in the provider page. Once those two fixes are in, this looks good to go. |
| "Undeprecated thing": false, | ||
| "Deprecated runtimes for a project": false, | ||
| "Update a project (deprecated fields are ignored)": false, |
There was a problem hiding this comment.
Blocking: this reformat is what makes CI_go fail. The main version of this map passes gofmt. gofmt starts a new alignment section here because the key lengths jump, so the shorter keys are meant to stay unpadded. With the extra padding, CI_go's gofmt step (Go 1.27.1) fails with:
##[error]not gofmt-formatted. Run 'gofmt -w plugins/openapi/vercel_test.go'.
gofmt -l . on this branch also lists this file. The fix is to drop the change to this file (git checkout origin/main -- plugins/openapi/vercel_test.go). Your local gofmt may be an older or newer Go than CI's 1.27.1; make GO=/path/to/go1.27.1 check will match CI.
| return adapter.Spec{ | ||
| Content: content, | ||
| Version: tag, | ||
| SourceURL: "https://raw.githubusercontent.com/Flagsmith/flagsmith/" + tag + "/openapi.yaml", |
There was a problem hiding this comment.
Golden doesn't match what production emits. adapter.Flagsmith.Fetch sets Version: strings.TrimPrefix(tag, "v") ("2.287.0"), but this fake sets Version: tag. As a result testdata/golden/flagsmith.json records "version": "v2.287.0" / "previous_version": "v2.286.0", which the real plugin will never produce. Vercel's fake mirrors its adapter on this point. Suggested fix (then regenerate the golden and say so in the PR):
| SourceURL: "https://raw.githubusercontent.com/Flagsmith/flagsmith/" + tag + "/openapi.yaml", | |
| Version: strings.TrimPrefix(tag, "v"), |
(This needs "strings" in the imports.)
Signed-off-by: AbdullahT01 <[email protected]>
Signed-off-by: AbdullahT01 <[email protected]>
|
@claude review |
|
Claude finished @AbdullahT01's task in 24s —— View job ✅ Ready to merge. Both blocking issues from the last review are fixed, and all four CI checks pass on the latest push. Rules
What changed since the last review
CICI_go ✅, CI_leak_guard ✅, CI_dco ✅, CI_contract ✅. CI_go runs the full Non-blocking (optional)
Thanks for the quick, clean fixes, @AbdullahT01. The source research and the honest caveat about the experimental endpoints make this an easy plugin to trust. |
What this changes
Adds Flagsmith as a new
openapiplugin. Source:openapi.yamlat the root of Flagsmith/flagsmith, its own OpenAPI 3.1 spec, generated with drf-spectacular and regenerated (and committed back by a bot) on every pull request that touchesapi/**, so a release tag always carries the spec for the code it ships. It reports whole operations removed and request-side parameter changes, same as GitLab's and the otheropenapiproviders.Closes #104.
Researched and ruled out before landing on the full
openapi.yaml:sdk/openapi.yaml(the same spec, filtered to SDK-only endpoints)CHANGELOG.md/ GitHub Releaseschangelog's classifier matched nothing.CHANGELOG.md(Python and JS SDKs, checked first per the ticket)changelogexpects (closest: "The Edge API will no longer allow forflagsmith.incrementTrait, this PR removes it", whose sentence shape doesn't match the "RemovedX" templates). Neither has a MIGRATION.md. Left for a future, separate client-library plugin.The replay fixture:
v2.286.0→v2.287.0(2026-10-15 to 2026-10-20), PR #8736 "Remove the experimental flag update endpoints", removed three whole operations and their eight request-body schemas, listed under "Features" in the v2.287.0 release notes. Honest caveat: all three were tagged "EXPERIMENTAL ENDPOINT - Subject to change without notice" from the day they shipped, not long-stable endpoints — still a real removal a caller of them would have hit, by the same mechanism (an operation gone between two tagged specs) that would catch a stable one's removal. Documented prominently inproviders/flagsmith.md.A real bug the fixture surfaced: the differ reports the 8 removed request-body schemas as their own "schema removed" changes, side
responseby default (Flagsmith names its request bodies, unlike GitLab's hash-named ones, so there's nothing to inline). Registered withKeep: requestSide, same filter and same reason as GitLab's, which drops those 8 and keeps the 3 real operation removals.Fixed after review: the fake test adapter recorded
version/previous_versionas the raw tag (v2.287.0/v2.286.0); the real adapter strips the leadingv(strings.TrimPrefix(tag, "v")), so the golden didn't match production. Fixed the fake and regenerated the golden to2.287.0/2.286.0.Checklist
docs/plugins.md(new row) andmake plugins-jsonrungit commit -s, DCO)testdata/golden/flagsmith.json)testdata/README.mdlists each file: URL, date fetched, license, quoteproviders/flagsmith.mdwritten fromproviders/_template.md, including Why this sourceenv.Get(fetch.Getinadapter/flagsmith.go)make checkpasses locallyNotes for the reviewer
deprecated: trueon an operation yet, so only an already-gone operation becomes an event (see Known gaps in the provider page).