Skip to content

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

Closed
camilamacedo86 wants to merge 1 commit into
operator-framework:mainfrom
camilamacedo86:fix-pollIntervalMinutes
Closed

🐛 Fix follow-up for bumping catalogd to v0.36.0: Replace pollInterval for pollIntervalMinutes#1442
camilamacedo86 wants to merge 1 commit into
operator-framework:mainfrom
camilamacedo86:fix-pollIntervalMinutes

Conversation

@camilamacedo86

@camilamacedo86camilamacedo86 commented Nov 11, 2024

Copy link
Copy Markdown
Contributor

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 ownerNovember 11, 2024 11:38
@netlify

netlifyBot commented Nov 11, 2024

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commit01c0f0b
🔍 Latest deploy loghttps://app.netlify.com/sites/olmv1/deploys/67325841b0dfa3000807af74
😎 Deploy Previewhttps://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
camilamacedo86force-pushed the fix-pollIntervalMinutes branch 2 times, most recently from d30bc8b to 69c5a0fCompareNovember 11, 2024 11:50
@codecov

codecovBot commented Nov 11, 2024

Copy link
Copy Markdown

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 
FlagCoverage Δ
e2e52.05% <ø> (ø)
unit57.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
Copy Markdown
Member

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

@m1kolam1kola left a comment

Copy link
Copy Markdown
Member

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 #1443.

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

Comment threaddocs/tutorials/add-catalog.md Outdated
@camilamacedo86camilamacedo86 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 pollIntervalMinutesNov 11, 2024
Comment threaddocs/tutorials/add-catalog.md Outdated
Comment threadconfig/samples/catalogd_operatorcatalog.yaml Outdated
Comment threaddocs/tutorials/add-catalog.md Outdated
@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

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

Closing in favor of mainly: #1445
AND #1443

Sign up for freeto 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

@camilamacedo86@m1kola@trgeiger