Add completion spec: openshift (oc)#223
Conversation
Add a comprehensive completion spec for the OpenShift CLI (oc) with: - JSON spec covering all 62 oc subcommands, including shared kubectl commands and OpenShift-specific ones (login, new-app, new-build, start-build, adm, project, etc.) - Generators for dynamic completions: - Reuses kubectl generators for shared Kubernetes resources - oc_builtin_completion using oc's Cobra __complete protocol - projects generator for oc project switching - build_configs generator for oc start-build Closes APP-3507 Co-Authored-By: Oz <oz-agent@warp.dev>
APP-3507 Add OpenShift (oc) completion spec
No completion spec exists for See GitHub #4147, #5073 |
|
Re-requesting screenshots: https://oz.staging.warp.dev/runs/019d4ad7-9720-7934-ae6f-f4132101a1f8?createdBy=5gyxwUE9o2ebwBT8yUO7CZ2gpkt2 |
Co-Authored-By: Oz <oz-agent@warp.dev>
Generator Validation ScreenshotsTested the OpenShift ( Test Environment
1.
|
|
Confirmed the builtins and |
Screenshots showing the projects and build_configs generators working in Warp: - oc_projects_completions.png: oc project <Tab> showing project names - oc_build_configs_completions.png: oc start-build <Tab> showing build config names Co-Authored-By: Oz <oz-agent@warp.dev>
Generator Validation ScreenshotsTested the
|
|
Very nice, ty |







Summary
Add a comprehensive completion spec for the OpenShift CLI (
oc).Closes APP-3507
What's included
JSON Spec (
command-signatures/json/oc.json)login,logout,whoami,get-tokennew-app,new-build,start-build,cancel-build,rollbackproject,projects,new-projectimport-image,tag,image,registrydebug,rsh,rsyncadmwith full subcommand tree (cordon, drain, upgrade, policy, groups, prune, etc.)process,extract,observe,policy,secrets,idle,events,statusGenerators (
command-signatures/src/generators/oc.rs)oc_builtin_completion: Uses oc's Cobra__completeprotocol for dynamic completionsprojects: Lists available OpenShift projects foroc projectswitchingbuild_configs: Lists build configurations foroc start-buildTesting
Tested E2E in a local Warp build. Screenshots of completions working:
octop-level subcommandsCompletions dropdown shows all subcommands with descriptions (adm, annotate, api-resources, apply, etc.)
oc loginoptionsShows login-specific options (--username, --password, --token, --web, --certificate-authority, etc.)
oc start-buildoptionsShows start-build options (--from-build, --from-dir, --follow, --wait, etc.)
oc projectoptionsShows project command options (-q/--short) and global flags
All presubmit checks pass (prettier formatting, cargo fmt, cargo clippy, cargo test).
Conversation: https://staging.warp.dev/conversation/51c03c7e-989d-49ad-9fce-a3b49b579646
Run: https://oz.staging.warp.dev/runs/019d4aa5-bddf-7179-8903-8b1d63506b22
This PR was generated with Oz.