-
Notifications
You must be signed in to change notification settings - Fork 913
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
just a CI test #5913
just a CI test #5913
Conversation
Print the schema diff when there are missing 'added'/'deprecated' fields. This saves some time when cleaning up code before using CI. Changelog-None
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. I changed it so that they do a `git fetch origin` at first and do the `git diff` against 'origin/master...HEAD' instead of just master. Also fixed a bug in the script that was missing $$master in the same line. ``` 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>...]' ```
Are you sure Github just renamed the branch without prompting us? That'd be a very surprising move and definitely cause a lot of trouble. I just checked out this repo and the main branch is still called |
@cdecker Yes, the make script CI is calling is definitively not working correctly (anymore?)
Currently fiddling around to fix that. |
That usually means that there is both a branch |
Ok, that theory falls through quickly: no |
doc/Makefile
Outdated
@@ -209,11 +209,11 @@ doc/index.rst: $(MANPAGES:=.md) | |||
|
|||
# So GitHub renamed master to main. This is painful. | |||
schema-added-check: | |||
@if ! git describe master >/dev/null 2>&1; then MASTER=main; else MASTER=master; fi; if git diff $$MASTER doc/schemas | grep -q '^+.*{' && ! git diff master doc/schemas | grep -q '^+.*"added"'; then echo 'New schema fields must have "added": "vNEXTVERSION"' >&2; exit 1; fi | |||
@git fetch origin master ; if git diff origin/master...HEAD -- doc/schemas | grep -q '^+.*{' && ! git diff origin/master...HEAD -- doc/schemas | grep -q '^+.*"added"'; then git diff origin/master...HEAD -- doc/schemas ; echo 'New schema fields must have "added": "vNEXTVERSION"' >&2; exit 1; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git fetch
in a script will cause people headaches if they have a passphrase or a hardware key holding the SSH keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, can't do it that way... :/
@cdecker looks like GitHub CI is not checking out the repo with any refs except the PRs branch itself. I think the master/main naming issue doesn't apply for us, as our repo has 'master' branch and it will likely stay that way. The political correct 'main' branch is only for new projects. So we can remove that main/master if/else from our script. I will try to change it in a way that only when it detects that it is running on GitHub actions CI it will do the 'fetch origin master'. |
…oing schema checks
…efore doing schema checks
…fetch before doing schema checks
…ds git fetch before doing schema checks
… ci: adds git fetch before doing schema checks
… fixup! ci: adds git fetch before doing schema checks
… fixup! fixup! ci: adds git fetch before doing schema checks
Just a test PR, trying to debug some CI issues...