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

Bug 1993002: fix kubebuilder directives #988

Merged
merged 1 commit into from Aug 16, 2021

Conversation

candita
Copy link
Contributor

@candita candita commented Aug 12, 2021

Add + to kubebuilder itself or it isn't observed
Capitalize validation directives Minimum and Maximum and put on separate lines
Use MinItems, not MinLength for array

@@ -355,14 +355,14 @@ type RequiredHSTSPolicy struct {
type MaxAgePolicy struct {
// The largest allowed value (in seconds) of the RequiredHSTSPolicy max-age
// This value can be left unspecified, in which case no upper limit is enforced.
// kubebuilder:validation:minimum=0:maximum=2147483647
// kubebuilder:validation:Minimum=0:Maximum=2147483647
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs a + to have the desired effect:

Suggested change
// kubebuilder:validation:Minimum=0:Maximum=2147483647
// +kubebuilder:validation:Minimum=0:Maximum=2147483647

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Miciah. There were multiple other errors that were hidden because of that. I think I caught them all.

config/v1/types.go Outdated Show resolved Hide resolved
@candita candita changed the title Bug 1993002 - capitalize kubebuilder directives Minimum and Maximum Bug 1993002 - fix kubebuilder directives Aug 12, 2021
@Miciah
Copy link
Contributor

Miciah commented Aug 12, 2021

Looks like you got unlucky—the build scripts create temporary files with randomly generated names, and sometimes a randomly generated name has a prefix that causes it to be parsed as a number:

Error: unable to parse option "output:dir=/tmp/tmp.0xifVHmc4m": [hexadecimal literal has no digits (at <input>:1:10)]

/test verify

@candita
Copy link
Contributor Author

candita commented Aug 12, 2021

Random filename string started with 0x and was treated like a hexadecimal?

_output/tools/bin/controller-gen-v0.6.0' schemapatch:manifests="./cloudnetwork/v1" paths="./cloudnetwork/v1" output:dir="/tmp/tmp.0xifVHmc4m"
Error: unable to parse option "output:dir=/tmp/tmp.0xifVHmc4m": [hexadecimal literal has no digits (at <input>:1:10)]

/test verify

@candita
Copy link
Contributor Author

candita commented Aug 12, 2021

Looks like you got unlucky—the build scripts create temporary files with randomly generated names, and sometimes a randomly generated name has a prefix that causes it to be parsed as a number:

Error: unable to parse option "output:dir=/tmp/tmp.0xifVHmc4m": [hexadecimal literal has no digits (at <input>:1:10)]

/test verify

I saw this at the same time as you, how funny.

Does it lgty?

@Miciah
Copy link
Contributor

Miciah commented Aug 13, 2021

Yup, lgtm, and the verify job passed.
/lgtm
/title Bug 1993002: fix kubebuilder directives

David, can you approve this PR? Just a quick follow-up to #958.
/assign @deads2k

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 13, 2021
@Miciah
Copy link
Contributor

Miciah commented Aug 13, 2021

/retitle Bug 1993002: fix kubebuilder directives

@Miciah
Copy link
Contributor

Miciah commented Aug 13, 2021

Hm, /title and /retitle aren't working. @candita, can you change the PR title to use a colon?

Never mind, the bot's just slow.

@openshift-ci openshift-ci bot changed the title Bug 1993002 - fix kubebuilder directives Bug 1993002: fix kubebuilder directives Aug 13, 2021
@openshift-ci openshift-ci bot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label Aug 13, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 13, 2021

@candita: This pull request references Bugzilla bug 1993002, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @quarterpin

In response to this:

Bug 1993002: fix kubebuilder directives

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/test-infra repository.

@openshift-ci openshift-ci bot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 13, 2021
@openshift-ci openshift-ci bot requested a review from quarterpin August 13, 2021 02:45
@deads2k
Copy link
Contributor

deads2k commented Aug 16, 2021

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 16, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: candita, deads2k, Miciah

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 16, 2021
@openshift-ci openshift-ci bot merged commit 8ff39b7 into openshift:master Aug 16, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 16, 2021

@candita: All pull requests linked via external trackers have merged:

Bugzilla bug 1993002 has been moved to the MODIFIED state.

In response to this:

Bug 1993002: fix kubebuilder directives

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants