Comments (3)
Hi, I finally found out what was causing this and figured I'd report back here for completeness;
In GitLab, the git repo is cloned down with a "depth" of 50. This means that after 50 commits in a pull requests, neither setuptools_scm or poetry-dynamic-versioning will find the last git tag (which is at a distance of 50). Here, the SCM-driven semver resets into 0.0.1+dev50
.
To fix this, you can set a GitLab CI/CD variable GIT_DEPTH
to 0
to make GitLab clone down the entire repo, all branches and without any "depth" limit. Or you can set a maximum of 1000. The docs on this can be found here: https://docs.gitlab.com/ee/ci/pipelines/settings.html#git-shallow-clone
from poetry-dynamic-versioning.
That's very strange, considering that 0.0.1
isn't even in your tag list and that Dunamai's placeholder is 0.0.0
. Some questions:
- What are your plugin settings in pyproject.toml?
- I'm not familiar with GitLab, but could there have been a change (either specific to your project or generally on their service) to clone the repo without tags?
- Is that
git --no-pager tag
output from your local computer or from the GitLab workflow? If it's not from GitLab directly, I think it would be good to add it to the workflow and see how it compares. You could also add indunamai from git --debug
.
from poetry-dynamic-versioning.
We noticed something super strange, and it was that with a great distance from the last tag, git tag
would return fewer and fewer tags. This would continue with each commit in that GitLab PR until git tag
no longer returned any tags.
Since git tag
did not return any tags, it's natural that we'd get the starting 0.0.1 (as if no tags existed).
I think we can close this, as we solved it my squashing all commits down into one in that PR. This took everything back to normal. I'm thinking there could be a bug in gitlab perhaps. I should write a script that loops through creating batches of 20 or so git tags. And then see when GitLab starts to act up.
I will close this, as I don't think it's related to poetry-dynamic-versioning.
from poetry-dynamic-versioning.
Related Issues (20)
- Isn't compatible with Poetry 1.6.x HOT 3
- Using poetry to install dependency with poetry-dynamic-versioning HOT 4
- Create a file with the version in it without any "replacement magic" HOT 3
- Keep the apostrophe/quotation marks in pyproject version replacement HOT 2
- Version not substituted for chained package dependencies HOT 2
- SETUPTOOLS_SCM_PRETEND_VERSION vs POETRY_DYNAMIC_VERSIONING_BYPASS HOT 2
- Got an error with 'poetry update' HOT 3
- Whl files generated by poetry build do not contain the static version files specific in substitiution HOT 4
- Check file existance for `[tool.poetry-dynamic-versioning.substitution]` HOT 3
- `poetry install` with editable deps using dynamic versions always reports a downgrade. HOT 1
- Getting PermissionError when using poetry-dynamic-versioning in GitHub CI HOT 3
- poetry publish can't find files built with with dynamic versioning HOT 1
- `AssertionError: would build wheel with unsupported tag ('cp312', 'cp311', 'macosx_11_0_arm64')` HOT 2
- Plugin breaks poetry 1.8.0 HOT 2
- Push to PyPI, even in dirty mode HOT 2
- __version__.py file not included in build HOT 3
- poetry-dynamic-versioning fails to retrieve version with poetry 1.8.1 and 1.8.2 HOT 2
- What would you need to stop monkeypatching `poetry.core`? HOT 2
- Plugin installation crashes HOT 2
- Feature request: optional tag prefix for monorepo support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poetry-dynamic-versioning.