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

Add optional spec.replaces field to CSV for update graph compliance #572

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

compi-migui
Copy link
Contributor

The way we generate our CSVs uses OLM's skipRange functionality. This is fine, but using only this leads to older versions becoming unavailable after the fact -- see the warning at [1].

By adding an optional spec.replaces to our CSV we allow update testing as well as actual production updates for downstream builds that leverage it.

Populating the field requires knowledge of the latest-released bundle, so we take it from an environment variable to be provided by the builder. If this is unset we don't include the spec.replaces field at all -- leaving previous behavior unchanged.

Resolves #559
Related: STF-1658

[1] https://olm.operatorframework.io/docs/concepts/olm-architecture/operator-catalog/creating-an-update-graph/#skiprange

(cherry picked from commit 99221fb)

The way we generate our CSVs uses OLM's skipRange functionality. This is fine,
but using only this leads to older versions becoming unavailable after the
fact -- see the warning at [1].

By adding an optional spec.replaces to our CSV we allow update testing as
well as actual production updates for downstream builds that leverage it.

Populating the field requires knowledge of the latest-released bundle,
so we take it from an environment variable to be provided by the
builder. If this is unset we don't include the spec.replaces field at
all -- leaving previous behavior unchanged.

Resolves #559
Related: STF-1658

[1] https://olm.operatorframework.io/docs/concepts/olm-architecture/operator-catalog/creating-an-update-graph/#skiprange

(cherry picked from commit 99221fb)
@compi-migui
Copy link
Contributor Author

Cherry-pick from the master branch #560 to ensure we pick this up before any other upcoming changes.

@elfiesmelfie
Copy link
Collaborator

elfiesmelfie commented Feb 1, 2024

Since the branch names match, jenkins will build this change and the sgo change. I've started a build

Copy link
Collaborator

@csibbitt csibbitt left a comment

Choose a reason for hiding this comment

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

Same suggestions as infrawatch/smart-gateway-operator#157 (review) but I see these are both cherry-picks, so that comment belonged on the review that brought these to master. Feel free to ignore for now.

@compi-migui
Copy link
Contributor Author

Same suggestions as infrawatch/smart-gateway-operator#157 (review) but I see these are both cherry-picks, so that comment belonged on the review that brought these to master. Feel free to ignore for now.

Addressed in that other review, see infrawatch/smart-gateway-operator#157 (comment)

I agree completely but operator-sdk forces our hand unless we rework bundle generation in a major way.

@elfiesmelfie elfiesmelfie merged commit 4ffd1ab into stable-1.5 Feb 7, 2024
10 checks passed
@elfiesmelfie elfiesmelfie deleted the migarcia-spec-replaces-cp branch February 7, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants