Open demeringo opened 1 year ago
Cannot build docker image on dev branch, need to fix #202 first.
I believe we should pre-release a version 1.0.0a4 (based on actual dev branch) to replace 1.0.0a3 whose docker image is broken. It makes things easier for maintaining cloud scanner to target a working API version (even if only a pre-release).
@bamthomas @da-ekchajzer what is the procedure to publish an updated package and docker image ? Is it sufficient to:
normally it is done with make major/minor/patch
but I'm not sure that it will work with a3/a4 :/
I don't understand what has been done so far in dev branch. For me it would be much more simple to do Trunk Based Development i.e. commit/PR always on main/master. And so the main branch should always be releasable (CI is the indicator for it ; we could add GH actions) .
Right now to release a docker container you have to :
make dist
but it is broken now (and probably it has a link with the broken docker image)docker build -t <docker-tag-name-with-repository> --build-arg <boaviztapi-version> .
docker push <docker-tag-name-with-repository>
)I will add makefile target(s) to do it. But tests/build shoud be green before :)
Then the simplest thing would be also to make the CI build/release/push automatically when tagging the branch. That would avoid in the future those kind of issue and make the release easy for every one with tag access right on the repo. I can do this also.
I can have a look tomorrow if it is not too late.
Thank you for you answers @bamthomas.
I commited a small fix yesterday to the makefile (just passing the version to the docker build command): https://github.com/Boavizta/boaviztapi/commit/b468a4e9d075ed2b334576f3158802b2fbedb416
Locally, this flow works for me
poetry build
make docker-build
We have a Github action that builds the package and publishes docker image when a github release is published. See https://github.com/Boavizta/boaviztapi/blob/main/.github/workflows/release.yml But it does not uses the makefile (!) for all steps so there is a risk of diverging.
=> our best course of action may be to use the makefile everywhere (local dev and CI). => ideally automate the version bump when a release or tag is applied, but it may be a bit complicated.
And yes green tests should be the prerequisite ;-) (and they are passing right now 👍)
Thank you again for proposing to help and do not worry if you cannot immediately, it is not an urgent topic.
The pre-release 1.0.0a4 solved the original issue, so is this possible to close this issue since the docker image is usable now ?
Bug description
Container image published with pre-release v1.0.0a3 does not start.
To Reproduce
https://github.com/Boavizta/boaviztapi/releases/tag/v1.0.0a3
docker run -p5000:5000 ghcr.io/boavizta/boaviztapi:1.0.0a3
results inModuleNotFoundError: No module named 'yaml'
I did not test yet building the image from dev branch.
Expected behavior
Published docker image should run.
JSON OUTPUT
Additional context
I believe this dependecy issue was fixed after publication of this pre-release (but I did not verified this yet). -> Will try to rebuild locally the docker image from a more recent commit.
If this is fixed in more recent commit on dev branch, I will try to publish a newer release.