Skip to content

feat: add new registration-service config param for ui canary deployement #476

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 15 commits into from
May 6, 2025

Conversation

mfrancisc
Copy link
Contributor

Description

This PR adds new UICanaryDeploymentWeight in the toolchainconfig fields.

Jira: https://issues.redhat.com/browse/SANDBOX-1144

Checks

  1. Did you run make generate target? yes

  2. Did make generate change anything in other projects (host-operator)? yes

  3. In case of new CRD, did you the following? N/A

  4. In case other projects are changed, please provides PR links.

// - if the user has a number within the weight returned from the backend than user get's redirect to to new UI
// - if the user has a number above the weight they keep using the current UI
//
// +optional
Copy link
Contributor

Choose a reason for hiding this comment

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

just a detail, but you can add a validation of the input

Suggested change
// +optional
// +optional
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=10
// +kubebuilder:default=10

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, tbh I'm not sure what range we want to use.

I though about 1 - 100.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added the range (0 - 100 ) , but not the default, since that is defined in the registration service helper function.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, 1-100 is preferable IMO.

Copy link

sonarqubecloud bot commented May 6, 2025

@mfrancisc mfrancisc merged commit ee4a91d into codeready-toolchain:master May 6, 2025
5 of 6 checks passed
@mfrancisc mfrancisc deleted the uicanary branch May 6, 2025 18:38
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.

4 participants