This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Conversation
jhernand
force-pushed
the
validate_and_set_default_values_of_template_parameters
branch
2 times, most recently
from
July 11, 2025 10:54
2979d34 to
4a3e510
Compare
This patch changes the clusters server so that it validates that the template parameters specified in the cluster are valid, and sets the default values for those that aren't specified. Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
jhernand
force-pushed
the
validate_and_set_default_values_of_template_parameters
branch
from
July 16, 2025 10:05
4a3e510 to
c5b72ab
Compare
tzumainn
reviewed
Jul 16, 2025
| err = grpcstatus.Errorf( | ||
| grpccodes.InvalidArgument, | ||
| "template parameter '%s' doesn't exist, valid values for template '%s' are %s", | ||
| clusterParameterName, templateId, english.WordSeries(templateParameterNames, "and"), |
Contributor
There was a problem hiding this comment.
Would it make sense to group together all invalid template parameters and then send a single error that says something like "template parameters X, Y, Z don't exist, valid values..."?
Contributor
Author
There was a problem hiding this comment.
Yes, that makes sense, will do it.
Contributor
Author
This patch changes the clusters server so that it returns a single error message with the names of all the template parameters that don't exist. For example, if the user tries to use parameters `junk1` and `junk2` that don't exist in the template the error message returned will be like this: ``` template parameters 'junk1' and 'junk2' don't exist, valid values for template 'my_template' are 'my_param' and 'your_param'", ``` Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
jhernand
force-pushed
the
validate_and_set_default_values_of_template_parameters
branch
from
July 16, 2025 16:26
f02ae3a to
116c64a
Compare
tzumainn
approved these changes
Jul 17, 2025
jhernand
deleted the
validate_and_set_default_values_of_template_parameters
branch
July 17, 2025 16:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch changes the clusters server so that it validates that the template parameters specified in the cluster are valid, and sets the default values for those that aren't specified.