Skip to content

[experiments] Cannot publish new version using web UI #6857

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

Closed
phorcys420 opened this issue Mar 28, 2023 · 11 comments · Fixed by #6876
Closed

[experiments] Cannot publish new version using web UI #6857

phorcys420 opened this issue Mar 28, 2023 · 11 comments · Fixed by #6876
Assignees

Comments

@phorcys420
Copy link
Member

Version: v0.21.1+b38d1ed with CODER_EXPERIMENTS=*
Template: uwu/basic-env


image


The server responds with a 400 response code and the following data :

{"message":"Validation failed.","validations":[{"field":"name","detail":"Validation failed for tag \"template_version_name\" with value: \"heuristic_cray2\""}]}
@BrunoQuaresma
Copy link
Collaborator

Type a new name and it should work. I'm fixing this right away!

@BrunoQuaresma BrunoQuaresma self-assigned this Mar 28, 2023
@phorcys420
Copy link
Member Author

I did try that yesterday and it didn't work. Will retry today.

@phorcys420
Copy link
Member Author

It does work, but only when removing the underscore.

@BrunoQuaresma
Copy link
Collaborator

@mtojek maybe the validation of the name is too strict? I think we would like to allow underscores 🤔

@BrunoQuaresma
Copy link
Collaborator

@phorcys420 I will post the PR here when it is ready for review 👍 thanks for letting us know about the issue.

@mtojek
Copy link
Member

mtojek commented Mar 29, 2023

@mtojek maybe the validation of the name is too strict? I think we would like to allow underscores 🤔

This is a general validator for all names in the coder product. I wouldn't do excuses in this case unless it's a big usability problem.

@BrunoQuaresma
Copy link
Collaborator

@mtojek it is because the actual version name generator is generating names that are not validated in this way so we may change how random names are being generated to match the "general validator" or we make the version name accepts a diff validator specific for the version name. Having in mind versions could be named v1.0.0 as an example - not sure if the general validator allows dots.

@bpmct
Copy link
Member

bpmct commented Mar 29, 2023

I'm in favor of more permissive version names, kind of like display names. Or perhaps how Docker validates image tags?

@mtojek
Copy link
Member

mtojek commented Mar 30, 2023

I'm looking into this, it's a kind of bug. Let's make them more permissive.

@BrunoQuaresma
Copy link
Collaborator

@mtojek another thing that I notice. Let's say you have a version "my-version-1" and send a PATCH to it using the same name, it will get a unique error. I will fix that in the FE as well, not send a patch if nothing is changed, but maybe we should fix it on BE as well. If the name is not changed, just return 200 but it is up to you.

@mtojek
Copy link
Member

mtojek commented Mar 30, 2023

Yeah, it depends on how you treat this kind of situation. I will prepare a patch for it. Thanks for the heads-up, Bruno!

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

Successfully merging a pull request may close this issue.

4 participants