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 2116686, Bug OCPBUGS-1493: Initial implementation of validation webhooks #76

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

Fedosin
Copy link
Contributor

@Fedosin Fedosin commented Sep 21, 2022

This PR starts the implementation of the validation webhooks for CAPI objects.
In particular, it validates that Cluster object infrastructure reference has correct value.

@openshift-ci openshift-ci bot added bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Sep 21, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 21, 2022

@Fedosin: This pull request references Bugzilla bug 2116686, which is invalid:

  • expected the bug to target the "4.12.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 2116686: Initial implementation of validation webhooks

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.

@Fedosin
Copy link
Contributor Author

Fedosin commented Sep 21, 2022

/bugzilla refresh

@openshift-ci openshift-ci bot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Sep 21, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 21, 2022

@Fedosin: This pull request references Bugzilla bug 2116686, 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.12.0) matches configured target release for branch (4.12.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 @sunzhaohua2

In response to this:

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

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

i couldn't tell if the test failures are related to this pr, it didn't look like it, but this generally makes sense to me.
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 21, 2022
Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

I'd like to see some tests added for this before we merge. Please take a look at the CPMS webhook test for some inspiration on how we might do this.

It would also be good to set up some linting here, again, similar to CPMS

pkg/webhook/cluster.go Outdated Show resolved Hide resolved
pkg/webhook/cluster.go Outdated Show resolved Hide resolved
pkg/webhook/coreprovider.go Outdated Show resolved Hide resolved
pkg/webhook/infraprovider.go Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 28, 2022
pkg/webhook/coreprovider.go Outdated Show resolved Hide resolved
pkg/webhook/infraprovider.go Outdated Show resolved Hide resolved
pkg/webhook/infraprovider.go Outdated Show resolved Hide resolved
Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 30, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 30, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed

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 Sep 30, 2022
@Fedosin
Copy link
Contributor Author

Fedosin commented Sep 30, 2022

/hold

@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 Sep 30, 2022
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 3, 2022
This patch begins implementing of validation webhooks for CAPI objects.
In particular, it validates that Cluster object infrastructure reference
has correct value.
@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Oct 5, 2022
@openshift-ci-robot
Copy link

@Fedosin: This pull request references Jira Issue OCPBUGS-1493, which is invalid:

  • expected the bug to target the "4.12.0" version, but it targets "4.11.z" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

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

Retaining the bugzilla/valid-bug label as it was manually added.

In response to this:

This PR starts the implementation of the validation webhooks for CAPI objects.
In particular, it validates that Cluster object infrastructure reference has correct value.

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 removed the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Oct 5, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 5, 2022

@Fedosin: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

Bug 2116686, Bug OCPBUGS-1493: Initial implementation of validation webhooks

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.

@JoelSpeed
Copy link
Contributor

/lgtm
/retest-required

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 6, 2022
@Fedosin
Copy link
Contributor Author

Fedosin commented Oct 6, 2022

/retest

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 2f8fea6 and 2 for PR HEAD d2052ac in total

@JoelSpeed
Copy link
Contributor

/retest-required

2 similar comments
@Fedosin
Copy link
Contributor Author

Fedosin commented Oct 8, 2022

/retest-required

@JoelSpeed
Copy link
Contributor

/retest-required

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD b96aea1 and 1 for PR HEAD d2052ac in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD bfc33f9 and 0 for PR HEAD d2052ac in total

@openshift-ci-robot
Copy link

/hold

Revision d2052ac was retested 3 times: holding

@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 Oct 11, 2022
@JoelSpeed
Copy link
Contributor

/hold cancel
/retest-required

@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 Oct 11, 2022
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD e04713c and 2 for PR HEAD d2052ac in total

@JoelSpeed
Copy link
Contributor

/retest-required

1 similar comment
@Fedosin
Copy link
Contributor Author

Fedosin commented Oct 16, 2022

/retest-required

@JoelSpeed
Copy link
Contributor

/hold this is legitimately broken

The test suite downloads the latest version of the CLI instead of building from the source vendored into the project, this causes an issue because when new flags are added, the CLI sends new options to the library which then errors out.

We need to make sure the CLI and library version are consistent.

@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 Oct 17, 2022
@Fedosin
Copy link
Contributor Author

Fedosin commented Oct 17, 2022

@JoelSpeed I proposed a fix for CI: #80

@JoelSpeed
Copy link
Contributor

/hold cancel
/test all

@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 Oct 18, 2022
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 717c07c and 1 for PR HEAD d2052ac in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 18, 2022

@Fedosin: all tests passed!

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.

@openshift-merge-robot openshift-merge-robot merged commit 915cee7 into openshift:main Oct 18, 2022
@openshift-ci-robot
Copy link

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

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

In response to this:

This PR starts the implementation of the validation webhooks for CAPI objects.
In particular, it validates that Cluster object infrastructure reference has correct value.

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. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira 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.

5 participants