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

Version Ranges: Update CRD Regex #345

Closed
tmshort opened this issue Aug 21, 2023 · 0 comments · Fixed by #374
Closed

Version Ranges: Update CRD Regex #345

tmshort opened this issue Aug 21, 2023 · 0 comments · Fixed by #374
Assignees
Milestone

Comments

@tmshort
Copy link
Contributor

tmshort commented Aug 21, 2023

Summary

The regular expression contained in the CRD that clients use to validate input before sending to the server must be updated to support version ranges. Due to the complexity and imprecision of the hyphen (-) operator, it will not be included.

  • Update the regex to support the Masterminds/semver syntax (except for hyphen ranges).
  • Add unit tests to validate ranges, both positive and negative. This must use a client program (e.g. oc or kubectl).

Reference

RFC: OLMv1 Version Ranges

Update the Operator CR to support version ranges. There are no direct API changes.

Related GitHub Issues

See dependencies.

Dependencies

#344
#346 may remove the regex

Updates and Amendments

None.

@awgreene awgreene modified the milestones: v0.4.0, v0.5.0 Aug 22, 2023
@tmshort tmshort self-assigned this Aug 25, 2023
tmshort added a commit to tmshort/operator-controller that referenced this issue Aug 25, 2023
Fixes operator-framework#345

Add positive and negative test cases.

Signed-off-by: Todd Short <tshort@redhat.com>
tmshort added a commit to tmshort/operator-controller that referenced this issue Aug 25, 2023
Fixes operator-framework#345

Add positive and negative test cases.

Signed-off-by: Todd Short <tshort@redhat.com>
tmshort added a commit to tmshort/operator-controller that referenced this issue Aug 25, 2023
Fixes operator-framework#345

Add positive and negative test cases.

Signed-off-by: Todd Short <tshort@redhat.com>
tmshort added a commit to tmshort/operator-controller that referenced this issue Aug 28, 2023
Fixes operator-framework#345

Add positive and negative test cases.

Signed-off-by: Todd Short <tshort@redhat.com>
tmshort added a commit to tmshort/operator-controller that referenced this issue Aug 28, 2023
Fixes operator-framework#345

Add positive and negative test cases.

Signed-off-by: Todd Short <tshort@redhat.com>
tmshort added a commit to tmshort/operator-controller that referenced this issue Aug 31, 2023
Fixes operator-framework#345

Add positive and negative test cases.

Signed-off-by: Todd Short <tshort@redhat.com>
tmshort added a commit to tmshort/operator-controller that referenced this issue Aug 31, 2023
Fixes operator-framework#345

Add positive and negative test cases.

Signed-off-by: Todd Short <tshort@redhat.com>
github-merge-queue bot pushed a commit that referenced this issue Aug 31, 2023
* Update Version regex to support ranges

Fixes #345

Add positive and negative test cases.

Signed-off-by: Todd Short <tshort@redhat.com>

* Introduce Masterminds/semver

Fixes #346

Add support for Masterminds/semver for .spec.Version
This is a bit more entangled into the code than I expected,
most instances of bsemver were replaced.

Signed-off-by: Todd Short <tshort@redhat.com>

* fixup! Introduce Masterminds/semver

Signed-off-by: Todd Short <tshort@redhat.com>

---------

Signed-off-by: Todd Short <tshort@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants