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

Add missing graph pipeline validation #1011

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

tothszabi
Copy link
Contributor

Checklist

Version

Requires a MINOR version update

Context

There were a couple of graph pipeline validations which were not yet added to the CLI.

models/models.go Outdated

allowedValues := []string{string(GraphPipelineAlwaysRunModeOff), string(GraphPipelineAlwaysRunModeWorkflow)}
if !slices.Contains(allowedValues, value) {
return fmt.Errorf("%s is not a valid should always run value", value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return fmt.Errorf("%s is not a valid should always run value", value)
return fmt.Errorf("%s is not a valid should_always_run value", value)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also print the allowed values too? Given that it's already there in a slice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good ideas. I have updated the code.

@tothszabi tothszabi merged commit deacbb2 into master Oct 30, 2024
5 checks passed
@tothszabi tothszabi deleted the CI-3628-update-graph-pipeline-validation branch October 30, 2024 12:03
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 this pull request may close these issues.

2 participants