Skip to content
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

Support git fetch --tags #209

Open
reinerp opened this issue Jun 17, 2024 · 6 comments
Open

Support git fetch --tags #209

reinerp opened this issue Jun 17, 2024 · 6 comments

Comments

@reinerp
Copy link

reinerp commented Jun 17, 2024

My team is considering an approach where each experiment we run is pushed to a git tag on our repo. Ideally we'd like ClearML to run from that tag.

However, the ClearML agent uses git fetch --all --recurse-submodules on its VCS cache, which only fetches commits from branches, and it ignores commits that are only reachable from tags. Would it be possible to extend the pull command to be git fetch --all --recurse-submodules --tags?

self.call("fetch", "--all", "--recurse-submodules", cwd=self.location)

@jkhenning
Copy link
Member

Hi @reinerp,

If you specify the tag instead of a branch name, it should work out of the box 🙂

@reinerp
Copy link
Author

reinerp commented Jun 18, 2024

I tried that. It works if the VCS cache is disabled, because that uses a git clone command that does in fact fetch tags. However, if I enable the VCS cache then it fails.

The recent commit 4179ac5 looks like it would also "fix" my issue, but it would do so by effectively disabling the VCS cache, since every single tag fetch will be a cache miss and a full repository fetch.

What I'm asking for here is to make tags work under the VCS cache, by extending the git fetch command that I linked.

@jkhenning
Copy link
Member

Oh this seems to be an issue with the git pull (that is called on the VCS cache) but for some reason not updating the new tags (or the tags that moved).
It does call --all when calling the fetch but I think you are correct and we need to add --tags...
We will add that in the next RC release

@reinerp
Copy link
Author

reinerp commented Jun 18, 2024

Thanks!

@jkhenning
Copy link
Member

@reinerp, if you move a tag, does using --tags work and the new tag is fetched correctly?

@pollfly
Copy link
Contributor

pollfly commented Aug 29, 2024

Hey @reinerp! Just letting you know that this issue has been resolved in the recently released v1.9.0. Let us know if there are any issues :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants