Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore(cli): validate various names locally #14551

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

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Sep 4, 2024

Closes #14544.
Closes #10244.

As mentioned in coder/terraform-provider-coderd#85, coderd doesn't currently provide an error reason when a field in a request fails to validate. This means the CLI provides an arguably useless error message when a supplied name is invalid.

Even if coderd supplied an error reason when a field failed to validate, the problem in #14544 would still result in a not great UX, only showing the error after a plan (which could reasonably take several minutes for some Terraform providers).

I think it's okay to follow the Web UI here, and validate locally first, especially since both coderd and the CLI will call the same validator implementation in codersdk.

Copy link
Member Author

ethanndickson commented Sep 4, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ethanndickson and the rest of your teammates on Graphite Graphite

@ethanndickson ethanndickson marked this pull request as ready for review September 4, 2024 07:12
@ethanndickson ethanndickson changed the base branch from 09-04-feat_codersdk_export_name_validators to graphite-base/14551 September 4, 2024 08:17
@ethanndickson ethanndickson force-pushed the 09-04-chore_cli_validate_various_names_locally branch from 4fd4b55 to 5e0c568 Compare September 4, 2024 08:18
@graphite-app graphite-app bot changed the base branch from graphite-base/14551 to main September 4, 2024 08:18
@ethanndickson ethanndickson force-pushed the 09-04-chore_cli_validate_various_names_locally branch from 5e0c568 to 09de864 Compare September 4, 2024 08:18
@ethanndickson ethanndickson force-pushed the 09-04-chore_cli_validate_various_names_locally branch from 09de864 to 4bc6cfd Compare September 4, 2024 08:21
@ethanndickson ethanndickson enabled auto-merge (squash) September 4, 2024 08:21
@ethanndickson ethanndickson merged commit 8f85464 into main Sep 4, 2024
28 checks passed
@ethanndickson ethanndickson deleted the 09-04-chore_cli_validate_various_names_locally branch September 4, 2024 08:34
@github-actions github-actions bot locked and limited conversation to collaborators Sep 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants