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

Receiving error trying to update amazon.lambda.tools global tool when running two sam build commands concurrently #205

Open
nickdurcholz opened this issue Oct 27, 2020 · 2 comments

Comments

@nickdurcholz
Copy link

Description:

Receiving error from sam build when building a dotnet core 3.1 lambda function on a CI build server that is running more than one agent.

Error: DotnetCliPackageBuilder:GlobalToolInstall - Error configuring the Amazon.Lambda.Tools .NET Core Global Tool: Dotnet CLI Failed: Tool 'amazon.lambda.tools' failed to update due to the following:

Failed to uninstall tool 'amazon.lambda.tools': Failed to retrieve tool configuration: The process cannot access the file 'C:\Users\CruiseControl\.dotnet\tools\.store\amazon.lambda.tools\4.3.0\amazon.lambda.tools\4.3.0\tools\netcoreapp2.1\any\DotnetToolSettings.xml' because it is being used by another process.

Steps to reproduce the issue:

  1. Create a SAM project that includes a lambda with the dotnetcore3.1 runtime
  2. Create two different workspaces with the same code on your machine
  3. run sam build concurrently until the file locking issue is encountered

Additional environment details (Ex: Windows, Mac, Amazon Linux etc) observed on a windows build host

This seems related to #126 and would likely be resolved by #127 as well. Is there any timeline for releasing that change?

@sriram-mv
Copy link
Contributor

#214 should fix this.

@CoshUS
Copy link
Contributor

CoshUS commented Mar 17, 2022

#214 does not address the issue since locking is only implemented for single process. This issue is due to multiple sam builds running at the same time. Reopening.

@CoshUS CoshUS reopened this Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants