Repository navigation
Don't allow pipelines or teams containing '/' to be set with the set_pipeline step - #9537
Merged
Merged
Conversation
Contributor
|
I've tested the PR and it works as expected! While testing, I also checked whether we have similar validation for Examplefly -t local set-team -n test/main --config team.ymlI get deprecation warning: DEPRECATION WARNING:
- team: 'test/main' is not a valid identifier: illegal character '/'After creating a pipeline in the new team and attempting to open it, nothing happens. The URL is: Should we add the same validation to |
Member
Author
|
Thanks for checking that! Let's add it to this PR, it's small and similar enough to pack together. |
we do this same check in the `fly set-pipeline` command Signed-off-by: Taylor Silva <[email protected]>
blocking this in `fly set-team` and `set_pipeline` step. Teams with slashes `/` cannot be viewed in the UI either, so anyone that has created a team like this probably deleted and recreated the team after realizing this. Signed-off-by: Taylor Silva <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed by this PR
closes #8475
The
set_pipelinestep will now error if a pipeline name contains forward slashes/, which is whatfly set-pipelinecurrently does.We do this same check in the
fly set-pipelinecommand:concourse/fly/commands/set_pipeline.go
Lines 40 to 42 in 6e4c92e
I verified that we don't need to enforce this for resource or job names. Fly currently let's you set these and the UI does not break when resources or jobs have
/in their name.Update
fly set-teamand theset_pipelinestep will error on teams containing/as well now. Teams with this character already didn't work in the web UI. The fact we have no bug reports regarding this leads me to think that no one has tried making a team with a/in its name, so I don't think we're breaking anything for users.Marking this as a breaking change though and will warn users to rename their teams before upgrading.