Skip to content

📖 (docs) draft catalogd docs with new metas endpoint #1841

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

Merged
merged 1 commit into from
Mar 17, 2025

Conversation

anik120
Copy link
Contributor

@anik120 anik120 commented Mar 4, 2025

Closes #1782

Description

Reviewer Checklist

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

@anik120 anik120 requested a review from a team as a code owner March 4, 2025 19:42
Copy link

netlify bot commented Mar 4, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 5791b14
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/67d43aabab1ef60008889d40
😎 Deploy Preview https://deploy-preview-1841--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.

Copy link

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.04%. Comparing base (66b97ad) to head (5791b14).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1841   +/-   ##
=======================================
  Coverage   69.04%   69.04%           
=======================================
  Files          65       65           
  Lines        5263     5263           
=======================================
  Hits         3634     3634           
  Misses       1396     1396           
  Partials      233      233           
Flag Coverage Δ
e2e 50.01% <ø> (-0.08%) ⬇️
unit 56.96% <ø> (ø)

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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

azych
azych previously approved these changes Mar 5, 2025
Copy link
Contributor

@azych azych left a comment

Choose a reason for hiding this comment

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

added a few comments, but /lgtm

@@ -13,6 +18,21 @@ As an example, to access the full FBC via the v1 API endpoint (indicated by path

the URL to access the service would be `https://catalogd-service.olmv1-system.svc/catalogs/operatorhubio/api/v1/all`

2. `api/v1/metas` endpoint that allows clients to retrive filtered portions of the FBC.

The metas endpoint accepts additional parameters following the pattern `/api/v1/metas?<parameters>`, and accepts parameters that corresponds to any combination of the fields of the [FBC Meta structure](https://olm.operatorframework.io/docs/reference/file-based-catalogs/#schema) (except for `Blob`).
Copy link
Contributor

Choose a reason for hiding this comment

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

additional parameters following the pattern

I think we could just say 'query parameters'?

Also, accepts parameters repeats right after comma. Maybe just: The metas endpoint accepts query parameters that correspond to...?

Copy link
Contributor

Choose a reason for hiding this comment

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

to any combination of the fields ... (except for Blob)

maybe being more explicit here and for listing for example the elements of the Meta schema might make sense?

Another thing is, what does Blob refer to? Reading the documentation, there is this for example:

Each operator package in a catalog requires exactly one olm.package blob, at least one olm.channel blob, and one or more olm.bundle blobs.

but those would be valid query params, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea it's a little confusing. The Blob I was trying to highlight isn't a valid query parameter is this Blob.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, there's a lot of blobs ;)

@@ -12,6 +12,9 @@ Then you can query the catalog by using `curl` commands and the `jq` CLI tool to
By default, Catalogd is installed with TLS enabled for the catalog webserver.
The following examples will show this default behavior, but for simplicity's sake will ignore TLS verification in the curl commands using the `-k` flag.

!!! note
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

resolved in #1841 (comment)

@anik120
Copy link
Contributor Author

anik120 commented Mar 6, 2025

Not sure if I clicked any button but I did not dismiss any reviews 👀

Copy link
Member

Choose a reason for hiding this comment

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

For net-new functionality, the process default is to add a new "drafts" doc.

Also, this feature is still feature gated and off by default. Official docs should probably not include information about feature gated features, except potentially in a separate doc that lists all of the feature gates and describes what they do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It totally slipped my mind that this feature is behind a feature gate and isn't GA yet. I've moved the docs that need updating with the new endpoint (when feature gate is enabled) to the /docs/drafts folder as per our discussion in slack. PTAL

@anik120 anik120 changed the title 📖 (docs) update catalogd docs to include new metas endpoint 📖 (docs) draft catalogd docs with new metas endpoint Mar 7, 2025
@anik120
Copy link
Contributor Author

anik120 commented Mar 12, 2025

Rebased and pushed cc: @joelanford @grokspawn @azych


Responses are encoded as a [JSON Lines](https://jsonlines.org/) stream of [File-Based Catalog](https://olm.operatorframework.io/docs/reference/file-based-catalogs) (FBC) [Meta](https://olm.operatorframework.io/docs/reference/file-based-catalogs/#schema) objects delimited by newlines.

??? example "Example JSON-encoded FBC snippet"
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, this doesn't display correctly, together with the two ``` blocks below

Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine with our rendering system ... just not the github review front-end.
This doc includes both sequences: https://operator-framework.github.io/operator-controller/api-reference/catalogd-webserver/

Copy link
Contributor

Choose a reason for hiding this comment

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

good to know, thanks. @anik120 feel free to resolve, as I can't do it with my access level :-)

Copy link
Contributor

@azych azych left a comment

Choose a reason for hiding this comment

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

apart from multiple places where formatting doesn't display correctly (!!!, ???, ```), the actual documentation looks good to me

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 13, 2025
@anik120
Copy link
Contributor Author

anik120 commented Mar 13, 2025

I see multiple instances of !!! note and ??? example etc in other places in the documentation, so that means we'll have to do a full sweep of these based off of what @azych has discovered.

I'm merging this PR with the lgtm I have since it's in /docs/draft, and a follow up PR to sweep the whole area for !!! note, ??? example etc will take care of the ones @azych pointed here anyway (also because PR hasn't received any other feedback other than 👈🏽 for a while now).

@anik120 anik120 enabled auto-merge March 13, 2025 18:08
@anik120
Copy link
Contributor Author

anik120 commented Mar 13, 2025

Actually, looks like @grokspawn has a requested review, going to wait for a bit


For more examples of valid queries that can be made to the `api/v1/metas` service endpoint, please see [Catalog Queries](../howto/catalog-queries.md).

!!! note
Copy link
Contributor

@grokspawn grokspawn Mar 13, 2025

Choose a reason for hiding this comment

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

We don't have a problem here. The !!! note notation is supported by the mkdocs pipeline.
For e.g. see existing rendered docs here, immediately before the section 3 header: "Granting User Access to API Resources".

!!! important
Currently, OLM 1.0 does not support the installation of extensions that use webhooks or that target a single or specified set of namespaces.

3. Return list of packages where the channel head version use `olm.csv.metadata` format, support `AllNamespaces` install mode and do not use webhooks:
Copy link
Contributor

@grokspawn grokspawn Mar 13, 2025

Choose a reason for hiding this comment

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

nit:

Suggested change
3. Return list of packages where the channel head version use `olm.csv.metadata` format, support `AllNamespaces` install mode and do not use webhooks:
3. Return list of packages which support `AllNamespaces` install mode, do not use webhooks, and where the channel head version uses `olm.csv.metadata` format:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@grokspawn grokspawn dismissed their stale review March 13, 2025 19:07

blocking updates were resolved

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 14, 2025
Copy link

openshift-ci bot commented Mar 14, 2025

New changes are detected. LGTM label has been removed.

@anik120 anik120 added this pull request to the merge queue Mar 17, 2025
Merged via the queue into operator-framework:main with commit 18a4638 Mar 17, 2025
20 checks passed
@grokspawn grokspawn mentioned this pull request Mar 26, 2025
4 tasks
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.

[docs] update catalogd web api docs to include metas endpoint
6 participants