Skip to content

Restrict allowed character sets for names in API (pipelines, jobs, resources, steps, etc) #3985

@vito

Description

@vito

What challenge are you facing?

Tons of issues are opened all the time because various funny characters cause breakage in various places (e.g. fly, web UI):

We've never had any validation for these so folks have started to use all kinds of weird naming schemes which are difficult to support going forward, especially in contexts like fly where we often have our own notation in flags.

What would make this better?

We should just decide on allowable characters and perform validation at pipeline submission time.

If I were to start Concourse over I would have restricted everything to [a-z0-9-]+ and force everyone to use fairly simple job/pipeline names. I say a-z but I really mean alphabetical in whatever language the user speaks - I don't remember the regex notation for that.

I would even go as far as only allowing lowercase characters so we don't have to care about case-sensitivity, and allowing - but not _ so we don't end up with ideological wars.

The advantage of having such a strict set of allowable characters would be that everyone's Concourse feels the same. This also allows us to use notation more freely, e.g. / for pipeline hierarchies (#532).

Are there any use cases out there for certain special characters in job/pipeline names?

How many people have I made angry with my recklessly narrow definition of allowed characters?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions