Skip to content

Conversation

tmshort
Copy link
Contributor

@tmshort tmshort commented Feb 24, 2025

This required renaming op-con's CatalogSource to CatalogFilter to avoid a name conflict with catd's CatalogSource

Update source files to refer to the proper API directory, and name the import reference consistently.

The docs/api-reference is now combined as well.

Description

Reviewer Checklist

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

@tmshort tmshort requested a review from a team as a code owner February 24, 2025 16:52
Copy link

netlify bot commented Feb 24, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 75ca517
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/67bca4f09520a500081d05ac
😎 Deploy Preview https://deploy-preview-1803--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.

This required renaming op-con's CatalogSource to CatalogFilter to avoid
a name conflict with catd's CatalogSource

Update source files to refer to the proper API directory, and name the
import reference consistently.

The docs/api-reference is now combined as well.

Signed-off-by: Todd Short <tshort@redhat.com>
Copy link

codecov bot commented Feb 24, 2025

Codecov Report

Attention: Patch coverage is 64.07767% with 74 lines in your changes missing coverage. Please review.

Project coverage is 68.39%. Comparing base (8fd4464) to head (75ca517).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
api/v1/zz_generated.deepcopy.go 52.48% 64 Missing and 3 partials ⚠️
...logd/controllers/core/clustercatalog_controller.go 88.88% 4 Missing ⚠️
catalogd/cmd/catalogd/main.go 0.00% 1 Missing ⚠️
...ternal/catalogd/webhook/cluster_catalog_webhook.go 75.00% 1 Missing ⚠️
...al/operator-controller/contentmanager/sourcerer.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1803      +/-   ##
==========================================
+ Coverage   68.34%   68.39%   +0.05%     
==========================================
  Files          63       62       -1     
  Lines        5117     5117              
==========================================
+ Hits         3497     3500       +3     
+ Misses       1390     1388       -2     
+ Partials      230      229       -1     
Flag Coverage Δ
e2e 51.70% <57.92%> (+0.07%) ⬆️
unit 55.89% <22.81%> (-0.02%) ⬇️

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.

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

/lgtm

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

tmshort commented Feb 24, 2025

/hold
for @LalatenduMohanty

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 24, 2025
mkdir $(CRD_WORKING_DIR)
$(CONTROLLER_GEN) crd paths="./api/v1/..." output:crd:artifacts:config=$(CRD_WORKING_DIR)
mv $(CRD_WORKING_DIR)/olm.operatorframework.io_clusterextensions.yaml $(KUSTOMIZE_OPCON_CRDS_DIR)
mv $(CRD_WORKING_DIR)/olm.operatorframework.io_clustercatalogs.yaml $(KUSTOMIZE_CATD_CRDS_DIR)
Copy link
Member

Choose a reason for hiding this comment

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

We are not deleting the older files in KUSTOMIZE_OPCON_CRDS_DIR and expecting to override the olderfiles with the new ones. It should work but it is not a full proof method. Also assuming we will not change the file names in future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, we are not deleting the files. It's not strictly necessary, since the mv will overwrite existing files. And given that these are our CRDs, and that controller-gen uses a name specific format, I think we're ok. The only way we'd change the filenames is if we change the CRDs, which would make them incompatible.

@@ -1,5 +1,5 @@
/*
Copyright 2022.
Copyright 2024.
Copy link
Member

Choose a reason for hiding this comment

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

Is it necessary to change the Copyright year?

Copy link
Member

Choose a reason for hiding this comment

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

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's actually a new file, but git thinks it's a rename of api/catalogd/doc.go...
And you're right, it ought to be 2025

Copy link
Contributor Author

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 copyright policy... something we may want to talk about in one of our meetings.

@LalatenduMohanty
Copy link
Member

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 24, 2025
Copy link
Member

@LalatenduMohanty LalatenduMohanty left a comment

Choose a reason for hiding this comment

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

/lgtm

@tmshort tmshort added this pull request to the merge queue Feb 24, 2025
Merged via the queue into operator-framework:main with commit 4ecef20 Feb 24, 2025
19 of 21 checks passed
@tmshort tmshort deleted the mv-api4 branch February 24, 2025 19:59
@tmshort tmshort changed the title ✨ Consolidate APIs into the same directory ✨ OPRUN-3763: Consolidate APIs into the same directory Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants