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

update-dependencies fails when attempting to update existing PR #1898

Closed
mthalman opened this issue May 8, 2020 · 4 comments · Fixed by #2119
Closed

update-dependencies fails when attempting to update existing PR #1898

mthalman opened this issue May 8, 2020 · 4 comments · Fixed by #2119

Comments

@mthalman
Copy link
Member

mthalman commented May 8, 2020

The update-dependencies tool has special logic that handles a case where there's an existing PR. This logic fails with the following error:

System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
 ---> System.DllNotFoundException: Unable to load shared library 'git2-106a5f2' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgit2-106a5f2: cannot open shared object file: No such file or directory
   at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
   at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
   at LibGit2Sharp.Core.NativeMethods..cctor()
   --- End of inner exception stack trace ---
   at LibGit2Sharp.Core.NativeMethods.git_clone(git_repository*& repo, String origin_url, FilePath workdir_path, GitCloneOptions& opts)
   at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts)
   at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options)
   at Dotnet.Docker.Program.UpdateExistingPullRequest(GitHubAuth gitHubAuth, PullRequestOptions prOptions, String commitMessage, GitHubBranch upstreamBranch) in /update-dependencies/Program.cs:line 188
   at Dotnet.Docker.Program.CreatePullRequestAsync() in /update-dependencies/Program.cs:line 155
   at Dotnet.Docker.Program.Main(String[] args) in /update-dependencies/Program.cs:line 53
@omajid
Copy link
Member

omajid commented May 8, 2020

We have seen this problem when the version of libgit2.so isn't compatible with the platform, for some reason or another. For example, if the x64 version is being loaded when the platform is arm64. What os/container is this code running in?

@omajid
Copy link
Member

omajid commented May 8, 2020

Some repos, like sourcelink, even migrated off of libgit2sharp because of portability issues: dotnet/sourcelink#288

@mthalman
Copy link
Member Author

mthalman commented May 8, 2020

Nothing too fancy going on. The build job literally builds the Dockerfile locally and runs it. This runs on an AMD64 machine.

@MichaelSimons
Copy link
Member

@mthalman can this issue be closed? If not what work is remaining?

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.

3 participants