-
Notifications
You must be signed in to change notification settings - Fork 12
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
During checkout, retrieve all commits and tags #160
Conversation
…re the correct version number can be deduced dynamically
I saw in other PRs:
So the version number is wrong and we get a warning … I hope that fetching the entire git history (as per this PR) will fix this problem. AFAIK it never affected our build+publish workflow as this one is only triggered on release, and then the GH checkout action retrieves the entire git history by default already Edit: Yep, seems to work:
|
So it seems this warning/error is due to |
I don't think that's the full explanation, as the checkout action also doesn't seem to retrieve all tags by default So determining the version number just on the very last commit and tag won't work either Maybe the last tag will be received if it corresponds to the latest commit, I haven't tried that We could copy the checkout action's command line and play with it to find out the required options. But I currently don't have time for this |
It appears this problem is also being tracked upstream at actions/checkout#249 |
The checkout action also has a Not sure if it will get rid of the "shallow repository" warning though. |
I don't understand why and how this happens; the checkout action is identical to the one in the tests, or no? https://github.com/hoechenberger/openneuro-py/blob/main/.github/workflows/python-publish.yml#L31 |
Yes but the action itself parses what event triggered the action (new tag, release, commit, …) and adjusts its behavior accordingly. |
Where did you find that information? I can't find it in their docs... |
I thought I saw this in their code somewhere, but I'm failing to discover it again :D So … maybe I was mistaken! Maybe because the Publish workflow only runs once we've added a tag, retrieving the latest commit will also load the tag that points to this commit, and everything works as intended then? And it's just a happy coincidence for us. Definitely worth investigating! Maybe the safest approach for now really is setting the @cbrnr I'd appreciate it if you could find the time to dig a little bit into this – I'm rather busy this week :( Or maybe @larsoner can help! In any case, we should try to better understand what's going on to ensure we won't run into unintended problems in the future! also tagging @sappelhoff, @drammock and @agramfort just to keep them in the loop. |
Just to be sure we can always derive the correct version number dynamically. x-ref #160
No description provided.