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

Enforce label name limits in resource names #840

Merged

Conversation

shahulsonhal
Copy link
Member

@shahulsonhal shahulsonhal commented Jul 22, 2021

Changes

We got user feedback that build and buildrun names can be specified lead to controller error.
This is caused by the fact that the names used in the label they are strict in their length.

Add validation to enforce specific length for build and buildrun names.

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

Added validation to make sure that Build and BuildRun names follow the required character limits

We got user feedback that build and buildrun names can be specified lead to controller error.
This is caused by the fact that the names used in the label they are strict in their length.

Add validation to enforce specific length for build and buildrun names.
@openshift-ci openshift-ci bot added the release-note Label for when a PR has specified a release note label Jul 22, 2021
@HeavyWombat HeavyWombat added the kind/bug Categorizes issue or PR as related to a bug. label Jul 22, 2021
Copy link
Contributor

@HeavyWombat HeavyWombat left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Could you have a quick look into fixing the one TYPO. After fixing this, please click the re-request review icon.

pkg/apis/build/v1alpha1/build_types.go Outdated Show resolved Hide resolved
pkg/validate/buildname.go Outdated Show resolved Hide resolved
test/integration/build_to_buildruns_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@HeavyWombat HeavyWombat left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2021
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 left a comment

Choose a reason for hiding this comment

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

Nice. Please update the documentation. See the individual comments.

pkg/apis/build/v1alpha1/build_types.go Show resolved Hide resolved
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 26, 2021
Copy link
Member

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

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

openshift-ci bot commented Jul 26, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SaschaSchwarze0

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 Jul 26, 2021
@openshift-merge-robot openshift-merge-robot merged commit 3134504 into shipwright-io:main Jul 26, 2021
@SaschaSchwarze0 SaschaSchwarze0 mentioned this pull request Oct 6, 2021
4 tasks
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. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Label for when a PR has specified a release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants