consul
consul copied to clipboard
Export peering cli
Description
Describe why you're making this change, in plain English.
Testing & Reproduction steps
- In the case of bugs, describe how to replicate
- If any manual tests were done, document the steps and the conditions to replicate
- Call out any important/ relevant unit tests, e2e tests or integration tests you have added or are adding
Links
Include any links here that might be helpful for people reviewing your PR (Tickets, GH issues, API docs, external benchmarks, tools docs, etc). If there are none, feel free to delete this section.
Please be mindful not to leak any customer or confidential information. HashiCorp employees may want to use our internal URL shortener to obfuscate links.
PR Checklist
- [ ] updated test coverage
- [ ] external facing docs updated
- [ ] not a security concern
@nathancoleman , w.r.t. checking if the service exists, I would say no. Generally, design things in the CLI to support eventual consistency, so you don't need to worry about the order in which these things are created. It would be cool to have a -verify
flag to add the check, but there isn't any precedent for this.
This looks awesome! One note is this would look almost identical if we made a command for exporting to partitions. I wonder if this should be a new top-level command, and we can create a followup tasks to support both -peers
and -partitions
?
@DanStough the question of whether this single command supports both peers and partitions or whether we have this command and another parition-specific command elsewhere in the CLI is something I'm expecting an answer from Jared on before we merge
@DanStough if you could please review this, it'd be super appreciated!
We've split things out such that OSS here only has the -name
and -consumer-peers
flags.
The -namespace
, -partition
and -consumer-partitions
flags will be added in followup work based on our discussion yesterday.
@nathancoleman Out of curiosity are there docs changes for this features as well? I currently do not see docs for this feature here: https://developer.hashicorp.com/consul/commands/services
@david-yu good catch - meant to get docs done before the 1.16 release and completely forgot. I'll get a PR up today and backport in 1.16.x.
Edit: See #18425