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

✨ relax workspace object name validation #2341

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

mjudeikis
Copy link
Contributor

@mjudeikis mjudeikis commented Nov 10, 2022

Summary

Relaxes workspce object name validation accross the board to be able to start with digit. This allows use of GUID libaries to generate names. In addition this brings us closer to k8s upstream and RFC 1123. But now (not until workspaces are flatened) we are not abel fully re-use k8s validation

Related issue(s)

Fixes #

@openshift-ci openshift-ci bot added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Nov 10, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 10, 2022

Hi @mjudeikis. Thanks for your PR.

I'm waiting for a kcp-dev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 10, 2022
@ncdc
Copy link
Member

ncdc commented Nov 10, 2022

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 10, 2022
@mjudeikis mjudeikis changed the title ✨ relax object name validation ✨ relax workspace object name validation Nov 11, 2022
@mjudeikis
Copy link
Contributor Author

ping @ncdc

// reClusterName is a regular expression for cluster names. It is based on
// modified RFC 1123. It allows for 63 characters for single name and includes
// KCP specific ':' separator for workspace nesting. We are not re-using k8s
// validation regex because it purpose is for single name validation
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// validation regex because it purpose is for single name validation
// validation regex because its purpose is for single name validation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🙈 ⌨️ 💣

@ncdc
Copy link
Member

ncdc commented Nov 14, 2022

Just 1 typo in a comment

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

openshift-ci bot commented Nov 15, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncdc

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 Nov 15, 2022
@mjudeikis
Copy link
Contributor Author

/test e2e-sharded

@openshift-merge-robot openshift-merge-robot merged commit 22067d4 into kcp-dev:main Nov 15, 2022
@mjudeikis
Copy link
Contributor Author

bye bye:

for {
	user.Name = uuid.New().String()
	// HACK: we can't start with digit for now. This will change in the future
	if !unicode.IsDigit(rune(user.Name[0])) {
	    break
	}
}

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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants