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

Issue of checkout PR commit by sha #178

Open
thaikoh opened this issue Dec 13, 2023 · 1 comment
Open

Issue of checkout PR commit by sha #178

thaikoh opened this issue Dec 13, 2023 · 1 comment

Comments

@thaikoh
Copy link

thaikoh commented Dec 13, 2023

We have company's repo on github, as a developers I have my own fork of that repo and I merge changes to main repo with PRs on github. So I currently have issue with checking out by PRs sha with ClearML agent dockerised task.
Task params: as a repo I use company's repo, as a branch I use dev, as a commit I use sha of PR, created on github.

The error is:

fatal: reference is not a tree: f3575326826a912e2ffe55bd13417a18679fd6b4
Repository cloning failed: Command '['git', 'checkout', 'f3575326826a912e2ffe55bd13417a18679fd6b4', '--force']' returned non-zero exit status 128.
clearml_agent: ERROR: Failed cloning repository. 
1) Make sure you pushed the requested commit:
(repository='[email protected]:company/repo.git', branch='dev', commit_id='f3575326826a912e2ffe55bd13417a18679fd6b4', tag='', docker_cmd='...', entry_point='...', working_dir='...')
2) Check if remote-worker has valid credentials [see worker configuration file]

Looks like it is necessary to run git fetch before git checkout f3575326826a912e2ffe55bd13417a18679fd6b4 --force.

How to do that?
Or there is other way to go?

@jkhenning
Copy link
Member

Hi @thaikoh,

This seems to be a cache issue. The agent is always running:

git fetch --all --recurse-submodules

before checking out the specific version.

Try disabling the cache and see if it helps 🙂

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

2 participants