From 8f3b6870d1e58b7bad878e85c2aca0e80c8b13a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Sep 2022 12:37:11 +0000 Subject: [PATCH 01/13] Bump MongoDB.Driver.Core.Extensions.DiagnosticSources Bumps [MongoDB.Driver.Core.Extensions.DiagnosticSources](https://github.com/jbogard/MongoDB.Driver.Core.Extensions.DiagnosticSources) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/jbogard/MongoDB.Driver.Core.Extensions.DiagnosticSources/releases) - [Commits](https://github.com/jbogard/MongoDB.Driver.Core.Extensions.DiagnosticSources/compare/1.1.0...1.2.0) --- updated-dependencies: - dependency-name: MongoDB.Driver.Core.Extensions.DiagnosticSources dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/Directory.Build.props b/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/Directory.Build.props index e67020dabe..25c0a9724b 100644 --- a/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/Directory.Build.props +++ b/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/Directory.Build.props @@ -3,6 +3,6 @@ - + From 34891c47fb02a3799af7688a912edf3825d03f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Fri, 30 Sep 2022 17:27:47 +0200 Subject: [PATCH 02/13] Update golden files --- ...s.DistributionStructure_linux.verified.txt | 42 ++++++++++++------- ...sts.DistributionStructure_osx.verified.txt | 42 ++++++++++++------- ...DistributionStructure_windows.verified.txt | 42 ++++++++++++------- 3 files changed, 84 insertions(+), 42 deletions(-) diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_linux.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_linux.verified.txt index 33c903d316..15daef6500 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_linux.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_linux.verified.txt @@ -1,6 +1,10 @@ [ /AdditionalDeps/shared/Microsoft.NETCore.App/3.1.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, + /AdditionalDeps/shared/Microsoft.NETCore.App/3.1.0/runtimes/linux/native/libmongocrypt.so, + /AdditionalDeps/shared/Microsoft.NETCore.App/3.1.0/runtimes/osx/native/libmongocrypt.dylib, /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, + /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/runtimes/linux/native/libmongocrypt.so, + /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/runtimes/osx/native/libmongocrypt.dylib, /OpenTelemetry.AutoInstrumentation.Native.so, /integrations.json, /netcoreapp3.1/Google.Protobuf.dll, @@ -58,6 +62,7 @@ /netcoreapp3.1/runtimes/win/lib/netcoreapp2.0/System.Diagnostics.PerformanceCounter.dll, /netcoreapp3.1/runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll, /store/x64/net6.0/artifact.xml, + /store/x64/net6.0/dnsclient/1.4.0/lib/netstandard2.1/DnsClient.dll, /store/x64/net6.0/microsoft.extensions.configuration.abstractions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll, /store/x64/net6.0/microsoft.extensions.configuration.binder/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.dll, /store/x64/net6.0/microsoft.extensions.configuration/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.dll, @@ -69,10 +74,13 @@ /store/x64/net6.0/microsoft.extensions.options.configurationextensions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, /store/x64/net6.0/microsoft.extensions.options/6.0.0/lib/netstandard2.1/Microsoft.Extensions.Options.dll, /store/x64/net6.0/microsoft.extensions.primitives/6.0.0/lib/net6.0/Microsoft.Extensions.Primitives.dll, - /store/x64/net6.0/mongodb.bson/2.3.0/lib/netstandard1.5/MongoDB.Bson.dll, - /store/x64/net6.0/mongodb.driver.core.extensions.diagnosticsources/1.1.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, - /store/x64/net6.0/mongodb.driver.core/2.3.0/lib/netstandard1.5/MongoDB.Driver.Core.dll, + /store/x64/net6.0/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, + /store/x64/net6.0/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, + /store/x64/net6.0/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x64/net6.0/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x64/net6.0/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x64/netcoreapp3.1/artifact.xml, + /store/x64/netcoreapp3.1/dnsclient/1.4.0/lib/netstandard2.1/DnsClient.dll, /store/x64/netcoreapp3.1/microsoft.extensions.configuration.abstractions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll, /store/x64/netcoreapp3.1/microsoft.extensions.configuration.binder/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.dll, /store/x64/netcoreapp3.1/microsoft.extensions.configuration/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.dll, @@ -84,13 +92,15 @@ /store/x64/netcoreapp3.1/microsoft.extensions.options.configurationextensions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, /store/x64/netcoreapp3.1/microsoft.extensions.options/6.0.0/lib/netstandard2.1/Microsoft.Extensions.Options.dll, /store/x64/netcoreapp3.1/microsoft.extensions.primitives/6.0.0/lib/netcoreapp3.1/Microsoft.Extensions.Primitives.dll, - /store/x64/netcoreapp3.1/mongodb.bson/2.3.0/lib/netstandard1.5/MongoDB.Bson.dll, - /store/x64/netcoreapp3.1/mongodb.driver.core.extensions.diagnosticsources/1.1.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, - /store/x64/netcoreapp3.1/mongodb.driver.core/2.3.0/lib/netstandard1.5/MongoDB.Driver.Core.dll, - /store/x64/netcoreapp3.1/system.diagnostics.diagnosticsource/5.0.0/lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll, + /store/x64/netcoreapp3.1/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, + /store/x64/netcoreapp3.1/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, + /store/x64/netcoreapp3.1/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x64/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x64/netcoreapp3.1/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x64/netcoreapp3.1/system.diagnostics.diagnosticsource/6.0.0/lib/netstandard2.0/System.Diagnostics.DiagnosticSource.dll, /store/x64/netcoreapp3.1/system.runtime.compilerservices.unsafe/6.0.0/lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.dll, /store/x86/net6.0/artifact.xml, + /store/x86/net6.0/dnsclient/1.4.0/lib/netstandard2.1/DnsClient.dll, /store/x86/net6.0/microsoft.extensions.configuration.abstractions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll, /store/x86/net6.0/microsoft.extensions.configuration.binder/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.dll, /store/x86/net6.0/microsoft.extensions.configuration/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.dll, @@ -102,10 +112,13 @@ /store/x86/net6.0/microsoft.extensions.options.configurationextensions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, /store/x86/net6.0/microsoft.extensions.options/6.0.0/lib/netstandard2.1/Microsoft.Extensions.Options.dll, /store/x86/net6.0/microsoft.extensions.primitives/6.0.0/lib/net6.0/Microsoft.Extensions.Primitives.dll, - /store/x86/net6.0/mongodb.bson/2.3.0/lib/netstandard1.5/MongoDB.Bson.dll, - /store/x86/net6.0/mongodb.driver.core.extensions.diagnosticsources/1.1.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, - /store/x86/net6.0/mongodb.driver.core/2.3.0/lib/netstandard1.5/MongoDB.Driver.Core.dll, + /store/x86/net6.0/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, + /store/x86/net6.0/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, + /store/x86/net6.0/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x86/net6.0/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x86/net6.0/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x86/netcoreapp3.1/artifact.xml, + /store/x86/netcoreapp3.1/dnsclient/1.4.0/lib/netstandard2.1/DnsClient.dll, /store/x86/netcoreapp3.1/microsoft.extensions.configuration.abstractions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll, /store/x86/netcoreapp3.1/microsoft.extensions.configuration.binder/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.dll, /store/x86/netcoreapp3.1/microsoft.extensions.configuration/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.dll, @@ -117,10 +130,11 @@ /store/x86/netcoreapp3.1/microsoft.extensions.options.configurationextensions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, /store/x86/netcoreapp3.1/microsoft.extensions.options/6.0.0/lib/netstandard2.1/Microsoft.Extensions.Options.dll, /store/x86/netcoreapp3.1/microsoft.extensions.primitives/6.0.0/lib/netcoreapp3.1/Microsoft.Extensions.Primitives.dll, - /store/x86/netcoreapp3.1/mongodb.bson/2.3.0/lib/netstandard1.5/MongoDB.Bson.dll, - /store/x86/netcoreapp3.1/mongodb.driver.core.extensions.diagnosticsources/1.1.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, - /store/x86/netcoreapp3.1/mongodb.driver.core/2.3.0/lib/netstandard1.5/MongoDB.Driver.Core.dll, - /store/x86/netcoreapp3.1/system.diagnostics.diagnosticsource/5.0.0/lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll, + /store/x86/netcoreapp3.1/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, + /store/x86/netcoreapp3.1/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, + /store/x86/netcoreapp3.1/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x86/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x86/netcoreapp3.1/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x86/netcoreapp3.1/system.diagnostics.diagnosticsource/6.0.0/lib/netstandard2.0/System.Diagnostics.DiagnosticSource.dll, /store/x86/netcoreapp3.1/system.runtime.compilerservices.unsafe/6.0.0/lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.dll ] \ No newline at end of file diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt index 08450077e7..313bc14430 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt @@ -1,6 +1,10 @@ [ /AdditionalDeps/shared/Microsoft.NETCore.App/3.1.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, + /AdditionalDeps/shared/Microsoft.NETCore.App/3.1.0/runtimes/linux/native/libmongocrypt.so, + /AdditionalDeps/shared/Microsoft.NETCore.App/3.1.0/runtimes/osx/native/libmongocrypt.dylib, /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, + /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/runtimes/linux/native/libmongocrypt.so, + /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/runtimes/osx/native/libmongocrypt.dylib, /OpenTelemetry.AutoInstrumentation.Native.dylib, /integrations.json, /netcoreapp3.1/Google.Protobuf.dll, @@ -58,6 +62,7 @@ /netcoreapp3.1/runtimes/win/lib/netcoreapp2.0/System.Diagnostics.PerformanceCounter.dll, /netcoreapp3.1/runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll, /store/x64/net6.0/artifact.xml, + /store/x64/net6.0/dnsclient/1.4.0/lib/netstandard2.1/DnsClient.dll, /store/x64/net6.0/microsoft.extensions.configuration.abstractions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll, /store/x64/net6.0/microsoft.extensions.configuration.binder/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.dll, /store/x64/net6.0/microsoft.extensions.configuration/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.dll, @@ -69,10 +74,13 @@ /store/x64/net6.0/microsoft.extensions.options.configurationextensions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, /store/x64/net6.0/microsoft.extensions.options/6.0.0/lib/netstandard2.1/Microsoft.Extensions.Options.dll, /store/x64/net6.0/microsoft.extensions.primitives/6.0.0/lib/net6.0/Microsoft.Extensions.Primitives.dll, - /store/x64/net6.0/mongodb.bson/2.3.0/lib/netstandard1.5/MongoDB.Bson.dll, - /store/x64/net6.0/mongodb.driver.core.extensions.diagnosticsources/1.1.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, - /store/x64/net6.0/mongodb.driver.core/2.3.0/lib/netstandard1.5/MongoDB.Driver.Core.dll, + /store/x64/net6.0/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, + /store/x64/net6.0/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, + /store/x64/net6.0/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x64/net6.0/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x64/net6.0/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x64/netcoreapp3.1/artifact.xml, + /store/x64/netcoreapp3.1/dnsclient/1.4.0/lib/netstandard2.1/DnsClient.dll, /store/x64/netcoreapp3.1/microsoft.extensions.configuration.abstractions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll, /store/x64/netcoreapp3.1/microsoft.extensions.configuration.binder/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.dll, /store/x64/netcoreapp3.1/microsoft.extensions.configuration/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.dll, @@ -84,13 +92,15 @@ /store/x64/netcoreapp3.1/microsoft.extensions.options.configurationextensions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, /store/x64/netcoreapp3.1/microsoft.extensions.options/6.0.0/lib/netstandard2.1/Microsoft.Extensions.Options.dll, /store/x64/netcoreapp3.1/microsoft.extensions.primitives/6.0.0/lib/netcoreapp3.1/Microsoft.Extensions.Primitives.dll, - /store/x64/netcoreapp3.1/mongodb.bson/2.3.0/lib/netstandard1.5/MongoDB.Bson.dll, - /store/x64/netcoreapp3.1/mongodb.driver.core.extensions.diagnosticsources/1.1.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, - /store/x64/netcoreapp3.1/mongodb.driver.core/2.3.0/lib/netstandard1.5/MongoDB.Driver.Core.dll, - /store/x64/netcoreapp3.1/system.diagnostics.diagnosticsource/5.0.0/lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll, + /store/x64/netcoreapp3.1/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, + /store/x64/netcoreapp3.1/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, + /store/x64/netcoreapp3.1/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x64/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x64/netcoreapp3.1/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x64/netcoreapp3.1/system.diagnostics.diagnosticsource/6.0.0/lib/netstandard2.0/System.Diagnostics.DiagnosticSource.dll, /store/x64/netcoreapp3.1/system.runtime.compilerservices.unsafe/6.0.0/lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.dll, /store/x86/net6.0/artifact.xml, + /store/x86/net6.0/dnsclient/1.4.0/lib/netstandard2.1/DnsClient.dll, /store/x86/net6.0/microsoft.extensions.configuration.abstractions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll, /store/x86/net6.0/microsoft.extensions.configuration.binder/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.dll, /store/x86/net6.0/microsoft.extensions.configuration/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.dll, @@ -102,10 +112,13 @@ /store/x86/net6.0/microsoft.extensions.options.configurationextensions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, /store/x86/net6.0/microsoft.extensions.options/6.0.0/lib/netstandard2.1/Microsoft.Extensions.Options.dll, /store/x86/net6.0/microsoft.extensions.primitives/6.0.0/lib/net6.0/Microsoft.Extensions.Primitives.dll, - /store/x86/net6.0/mongodb.bson/2.3.0/lib/netstandard1.5/MongoDB.Bson.dll, - /store/x86/net6.0/mongodb.driver.core.extensions.diagnosticsources/1.1.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, - /store/x86/net6.0/mongodb.driver.core/2.3.0/lib/netstandard1.5/MongoDB.Driver.Core.dll, + /store/x86/net6.0/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, + /store/x86/net6.0/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, + /store/x86/net6.0/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x86/net6.0/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x86/net6.0/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x86/netcoreapp3.1/artifact.xml, + /store/x86/netcoreapp3.1/dnsclient/1.4.0/lib/netstandard2.1/DnsClient.dll, /store/x86/netcoreapp3.1/microsoft.extensions.configuration.abstractions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll, /store/x86/netcoreapp3.1/microsoft.extensions.configuration.binder/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.dll, /store/x86/netcoreapp3.1/microsoft.extensions.configuration/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Configuration.dll, @@ -117,10 +130,11 @@ /store/x86/netcoreapp3.1/microsoft.extensions.options.configurationextensions/6.0.0/lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, /store/x86/netcoreapp3.1/microsoft.extensions.options/6.0.0/lib/netstandard2.1/Microsoft.Extensions.Options.dll, /store/x86/netcoreapp3.1/microsoft.extensions.primitives/6.0.0/lib/netcoreapp3.1/Microsoft.Extensions.Primitives.dll, - /store/x86/netcoreapp3.1/mongodb.bson/2.3.0/lib/netstandard1.5/MongoDB.Bson.dll, - /store/x86/netcoreapp3.1/mongodb.driver.core.extensions.diagnosticsources/1.1.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, - /store/x86/netcoreapp3.1/mongodb.driver.core/2.3.0/lib/netstandard1.5/MongoDB.Driver.Core.dll, - /store/x86/netcoreapp3.1/system.diagnostics.diagnosticsource/5.0.0/lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll, + /store/x86/netcoreapp3.1/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, + /store/x86/netcoreapp3.1/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, + /store/x86/netcoreapp3.1/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x86/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x86/netcoreapp3.1/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x86/netcoreapp3.1/system.diagnostics.diagnosticsource/6.0.0/lib/netstandard2.0/System.Diagnostics.DiagnosticSource.dll, /store/x86/netcoreapp3.1/system.runtime.compilerservices.unsafe/6.0.0/lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.dll ] \ No newline at end of file diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt index ae9aba9373..b4575f1006 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt @@ -1,6 +1,10 @@ [ \AdditionalDeps\shared\Microsoft.NETCore.App\3.1.0\OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, + \AdditionalDeps\shared\Microsoft.NETCore.App\3.1.0\runtimes\linux\native\libmongocrypt.so, + \AdditionalDeps\shared\Microsoft.NETCore.App\3.1.0\runtimes\osx\native\libmongocrypt.dylib, \AdditionalDeps\shared\Microsoft.NETCore.App\6.0.0\OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, + \AdditionalDeps\shared\Microsoft.NETCore.App\6.0.0\runtimes\linux\native\libmongocrypt.so, + \AdditionalDeps\shared\Microsoft.NETCore.App\6.0.0\runtimes\osx\native\libmongocrypt.dylib, \integrations.json, \net462\Google.Protobuf.dll, \net462\Grpc.Core.Api.dll, @@ -202,6 +206,7 @@ \netcoreapp3.1\runtimes\win\lib\netcoreapp2.0\System.Diagnostics.PerformanceCounter.dll, \netcoreapp3.1\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll, \store\x64\net6.0\artifact.xml, + \store\x64\net6.0\dnsclient\1.4.0\lib\netstandard2.1\DnsClient.dll, \store\x64\net6.0\microsoft.extensions.configuration.abstractions\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll, \store\x64\net6.0\microsoft.extensions.configuration.binder\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll, \store\x64\net6.0\microsoft.extensions.configuration\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll, @@ -213,10 +218,13 @@ \store\x64\net6.0\microsoft.extensions.options.configurationextensions\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, \store\x64\net6.0\microsoft.extensions.options\6.0.0\lib\netstandard2.1\Microsoft.Extensions.Options.dll, \store\x64\net6.0\microsoft.extensions.primitives\6.0.0\lib\net6.0\Microsoft.Extensions.Primitives.dll, - \store\x64\net6.0\mongodb.bson\2.3.0\lib\netstandard1.5\MongoDB.Bson.dll, - \store\x64\net6.0\mongodb.driver.core.extensions.diagnosticsources\1.1.0\lib\netstandard2.0\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, - \store\x64\net6.0\mongodb.driver.core\2.3.0\lib\netstandard1.5\MongoDB.Driver.Core.dll, + \store\x64\net6.0\mongodb.bson\2.13.3\lib\netstandard2.1\MongoDB.Bson.dll, + \store\x64\net6.0\mongodb.driver.core.extensions.diagnosticsources\1.2.0\lib\netstandard2.0\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, + \store\x64\net6.0\mongodb.driver.core\2.13.3\lib\netstandard2.1\MongoDB.Driver.Core.dll, + \store\x64\net6.0\mongodb.libmongocrypt\1.2.2\lib\netstandard2.1\MongoDB.Libmongocrypt.dll, + \store\x64\net6.0\sharpcompress\0.23.0\lib\netstandard2.0\SharpCompress.dll, \store\x64\netcoreapp3.1\artifact.xml, + \store\x64\netcoreapp3.1\dnsclient\1.4.0\lib\netstandard2.1\DnsClient.dll, \store\x64\netcoreapp3.1\microsoft.extensions.configuration.abstractions\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll, \store\x64\netcoreapp3.1\microsoft.extensions.configuration.binder\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll, \store\x64\netcoreapp3.1\microsoft.extensions.configuration\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll, @@ -228,13 +236,15 @@ \store\x64\netcoreapp3.1\microsoft.extensions.options.configurationextensions\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, \store\x64\netcoreapp3.1\microsoft.extensions.options\6.0.0\lib\netstandard2.1\Microsoft.Extensions.Options.dll, \store\x64\netcoreapp3.1\microsoft.extensions.primitives\6.0.0\lib\netcoreapp3.1\Microsoft.Extensions.Primitives.dll, - \store\x64\netcoreapp3.1\mongodb.bson\2.3.0\lib\netstandard1.5\MongoDB.Bson.dll, - \store\x64\netcoreapp3.1\mongodb.driver.core.extensions.diagnosticsources\1.1.0\lib\netstandard2.0\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, - \store\x64\netcoreapp3.1\mongodb.driver.core\2.3.0\lib\netstandard1.5\MongoDB.Driver.Core.dll, - \store\x64\netcoreapp3.1\system.diagnostics.diagnosticsource\5.0.0\lib\netstandard1.3\System.Diagnostics.DiagnosticSource.dll, + \store\x64\netcoreapp3.1\mongodb.bson\2.13.3\lib\netstandard2.1\MongoDB.Bson.dll, + \store\x64\netcoreapp3.1\mongodb.driver.core.extensions.diagnosticsources\1.2.0\lib\netstandard2.0\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, + \store\x64\netcoreapp3.1\mongodb.driver.core\2.13.3\lib\netstandard2.1\MongoDB.Driver.Core.dll, + \store\x64\netcoreapp3.1\mongodb.libmongocrypt\1.2.2\lib\netstandard2.1\MongoDB.Libmongocrypt.dll, + \store\x64\netcoreapp3.1\sharpcompress\0.23.0\lib\netstandard2.0\SharpCompress.dll, \store\x64\netcoreapp3.1\system.diagnostics.diagnosticsource\6.0.0\lib\netstandard2.0\System.Diagnostics.DiagnosticSource.dll, \store\x64\netcoreapp3.1\system.runtime.compilerservices.unsafe\6.0.0\lib\netcoreapp3.1\System.Runtime.CompilerServices.Unsafe.dll, \store\x86\net6.0\artifact.xml, + \store\x86\net6.0\dnsclient\1.4.0\lib\netstandard2.1\DnsClient.dll, \store\x86\net6.0\microsoft.extensions.configuration.abstractions\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll, \store\x86\net6.0\microsoft.extensions.configuration.binder\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll, \store\x86\net6.0\microsoft.extensions.configuration\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll, @@ -246,10 +256,13 @@ \store\x86\net6.0\microsoft.extensions.options.configurationextensions\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, \store\x86\net6.0\microsoft.extensions.options\6.0.0\lib\netstandard2.1\Microsoft.Extensions.Options.dll, \store\x86\net6.0\microsoft.extensions.primitives\6.0.0\lib\net6.0\Microsoft.Extensions.Primitives.dll, - \store\x86\net6.0\mongodb.bson\2.3.0\lib\netstandard1.5\MongoDB.Bson.dll, - \store\x86\net6.0\mongodb.driver.core.extensions.diagnosticsources\1.1.0\lib\netstandard2.0\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, - \store\x86\net6.0\mongodb.driver.core\2.3.0\lib\netstandard1.5\MongoDB.Driver.Core.dll, + \store\x86\net6.0\mongodb.bson\2.13.3\lib\netstandard2.1\MongoDB.Bson.dll, + \store\x86\net6.0\mongodb.driver.core.extensions.diagnosticsources\1.2.0\lib\netstandard2.0\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, + \store\x86\net6.0\mongodb.driver.core\2.13.3\lib\netstandard2.1\MongoDB.Driver.Core.dll, + \store\x86\net6.0\mongodb.libmongocrypt\1.2.2\lib\netstandard2.1\MongoDB.Libmongocrypt.dll, + \store\x86\net6.0\sharpcompress\0.23.0\lib\netstandard2.0\SharpCompress.dll, \store\x86\netcoreapp3.1\artifact.xml, + \store\x86\netcoreapp3.1\dnsclient\1.4.0\lib\netstandard2.1\DnsClient.dll, \store\x86\netcoreapp3.1\microsoft.extensions.configuration.abstractions\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll, \store\x86\netcoreapp3.1\microsoft.extensions.configuration.binder\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll, \store\x86\netcoreapp3.1\microsoft.extensions.configuration\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll, @@ -261,10 +274,11 @@ \store\x86\netcoreapp3.1\microsoft.extensions.options.configurationextensions\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, \store\x86\netcoreapp3.1\microsoft.extensions.options\6.0.0\lib\netstandard2.1\Microsoft.Extensions.Options.dll, \store\x86\netcoreapp3.1\microsoft.extensions.primitives\6.0.0\lib\netcoreapp3.1\Microsoft.Extensions.Primitives.dll, - \store\x86\netcoreapp3.1\mongodb.bson\2.3.0\lib\netstandard1.5\MongoDB.Bson.dll, - \store\x86\netcoreapp3.1\mongodb.driver.core.extensions.diagnosticsources\1.1.0\lib\netstandard2.0\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, - \store\x86\netcoreapp3.1\mongodb.driver.core\2.3.0\lib\netstandard1.5\MongoDB.Driver.Core.dll, - \store\x86\netcoreapp3.1\system.diagnostics.diagnosticsource\5.0.0\lib\netstandard1.3\System.Diagnostics.DiagnosticSource.dll, + \store\x86\netcoreapp3.1\mongodb.bson\2.13.3\lib\netstandard2.1\MongoDB.Bson.dll, + \store\x86\netcoreapp3.1\mongodb.driver.core.extensions.diagnosticsources\1.2.0\lib\netstandard2.0\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, + \store\x86\netcoreapp3.1\mongodb.driver.core\2.13.3\lib\netstandard2.1\MongoDB.Driver.Core.dll, + \store\x86\netcoreapp3.1\mongodb.libmongocrypt\1.2.2\lib\netstandard2.1\MongoDB.Libmongocrypt.dll, + \store\x86\netcoreapp3.1\sharpcompress\0.23.0\lib\netstandard2.0\SharpCompress.dll, \store\x86\netcoreapp3.1\system.diagnostics.diagnosticsource\6.0.0\lib\netstandard2.0\System.Diagnostics.DiagnosticSource.dll, \store\x86\netcoreapp3.1\system.runtime.compilerservices.unsafe\6.0.0\lib\netcoreapp3.1\System.Runtime.CompilerServices.Unsafe.dll, \win-x64\OpenTelemetry.AutoInstrumentation.Native.dll, From 296ba11f3e5b8f87e9b32dec3c835011a816e77f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Tue, 4 Oct 2022 08:59:20 +0200 Subject: [PATCH 03/13] Bump MongoDB.Driver in test application --- .../TestApplication.MongoDB/TestApplication.MongoDB.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-applications/integrations/TestApplication.MongoDB/TestApplication.MongoDB.csproj b/test/test-applications/integrations/TestApplication.MongoDB/TestApplication.MongoDB.csproj index ee09d2d3a2..a760244b2a 100644 --- a/test/test-applications/integrations/TestApplication.MongoDB/TestApplication.MongoDB.csproj +++ b/test/test-applications/integrations/TestApplication.MongoDB/TestApplication.MongoDB.csproj @@ -5,7 +5,7 @@ - 2.13.0 + 2.13.3 $(DefineConstants);MONGODB_2_15 $(DefineConstants);MONGODB_2_7 From 6115a83974d34cf3fa363f2f4f260c18449d0f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Tue, 4 Oct 2022 09:19:30 +0200 Subject: [PATCH 04/13] update documentation and changelog --- CHANGELOG.md | 7 +++++++ docs/config.md | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc40a0ae85..824a176b55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Replaced `OTEL_DOTNET_AUTO_TRACES_PLUGINS` and `OTEL_DOTNET_AUTO_METRICS_PLUGINS` with new environment variable `OTEL_DOTNET_AUTO_PLUGINS`. +- Adjusted tags for MongoDB integration. See [pull request](https://github.com/jbogard/MongoDB.Driver.Core.Extensions.DiagnosticSources/pull/18) + for more details. + +### Removed + +- Removed support for MongoDB integration for [MongoDB.Driver.Core](https://www.nuget.org/packages/MongoDB.Driver.Core) + older than 2.13.3. ### Fixed diff --git a/docs/config.md b/docs/config.md index 6478e3711c..2cf7a91fda 100644 --- a/docs/config.md +++ b/docs/config.md @@ -39,7 +39,7 @@ for more details. | `GraphQL` | [GraphQL](https://www.nuget.org/packages/GraphQL/) | ≥2.3.0 & < 3.0.0 | bytecode | | `GrpcNetClient` | [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client) | ≥2.43.0 & < 3.0.0 | source | | `HttpClient` | [System.Net.Http.HttpClient](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient) and [System.Net.HttpWebRequest](https://docs.microsoft.com/dotnet/api/system.net.httpwebrequest) | * | source | -| `MongoDB` | [MongoDB.Driver.Core](https://www.nuget.org/packages/MongoDB.Driver.Core) **Not supported on .NET Framework** | ≥2.3.0 & < 3.0.0 | source & bytecode | +| `MongoDB` | [MongoDB.Driver.Core](https://www.nuget.org/packages/MongoDB.Driver.Core) **Not supported on .NET Framework** | ≥2.13.3 & < 3.0.0 | source & bytecode | | `MySqlData` | [MySql.Data](https://www.nuget.org/packages/MySql.Data) **Not supported on .NET Framework** | ≥6.10.7 | source | | `Npgsql` | [Npgsql](https://www.nuget.org/packages/Npgsql) | ≥6.0.0 | source | | `SqlClient` | [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) and [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) | * | source | From 6291a5c9c4817b0a61535018e57451c451f650a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Tue, 4 Oct 2022 09:22:30 +0200 Subject: [PATCH 05/13] cleanup leftovers for MongoDB 2.7 --- .../integrations/TestApplication.MongoDB/Program.cs | 9 +-------- .../TestApplication.MongoDB.csproj | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/test/test-applications/integrations/TestApplication.MongoDB/Program.cs b/test/test-applications/integrations/TestApplication.MongoDB/Program.cs index 2a4480c998..d9272af59e 100644 --- a/test/test-applications/integrations/TestApplication.MongoDB/Program.cs +++ b/test/test-applications/integrations/TestApplication.MongoDB/Program.cs @@ -76,11 +76,8 @@ public static void Run(IMongoCollection collection, BsonDocument n collection.DeleteMany(allFilter); collection.InsertOne(newDocument); -#if MONGODB_2_7 var count = collection.CountDocuments(new BsonDocument()); -#else - var count = collection.Count(new BsonDocument()); -#endif + Console.WriteLine($"Documents: {count}"); var find = collection.Find(allFilter); @@ -115,11 +112,7 @@ public static async Task RunAsync(IMongoCollection collection, Bso await collection.DeleteManyAsync(allFilter); await collection.InsertOneAsync(newDocument); -#if MONGODB_2_7 var count = await collection.CountDocumentsAsync(new BsonDocument()); -#else - var count = await collection.CountAsync(new BsonDocument()); -#endif Console.WriteLine($"Documents: {count}"); diff --git a/test/test-applications/integrations/TestApplication.MongoDB/TestApplication.MongoDB.csproj b/test/test-applications/integrations/TestApplication.MongoDB/TestApplication.MongoDB.csproj index a760244b2a..45070bec84 100644 --- a/test/test-applications/integrations/TestApplication.MongoDB/TestApplication.MongoDB.csproj +++ b/test/test-applications/integrations/TestApplication.MongoDB/TestApplication.MongoDB.csproj @@ -7,7 +7,6 @@ 2.13.3 $(DefineConstants);MONGODB_2_15 - $(DefineConstants);MONGODB_2_7 false From fdca153790eaff75b75c0b15d1de574d1c34c216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Tue, 4 Oct 2022 09:26:37 +0200 Subject: [PATCH 06/13] update instrumentation definition --- integrations.json | 4 ++-- .../Instrumentations/MongoDb/MongoClientIntegration.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/integrations.json b/integrations.json index 04fc0b8ac2..229f9144da 100644 --- a/integrations.json +++ b/integrations.json @@ -13,8 +13,8 @@ "MongoDB.Driver.MongoClientSettings" ], "minimum_major": 2, - "minimum_minor": 3, - "minimum_patch": 0, + "minimum_minor": 13, + "minimum_patch": 3, "maximum_major": 2, "maximum_minor": 65535, "maximum_patch": 65535 diff --git a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/MongoDb/MongoClientIntegration.cs b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/MongoDb/MongoClientIntegration.cs index c0971bd97c..f37c9725f1 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/MongoDb/MongoClientIntegration.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/MongoDb/MongoClientIntegration.cs @@ -34,7 +34,7 @@ namespace OpenTelemetry.AutoInstrumentation.Instrumentations.MongoDB; MethodName = ".ctor", ReturnTypeName = ClrNames.Void, ParameterTypeNames = new[] { "MongoDB.Driver.MongoClientSettings" }, - MinimumVersion = "2.3.0", + MinimumVersion = "2.13.3", MaximumVersion = "2.65535.65535", IntegrationName = "MongoDB")] public class MongoClientIntegration From fa0fec1e3ee3afe1b3ea94aa9b201b40d4db9220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Tue, 4 Oct 2022 12:41:22 +0200 Subject: [PATCH 07/13] cleanup AdditionalDeps/runtime folder --- build/nuke/Build.Steps.cs | 3 ++- .../BuildTests.DistributionStructure_linux.verified.txt | 4 ---- .../BuildTests.DistributionStructure_osx.verified.txt | 4 ---- .../BuildTests.DistributionStructure_windows.verified.txt | 4 ---- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/build/nuke/Build.Steps.cs b/build/nuke/Build.Steps.cs index c59fd2fa74..957219269e 100644 --- a/build/nuke/Build.Steps.cs +++ b/build/nuke/Build.Steps.cs @@ -372,7 +372,8 @@ partial class Build // Major and Minor version are extracted from framework and default value of 0 is appended for patch. .SetOutput(AdditionalDepsDirectory / "shared" / "Microsoft.NETCore.App" / framework.ToString().Substring(framework.ToString().Length - 3) + ".0"))); - AdditionalDepsDirectory.GlobFiles("**/*.dll", "**/*.pdb", "**/*.xml").ForEach(DeleteFile); + AdditionalDepsDirectory.GlobFiles("**/*.dll", "**/*.pdb", "**/*.xml", "**/*.dylib", "**/*.so").ForEach(DeleteFile); + AdditionalDepsDirectory.GlobDirectories("**/runtimes").ForEach(DeleteDirectory); AdditionalDepsDirectory.GlobFiles("**/*deps.json") .ForEach(file => { diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_linux.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_linux.verified.txt index 15daef6500..83c10c58eb 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_linux.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_linux.verified.txt @@ -1,10 +1,6 @@ [ /AdditionalDeps/shared/Microsoft.NETCore.App/3.1.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, - /AdditionalDeps/shared/Microsoft.NETCore.App/3.1.0/runtimes/linux/native/libmongocrypt.so, - /AdditionalDeps/shared/Microsoft.NETCore.App/3.1.0/runtimes/osx/native/libmongocrypt.dylib, /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, - /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/runtimes/linux/native/libmongocrypt.so, - /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/runtimes/osx/native/libmongocrypt.dylib, /OpenTelemetry.AutoInstrumentation.Native.so, /integrations.json, /netcoreapp3.1/Google.Protobuf.dll, diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt index 313bc14430..942b3fa3ac 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt @@ -1,10 +1,6 @@ [ /AdditionalDeps/shared/Microsoft.NETCore.App/3.1.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, - /AdditionalDeps/shared/Microsoft.NETCore.App/3.1.0/runtimes/linux/native/libmongocrypt.so, - /AdditionalDeps/shared/Microsoft.NETCore.App/3.1.0/runtimes/osx/native/libmongocrypt.dylib, /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, - /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/runtimes/linux/native/libmongocrypt.so, - /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/runtimes/osx/native/libmongocrypt.dylib, /OpenTelemetry.AutoInstrumentation.Native.dylib, /integrations.json, /netcoreapp3.1/Google.Protobuf.dll, diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt index b4575f1006..69012ccc78 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt @@ -1,10 +1,6 @@ [ \AdditionalDeps\shared\Microsoft.NETCore.App\3.1.0\OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, - \AdditionalDeps\shared\Microsoft.NETCore.App\3.1.0\runtimes\linux\native\libmongocrypt.so, - \AdditionalDeps\shared\Microsoft.NETCore.App\3.1.0\runtimes\osx\native\libmongocrypt.dylib, \AdditionalDeps\shared\Microsoft.NETCore.App\6.0.0\OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, - \AdditionalDeps\shared\Microsoft.NETCore.App\6.0.0\runtimes\linux\native\libmongocrypt.so, - \AdditionalDeps\shared\Microsoft.NETCore.App\6.0.0\runtimes\osx\native\libmongocrypt.dylib, \integrations.json, \net462\Google.Protobuf.dll, \net462\Grpc.Core.Api.dll, From 22551b9a26202dffedc070d942fef339bde8de94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Thu, 6 Oct 2022 11:33:43 +0200 Subject: [PATCH 08/13] Copy Native dependencies to Store --- build/nuke/Build.Steps.cs | 151 ++++++++++++++---- ...s.DistributionStructure_linux.verified.txt | 24 +++ ...sts.DistributionStructure_osx.verified.txt | 24 +++ ...DistributionStructure_windows.verified.txt | 24 +++ 4 files changed, 189 insertions(+), 34 deletions(-) diff --git a/build/nuke/Build.Steps.cs b/build/nuke/Build.Steps.cs index 957219269e..5cad767526 100644 --- a/build/nuke/Build.Steps.cs +++ b/build/nuke/Build.Steps.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text.Json; using System.Text.RegularExpressions; using Extensions; using Nuke.Common; @@ -350,41 +351,123 @@ partial class Build } }); - Target CopyAdditionalDeps => _ => _ - .Unlisted() - .Description("Creates AutoInstrumentation.AdditionalDeps and shared store in tracer-home") - .After(CompileManagedSrc) - .Executes(() => - { - AdditionalDepsDirectory.GlobFiles("**/*deps.json").ForEach(DeleteFile); + Target CopyAdditionalDeps => _ => + { + return _ + .Unlisted() + .Description("Creates AutoInstrumentation.AdditionalDeps and shared store in tracer-home") + .After(CompileManagedSrc) + .Executes(() => + { + AdditionalDepsDirectory.GlobFiles("**/*deps.json").ForEach(DeleteFile); - DotNetPublish(s => s - .SetProject(Solution.GetProject(Projects.AutoInstrumentationAdditionalDeps)) - .SetConfiguration(BuildConfiguration) - .SetTargetPlatformAnyCPU() - .SetProperty("TracerHomePath", TracerHomeDirectory) - .EnableNoBuild() - .EnableNoRestore() - .CombineWith(TestFrameworks.ExceptNetFramework(), (p, framework) => p - .SetFramework(framework) - // Additional-deps probes the directory using SemVer format. - // Example: For netcoreapp3.1 framework, additional-deps uses 3.1.0 or 3.1.1 and so on. - // Major and Minor version are extracted from framework and default value of 0 is appended for patch. - .SetOutput(AdditionalDepsDirectory / "shared" / "Microsoft.NETCore.App" / framework.ToString().Substring(framework.ToString().Length - 3) + ".0"))); - - AdditionalDepsDirectory.GlobFiles("**/*.dll", "**/*.pdb", "**/*.xml", "**/*.dylib", "**/*.so").ForEach(DeleteFile); - AdditionalDepsDirectory.GlobDirectories("**/runtimes").ForEach(DeleteDirectory); - AdditionalDepsDirectory.GlobFiles("**/*deps.json") - .ForEach(file => - { - string depsJsonContent = File.ReadAllText(file); - // Remove OpenTelemetry.Instrumentation.AutoInstrumentationAdditionalDeps entry from target section. - depsJsonContent = Regex.Replace(depsJsonContent, "\"OpenTelemetry(.+)AutoInstrumentation.AdditionalDeps.dll(.+?)}," + Environment.NewLine + "(.+?)\"", "\"", RegexOptions.IgnoreCase | RegexOptions.Singleline); - // Remove OpenTelemetry.Instrumentation.AutoInstrumentationAdditionalDeps entry from library section and write to file. - depsJsonContent = Regex.Replace(depsJsonContent, "\"OpenTelemetry(.+?)}," + Environment.NewLine + "(.+?)\"", "\"", RegexOptions.IgnoreCase | RegexOptions.Singleline); - File.WriteAllText(file, depsJsonContent); - }); - }); + DotNetPublish(s => s + .SetProject(Solution.GetProject(Projects.AutoInstrumentationAdditionalDeps)) + .SetConfiguration(BuildConfiguration) + .SetTargetPlatformAnyCPU() + .SetProperty("TracerHomePath", TracerHomeDirectory) + .EnableNoBuild() + .EnableNoRestore() + .CombineWith(TestFrameworks.ExceptNetFramework(), (p, framework) => p + .SetFramework(framework) + // Additional-deps probes the directory using SemVer format. + // Example: For netcoreapp3.1 framework, additional-deps uses 3.1.0 or 3.1.1 and so on. + // Major and Minor version are extracted from framework and default value of 0 is appended for patch. + .SetOutput(AdditionalDepsDirectory / "shared" / "Microsoft.NETCore.App" / framework.ToString().Substring(framework.ToString().Length - 3) + ".0"))); + + + AdditionalDepsDirectory.GlobFiles("**/*deps.json") + .ForEach(file => + { + var depsJsonContent = File.ReadAllText(file); + CopyNativeDependenciesToStore(file, depsJsonContent); + + RemoveOpenTelemetryAutoInstrumentationAdditionalDepsFromDepsFile(depsJsonContent, file); + }); + RemoveFilesFromAdditionalDepsDirectory(); + + void CopyNativeDependenciesToStore(AbsolutePath file, string depsJsonContent) + { + var depsDirectory = file.Parent; + var targetDirectory = Path.Combine(depsDirectory.Parent.Parent.Parent.Parent, "store"); + using var jsonDocument = JsonDocument.Parse(depsJsonContent); + + var runtimeName = jsonDocument.RootElement.GetProperty("runtimeTarget").GetProperty("name").GetString(); + var folderRuntimeName = MapToFolderName(runtimeName); + + string MapToFolderName(string runtimeName) + { + switch (runtimeName) + { + case ".NETCoreApp,Version=v3.1": + return "netcoreapp3.1"; + case ".NETCoreApp,Version=v6.0": + return "net6.0"; + } + + throw new ArgumentOutOfRangeException(nameof(runtimeName), runtimeName, + "This value is not supported. You have probably introduced new .NET version to AutoInstrumentation"); + } + + foreach (var targetProperty in jsonDocument.RootElement.GetProperty("targets").EnumerateObject()) + { + var target = targetProperty.Value; + + foreach (var packages in target.EnumerateObject()) + { + if (packages.Value.TryGetProperty("runtimeTargets", out var runtimeTargets)) + { + foreach (var runtimeDependency in runtimeTargets.EnumerateObject()) + { + var sourceFileName = Path.Combine(depsDirectory, runtimeDependency.Name); + + + var targetFileNameX64 = Path.Combine(targetDirectory, "x64", folderRuntimeName, + packages.Name.ToLowerInvariant(), runtimeDependency.Name); + var targetFileNameX86 = Path.Combine(targetDirectory, "x86", folderRuntimeName, + packages.Name.ToLowerInvariant(), runtimeDependency.Name); + + var targetDirectoryX64 = Path.GetDirectoryName(targetFileNameX64); + var targetDirectoryX86 = Path.GetDirectoryName(targetFileNameX86); + + if (!Directory.Exists(targetDirectoryX64)) + { + Directory.CreateDirectory(targetDirectoryX64); + } + + File.Copy(sourceFileName, targetFileNameX64); + + if (!Directory.Exists(targetDirectoryX86)) + { + Directory.CreateDirectory(targetDirectoryX86); + } + + File.Copy(sourceFileName, targetFileNameX86); + } + } + } + } + } + + void RemoveOpenTelemetryAutoInstrumentationAdditionalDepsFromDepsFile(string depsJsonContent, AbsolutePath file) + { + // Remove OpenTelemetry.Instrumentation.AutoInstrumentationAdditionalDeps entry from target section. + depsJsonContent = Regex.Replace(depsJsonContent, + "\"OpenTelemetry(.+)AutoInstrumentation.AdditionalDeps.dll(.+?)}," + Environment.NewLine + "(.+?)\"", "\"", + RegexOptions.IgnoreCase | RegexOptions.Singleline); + // Remove OpenTelemetry.Instrumentation.AutoInstrumentationAdditionalDeps entry from library section and write to file. + depsJsonContent = Regex.Replace(depsJsonContent, "\"OpenTelemetry(.+?)}," + Environment.NewLine + "(.+?)\"", "\"", + RegexOptions.IgnoreCase | RegexOptions.Singleline); + File.WriteAllText(file, depsJsonContent); + } + + void RemoveFilesFromAdditionalDepsDirectory() + { + AdditionalDepsDirectory.GlobFiles("**/*.dll", "**/*.pdb", "**/*.xml", "**/*.dylib", "**/*.so").ForEach(DeleteFile); + AdditionalDepsDirectory.GlobDirectories("**/runtimes").ForEach(DeleteDirectory); + } + }); + }; Target InstallDocumentationTools => _ => _ .Description("Installs markdownlint-cli and cspell locally. npm is required") diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_linux.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_linux.verified.txt index 83c10c58eb..9d7097b9ee 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_linux.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_linux.verified.txt @@ -73,7 +73,13 @@ /store/x64/net6.0/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, /store/x64/net6.0/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /store/x64/net6.0/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x64/net6.0/mongodb.driver.core/2.13.3/runtimes/win/native/libzstd.dll, + /store/x64/net6.0/mongodb.driver.core/2.13.3/runtimes/win/native/snappy32.dll, + /store/x64/net6.0/mongodb.driver.core/2.13.3/runtimes/win/native/snappy64.dll, /store/x64/net6.0/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x64/net6.0/mongodb.libmongocrypt/1.2.2/runtimes/linux/native/libmongocrypt.so, + /store/x64/net6.0/mongodb.libmongocrypt/1.2.2/runtimes/osx/native/libmongocrypt.dylib, + /store/x64/net6.0/mongodb.libmongocrypt/1.2.2/runtimes/win/native/mongocrypt.dll, /store/x64/net6.0/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x64/netcoreapp3.1/artifact.xml, /store/x64/netcoreapp3.1/dnsclient/1.4.0/lib/netstandard2.1/DnsClient.dll, @@ -91,7 +97,13 @@ /store/x64/netcoreapp3.1/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, /store/x64/netcoreapp3.1/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /store/x64/netcoreapp3.1/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x64/netcoreapp3.1/mongodb.driver.core/2.13.3/runtimes/win/native/libzstd.dll, + /store/x64/netcoreapp3.1/mongodb.driver.core/2.13.3/runtimes/win/native/snappy32.dll, + /store/x64/netcoreapp3.1/mongodb.driver.core/2.13.3/runtimes/win/native/snappy64.dll, /store/x64/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x64/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/runtimes/linux/native/libmongocrypt.so, + /store/x64/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/runtimes/osx/native/libmongocrypt.dylib, + /store/x64/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/runtimes/win/native/mongocrypt.dll, /store/x64/netcoreapp3.1/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x64/netcoreapp3.1/system.diagnostics.diagnosticsource/6.0.0/lib/netstandard2.0/System.Diagnostics.DiagnosticSource.dll, /store/x64/netcoreapp3.1/system.runtime.compilerservices.unsafe/6.0.0/lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.dll, @@ -111,7 +123,13 @@ /store/x86/net6.0/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, /store/x86/net6.0/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /store/x86/net6.0/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x86/net6.0/mongodb.driver.core/2.13.3/runtimes/win/native/libzstd.dll, + /store/x86/net6.0/mongodb.driver.core/2.13.3/runtimes/win/native/snappy32.dll, + /store/x86/net6.0/mongodb.driver.core/2.13.3/runtimes/win/native/snappy64.dll, /store/x86/net6.0/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x86/net6.0/mongodb.libmongocrypt/1.2.2/runtimes/linux/native/libmongocrypt.so, + /store/x86/net6.0/mongodb.libmongocrypt/1.2.2/runtimes/osx/native/libmongocrypt.dylib, + /store/x86/net6.0/mongodb.libmongocrypt/1.2.2/runtimes/win/native/mongocrypt.dll, /store/x86/net6.0/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x86/netcoreapp3.1/artifact.xml, /store/x86/netcoreapp3.1/dnsclient/1.4.0/lib/netstandard2.1/DnsClient.dll, @@ -129,7 +147,13 @@ /store/x86/netcoreapp3.1/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, /store/x86/netcoreapp3.1/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /store/x86/netcoreapp3.1/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x86/netcoreapp3.1/mongodb.driver.core/2.13.3/runtimes/win/native/libzstd.dll, + /store/x86/netcoreapp3.1/mongodb.driver.core/2.13.3/runtimes/win/native/snappy32.dll, + /store/x86/netcoreapp3.1/mongodb.driver.core/2.13.3/runtimes/win/native/snappy64.dll, /store/x86/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x86/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/runtimes/linux/native/libmongocrypt.so, + /store/x86/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/runtimes/osx/native/libmongocrypt.dylib, + /store/x86/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/runtimes/win/native/mongocrypt.dll, /store/x86/netcoreapp3.1/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x86/netcoreapp3.1/system.diagnostics.diagnosticsource/6.0.0/lib/netstandard2.0/System.Diagnostics.DiagnosticSource.dll, /store/x86/netcoreapp3.1/system.runtime.compilerservices.unsafe/6.0.0/lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.dll diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt index 942b3fa3ac..ec1ed1d7be 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt @@ -73,7 +73,13 @@ /store/x64/net6.0/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, /store/x64/net6.0/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /store/x64/net6.0/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x64/net6.0/mongodb.driver.core/2.13.3/runtimes/win/native/libzstd.dll, + /store/x64/net6.0/mongodb.driver.core/2.13.3/runtimes/win/native/snappy32.dll, + /store/x64/net6.0/mongodb.driver.core/2.13.3/runtimes/win/native/snappy64.dll, /store/x64/net6.0/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x64/net6.0/mongodb.libmongocrypt/1.2.2/runtimes/linux/native/libmongocrypt.so, + /store/x64/net6.0/mongodb.libmongocrypt/1.2.2/runtimes/osx/native/libmongocrypt.dylib, + /store/x64/net6.0/mongodb.libmongocrypt/1.2.2/runtimes/win/native/mongocrypt.dll, /store/x64/net6.0/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x64/netcoreapp3.1/artifact.xml, /store/x64/netcoreapp3.1/dnsclient/1.4.0/lib/netstandard2.1/DnsClient.dll, @@ -91,7 +97,13 @@ /store/x64/netcoreapp3.1/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, /store/x64/netcoreapp3.1/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /store/x64/netcoreapp3.1/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x64/netcoreapp3.1/mongodb.driver.core/2.13.3/runtimes/win/native/libzstd.dll, + /store/x64/netcoreapp3.1/mongodb.driver.core/2.13.3/runtimes/win/native/snappy32.dll, + /store/x64/netcoreapp3.1/mongodb.driver.core/2.13.3/runtimes/win/native/snappy64.dll, /store/x64/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x64/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/runtimes/linux/native/libmongocrypt.so, + /store/x64/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/runtimes/osx/native/libmongocrypt.dylib, + /store/x64/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/runtimes/win/native/mongocrypt.dll, /store/x64/netcoreapp3.1/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x64/netcoreapp3.1/system.diagnostics.diagnosticsource/6.0.0/lib/netstandard2.0/System.Diagnostics.DiagnosticSource.dll, /store/x64/netcoreapp3.1/system.runtime.compilerservices.unsafe/6.0.0/lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.dll, @@ -111,7 +123,13 @@ /store/x86/net6.0/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, /store/x86/net6.0/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /store/x86/net6.0/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x86/net6.0/mongodb.driver.core/2.13.3/runtimes/win/native/libzstd.dll, + /store/x86/net6.0/mongodb.driver.core/2.13.3/runtimes/win/native/snappy32.dll, + /store/x86/net6.0/mongodb.driver.core/2.13.3/runtimes/win/native/snappy64.dll, /store/x86/net6.0/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x86/net6.0/mongodb.libmongocrypt/1.2.2/runtimes/linux/native/libmongocrypt.so, + /store/x86/net6.0/mongodb.libmongocrypt/1.2.2/runtimes/osx/native/libmongocrypt.dylib, + /store/x86/net6.0/mongodb.libmongocrypt/1.2.2/runtimes/win/native/mongocrypt.dll, /store/x86/net6.0/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x86/netcoreapp3.1/artifact.xml, /store/x86/netcoreapp3.1/dnsclient/1.4.0/lib/netstandard2.1/DnsClient.dll, @@ -129,7 +147,13 @@ /store/x86/netcoreapp3.1/mongodb.bson/2.13.3/lib/netstandard2.1/MongoDB.Bson.dll, /store/x86/netcoreapp3.1/mongodb.driver.core.extensions.diagnosticsources/1.2.0/lib/netstandard2.0/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /store/x86/netcoreapp3.1/mongodb.driver.core/2.13.3/lib/netstandard2.1/MongoDB.Driver.Core.dll, + /store/x86/netcoreapp3.1/mongodb.driver.core/2.13.3/runtimes/win/native/libzstd.dll, + /store/x86/netcoreapp3.1/mongodb.driver.core/2.13.3/runtimes/win/native/snappy32.dll, + /store/x86/netcoreapp3.1/mongodb.driver.core/2.13.3/runtimes/win/native/snappy64.dll, /store/x86/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/lib/netstandard2.1/MongoDB.Libmongocrypt.dll, + /store/x86/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/runtimes/linux/native/libmongocrypt.so, + /store/x86/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/runtimes/osx/native/libmongocrypt.dylib, + /store/x86/netcoreapp3.1/mongodb.libmongocrypt/1.2.2/runtimes/win/native/mongocrypt.dll, /store/x86/netcoreapp3.1/sharpcompress/0.23.0/lib/netstandard2.0/SharpCompress.dll, /store/x86/netcoreapp3.1/system.diagnostics.diagnosticsource/6.0.0/lib/netstandard2.0/System.Diagnostics.DiagnosticSource.dll, /store/x86/netcoreapp3.1/system.runtime.compilerservices.unsafe/6.0.0/lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.dll diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt index 69012ccc78..948dfa971e 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt @@ -217,7 +217,13 @@ \store\x64\net6.0\mongodb.bson\2.13.3\lib\netstandard2.1\MongoDB.Bson.dll, \store\x64\net6.0\mongodb.driver.core.extensions.diagnosticsources\1.2.0\lib\netstandard2.0\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, \store\x64\net6.0\mongodb.driver.core\2.13.3\lib\netstandard2.1\MongoDB.Driver.Core.dll, + \store\x64\net6.0\mongodb.driver.core\2.13.3\runtimes\win\native\libzstd.dll, + \store\x64\net6.0\mongodb.driver.core\2.13.3\runtimes\win\native\snappy32.dll, + \store\x64\net6.0\mongodb.driver.core\2.13.3\runtimes\win\native\snappy64.dll, \store\x64\net6.0\mongodb.libmongocrypt\1.2.2\lib\netstandard2.1\MongoDB.Libmongocrypt.dll, + \store\x64\net6.0\mongodb.libmongocrypt\1.2.2\runtimes\linux\native\libmongocrypt.so, + \store\x64\net6.0\mongodb.libmongocrypt\1.2.2\runtimes\osx\native\libmongocrypt.dylib, + \store\x64\net6.0\mongodb.libmongocrypt\1.2.2\runtimes\win\native\mongocrypt.dll, \store\x64\net6.0\sharpcompress\0.23.0\lib\netstandard2.0\SharpCompress.dll, \store\x64\netcoreapp3.1\artifact.xml, \store\x64\netcoreapp3.1\dnsclient\1.4.0\lib\netstandard2.1\DnsClient.dll, @@ -235,7 +241,13 @@ \store\x64\netcoreapp3.1\mongodb.bson\2.13.3\lib\netstandard2.1\MongoDB.Bson.dll, \store\x64\netcoreapp3.1\mongodb.driver.core.extensions.diagnosticsources\1.2.0\lib\netstandard2.0\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, \store\x64\netcoreapp3.1\mongodb.driver.core\2.13.3\lib\netstandard2.1\MongoDB.Driver.Core.dll, + \store\x64\netcoreapp3.1\mongodb.driver.core\2.13.3\runtimes\win\native\libzstd.dll, + \store\x64\netcoreapp3.1\mongodb.driver.core\2.13.3\runtimes\win\native\snappy32.dll, + \store\x64\netcoreapp3.1\mongodb.driver.core\2.13.3\runtimes\win\native\snappy64.dll, \store\x64\netcoreapp3.1\mongodb.libmongocrypt\1.2.2\lib\netstandard2.1\MongoDB.Libmongocrypt.dll, + \store\x64\netcoreapp3.1\mongodb.libmongocrypt\1.2.2\runtimes\linux\native\libmongocrypt.so, + \store\x64\netcoreapp3.1\mongodb.libmongocrypt\1.2.2\runtimes\osx\native\libmongocrypt.dylib, + \store\x64\netcoreapp3.1\mongodb.libmongocrypt\1.2.2\runtimes\win\native\mongocrypt.dll, \store\x64\netcoreapp3.1\sharpcompress\0.23.0\lib\netstandard2.0\SharpCompress.dll, \store\x64\netcoreapp3.1\system.diagnostics.diagnosticsource\6.0.0\lib\netstandard2.0\System.Diagnostics.DiagnosticSource.dll, \store\x64\netcoreapp3.1\system.runtime.compilerservices.unsafe\6.0.0\lib\netcoreapp3.1\System.Runtime.CompilerServices.Unsafe.dll, @@ -255,7 +267,13 @@ \store\x86\net6.0\mongodb.bson\2.13.3\lib\netstandard2.1\MongoDB.Bson.dll, \store\x86\net6.0\mongodb.driver.core.extensions.diagnosticsources\1.2.0\lib\netstandard2.0\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, \store\x86\net6.0\mongodb.driver.core\2.13.3\lib\netstandard2.1\MongoDB.Driver.Core.dll, + \store\x86\net6.0\mongodb.driver.core\2.13.3\runtimes\win\native\libzstd.dll, + \store\x86\net6.0\mongodb.driver.core\2.13.3\runtimes\win\native\snappy32.dll, + \store\x86\net6.0\mongodb.driver.core\2.13.3\runtimes\win\native\snappy64.dll, \store\x86\net6.0\mongodb.libmongocrypt\1.2.2\lib\netstandard2.1\MongoDB.Libmongocrypt.dll, + \store\x86\net6.0\mongodb.libmongocrypt\1.2.2\runtimes\linux\native\libmongocrypt.so, + \store\x86\net6.0\mongodb.libmongocrypt\1.2.2\runtimes\osx\native\libmongocrypt.dylib, + \store\x86\net6.0\mongodb.libmongocrypt\1.2.2\runtimes\win\native\mongocrypt.dll, \store\x86\net6.0\sharpcompress\0.23.0\lib\netstandard2.0\SharpCompress.dll, \store\x86\netcoreapp3.1\artifact.xml, \store\x86\netcoreapp3.1\dnsclient\1.4.0\lib\netstandard2.1\DnsClient.dll, @@ -273,7 +291,13 @@ \store\x86\netcoreapp3.1\mongodb.bson\2.13.3\lib\netstandard2.1\MongoDB.Bson.dll, \store\x86\netcoreapp3.1\mongodb.driver.core.extensions.diagnosticsources\1.2.0\lib\netstandard2.0\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, \store\x86\netcoreapp3.1\mongodb.driver.core\2.13.3\lib\netstandard2.1\MongoDB.Driver.Core.dll, + \store\x86\netcoreapp3.1\mongodb.driver.core\2.13.3\runtimes\win\native\libzstd.dll, + \store\x86\netcoreapp3.1\mongodb.driver.core\2.13.3\runtimes\win\native\snappy32.dll, + \store\x86\netcoreapp3.1\mongodb.driver.core\2.13.3\runtimes\win\native\snappy64.dll, \store\x86\netcoreapp3.1\mongodb.libmongocrypt\1.2.2\lib\netstandard2.1\MongoDB.Libmongocrypt.dll, + \store\x86\netcoreapp3.1\mongodb.libmongocrypt\1.2.2\runtimes\linux\native\libmongocrypt.so, + \store\x86\netcoreapp3.1\mongodb.libmongocrypt\1.2.2\runtimes\osx\native\libmongocrypt.dylib, + \store\x86\netcoreapp3.1\mongodb.libmongocrypt\1.2.2\runtimes\win\native\mongocrypt.dll, \store\x86\netcoreapp3.1\sharpcompress\0.23.0\lib\netstandard2.0\SharpCompress.dll, \store\x86\netcoreapp3.1\system.diagnostics.diagnosticsource\6.0.0\lib\netstandard2.0\System.Diagnostics.DiagnosticSource.dll, \store\x86\netcoreapp3.1\system.runtime.compilerservices.unsafe\6.0.0\lib\netcoreapp3.1\System.Runtime.CompilerServices.Unsafe.dll, From 4eb3ef0c82e479609b5e1c7c09f493cc8ad6acb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Fri, 7 Oct 2022 14:16:55 +0200 Subject: [PATCH 09/13] pr feedback revert if --- build/nuke/Build.Steps.cs | 42 ++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/build/nuke/Build.Steps.cs b/build/nuke/Build.Steps.cs index 5cad767526..e7febc87c0 100644 --- a/build/nuke/Build.Steps.cs +++ b/build/nuke/Build.Steps.cs @@ -415,35 +415,37 @@ string MapToFolderName(string runtimeName) foreach (var packages in target.EnumerateObject()) { - if (packages.Value.TryGetProperty("runtimeTargets", out var runtimeTargets)) + if (!packages.Value.TryGetProperty("runtimeTargets", out var runtimeTargets)) { - foreach (var runtimeDependency in runtimeTargets.EnumerateObject()) - { - var sourceFileName = Path.Combine(depsDirectory, runtimeDependency.Name); + continue; + } + foreach (var runtimeDependency in runtimeTargets.EnumerateObject()) + { + var sourceFileName = Path.Combine(depsDirectory, runtimeDependency.Name); - var targetFileNameX64 = Path.Combine(targetDirectory, "x64", folderRuntimeName, - packages.Name.ToLowerInvariant(), runtimeDependency.Name); - var targetFileNameX86 = Path.Combine(targetDirectory, "x86", folderRuntimeName, - packages.Name.ToLowerInvariant(), runtimeDependency.Name); - var targetDirectoryX64 = Path.GetDirectoryName(targetFileNameX64); - var targetDirectoryX86 = Path.GetDirectoryName(targetFileNameX86); + var targetFileNameX64 = Path.Combine(targetDirectory, "x64", folderRuntimeName, + packages.Name.ToLowerInvariant(), runtimeDependency.Name); + var targetFileNameX86 = Path.Combine(targetDirectory, "x86", folderRuntimeName, + packages.Name.ToLowerInvariant(), runtimeDependency.Name); - if (!Directory.Exists(targetDirectoryX64)) - { - Directory.CreateDirectory(targetDirectoryX64); - } + var targetDirectoryX64 = Path.GetDirectoryName(targetFileNameX64); + var targetDirectoryX86 = Path.GetDirectoryName(targetFileNameX86); - File.Copy(sourceFileName, targetFileNameX64); + if (!Directory.Exists(targetDirectoryX64)) + { + Directory.CreateDirectory(targetDirectoryX64); + } - if (!Directory.Exists(targetDirectoryX86)) - { - Directory.CreateDirectory(targetDirectoryX86); - } + File.Copy(sourceFileName, targetFileNameX64); - File.Copy(sourceFileName, targetFileNameX86); + if (!Directory.Exists(targetDirectoryX86)) + { + Directory.CreateDirectory(targetDirectoryX86); } + + File.Copy(sourceFileName, targetFileNameX86); } } } From dcb907b40d44fadf9d457a9d3cdb1fb889797f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Fri, 7 Oct 2022 14:21:02 +0200 Subject: [PATCH 10/13] pr feedback - switch method to pattern matching --- build/nuke/Build.Steps.cs | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/build/nuke/Build.Steps.cs b/build/nuke/Build.Steps.cs index e7febc87c0..6f79ec296b 100644 --- a/build/nuke/Build.Steps.cs +++ b/build/nuke/Build.Steps.cs @@ -393,21 +393,13 @@ void CopyNativeDependenciesToStore(AbsolutePath file, string depsJsonContent) using var jsonDocument = JsonDocument.Parse(depsJsonContent); var runtimeName = jsonDocument.RootElement.GetProperty("runtimeTarget").GetProperty("name").GetString(); - var folderRuntimeName = MapToFolderName(runtimeName); - - string MapToFolderName(string runtimeName) + var folderRuntimeName = runtimeName switch { - switch (runtimeName) - { - case ".NETCoreApp,Version=v3.1": - return "netcoreapp3.1"; - case ".NETCoreApp,Version=v6.0": - return "net6.0"; - } - - throw new ArgumentOutOfRangeException(nameof(runtimeName), runtimeName, - "This value is not supported. You have probably introduced new .NET version to AutoInstrumentation"); - } + ".NETCoreApp,Version=v3.1" => "netcoreapp3.1", + ".NETCoreApp,Version=v6.0" => "net6.0", + _ => throw new ArgumentOutOfRangeException(nameof(runtimeName), runtimeName, + "This value is not supported. You have probably introduced new .NET version to AutoInstrumentation") + }; foreach (var targetProperty in jsonDocument.RootElement.GetProperty("targets").EnumerateObject()) { From ed806de1e11b67e7cb576a634d69c34a6d0a88b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Fri, 7 Oct 2022 14:27:39 +0200 Subject: [PATCH 11/13] pr feedback - remove redundant ifs --- build/nuke/Build.Steps.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/build/nuke/Build.Steps.cs b/build/nuke/Build.Steps.cs index 6f79ec296b..f87ca466c5 100644 --- a/build/nuke/Build.Steps.cs +++ b/build/nuke/Build.Steps.cs @@ -425,18 +425,10 @@ void CopyNativeDependenciesToStore(AbsolutePath file, string depsJsonContent) var targetDirectoryX64 = Path.GetDirectoryName(targetFileNameX64); var targetDirectoryX86 = Path.GetDirectoryName(targetFileNameX86); - if (!Directory.Exists(targetDirectoryX64)) - { - Directory.CreateDirectory(targetDirectoryX64); - } + Directory.CreateDirectory(targetDirectoryX64); + Directory.CreateDirectory(targetDirectoryX86); File.Copy(sourceFileName, targetFileNameX64); - - if (!Directory.Exists(targetDirectoryX86)) - { - Directory.CreateDirectory(targetDirectoryX86); - } - File.Copy(sourceFileName, targetFileNameX86); } } From 4156b0fd2505c6fac0a5f83c95d26ae27049d3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Fri, 7 Oct 2022 20:24:34 +0200 Subject: [PATCH 12/13] Update CHANGELOG.md Co-authored-by: Paulo Janotti --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 824a176b55..1dcf917666 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Removed - Removed support for MongoDB integration for [MongoDB.Driver.Core](https://www.nuget.org/packages/MongoDB.Driver.Core) - older than 2.13.3. + prior to 2.13.3. ### Fixed From a55240fa440fda62f5ad0aaf8ddf921b29b9cbdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Fri, 7 Oct 2022 20:27:13 +0200 Subject: [PATCH 13/13] fix code formating - double empty lines --- build/nuke/Build.Steps.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/nuke/Build.Steps.cs b/build/nuke/Build.Steps.cs index f87ca466c5..e2ed5b3d41 100644 --- a/build/nuke/Build.Steps.cs +++ b/build/nuke/Build.Steps.cs @@ -375,7 +375,6 @@ partial class Build // Major and Minor version are extracted from framework and default value of 0 is appended for patch. .SetOutput(AdditionalDepsDirectory / "shared" / "Microsoft.NETCore.App" / framework.ToString().Substring(framework.ToString().Length - 3) + ".0"))); - AdditionalDepsDirectory.GlobFiles("**/*deps.json") .ForEach(file => { @@ -416,7 +415,6 @@ void CopyNativeDependenciesToStore(AbsolutePath file, string depsJsonContent) { var sourceFileName = Path.Combine(depsDirectory, runtimeDependency.Name); - var targetFileNameX64 = Path.Combine(targetDirectory, "x64", folderRuntimeName, packages.Name.ToLowerInvariant(), runtimeDependency.Name); var targetFileNameX86 = Path.Combine(targetDirectory, "x86", folderRuntimeName,