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

Race condition in ExtensionsMetadataGenerator.targets leads to incorrect TargetDir #4051

Closed
moritonal opened this issue Feb 5, 2019 · 1 comment

Comments

@moritonal
Copy link

moritonal commented Feb 5, 2019

Investigative information

  • Timestamp: As of 05 Feb 2019
  • Function App version (1.0 or 2.0): 2.0
  • Function App name: N/A
  • Function name(s) (as appropriate): N/A
  • Invocation ID: N/A
  • Region: N/A

Repro steps

Referencing Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator should create an extensions.json file within our TargetDir. Currently, referencing both this, and Microsoft.Net.SDK.Functions leads to the incorrect TargetDir being used in the Generation part of this project.

Expected behavior

The file extensions.json should be generated in the correct TargetDir directory, with the correct values.

Actual behavior

A variety of things happen depending on the specific order of events, but most resolve into an empty extensions.json file being outputted somewhere.

Known workarounds

Putting a custom .targets file within your project.

Related information

I'm fairly sure this is the cause of a lot of issues given I believe (of course I could be wrong) this bug is referenced in the following:

I have a pull-request which I'll attach shortly.

The issue is mostly caused by https://github.com/Azure/azure-functions-vs-build-sdk/blob/master/src/Microsoft.NET.Sdk.Functions.MSBuild/Targets/netstandard1.0/Microsoft.NET.Sdk.Functions.Build.targets#150 changing the TargetPath which (given the Property's in the current Extension.Targets are set at start) means that the ConsoleApp within ExtensionsMetadataGenerator executes over the wrong directory.

@moritonal
Copy link
Author

Closing because I've used the incorrect account, see #4057

@ghost ghost locked as resolved and limited conversation to collaborators Dec 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant