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

test crd schema checker #1202

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gibizer
Copy link
Contributor

@gibizer gibizer commented Nov 22, 2024

  • [make][pre-commit]Check CRD schema to avoid update issues
  • DNM:test make crd-schema-check

Copy link

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/openstack-k8s-operators/openstack-operator for 1202,7fe2b7c0f261d044999b80766f2de701bf3f9531

Copy link
Contributor

openshift-ci bot commented Nov 22, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gibizer
Once this PR has been reviewed and has the lgtm label, please assign bshephar for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gibizer
Copy link
Contributor Author

gibizer commented Nov 22, 2024

/hold this is just a test PR to show that the new make crd-schema-check make target included in the pre-commit job catches non backwards compatible CRD changes.

@gibizer
Copy link
Contributor Author

gibizer commented Nov 22, 2024

The pre-commit check should have caught the CRD change but it did not. The make target catches is for me locally so something is with the CI job.

@gibizer gibizer force-pushed the test-crd-schema-checker branch from 8bb171f to 5975d9f Compare November 22, 2024 14:06
@gibizer
Copy link
Contributor Author

gibizer commented Nov 22, 2024

I see the issue when the pre-commit runs in the CI the proposed commit already placed on the main branch of he repo:

    Merge commit '5975d9fde9b40d1a1a93fc53d469d3321fa25f91'

So the schema diff between the proposed commit and main is always empty in CI. I can try to be more specific using origin/main instead of main...

@gibizer gibizer force-pushed the test-crd-schema-checker branch 5 times, most recently from 485c02b to d1c2ca3 Compare November 25, 2024 14:59
The new crd-schema-check make target compares the CRD schema of the
patch with the schema on the tip of main and report errors on non
backward compatible changes.

This make target now also run in pre-commit both locally and in CI.

This make target uses https://github.com/openshift/crd-schema-checker
to do the actual checking.

Related: OSPRH-11833
@gibizer gibizer force-pushed the test-crd-schema-checker branch from d1c2ca3 to ce9cdc7 Compare November 26, 2024 11:34
Copy link
Contributor

openshift-ci bot commented Nov 26, 2024

@gibizer: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/precommit-check ce9cdc7 link true /test precommit-check

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants