action #177267
Updated by tinita 9 days ago
## Motivation
Currently you can put just about any character into the TEST variable, including stuff like vertical tabs, colons, equal signs, quotes and colons.
That can create problems in various places (see #176886 for example, where `=` would make a scope setting impossible)
Note that in our YAML schema we are already a bit more restrictive, e.g.
```
job_templates:
type: object
additionalProperties: false
patternProperties:
^[A-Za-z\s0-9_*.+-]+$:
```
But I think the `\s` there was a mistake and should be a simple space instead. We don't want tabs or vertical tabs or newlines...
## Acceptance Criteria
* **AC1:**: The TEST name is limited to certain characters
* ~~* **AC2**: ~~The The YAML schema allows the same characters as required elsewhere~~
## Suggestions
* Research exactly where this is relevant e.g. the schema used in the context of isos post
* openqa-clone-job can also override the test name, it may not be checked there
* Use of the openqa-clone-custom-refspec script?
* Any command where you can specify settings including `TEST=...`
* Restrict the initial and last character to words e.g. a test name would never started with a & or +
* If you allow unicode characters, make sure they actually work, because at the moment they end up as garbage when specified on the commandlime, e.g. `TEST=测试`
* Use `\p{Word}` instead of `\w` to allow unicode words
* The YAML schema should be more restrictive. Original test names should not allow things like `@#/` because for example `#` and `/` are part of github urls that are used for pull request tests. Normal test names don't need to allow them, and shouldn't, because then when seeing `#/` it's usually clear that it's from a PR / branch.
* Check the `jobs.test` column in the database for what has been used in the past
Back