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

🐛 Fix follow-up for bumping catalogd to v0.36.0: Replace pollInterval for pollIntervalMinutes #1442

Conversation

camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Nov 11, 2024

In #1434, the API was updated to use pollIntervalMinutes instead of pollInterval. This commit ensures all references are properly updated.

See: https://github.com/operator-framework/operator-controller/pull/1434/files#diff-93b46b0715181c9cf397eed60862261b7839ff721599fcc393a393b9edea610bR57

Example of issue:

If we follow up the docs before this change:

$ kubectl apply -f - <<EOF
> apiVersion: olm.operatorframework.io/v1alpha1
> kind: ClusterCatalog
> metadata:
>   name: operatorhubio
> spec:
>   source:
>     type: Image
>     image:
>       ref: quay.io/operatorhubio/catalog:latest
>       pollInterval: 10m
> EOF
The request is invalid: patch: Invalid value: "{\"apiVersion\":\"olm.operatorframework.io/v1alpha1\",\"kind\":\"ClusterCatalog\",\"metadata\":{\"annotations\":{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"olm.operatorframework.io/v1alpha1\\\",\\\"kind\\\":\\\"ClusterCatalog\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"operatorhubio\\\"},\\\"spec\\\":{\\\"source\\\":{\\\"image\\\":{\\\"pollInterval\\\":\\\"10m\\\",\\\"ref\\\":\\\"quay.io/operatorhubio/catalog:latest\\\"},\\\"type\\\":\\\"Image\\\"}}}\\n\"},\"creationTimestamp\":\"2024-11-11T11:21:43Z\",\"finalizers\":[\"olm.operatorframework.io/delete-server-cache\"],\"generation\":1,\"labels\":{\"olm.operatorframework.io/metadata.name\":\"operatorhubio\"},\"managedFields\":[{\"apiVersion\":\"olm.operatorframework.io/v1alpha1\",\"fieldsType\":\"FieldsV1\",\"fieldsV1\":{\"f:metadata\":{\"f:annotations\":{\".\":{},\"f:kubectl.kubernetes.io/last-applied-configuration\":{}}},\"f:spec\":{\".\":{},\"f:availabilityMode\":{},\"f:priority\":{},\"f:source\":{\".\":{},\"f:image\":{\".\":{},\"f:pollIntervalMinutes\":{},\"f:ref\":{}},\"f:type\":{}}}},\"manager\":\"kubectl-client-side-apply\",\"operation\":\"Update\",\"time\":\"2024-11-11T11:21:43Z\"},{\"apiVersion\":\"olm.operatorframework.io/v1alpha1\",\"fieldsType\":\"FieldsV1\",\"fieldsV1\":{\"f:metadata\":{\"f:finalizers\":{\".\":{},\"v:\\\"olm.operatorframework.io/delete-server-cache\\\"\":{}}}},\"manager\":\"manager\",\"operation\":\"Update\",\"time\":\"2024-11-11T11:21:43Z\"},{\"apiVersion\":\"olm.operatorframework.io/v1alpha1\",\"fieldsType\":\"FieldsV1\",\"fieldsV1\":{\"f:status\":{\".\":{},\"f:conditions\":{\".\":{},\"k:{\\\"type\\\":\\\"Progressing\\\"}\":{\".\":{},\"f:lastTransitionTime\":{},\"f:message\":{},\"f:observedGeneration\":{},\"f:reason\":{},\"f:status\":{},\"f:type\":{}},\"k:{\\\"type\\\":\\\"Serving\\\"}\":{\".\":{},\"f:lastTransitionTime\":{},\"f:message\":{},\"f:observedGeneration\":{},\"f:reason\":{},\"f:status\":{},\"f:type\":{}}},\"f:lastUnpacked\":{},\"f:resolvedSource\":{\".\":{},\"f:image\":{\".\":{},\"f:ref\":{}},\"f:type\":{}},\"f:urls\":{\".\":{},\"f:base\":{}}}},\"manager\":\"manager\",\"operation\":\"Update\",\"subresource\":\"status\",\"time\":\"2024-11-11T11:22:01Z\"}],\"name\":\"operatorhubio\",\"resourceVersion\":\"1186\",\"uid\":\"9f0625a0-3125-4d9f-aa4e-555ece23f264\"},\"spec\":{\"availabilityMode\":\"Available\",\"priority\":0,\"source\":{\"image\":{\"pollInterval\":\"10m\",\"ref\":\"quay.io/operatorhubio/catalog:latest\"},\"type\":\"Image\"}},\"status\":{\"conditions\":[{\"lastTransitionTime\":\"2024-11-11T11:22:01Z\",\"message\":\"Successfully unpacked and stored content from resolved source\",\"observedGeneration\":1,\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"Progressing\"},{\"lastTransitionTime\":\"2024-11-11T11:22:01Z\",\"message\":\"Serving desired content from resolved source\",\"observedGeneration\":1,\"reason\":\"Available\",\"status\":\"True\",\"type\":\"Serving\"}],\"lastUnpacked\":\"2024-11-11T11:22:01Z\",\"resolvedSource\":{\"image\":{\"ref\":\"quay.io/operatorhubio/catalog@sha256:025cb23665449d8974102dda042c2e25bd3cb9138791971748f48d57c90a21d8\"},\"type\":\"Image\"},\"urls\":{\"base\":\"https://catalogd-service.olmv1-system.svc/catalogs/operatorhubio\"}}}": strict decoding error: unknown field "spec.source.image.pollInterval"
```

With the fix

```
 $ kubectl apply -f - <<EOF
> apiVersion: olm.operatorframework.io/v1alpha1
> kind: ClusterCatalog
> metadata:
>   name: operatorhubio
> spec:
>   source:
>     type: Image
>     image:
>       ref: quay.io/operatorhubio/catalog:latest
>       pollIntervalMinutes: 10
> EOF
clustercatalog.olm.operatorframework.io/operatorhubio unchanged
```

@camilamacedo86 camilamacedo86 requested a review from a team as a code owner November 11, 2024 11:38
Copy link

netlify bot commented Nov 11, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 01c0f0b
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/67325841b0dfa3000807af74
😎 Deploy Preview https://deploy-preview-1442--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@camilamacedo86 camilamacedo86 force-pushed the fix-pollIntervalMinutes branch 2 times, most recently from d30bc8b to 69c5a0f Compare November 11, 2024 11:50
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.91%. Comparing base (aaa0e00) to head (01c0f0b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1442      +/-   ##
==========================================
+ Coverage   74.88%   74.91%   +0.03%     
==========================================
  Files          42       42              
  Lines        3241     3241              
==========================================
+ Hits         2427     2428       +1     
+ Misses        643      642       -1     
  Partials      171      171              
Flag Coverage Δ
e2e 52.05% <ø> (ø)
unit 57.20% <ø> (+0.03%) ⬆️

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
Copy link
Member

m1kola commented Nov 11, 2024

We need to fix a lot more issues in our examples and docs. I'm working on it here: #1443

Copy link
Member

@m1kola m1kola left a comment

Choose a reason for hiding this comment

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

@camilamacedo86 could you please do the following?

  1. Update hack/test/pre-upgrade-setup.sh to have pollIntervalMinutes: 1440.
  2. Revert changes from doc. We will address this stuff in 📖 Fix docs: "Getting Started" and "Tutorials" #1443.

After that - we can merge your PR and cut a new release. This should fix upgrade-e2e

docs/tutorials/add-catalog.md Outdated Show resolved Hide resolved
@camilamacedo86 camilamacedo86 force-pushed the fix-pollIntervalMinutes branch from 69c5a0f to d2acae2 Compare November 11, 2024 16:00
@camilamacedo86 camilamacedo86 force-pushed the fix-pollIntervalMinutes branch from d2acae2 to ff65eb8 Compare November 11, 2024 16:02
@camilamacedo86 camilamacedo86 changed the title 🐛 Fix follow-up for bumping catalogd to v0.36.0: Update pollInterval to pollIntervalMinutes in ClusterCatalog spec 🐛 Fix follow-up for bumping catalogd to v0.36.0: Replace pollInterval for pollIntervalMinutes Nov 11, 2024
docs/tutorials/add-catalog.md Outdated Show resolved Hide resolved
@camilamacedo86 camilamacedo86 force-pushed the fix-pollIntervalMinutes branch from ff65eb8 to 9fc3f7b Compare November 11, 2024 16:10
@camilamacedo86

This comment was marked as resolved.

…ith pollIntervalMinutes in ClusterCatalog spec and update documentation references

In operator-framework#1434, the API was updated to use pollIntervalMinutes instead of pollInterval.
This commit ensures that all references to pollInterval are correctly replaced with pollIntervalMinutes across the ClusterCatalog spec and relevant documentation.

See: https://github.com/operator-framework/operator-controller/pull/1434/files#diff-93b46b0715181c9cf397eed60862261b7839ff721599fcc393a393b9edea610bR57
@camilamacedo86 camilamacedo86 force-pushed the fix-pollIntervalMinutes branch from 1ce3876 to 01c0f0b Compare November 11, 2024 19:17
@camilamacedo86
Copy link
Contributor Author

Hi @m1kola

I will leave this one open
until you merge the #1443
Your PR probably will get all addressed, so all fine and I close this one 👍

c/c @tylerslaton ^

@camilamacedo86
Copy link
Contributor Author

Closing in favor of mainly: #1445
AND #1443

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.

3 participants