Add --replicas-* CLI option group to deployment search commands
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
Expose the DeploymentFilter.replicas nested filter (from the backend story) on the CLI. REST v2/SDK get it for free via the shared DTO, but the CLI assembles DeploymentFilter from an explicit set of Click options, so it needs a dedicated option group.
Source: proposals/BEP-1060-v2-connection-type-nested-filters.md
- client/cli/v2/{admin,my}/deployment.py: add a -~~replicas~~\* option group to the deployment search commands, accepting the matching mode (some/every/none) plus replica conditions (status/traffic_status/health_status) and building DeploymentFilter.replicas.
## Success Criteria
- [ ] both admin and my deployment search accept -~~replicas~~\* options
- [ ] some/every/none selection plus replica conditions (e.g. health_status) are sent in the SDK request
- [ ] behavior unchanged when the options are omitted (additive)
- [ ] CLI filter results match GraphQL on the live server (./bai)
- [ ] pants test passes for affected packages
JIRA Issue: BA-6850
Contributor guide
Research direction
Start in client/cli/v2/admin/deployment.py and client/cli/v2/my/deployment.py, then read proposals/BEP-1060-v2-connection-type-nested-filters.md and the existing DeploymentFilter option assembly. Verify both search commands accept the replicas mode and replica conditions, that omitted options preserve current behavior, and run pants test for the affected packages; compare live results with GraphQL via ./bai.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100