Git Product home page Git Product logo

Comments (3)

fredrikaverpil avatar fredrikaverpil commented on May 16, 2024 2

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.

mtkennerly avatar mtkennerly commented on May 16, 2024

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 in dunamai from git --debug.

from poetry-dynamic-versioning.

fredrikaverpil avatar fredrikaverpil commented on May 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.