-
Notifications
You must be signed in to change notification settings - Fork 539
WIP: CORENET-5857: Add a field for specifying UDN Name for a project #2265
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
base: master
Are you sure you want to change the base?
Conversation
@miheer: This pull request references CORENET-5857 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Hello @miheer! Some important instructions when contributing to openshift/api: |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: miheer The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a few initial comments. Additionally, this looks like it is a change that is being made to a v1 API, which means that this field must be added behind a new feature gate and go through the promotion process for new features.
I would also expect to see updates to appropriate tests to ensure the validations on the field are working as expected.
// Reference of regex and max length: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set | ||
// +kubebuilder:validation:MaxLength=63 | ||
// +kubebuilder:validation:Pattern=`^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$` | ||
UDNName string `json:"udnName,omitempty" protobuf:"bytes,4,opt,name=udnName"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this field is intended to be optional and therefore should have the // +optional
marker. It should also be mentioned explicitly in the GoDoc that this field is optional.
What happens if this value is not provided by a user? Explain this in the GoDoc as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, is the empty string (""
) a valid value to specify? If so, how is this different than not specifying the value? If not, this should probably have a minimum length constraint as well.
@@ -108,4 +111,9 @@ type ProjectRequest struct { | |||
DisplayName string `json:"displayName,omitempty" protobuf:"bytes,2,opt,name=displayName"` | |||
// description is the description to apply to a project | |||
Description string `json:"description,omitempty" protobuf:"bytes,3,opt,name=description"` | |||
// udnName is the User Defined Networks Name to apply to a project | |||
// Reference of regex and max length: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't include a documentation reference here. Instead, state in plain sentences what the constraints of this field are.
@miheer: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
No description provided.