-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v15] Add new
tctl bots update
command (#37061)
* Add new `tctl bots update` command This adds a new command to update roles and logins for existing bots, with flags to both set and append as desired. changelog: Add new `tctl bots update` command to update bot roles and logins * Pluralize "add-" flags for consistency * Add docs for `tctl bots update` Also merges in some other misc docs changes for `tctl bots ...` * Fix docs lint * Fix incorrect example * Apply suggestions from code review Co-authored-by: Paul Gottschling <[email protected]> * Use the bot service's `UpdateBot()` RPC instead of modifying directly This switches to use the new `UpdateBot()` RPC instead of modifying the bot user and role directly. Also, tweaks CLI messaging to be a bit less chatty. * Update tool/tctl/common/bots_command.go Co-authored-by: Hugo Shaka <[email protected]> * Move set functions into their own reusable package The set package adds a little extra functionality but is still missing various important functions, like subset/superset, difference, intersection, xor/symmetric difference, etc. This changes the API slightly, so the tctl command is updated to use the new package. * Remove duplicate tests * Reword flag help strings for clarity * Remove set abstraction Removes the Set package and unrolls all related function calls in bots_command. * Add unit tests for `updateBotLogins()` and `updateBotRoles()` This also makes a minimal API wrapper interface for mocking. * Use utils function to convert sets to a string slice * Update docs/pages/reference/cli/tctl.mdx Co-authored-by: Zac Bergquist <[email protected]> --------- Co-authored-by: Paul Gottschling <[email protected]> Co-authored-by: Hugo Shaka <[email protected]> Co-authored-by: Zac Bergquist <[email protected]>
- Loading branch information
1 parent
c7405ef
commit 510bc40
Showing
3 changed files
with
455 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.