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

ci: fix schema checks #5914

Closed

Conversation

m-schmoock
Copy link
Collaborator

@m-schmoock m-schmoock commented Jan 20, 2023

This fixes the CI errors when doing make check-source steps 'schema-added-check' and 'schema-removed-check'. These errors prevented CI from performing these steps correctly:

fatal: ambiguous argument 'main': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

I changed it so that CI does a git fetch origin at first and do the git diff against 'origin/master' (which then exist). Also fixed a bug in the script that was missing $$master in the same line.

Also I added that the script shows the actual diff before failing, so the user quickly sees whats wrong.

Note 1: Without this fix, CI is not doing this schema checks correctly, but silently ignore it, as it continues after the warnings/errors.

Note 2: I tested this fix on CI ( #5913 ) and locally, it now performs correctly and aborts, telling the user that there are missing 'added'/'deprecated' annotations.

This fixes the CI errors when doing `make check-source`
steps 'schema-added-check' and 'schema-removed-check'.
These errors prevented CI from performing these steps correctly:

```
fatal: ambiguous argument 'main': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
```

I changed it so that CI does a `git fetch origin` at first and do
the `git diff` against 'origin/master' (which then exist).
Also fixed a bug in the script that was missing $$master in the same line.

Also I added that the script shows the actual diff before failing,
so the user quickly sees whats wrong.
@m-schmoock m-schmoock requested a review from cdecker January 20, 2023 22:55
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

ACK b0eea9e

@m-schmoock
Copy link
Collaborator Author

I included this in #5841, as I needed the fix there. So lets close this for now.

@m-schmoock m-schmoock closed this Jan 24, 2023
@m-schmoock m-schmoock deleted the ci/check-schema branch January 25, 2023 13:52
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.

2 participants