Skip to content

Fixed invalid object names generated for long package names #4471

Merged
jmrodri merged 3 commits intooperator-framework:masterfrom
jmrodri:issue4470
Feb 4, 2021
Merged

Fixed invalid object names generated for long package names #4471
jmrodri merged 3 commits intooperator-framework:masterfrom
jmrodri:issue4470

Conversation

@jmrodri
Copy link
Copy Markdown
Member

@jmrodri jmrodri commented Feb 3, 2021

  • TrimDNS1123Label would trim strings but end up creating invalid DNS1123
    strings.
  • FormatOperatorNameDNS1123 would return strings that were invalid if
    they begin or end with non-alphanumeric or hyphens.

Fixes #4470

Signed-off-by: jesus m. rodriguez jmrodri@gmail.com

Checklist

If the pull request includes user-facing changes, extra documentation is required:

Comment thread internal/util/k8sutil/k8sutil.go
@jmrodri jmrodri force-pushed the issue4470 branch 2 times, most recently from eef1a41 to 16149a3 Compare February 3, 2021 16:53
Comment thread internal/util/k8sutil/k8sutil.go
Comment thread internal/util/k8sutil/k8sutil.go Outdated
Comment thread internal/util/k8sutil/k8sutil.go
Comment thread internal/util/k8sutil/k8sutil.go Outdated
Copy link
Copy Markdown
Member

@estroz estroz 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-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 3, 2021
@jberkhahn
Copy link
Copy Markdown
Contributor

ok
/lgtm

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 3, 2021
Comment thread changelog/fragments/fix-trim-format-dns1123-functions.yaml Outdated
* TrimDNS1123Label would trim strings but end up creating invalid DNS1123
strings.
* FormatOperatorNameDNS1123 would return strings that were invalid if
  they begin or end with non-alphanumeric or hyphens.

Fixes operator-framework#4470

Signed-off-by: jesus m. rodriguez <jmrodri@gmail.com>
Signed-off-by: jesus m. rodriguez <jmrodri@gmail.com>
Signed-off-by: jesus m. rodriguez <jmrodri@gmail.com>
@jmrodri
Copy link
Copy Markdown
Member Author

jmrodri commented Feb 4, 2021

@estroz updated it and rebased things around.

@jmrodri jmrodri changed the title Fix Trim and Format DNS1123 functions to return valid values Fixed invalid object names generated for long package names Feb 4, 2021
Copy link
Copy Markdown
Member

@estroz estroz 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-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 4, 2021
@jmrodri jmrodri merged commit 67358fb into operator-framework:master Feb 4, 2021
@jmrodri
Copy link
Copy Markdown
Member Author

jmrodri commented Feb 4, 2021

/cherry-pick v1.3.x

@openshift-cherrypick-robot
Copy link
Copy Markdown

@jmrodri: new pull request created: #4476

Details

In response to this:

/cherry-pick v1.3.x

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.

reinvantveer pushed a commit to reinvantveer/operator-sdk that referenced this pull request Feb 4, 2021
…-framework#4471)

* Fixed invalid object names generated for long package names

* TrimDNS1123Label would trim strings but end up creating invalid DNS1123
strings.
* FormatOperatorNameDNS1123 would return strings that were invalid if
  they begin or end with non-alphanumeric or hyphens.

* Handle capitals and use more efficient trim mechanism

* React to new expectation.

Fixes operator-framework#4470

Signed-off-by: jesus m. rodriguez <jmrodri@gmail.com>
Signed-off-by: Rein van 't Veer <reinvantveer@gmail.com>
reinvantveer pushed a commit to reinvantveer/operator-sdk that referenced this pull request Feb 4, 2021
…-framework#4471)

* Fixed invalid object names generated for long package names

* TrimDNS1123Label would trim strings but end up creating invalid DNS1123
strings.
* FormatOperatorNameDNS1123 would return strings that were invalid if
  they begin or end with non-alphanumeric or hyphens.

* Handle capitals and use more efficient trim mechanism

* React to new expectation.

Fixes operator-framework#4470

Signed-off-by: jesus m. rodriguez <jmrodri@gmail.com>
Signed-off-by: Rein van 't Veer <reinvantveer@gmail.com>
reinvantveer pushed a commit to reinvantveer/operator-sdk that referenced this pull request Feb 5, 2021
…-framework#4471)

* Fixed invalid object names generated for long package names

* TrimDNS1123Label would trim strings but end up creating invalid DNS1123
strings.
* FormatOperatorNameDNS1123 would return strings that were invalid if
  they begin or end with non-alphanumeric or hyphens.

* Handle capitals and use more efficient trim mechanism

* React to new expectation.

Fixes operator-framework#4470

Signed-off-by: jesus m. rodriguez <jmrodri@gmail.com>
Signed-off-by: Rein van 't Veer <reinvantveer@gmail.com>
reinvantveer pushed a commit to reinvantveer/operator-sdk that referenced this pull request Feb 5, 2021
…-framework#4471)

* Fixed invalid object names generated for long package names

* TrimDNS1123Label would trim strings but end up creating invalid DNS1123
strings.
* FormatOperatorNameDNS1123 would return strings that were invalid if
  they begin or end with non-alphanumeric or hyphens.

* Handle capitals and use more efficient trim mechanism

* React to new expectation.

Fixes operator-framework#4470

Signed-off-by: jesus m. rodriguez <jmrodri@gmail.com>
Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
reinvantveer pushed a commit to reinvantveer/operator-sdk that referenced this pull request Feb 5, 2021
…-framework#4471)

* Fixed invalid object names generated for long package names

* TrimDNS1123Label would trim strings but end up creating invalid DNS1123
strings.
* FormatOperatorNameDNS1123 would return strings that were invalid if
  they begin or end with non-alphanumeric or hyphens.

* Handle capitals and use more efficient trim mechanism

* React to new expectation.

Fixes operator-framework#4470

Signed-off-by: jesus m. rodriguez <jmrodri@gmail.com>
Signed-off-by: Rein van 't Veer <reinvantveer@gmail.com>
Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
@jmrodri jmrodri deleted the issue4470 branch January 30, 2022 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

k8sutil.TrimDNS1123Label creates invalid values

5 participants