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

feat: check for incompatible flavors #146

Merged
merged 3 commits into from
Jan 24, 2024

Conversation

crgisch
Copy link
Contributor

@crgisch crgisch commented Jan 24, 2024

No description provided.

@crgisch crgisch marked this pull request as ready for review January 24, 2024 19:24
@wpjunior
Copy link
Member

LGTM, please don't forget to generate manifests with make manifests

@wpjunior wpjunior requested a review from morpheu January 24, 2024 19:26
Copy link
Member

@morpheu morpheu left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -1289,6 +1289,11 @@ func (m *k8sRpaasManager) validateFlavors(ctx context.Context, instance *v1alpha
if flavorObj.Spec.CreationOnly && !isCreation {
return &ValidationError{Msg: fmt.Sprintf("flavor %q can used only in the creation of instance", f)}
}

incompatibleFlavor := checkIncompatibleFlavors(flavorObj.Spec.IncompatibleFlavors, flavors)
Copy link
Member

@morpheu morpheu Jan 24, 2024

Choose a reason for hiding this comment

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

I think is just cosmetic, but would be nice bring error message inside checkIncompatibleFlavors and throw it instead a string to be more golang way to handle error

Copy link
Member

@morpheu morpheu left a comment

Choose a reason for hiding this comment

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

nice :)

@wpjunior wpjunior merged commit bd559c0 into tsuru:main Jan 24, 2024
3 checks passed
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.

3 participants