Skip to content

feat: add validation for team names to prevent '/' characters in rename-team command - #9600

Merged
taylorsilva merged 1 commit into
concourse:masterfrom
IvanChalukov:rename-team
Jun 15, 2026
Merged

taylorsilva merged 1 commit into
concourse:masterfrom
IvanChalukov:rename-team

Conversation

@IvanChalukov

Copy link
Copy Markdown
Contributor

Changes proposed by this PR

Follow up of #9537
Teams should not be able to contain "/" in their names. This change handle rename-pipeline command.

  • add validation for "/" in rename-team command
  • extend tests for the command

Notes to reviewer

Sample test could be executed by running:

fly -t dev set-team -n new/team --local-user=test

I've also test to rename teams and pipelines through API. Both operation succeeds and I was able to rename pipeline from vault2 to vault/2, as well as team ivan to ivan/2. Sample calls:

  • pipeline rename with /

    curl --request PUT \
      --url http://localhost:8080/api/v1/teams/ivan/pipelines/vault2/rename \
      --header 'authorization: Bearer <token>' \
      --header 'content-type: application/json' \
      --data '{
      "name": "vault/2"
    }'

    The response of that call contains only warning:

    {"warnings":[{"type":"invalid_identifier","message":"pipeline: 'vault/2' is not a valid identifier: illegal character '/'"}]}
  • team rename with /:

    curl --request PUT \
      --url http://localhost:8080/api/v1/teams/ivan/rename \
      --header 'authorization: Bearer <token>' \
      --header 'content-type: application/json' \
      --data '{
      "name": "ivan/2"
    }'
    The response of that call contains only warning:
    
    ```sh
    {"warnings":[{"type":"invalid_identifier","message":"team: 'ivan/2' is not a valid identifier: illegal character '/'"}]}

However, I believe those exceptions would be handled in #9271


@Kump3r

Kump3r commented Jun 13, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-06-13 at 12 13 33

Works as expected!

@taylorsilva
taylorsilva merged commit 95e3297 into concourse:master Jun 15, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Pull Requests Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants