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

Custom GIT LFS Server not supported after v2.141 #2598

Closed
saschaa442 opened this issue Nov 14, 2019 · 16 comments · Fixed by #2657
Closed

Custom GIT LFS Server not supported after v2.141 #2598

saschaa442 opened this issue Nov 14, 2019 · 16 comments · Fixed by #2657

Comments

@saschaa442
Copy link

Agent Version and Platform

Version v2.142
Windows

Azure DevOps Type and Version

On Premise TFS

What's not working?

With Version 2.142 of the agent the following pull request was issued: #1901
In this request the GIT_LFS_SKIP_SMUDGE - Filter is used whenever the Option "Checkout files from lfs or the Variable $agent.source.git.lfs is not set.
This however has the following side effect. If you are NOT using the TFS built in GIT LFS and you are relying on the .lfsconfig to tell git/git-lfs where to find the source files you are not able to work with tfs anymore.
If "Checkout files from lfs or the Variable $agent.source.git.lfs is set - the agent will construct the url to the git lfs repository itself which will result in a non-existing path to an tfs git lfs repository.

@tmisch
Copy link

tmisch commented Dec 9, 2019

Git LFS Tutorial suggests to add a custom .lfsconfig file to a git repository in case of an external lfs server. In such a case, the current agent implementation cannot work correctly, because git lfs fetch is done before git checkout. But without git checkout, the required file .lfsconfig is not available for git lfs client and thus it does not get any files tracked by lfs.

A solution could be to retrieve file .lfsconfig before doing git lfs fetch, using command git checkout {refSpec} -- .lfsconfig.

I have applied necessary changes to a local compiled version of the build agent and it seemed to work. The only drawback i see is in case of not using an external lfs server, in which no .lfsconfig exists at all. This will cause a message to appear in the log:

error: pathspec '.lfsconfig' did not match any file(s) known to git

@jtpetty jtpetty self-assigned this Dec 9, 2019
jtpetty pushed a commit that referenced this issue Dec 9, 2019
jtpetty pushed a commit that referenced this issue Dec 13, 2019
@tmisch
Copy link

tmisch commented Dec 20, 2019

@jtpetty
I am sorry, but i think that this issue is not resolved/closed by the changes you made.
I just pulled the newest agent sources, did a "dev l" and a "dev b" and tested the agent with our git lfs environment.

Although the used git version is now 2.24.0.windows.2, the files from lfs are not downloaded, as you can see in the logs: git.log

The folder C:/GIT/External/azure-pipelines-agent/_layout/win-x64/_work/1/s is still empty (except the .git subfolder), no file .lfsconfig has been pulled from git repository, which is necessary to let git lfs know from where to pull the lfs files.

@jtpetty jtpetty reopened this Dec 30, 2019
@jtpetty
Copy link
Contributor

jtpetty commented Dec 30, 2019

I apologize, I believe I linked the PR to the wrong issue. I will take a look at this issue again.

@jtpetty
Copy link
Contributor

jtpetty commented Dec 30, 2019

@tmisch - Would you mind publishing your changes that you have working as a PR?

@tmisch
Copy link

tmisch commented Jan 2, 2020

@jtpetty
I would do that, but it seems that i do not have the permission to push my local branch to the remote repo.

@jtpetty
Copy link
Contributor

jtpetty commented Jan 2, 2020

@tmisch - you would have to create a fork and do a pull request that way. Here is some docs on how to do that: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork

@tmisch
Copy link

tmisch commented Jan 3, 2020

@jtpetty
I have now created PR #2706

@jtpetty
Copy link
Contributor

jtpetty commented Jan 3, 2020

@tmisch - Thanks! We will review the PR in the next few days and see if we can get this issue fixed for you.

@jtpetty
Copy link
Contributor

jtpetty commented Apr 2, 2020

@mjroghelia - This is the issue I was talking with you about offline that we need to look at regarding improving our support for Git LFS

@github-actions
Copy link

This issue has had no activity in 180 days. Please comment if it is not actually stale

@github-actions github-actions bot added the stale label Sep 29, 2020
@tmisch
Copy link

tmisch commented Sep 29, 2020

@jtpetty
Is there still any chance to get this fixed?

@github-actions
Copy link

github-actions bot commented Jun 9, 2021

This issue has had no activity in 180 days. Please comment if it is not actually stale

@saltz
Copy link

saltz commented Sep 10, 2021

This issue is still present, the .lfsconfig is not checked out before the objects are retrieved. Which results in 404 requests.

@github-actions
Copy link

github-actions bot commented Mar 9, 2022

This issue has had no activity in 180 days. Please comment if it is not actually stale

@alexander-smolyakov
Copy link
Contributor

Reopening this, since the issue is still actual.

We have merged the related pull request:

We will update the ticket once related changes will be deployed.

@github-actions
Copy link

This issue has had no activity in 180 days. Please comment if it is not actually stale

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

Successfully merging a pull request may close this issue.

8 participants