ukaea / piezo

1 stars 0 forks source link

Web app rejects poorly-formatted job names #70

Closed robert-clegg-tessella closed 5 years ago

robert-clegg-tessella commented 5 years ago

Pod names must be composed of lower case characters, digits, . and -. . and - must be surrounded by characters and/or digits.

The Kubernetes API will reject poorly-formatted names, but the error message it returns is not very clear. Instead, we should warn the user of this at the same time as all other validation warnings.

In addition see failed test cases from #51

Acceptance criteria

Poorly-formatted job names are rejected by the web app, with a 400 response and helpful error message. Well-formatted job names are accepted as before.

The documentation in the wiki user guide matches the accepted formatting.

Test Scenarios

vidhyamanojkumar commented 5 years ago

@robert-clegg-tessella @oliver-tarrant-tessella Could we display the error message with the name restriction details, rather than adding a link to user guide?

robert-clegg-tessella commented 5 years ago

@vidhyamanojkumar I'd rather have these in just one place, rather than risk divergence. Having it on the wiki page means users can see what the restrictions are before submitting a job.