Closed NicolaDonelli closed 1 year ago
- the version of the package is missing since the executor seems to be unable to retrieve the last tag from the repository. This is quite annoying and, in a Docker container, can be solved by copying the .git folder but I am not sure yet how to solve it in the workflows.
Uhm, copying the .git does NOT seem the way to go. Docker build should be git agnostic. I'd really rather avoid this.
Copying .git in Docker container (or at least a part of it) is necessary since versioneer is based on it to compute semantic versions based on tags.
I am actually quite puzzled that this issue is present also in workflows since they should be aware of git history...
To be honest we have to make a decision:
Between the two I'd argue it would be best to go for reducing the docker image size. Also, I don't think having the version right on the docker image is so critical. Every release could produce a docker image with the right version of the docker image.
Beside, I believe it would be easy to modify the versioneer file in order to put the business logic that, if a certain env variable is set, we could tag the package with that, instead of figuring that out using the VSC system. Not sure we should do that, but it is something we could think about. But definitely, I'd really AVOID copying the git repo in the docker image ONLY for having one string out
By checking action outputs here I realised that in the
Check typing linting and formatting
job we have this snippetThis is strange since the name of the package should be
py4ai-core-0.0.1+11.g667d4c4.dirty
.I think this could be due to two different problems:
sdist
command of setuptools is unaware of pep 517/8,so preinstall/prebuild is a required step (as explained here): a possible solution to this point is to change Makefile upgrading setuptools (and pip) before building pre-deps:.git
folder but I am not sure yet how to solve it in the workflows.