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 1896977: Enhance host name validation in router #238

Merged

Conversation

candita
Copy link
Contributor

@candita candita commented Dec 11, 2020

Router host name validation did not properly report an issue with a DNS label over length. Update it to use a k8s apimachinery host name validation that reports the issue properly, as well as enforcing host name must have at least two labels (new), with each label less than 63 chars, and total length less than 253 chars. Trailing dots are allowed (new).

Also remove an unneeded/noisy error log in host admitter and correct/add unit tests.

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-low Referenced Bugzilla bug's severity is low 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. labels Dec 11, 2020
@openshift-ci-robot
Copy link
Contributor

@candita: This pull request references Bugzilla bug 1896977, 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.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1896977: Enhance host name validation in router

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 11, 2020
@candita candita force-pushed the BZ-1896977-HostnameValidation branch from 67bc39c to e60b47c Compare December 11, 2020 22:05
@candita
Copy link
Contributor Author

candita commented Dec 14, 2020

Companion PR in openshift/apiserver: openshift/openshift-apiserver#167

@candita candita changed the title Bug 1896977: Enhance host name validation in router Bug 1896977: [WIP] Enhance host name validation in router Dec 14, 2020
@candita candita changed the title Bug 1896977: [WIP] Enhance host name validation in router Bug 1896977: Enhance host name validation in router Dec 18, 2020
@candita
Copy link
Contributor Author

candita commented Dec 22, 2020

/hold for openshift/library-go#975

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 22, 2020
@candita
Copy link
Contributor Author

candita commented Jan 4, 2021

/hold for openshift/api#830

@candita candita force-pushed the BZ-1896977-HostnameValidation branch from e60b47c to c9955b4 Compare January 15, 2021 21:45
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 15, 2021
@candita candita force-pushed the BZ-1896977-HostnameValidation branch from c9955b4 to 2d2adc5 Compare January 16, 2021 01:00
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 16, 2021
@candita
Copy link
Contributor Author

candita commented Jan 16, 2021

/test e2e-agnostic

1 similar comment
@candita
Copy link
Contributor Author

candita commented Jan 18, 2021

/test e2e-agnostic

@candita
Copy link
Contributor Author

candita commented Jan 18, 2021

/retest

@candita
Copy link
Contributor Author

candita commented Jan 18, 2021

/test e2e-upgrade

@sgreene570
Copy link

Looks good to me.
I'll defer to Miciah for final LGTM (in case he has any final comments).

},
},
expectedErrors: true,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Might as well add a couple test cases with the annotation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be good to add a test case or two here to get coverage to make sure ValidateHostName correctly looks up the annotation and passes it to ValidateHost.

@candita candita force-pushed the BZ-1896977-HostnameValidation branch from 2d2adc5 to 7a106ec Compare January 19, 2021 20:36
@Miciah
Copy link
Contributor

Miciah commented Jan 19, 2021

Thanks!
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 19, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: candita, 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

@candita
Copy link
Contributor Author

candita commented Jan 20, 2021

/test e2e-agnostic

@candita
Copy link
Contributor Author

candita commented Jan 20, 2021

/hold cance

@candita
Copy link
Contributor Author

candita commented Jan 20, 2021

/unhold

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 20, 2021
@openshift-merge-robot openshift-merge-robot merged commit 25b1656 into openshift:master Jan 20, 2021
@openshift-ci-robot
Copy link
Contributor

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

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Bugzilla bug in order for it to move to the next state. Once unlinked, request a bug refresh with /bugzilla refresh.

Bugzilla bug 1896977 has not been moved to the MODIFIED state.

In response to this:

Bug 1896977: Enhance host name validation in router

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-low Referenced Bugzilla bug's severity is low 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

5 participants