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

🌱 improve the verify-crd-compatibility make target #1499

Conversation

everettraven
Copy link
Contributor

for use during local development by making the default updated source be the local file, picking up changes not yet committed. The previous git sourcing required changes to be committed to be picked up and is not a very good developer experience as you should validate the changes prior to commiting them. Since the git source is necessary for CI, the GitHub Action is updated to specify the git source for the updated file.

Reviewer Checklist

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

for use during local development by making the default updated source
be the local file, picking up changes not yet committed. The previous
git sourcing required changes to be committed to be picked up and is not
a very good developer experience as you should validate the changes
prior to commiting them. Since the git source is necessary for CI,
the GitHub Action is updated to specify the git source for the updated file.

Signed-off-by: everettraven <[email protected]>
@everettraven everettraven requested a review from a team as a code owner November 26, 2024 14:38
Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 7b1ee08
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/6745dd500fa4140008ab6ea0
😎 Deploy Preview https://deploy-preview-1499--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.

@@ -132,10 +132,10 @@ bingo-upgrade: $(BINGO) #EXHELP Upgrade tools

.PHONY: verify-crd-compatibility
CRD_DIFF_ORIGINAL_REF := main
CRD_DIFF_UPDATED_REF := HEAD
CRD_DIFF_UPDATED_SOURCE := file://config/base/crd/bases/olm.operatorframework.io_clusterextensions.yaml
Copy link
Contributor

@tmshort tmshort Nov 26, 2024

Choose a reason for hiding this comment

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

I'm assuming this isn't treated as an absolute path?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope. It will read it as a relative path.

CRD_DIFF_CONFIG := crd-diff-config.yaml
verify-crd-compatibility: $(CRD_DIFF)
$(CRD_DIFF) --config="${CRD_DIFF_CONFIG}" "git://${CRD_DIFF_ORIGINAL_REF}?path=config/base/crd/bases/olm.operatorframework.io_clusterextensions.yaml" "git://${CRD_DIFF_UPDATED_REF}?path=config/base/crd/bases/olm.operatorframework.io_clusterextensions.yaml"
verify-crd-compatibility: $(CRD_DIFF) manifests
Copy link
Contributor

@tmshort tmshort Nov 26, 2024

Choose a reason for hiding this comment

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

Adding manifests to this target will cause it to also be run in the CI, and if there's a diff, it won't be caught by the GitHub workflow, because it's looking directly at SHAs.
That being said, this should fail make verify

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. In CI, the expectation is that it is looking at the committed changes. I would push for us to rely on the distinct checks for "uncommitted, generated, changes" in CI.

Copy link
Contributor

@tmshort tmshort left a comment

Choose a reason for hiding this comment

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

Two minor comments/questions.

@tmshort
Copy link
Contributor

tmshort commented Nov 26, 2024

⛔ This should be held, unless we consider it a bug.

@tmshort
Copy link
Contributor

tmshort commented Nov 26, 2024

/hold

@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 Nov 26, 2024
@tmshort
Copy link
Contributor

tmshort commented Nov 26, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 26, 2024
@perdasilva perdasilva removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 28, 2024
@perdasilva
Copy link
Contributor

unholding as v1 has been released 🎉

@perdasilva perdasilva added this pull request to the merge queue Nov 28, 2024
Merged via the queue into operator-framework:main with commit a3946d2 Nov 28, 2024
16 checks passed
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