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

📖 Docs for version range support #544

Conversation

michaelryanpeter
Copy link
Contributor

@michaelryanpeter michaelryanpeter commented Nov 16, 2023

Description

Add docs about version range support. Create a drafts docs folder. This folder is for docs that are drafts to iterate on and not published as part of the customer-facing docs.

Closes #407.

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Add docs explaining version range.

Signed-off-by: Michael Ryan Peter <mipeter@redhat.com>
@michaelryanpeter michaelryanpeter requested a review from a team as a code owner November 16, 2023 20:16
@michaelryanpeter michaelryanpeter changed the title 📖 Issue #407: Docs for version range support WIP: 📖 Docs for version range support Nov 16, 2023
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 16, 2023
@michaelryanpeter michaelryanpeter changed the title WIP: 📖 Docs for version range support [WIP] 📖 Docs for version range support Nov 16, 2023
@michaelryanpeter michaelryanpeter changed the title [WIP] 📖 Docs for version range support [WIP] Docs for version range support Nov 16, 2023
@michaelryanpeter michaelryanpeter changed the title [WIP] Docs for version range support WIP: 📖 Docs for version range support Nov 16, 2023
@michaelryanpeter michaelryanpeter changed the title WIP: 📖 Docs for version range support WIP: 📖 Docs for version range support Nov 16, 2023
@michaelryanpeter michaelryanpeter changed the title WIP: 📖 Docs for version range support 📖 Docs for version range support Nov 16, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 16, 2023
@michaelryanpeter michaelryanpeter changed the title 📖 Docs for version range support 📖 WIP Docs for version range support Nov 16, 2023
@michaelryanpeter michaelryanpeter changed the title 📖 WIP Docs for version range support WIP: 📖 Docs for version range support Nov 16, 2023
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 16, 2023
Comment on lines 17 to 19
Specifying a channel
: Installs or updates the latest version of the Operator in the channel.
Updates are applied automatically when they are published to the specified channel.
Copy link
Member

Choose a reason for hiding this comment

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

I would expect this doc to be purely about spec.version, so I'd suggest striking this.

In a higher-level doc, I'd expect something that talks about the various spec fields and their interactions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

The following list describes how OLM resolves an Operator's target version, and the resulting actions:

Not specifying a version in the CR
: Installs or updates the latest version of the Operator.
Copy link
Member

Choose a reason for hiding this comment

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

latest

Technically, it's the latest version that satisfies resolution. I think it's important to call that out pretty clearly somewhere, and possibly explain with an example.

For example:

In the catalog:

  • packageA v1.0.0 exists and depends on packageB v1.2.0
  • packageB v1.2.0 exists
  • packageB v1.2.1 exists

On the cluster:

  • Operator for packageA says spec.version: 1.0.0
  • Operator for packageB says spec.version: 1.2.x

The version that will ultimately be chosen for packageB is 1.2.0 even though 1.2.1 is available, because that's what packageA requires.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the moment, I linked to Deppy's README to explain resolution. WDYT of creating a follow up issue to port the OCP docs about dependency resolution upstream?

| `<` | less than |
| `>=` | greater than or equal to |
| `<=` | less than or equal to |

Copy link
Contributor Author

@michaelryanpeter michaelryanpeter Nov 20, 2023

Choose a reason for hiding this comment

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

I created #550 to add docs on working with pre-releases

- Remove references to the Mastermind SemVer docs
- Define operators and comparisons
- Address review feedback

Signed-off-by: Michael Ryan Peter <mipeter@redhat.com>

You define a version range in an Operator's custom resource (CR) file.

## Specifying a version range in the CR
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the other sections on the spec.version field. They didn't make sense with the expanded content, and I think it will take a bit more work to incorporate the content into one doc on the spec.version field. I created a follow up issue here: #551

@@ -0,0 +1,93 @@
# Operator version ranges
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created a follow up issue to add example CRs to the doc: #552

@michaelryanpeter michaelryanpeter changed the title WIP: 📖 Docs for version range support 📖 Docs for version range support Nov 20, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 20, 2023
Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

This doc looks great to me! I noticed one small thing:


| Operator | Definition |
|----------|-----------------------------------|
| `=` | equal (not aliased to an operator |
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing a closing parenthesis

Suggested change
| `=` | equal (not aliased to an operator |
| `=` | equal (not aliased to an operator) |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 164bb28


#### Range comparisons

OLM 1.0 does not support hypen range comparisons.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
OLM 1.0 does not support hypen range comparisons.
OLM 1.0 does not support hyphen range comparisons.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to mention hyphen ranges at all? If we're not mentioning Masterminds, should we?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 164bb28

- Close parenthesis on line 11
- Remove mention of hyphen range comparisons

Signed-off-by: Michael Ryan Peter <mipeter@redhat.com>
Copy link

codecov bot commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6cb56f7) 78.59% compared to head (164bb28) 83.72%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #544      +/-   ##
==========================================
+ Coverage   78.59%   83.72%   +5.13%     
==========================================
  Files          18       20       +2     
  Lines         766      811      +45     
==========================================
+ Hits          602      679      +77     
+ Misses        131       91      -40     
- Partials       33       41       +8     
Flag Coverage Δ
e2e 63.62% <ø> (?)
unit 78.54% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@m1kola m1kola added this pull request to the merge queue Nov 28, 2023
Merged via the queue into operator-framework:main with commit 1f84177 Nov 28, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation for support of version ranges
5 participants