fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Rename teams via GitOps

Open getvictor opened this issue 1 year ago • 4 comments

Goal

User story
As a Fleet gitops user,
I want to rename my team
so that I do not have to use the UI when interacting with Fleet.
  • Requestor(s): @getvictor
  • Product designer: @noahtalerman

Current workflow to change a team's name when using Fleet's best practice GitOps:

  1. Edit the team's name in the UI
  2. Open a PR to match the team's name via GitOps. The new name in the git repo matches new name in the UI

Changes

Product

  • [ ] GitOps changes: When the name changes in a team YAML file, if the team YAML's filename doesn't change, edit the team's name.
  • [ ] Outdated documentation changes: No documentation changes needed.
  • [ ] Changes to paid features or tiers: Available in Fleet Free and Fleet Premium

Engineering

  • [ ] Database schema migrations: TODO
  • [ ] Load testing: TODO

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

  • Requires load testing: TODO
  • Risk level: Low / High TODO
  • Risk description: TODO

Manual testing steps

  1. Step 1
  2. Step 2
  3. Step 3

Testing notes

Confirmation

  1. [ ] Engineer (@____): Added comment to user story confirming successful completion of QA.
  2. [ ] QA (@____): Added comment to user story confirming successful completion of QA.

getvictor avatar Apr 22 '24 19:04 getvictor

@getvictor the expected workflow for editing a team name is that the user will edit name in an existing team YAML file and nothing else.

If they're trying to create a new team, they'll create an entirely new team YAML file.

  • [ ] GitOps changes: When the name changes in a team YAML file, if the team YAML's filename doesn't change, edit the team's name.

What do you think about this change to support the edit team name workflow?

noahtalerman avatar May 14 '24 13:05 noahtalerman

@getvictor the expected workflow for editing a team name is that the user will edit name in an existing team YAML file and nothing else.

If they're trying to create a new team, they'll create an entirely new team YAML file.

  • [ ] GitOps changes: When the name changes in a team YAML file, if the team YAML's filename doesn't change, edit the team's name.

What do you think about this change to support the edit team name workflow?

Doesn't seem very clean to me. The name of the yaml file could be anything, like teams/config5.yml and currently we pay no attention to the file name, except for default.yml

getvictor avatar May 14 '24 19:05 getvictor

Hmm, ok.

expected workflow for editing a team name is that the user will edit name in an existing team YAML file and nothing else.

@getvictor are there other ways we can enable this workflow?

noahtalerman avatar May 17 '24 14:05 noahtalerman

Hey @getvictor just giving you another toast notification (ping) :)

expected workflow for editing a team name is that the user will edit name in an existing team YAML file and nothing else.

Please let me know if you have other ideas on how we can enable this workflow :)

noahtalerman avatar May 22 '24 14:05 noahtalerman

@noahtalerman What if we introduce a new team identifier, like unique_id? By default, it will be the same as the team name, but users can also set it to anything they want.

When creating a team:

name: My Team
unique_id: engineering-01

When changing a team name:

name: Engineering Team
unique_id: engineering-01

getvictor avatar May 23 '24 11:05 getvictor

expected workflow for editing a team name is that the user will edit name in an existing team YAML file and nothing else.

@getvictor I like that idea but I think it would be best if we can find a solution that meets the above requirement w/o adding any new field to the YAML.

Why? It's simpler and more intuitive for the user. As a user, if I want to edit the name, I edit the name field. If I want to create a new team I create a new file w/ a new team name. I don't want to have to worry about another identifier. The name is enough.

Any ideas?

noahtalerman avatar May 30 '24 13:05 noahtalerman

@noahtalerman We can store the gitops filename as the 2nd identifier in the backend, and use that. We would want to document that behavior to be transparent.

getvictor avatar May 30 '24 14:05 getvictor

We can store the gitops filename as the 2nd identifier in the backend, and use that. We would want to document that behavior to be transparent.

@getvictor sounds good. I updated the issue description to reflect this ("Changes" section)

@sharon-fdm heads up, I moved this story to "Settled" and assigned you. I think it's ready for estimation.

noahtalerman avatar Jun 14 '24 14:06 noahtalerman

Current workflow to change a team's name when using Fleet's best practice GitOps:

  1. Edit the team's name in the UI
  2. Open a PR to match the team's name via GitOps. The new name in the git repo matches new name in the UI

Hey @spokanemac and @lukeheath heads up that this GitOps improvement shipped. We no longer have to do the above workaround when renaming a team.

TODO @noahtalerman document the following: If the name changes and the team's YAML filename doesn't change, edit the team's name. If the name changes and the team's filename does change, create a new team.

noahtalerman avatar Jul 18 '24 16:07 noahtalerman

TODO @noahtalerman document the following: If the name changes and the team's YAML filename doesn't change, edit the team's name.

Docs PR is here: https://github.com/fleetdm/fleet/pull/20681

noahtalerman avatar Jul 24 '24 13:07 noahtalerman

Renaming teams with ease, Like changing winds, no UI tease. Cloud city breathes, pleased.

fleet-release avatar Jul 25 '24 16:07 fleet-release