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

OCPBUGS-26067: Backport CEL IP and CIDR validations #1828

Merged

Conversation

JoelSpeed
Copy link

A recent addition upstream includes new CEL validations for IPs and CIDRs. We have a number of APIs in tech preview in 4.15 that intend to be promoted to GA in 4.16, that could benefit from these IP address validations.

Our current approach is to use regex which does not provide a good experience when an error occurs, the whole regex is spit out.

The intention here is to backport the library change, which can be dropped when rebasing to 1.30. And the also change the introduced version to 1.28 (which also means this needs backporting to 4.15), so that, we ship the library in 4.15, but only start using it in 4.16.

Upstream, they were only introduced in 1.30 which means they wouldn't be usable until 1.31.

This allows us to improve our API validation from OpenShift 4.16 onwards, instead of OpenShift 4.18 onwards.

Previously discussed with @deads2k
/assign @deads2k

@openshift-ci-robot openshift-ci-robot added the backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. label Dec 18, 2023
@openshift-ci-robot
Copy link

@JoelSpeed: the contents of this pull request could not be automatically validated.

The following commits are valid:

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@JoelSpeed JoelSpeed changed the title Backport cel ip cidr Backport CEL IP and CIDR validations Dec 18, 2023
@openshift-ci openshift-ci bot added the vendor-update Touching vendor dir or related files label Dec 18, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 18, 2023

@JoelSpeed: the contents of this pull request could not be automatically validated.

The following commits are valid:

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@JoelSpeed
Copy link
Author

/hold

I've rebase this to make sure it's up to date with the 1.29 changes, will be ready for merge once #1815 merges and I've rebased again

Will also be bringing up for discussion in the new year

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 18, 2023
This adds new CEL functions to the library for validating if a string is an IP address,
and, if it can be parsed as an IP address, adds additional accessors to get properties
of the IP address.
This commit needs to be carried until we rebase onto Kube 1.31.

We have backported the library changes to 1.28, which means they can then be used in 1.29.

Upstream, they were only introduced in 1.30 which means they wouldn't be usable until 1.31.

This allows us to improve our API validation from OpenShift 4.16 onwards, instead of OpenShift 4.18 onwards.
@openshift-ci-robot
Copy link

@JoelSpeed: the contents of this pull request could not be automatically validated.

The following commits are valid:

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@JoelSpeed
Copy link
Author

/hold cancel

The 1.29 rebase has merged and I've got this rebased, assuming tests pass I think this could be merged

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 21, 2023
@JoelSpeed
Copy link
Author

Unit failure looks unrelated
/test unit

Copy link
Member

@soltysh soltysh 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

@soltysh
Copy link
Member

soltysh commented Jan 4, 2024

/remove-label backports/unvalidated-commits
/label backports/validated-commits

@openshift-ci openshift-ci bot added the backports/validated-commits Indicates that all commits come to merged upstream PRs. label Jan 4, 2024
@soltysh
Copy link
Member

soltysh commented Jan 4, 2024

/test unit

@openshift-ci openshift-ci bot removed the backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. label Jan 4, 2024
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 4, 2024
Copy link

openshift-ci bot commented Jan 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed, soltysh

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 Jan 4, 2024
@JoelSpeed JoelSpeed changed the title Backport CEL IP and CIDR validations OCPBUGS-26067: Backport CEL IP and CIDR validations Jan 4, 2024
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jan 4, 2024
@openshift-ci-robot
Copy link

@JoelSpeed: This pull request references Jira Issue OCPBUGS-26067, which is valid. The bug has been moved to the POST state.

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

Requesting review from QA contact:
/cc @wangke19

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

A recent addition upstream includes new CEL validations for IPs and CIDRs. We have a number of APIs in tech preview in 4.15 that intend to be promoted to GA in 4.16, that could benefit from these IP address validations.

Our current approach is to use regex which does not provide a good experience when an error occurs, the whole regex is spit out.

The intention here is to backport the library change, which can be dropped when rebasing to 1.30. And the also change the introduced version to 1.28 (which also means this needs backporting to 4.15), so that, we ship the library in 4.15, but only start using it in 4.16.

Upstream, they were only introduced in 1.30 which means they wouldn't be usable until 1.31.

This allows us to improve our API validation from OpenShift 4.16 onwards, instead of OpenShift 4.18 onwards.

Previously discussed with @deads2k
/assign @deads2k

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

/retest-required

Remaining retests: 0 against base HEAD 1de6a14 and 2 for PR HEAD 91f2420 in total

Copy link

openshift-ci bot commented Jan 4, 2024

@JoelSpeed: 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-aws-ovn-downgrade 14d8b28 link true /test e2e-aws-ovn-downgrade
ci/prow/e2e-aws-ovn-upgrade 14d8b28 link true /test e2e-aws-ovn-upgrade
ci/prow/e2e-aws-csi 91f2420 link false /test e2e-aws-csi

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/test-infra repository. I understand the commands that are listed here.

@JoelSpeed
Copy link
Author

/retest-required

@openshift-merge-bot openshift-merge-bot bot merged commit e74ad97 into openshift:master Jan 5, 2024
18 of 19 checks passed
@openshift-ci-robot
Copy link

@JoelSpeed: Jira Issue OCPBUGS-26067: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-26067 has been moved to the MODIFIED state.

In response to this:

A recent addition upstream includes new CEL validations for IPs and CIDRs. We have a number of APIs in tech preview in 4.15 that intend to be promoted to GA in 4.16, that could benefit from these IP address validations.

Our current approach is to use regex which does not provide a good experience when an error occurs, the whole regex is spit out.

The intention here is to backport the library change, which can be dropped when rebasing to 1.30. And the also change the introduced version to 1.28 (which also means this needs backporting to 4.15), so that, we ship the library in 4.15, but only start using it in 4.16.

Upstream, they were only introduced in 1.30 which means they wouldn't be usable until 1.31.

This allows us to improve our API validation from OpenShift 4.16 onwards, instead of OpenShift 4.18 onwards.

Previously discussed with @deads2k
/assign @deads2k

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-bot
Copy link

[ART PR BUILD NOTIFIER]

This PR has been included in build openshift-enterprise-pod-container-v4.16.0-202401051633.p0.ge74ad97.assembly.stream for distgit openshift-enterprise-pod.
All builds following this will include this PR.

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. backports/validated-commits Indicates that all commits come to merged upstream PRs. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. vendor-update Touching vendor dir or related files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants