Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle incorrect revision numbers more cleanly #437

Open
bifurcation opened this issue Jul 8, 2024 · 1 comment
Open

Handle incorrect revision numbers more cleanly #437

bifurcation opened this issue Jul 8, 2024 · 1 comment

Comments

@bifurcation
Copy link
Contributor

The submission workflow has the author submit a tag in the form of draft-documentname-revision, which gets used as the file name in submission. If the author submits a tag with the incorrect version (say -03 when the most recent published is -01), then the datatracker will return a 400 error on submission and the CI job will fail with no message other than the 400.

It seems like the submission script could check that the tag has the correct form and revision for the document in question, and if not, fail with a helpful error. It would also be helpful to provide a more intelligible error in response to datatracker errors. ("The datatracker didn't like your submission. Have you checked...?")

@martinthomson
Copy link
Owner

I just tried this myself and got this:

{"error": "Validation Error", "messages": ["Invalid revision (revision 02 is expected)"]}+ echo

Admittedly, this is buried in a bunch of diagnostic messages, but this is a hugely error-prone sequence that runs rarely, so suppressing those might be unwise.

That said, I think we can probably avoid doing an upload if the tag is not the next in sequence or a new name with -00. Then, as you say, the error message can be a lot clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants