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: Promote WorkstationConfig to v1beta1 #3412

Conversation

jasonvigil
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@yuwenma yuwenma left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
/hold

one nit, but a blocker. Feel free to unhold and fix in follow-up PRs.

// Parent is a reference to the parent WorkstationCluster for this WorkstationConfig.
Parent *WorkstationClusterRef `json:"parentRef"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable"
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: can we remove this immutable checker? This field has been guardrailed in the Identity and adding the CEL immutability check here will leave the KCC object unfixable in certain situations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the CEL immutability check here will leave the KCC object unfixable in certain situations.

I am not sure that I understand this. What situation would this be a problem? Also, the CEL check is still in the template:

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable"

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, we should clean up the template as well. Basically this field has been guarded by the resource identity function (check spec.project match externalref.project, spec.location matches externalref.location, and id matches the externalRefid). If adding the immutable check in CRD level, certain situations may not work as expected and confuse users. .e.g. user use the default metadata.name (spec.resourceID empty) to create the object, and later on want to set the spec.resourceID, the CEL check fails because nil -> string is considered as a mutable change.

Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yuwenma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot added approved and removed lgtm labels Dec 18, 2024
@jasonvigil jasonvigil requested a review from yuwenma December 18, 2024 21:31
@jasonvigil jasonvigil force-pushed the workstationconfig-promote branch from 5d08840 to 05e927e Compare December 18, 2024 22:39
@yuwenma
Copy link
Collaborator

yuwenma commented Dec 19, 2024

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Dec 19, 2024
@yuwenma
Copy link
Collaborator

yuwenma commented Dec 19, 2024

/hold cancel

@google-oss-prow google-oss-prow bot merged commit 0249649 into GoogleCloudPlatform:master Dec 19, 2024
17 checks passed
@jasonvigil jasonvigil deleted the workstationconfig-promote branch December 26, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants