-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix rpm build issues introduced by jsonschema feature #74
fix rpm build issues introduced by jsonschema feature #74
Conversation
Annoyingly, the tests passed and nothing seemed amiss at first, but the package was missing from the list. Signed-off-by: John Mulligan <[email protected]>
Due to a somewhat hilarious misalignment of the stars the recently added jsonschema support doesn't actually work on the distro we build for. This was masked by the fact that the sambacc CI didn't test the distro level stuff that actually showed there was a problem. This change just tells mypy to chillax if it fails to import typing data for jsonschema so that it can pass the tests with or without the jsonschema library present (as it is an optional dep). Signed-off-by: John Mulligan <[email protected]>
We need to unscramble our distro level dependencies before we can really use jsonschema. Signed-off-by: John Mulligan <[email protected]>
Previously, we only executed the rpm build if the `distname` was given, meaning we expected to output the rpms to a "distribution" location. But this meant that the rpms were typically only built when samba containers are being built and never as part of a CI run. This change updates the build script to always build the RPMs, even if distname is not supplied by using a "scratch" dist dir. Now, the rpm build should be executed as part of a typical CI run. Signed-off-by: John Mulligan <[email protected]>
The build fails in the CI and works locally. Even though we're (in theory) using the same containerized environment. The first thing that appears significantly different is:
despite tweaking the checkout config, I still don't see why this happens |
Fixed the problem, but now I need to clean up the debris. |
In some cases, specifically the github CI runner, calls made to git by setuptools_scm were failing leading to source taballs that were missing files, which lead to rpmbuild failures. This was all because of "stricter repository ownership checks" in git. Use the `safe.directory` configuration key to always permit the use of our checkout when run in the container. Signed-off-by: John Mulligan <[email protected]>
b384a8e
to
f05cc7e
Compare
By default, github ci action checks out with no history. This leads to warnings in setuptools_scm and may lead to errors in a future version. This is a pretty small repo too and thus we shouldn't have much if any drawbacks to pulling all history. Signed-off-by: John Mulligan <[email protected]>
f05cc7e
to
64b3757
Compare
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.
LGTM
Upon merging #69 the samba-container builds broke.
The RPM build failed because the tox test dependencies listed jsonschema and no jsonschema python packages were installed. On top of that, the python3-jsonschema package in fedora 36 is incompatible and breaks the tests. So we're mostly just undoing the initial damage to try and get samba-containers working again.
To prevent future damage this PR enables the CI to run the RPM build step which was previously skipped (and only executed by samba-container builds).