consul icon indicating copy to clipboard operation
consul copied to clipboard

Export peering cli

Open nathancoleman opened this issue 2 years ago • 4 comments

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 avatar Dec 02 '22 18:12 nathancoleman

@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.

DanStough avatar Dec 05 '22 20:12 DanStough

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 avatar Dec 05 '22 20:12 DanStough

@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

nathancoleman avatar Dec 12 '22 21:12 nathancoleman

@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 avatar Feb 01 '23 21:02 nathancoleman

@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 avatar Jun 28 '23 02:06 david-yu

@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

nathancoleman avatar Jun 29 '23 16:06 nathancoleman