Remove plugin-config command (not exposed by API7 EE)#34
Conversation
The API7 EE control-plane does not expose /apisix/admin/plugin_configs as a management resource (verified against api7ee-3-control-plane: no routes, no handlers, not in the generated OpenAPI spec). Mirrors PR #21 (upstream/consumer-group/service-template): - delete pkg/cmd/plugin-config/ and pkg/api/types_plugin_config.go - unregister from pkg/cmd/root/root.go - drop plugin_configs from config dump/diff/sync paths - add plugin_configs to declarative-config validation rejection alongside upstreams/consumer_groups/service_templates - replace the old 'compatibility error' e2e file with the standard TestUnsupportedResourceCommandsAreRemoved + TestHelp assertions - extend TestConfigValidate_EmptyUnsupportedSections with plugin_configs - PRD: align the Plugin Config note with the consumer-groups treatment The CP still accepts plugin_configs *inside* batch config-validation payloads, so the rejection only applies to a7's standalone command and the top-level declarative section. Closes #24.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (27)
💤 Files with no reviewable changes (20)
📝 WalkthroughWalkthroughThe pull request completely removes the ChangesPlugin-Config Command and Config Handling Removal
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
The API7 EE control-plane does not expose
/apisix/admin/plugin_configsas a management resource. Verified againstapi7ee-3-control-plane: no routes, no handlers, not in the generated OpenAPI spec; same signature as the already-removedconsumer_group. Thea7 plugin-configcommand was therefore non-functional against API7 EE and is removed.Mirrors #21 (which removed
upstream/consumer-group/service-template).Changes
Code
pkg/cmd/plugin-config/(parent + all subcommand dirs) andpkg/api/types_plugin_config.go.pkg/cmd/root/root.go.plugin_configsfromconfig dump/diff/syncpaths inconfigutilandsync.go.plugin_configsto declarative-config validation rejection alongsideupstreams/consumer_groups/service_templates.ConfigFile.PluginConfigsto[]interface{}(rejection-only, same pattern asServiceTemplates).Tests
test/e2e/plugin_config_test.go(the old "compatibility error" tests). The standardTestUnsupportedResourceCommandsAreRemoved+TestHelpincompletion_version_test.gonow coverplugin-configremoval.TestConfigValidate_EmptyUnsupportedSectionswith theplugin_configscase (all 4 subtests pass)./apisix/admin/plugin_configsstub fromdiff_test.go/dump_test.go/sync_test.go.Docs
PRD.md: align the Plugin Config note with howconsumer-groupswas handled in PR Remove unsupported API7 resource commands #21; dropplugin-configfrom the Phase 3 export list, Phase 5 user-guide list, and Phase 8 e2e tests list.docs/ga-test-plan.md: drop the "after Task test: align E2E coverage with current EE models #2" annotations.AGENTS.mdanddocs/api7ee-api-spec.mdalready note plugin_configs as "not exposed"; left as-is.Caveat
The CP still accepts
plugin_configsinside batch config-validation payloads. The rejection applies only to a7's standalone command and the top-level declarative section, not that internal validation path.Test plan
go build,go vet, fullgo test ./...all pass locally../bin/a7 plugin-config --help→Error: unknown command "plugin-config" for "a7"../bin/a7 --helpshows onlypluginandplugin-metadata, noplugin-config.Closes #24. Part of #22.
Summary by CodeRabbit
Release Notes
Chores
a7 plugin-configcommand and all related subcommands from the CLI.Documentation