Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.

⚠️ change catalog-specific URL from full path to API endpoint ref#429

Merged
joelanford merged 4 commits into
operator-framework:mainfrom
grokspawn:urltype-change
Oct 18, 2024
Merged

⚠️ change catalog-specific URL from full path to API endpoint ref#429
joelanford merged 4 commits into
operator-framework:mainfrom
grokspawn:urltype-change

Conversation

@grokspawn

@grokspawn grokspawn commented Oct 10, 2024

Copy link
Copy Markdown
Contributor

change catalog-specific URL from full path to API endpoint ref

solves #427 and implements phase 1 of the CatalogD expandable interface.

This phase just moves from status.contentURL to status.urls.base, and will be used to provide reference to the catalog-specific API instead of the full path to JSONLines-formatted content, plus tests and documentation.

Signed-off-by: Jordan Keister jordan@nimblewidget.com

@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 Oct 10, 2024
@codecov

codecov Bot commented Oct 10, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 58.33333% with 15 lines in your changes missing coverage. Please review.

Project coverage is 37.83%. Comparing base (d320249) to head (28e5fbb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
api/core/v1alpha1/zz_generated.deepcopy.go 0.00% 14 Missing ⚠️
cmd/manager/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #429      +/-   ##
==========================================
- Coverage   38.36%   37.83%   -0.54%     
==========================================
  Files          15       15              
  Lines         941     1208     +267     
==========================================
+ Hits          361      457      +96     
- Misses        530      701     +171     
  Partials       50       50              

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

@grokspawn

Copy link
Copy Markdown
Contributor Author

e2e/upgrade-e2e will not work right because this is a breaking API change and the test pulls the latest release tag. Until this PR merges and we release a new tag, this test will not pass.

@grokspawn grokspawn force-pushed the urltype-change branch 2 times, most recently from eebf82e to 5ee9eaa Compare October 10, 2024 21:38
@grokspawn grokspawn marked this pull request as ready for review October 10, 2024 21:42
@grokspawn grokspawn requested a review from a team as a code owner October 10, 2024 21:42
@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 Oct 10, 2024
@grokspawn grokspawn changed the title ⚠️ change catalog-specific URL from full path to API endpoint ref WIP: ⚠️ change catalog-specific URL from full path to API endpoint ref Oct 10, 2024
@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 Oct 10, 2024
@grokspawn

Copy link
Copy Markdown
Contributor Author

Setting this WIP until after the RFC completes review, but it's ready for eyeballs so I don't think it belongs in a draft state.

@grokspawn grokspawn force-pushed the urltype-change branch 2 times, most recently from fcd19bb to 3686929 Compare October 11, 2024 18:04
@grokspawn

grokspawn commented Oct 11, 2024

Copy link
Copy Markdown
Contributor Author

There were some questions about whether we could change the api access from the form

<site>/catalogs/<catalog>/api/v1/all

to

<site>/api/v1/catalog

to provide the v1 raw FBC. I'm playing in that space right now to see if there's a quick path to this, since the most important part we were trying to get done was the shift of status.contentURL to status.baseURL so we could get the API review going.

Edit: a few of us met yesterday to discuss in depth, and we determined that the catalog-centric API approach was more conducive to near-future plans to add digest-level information. So we're sticking with the catalog-centric API.

@grokspawn grokspawn force-pushed the urltype-change branch 3 times, most recently from 926262f to c0395e6 Compare October 14, 2024 18:30
Comment thread README.md Outdated
Comment thread api/core/v1alpha1/clustercatalog_types.go Outdated
Comment thread docs/fetching-catalog-contents.md Outdated
Comment thread docs/fetching-catalog-contents.md Outdated
Comment thread docs/fetching-catalog-contents.md Outdated
Comment thread internal/storage/localdir.go Outdated
Comment thread internal/storage/localdir.go Outdated
Comment thread internal/storage/localdir.go Outdated
Comment thread internal/storage/localdir.go
Comment thread internal/storage/localdir.go Outdated
Comment thread api/core/v1alpha1/clustercatalog_types.go Outdated
Comment thread api/core/v1alpha1/clustercatalog_types.go Outdated
Comment thread api/core/v1alpha1/clustercatalog_types.go Outdated
Comment thread docs/fetching-catalog-contents.md Outdated
Comment thread docs/fetching-catalog-contents.md Outdated
Comment thread docs/fetching-catalog-contents.md Outdated
Comment thread internal/controllers/core/clustercatalog_controller.go Outdated
Comment thread internal/storage/localdir.go
Comment thread internal/storage/localdir.go Outdated
Comment thread internal/storage/localdir.go Outdated
Comment thread test/e2e/util.go Outdated
Comment thread test/e2e/util.go Outdated
Comment thread test/e2e/util.go Outdated
@grokspawn

Copy link
Copy Markdown
Contributor Author

Thanks again for the review passes folks!
I think I've made all the changes, but for your (and my) convenience I included all the resolutions in a separate commit. The merge queues already squash multiple commits, so hopefully this makes it easier for us all to audit the changes with no actual impact to the merge.
Many of the changes look simple but quickly balloon out to a bunch of fiddly updates.

Comment thread internal/controllers/core/clustercatalog_controller_test.go Outdated
Comment thread internal/controllers/core/clustercatalog_controller_test.go Outdated

@everettraven everettraven left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One minor thing in the readme. Other than that LGTM

Comment thread README.md Outdated
Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
@joelanford joelanford enabled auto-merge October 18, 2024 18:38
@joelanford joelanford added this pull request to the merge queue Oct 18, 2024
Merged via the queue into operator-framework:main with commit d70f01f Oct 18, 2024
@grokspawn grokspawn deleted the urltype-change branch October 18, 2024 18:49
// can read the content of a catalog
// urls contains the URLs that can be used to access the catalog.
// +optional
ContentURL string `json:"contentURL,omitempty"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You should add a "tombstone" representing this API field now that it has been removed, to prevent it being re-added as a different serialisation

If contentURL in the future was re-added as a struct, instead of string, this would break clients who expect to be able to unmarshal it as a string

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.

We have discussed this and the general consensus is that we are not going to fix it as we have not released GA APIs upstream. Also we do not have many clients who uses OLM V1 (indirectly this API) . We have been communicating that these set of APIs are not stable till we release V1 GA APIs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants