Skip to content

Conversation

@dlom
Copy link
Contributor

@dlom dlom commented Oct 22, 2025

Closes #256 (for real this time)
xref: CORS-4266
See also: openshift/hive#2731

Additionally, this PR removes the UniqueItems validator on the IP address tuples, as explained in the commit message

@openshift-ci openshift-ci bot requested review from eslutsky and honza October 22, 2025 00:13
@dlom dlom force-pushed the add-deepcopy-to-types branch from aafbc03 to e3465e9 Compare October 22, 2025 00:13
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign barbacbd for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

)

//go:generate go run ../../vendor/sigs.k8s.io/controller-tools/cmd/controller-gen crd:crdVersions=v1 paths=. output:dir=../../data/data/
//go:generate go run ../../vendor/k8s.io/code-generator/cmd/deepcopy-gen --output-file zz_generated.deepcopy.go ./...
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is where the generator is actually invoked. This ties in with existing codegen, and hack/verify_codegen.sh

@dlom dlom force-pushed the add-deepcopy-to-types branch 3 times, most recently from e68c362 to 76157f1 Compare October 22, 2025 02:59
@dlom dlom force-pushed the add-deepcopy-to-types branch from 76157f1 to f99bfe3 Compare October 22, 2025 19:04
@dlom
Copy link
Contributor Author

dlom commented Oct 22, 2025

/retitle CORS-4266: Add generated DeepCopy implementations for pkg/types/installconfig

@openshift-ci openshift-ci bot changed the title Add generated DeepCopy implementations for pkg/types/installconfig CORS-4266: Add generated DeepCopy implementations for pkg/types/installconfig Oct 22, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 22, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 22, 2025

@dlom: This pull request references CORS-4266 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 task to target the "4.21.0" version, but no target version was set.

In response to this:

Closes #256 (for real this time)

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.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 22, 2025

@dlom: This pull request references CORS-4266 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 task to target the "4.21.0" version, but no target version was set.

In response to this:

Closes #256 (for real this time)
xref: CORS-4266
See also: openshift/hive#2731

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.

1 similar comment
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 22, 2025

@dlom: This pull request references CORS-4266 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 task to target the "4.21.0" version, but no target version was set.

In response to this:

Closes #256 (for real this time)
xref: CORS-4266
See also: openshift/hive#2731

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.

@dlom
Copy link
Contributor Author

dlom commented Oct 22, 2025

/jira refresh

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 22, 2025

@dlom: This pull request references CORS-4266 which is a valid jira issue.

In response to this:

/jira refresh

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.

Iff the intent of adding kubebuilder/DeepCopy code generation is to
enable these types to be used in CRD definitions, it stands to reason
that these CRDs should be usable in a k8s cluster.  UniqueItem=true is
not permitted on CRDs for k8s.

This might be controversial because it relaxes validation requirements
@dlom dlom force-pushed the add-deepcopy-to-types branch from d4fcf54 to 91cb5e1 Compare October 23, 2025 00:56
@dlom
Copy link
Contributor Author

dlom commented Oct 23, 2025

/retest

3 similar comments
@dlom
Copy link
Contributor Author

dlom commented Oct 24, 2025

/retest

@dlom
Copy link
Contributor Author

dlom commented Oct 25, 2025

/retest

@dlom
Copy link
Contributor Author

dlom commented Oct 29, 2025

/retest

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 29, 2025

@dlom: This pull request references CORS-4266 which is a valid jira issue.

In response to this:

Closes #256 (for real this time)
xref: CORS-4266
See also: openshift/hive#2731

Additionally, this PR removes the UniqueItems validator on the IP address tuples, as explained in the commit message

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 29, 2025

@dlom: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-azurestack 91cb5e1 link false /test e2e-azurestack
ci/prow/e2e-ibmcloud-ovn 91cb5e1 link false /test e2e-ibmcloud-ovn
ci/prow/okd-scos-e2e-aws-ovn 91cb5e1 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-metal-ovn-two-node-fencing 91cb5e1 link false /test e2e-metal-ovn-two-node-fencing
ci/prow/e2e-aws-ovn-heterogeneous 91cb5e1 link false /test e2e-aws-ovn-heterogeneous
ci/prow/e2e-metal-assisted 91cb5e1 link false /test e2e-metal-assisted
ci/prow/e2e-nutanix-ovn 91cb5e1 link false /test e2e-nutanix-ovn
ci/prow/e2e-azure-ovn-shared-vpc 91cb5e1 link false /test e2e-azure-ovn-shared-vpc

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.

Copy link
Contributor

@patrickdillon patrickdillon left a comment

Choose a reason for hiding this comment

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

This looks good. Left some minor comments, which I think should be addressed.

Regarding the last commit, removing uniqueitems I think that's fine. I reviewed the validation code and we have validation in place that ensures if 2 IPs are provided, one must be ipv4 and one ipv6, so therefore they must be unique. i.e. the validation is redundant and already in place.

Comment on lines +71 to +72
IP: net.IP{10, 0, 0, 0},
Mask: net.IPv4Mask(255, 0, 0, 0),
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand this.. Is this seeding with an incorrect value, and it should be overwritten with the correct value?
Seems like it should just be empty (&IPNet{})

Comment on lines +87 to +93
ipNetIn.IPNet = net.IPNet{
IP: net.IP{192, 168, 10, 10},
Mask: net.IPv4Mask(255, 255, 255, 255),
}
if ipNetOut.String() == ipNetIn.String() {
t.Fatalf("%v (%q) == %v (%q)", ipNetOut, ipNetOut.String(), ipNetIn, ipNetIn.String())
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This assertion also seems a little weird. Can you double check this?

@@ -1,5 +1,6 @@
// Package azure contains Azure-specific structures for installer
// configuration and management.
// +k8s:deepcopy-gen=package
Copy link
Contributor

Choose a reason for hiding this comment

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

does the annotation only need to be on a single file in the package? Typically platform.go is the "main" file for each platform, and prima face seems to mea better candidate than doc.go, though I'm open to doc.go if there's a rationale

Copy link
Contributor

Choose a reason for hiding this comment

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

All generation is governed by comment tags in the source. Any package may request DeepCopy generation by including a comment in the file-comments of a doc.go file, of the form:

shows what I know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InstallConfig Cannot Be Embedded in Kube Types Due to missing DeepCopyInto Methods

3 participants