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

Start flowing Microsoft.NETCore.App dependency #22279

Closed
wants to merge 1 commit into from

Conversation

bricelam
Copy link
Contributor

@bricelam bricelam commented Aug 27, 2020

This will tighten the feedback loop for changes made to the "BCL". I feel this is important as we near the end of the 5.0 release.

Fixes #22304

@bricelam bricelam requested a review from dougbu as a code owner August 27, 2020 20:21
@bricelam bricelam requested a review from a team August 27, 2020 20:21
Directory.Build.targets Outdated Show resolved Hide resolved
Directory.Build.props Outdated Show resolved Hide resolved
global.json Show resolved Hide resolved
@@ -53,12 +53,12 @@ private TException SerializeAndDeserialize<TException>(TException exception)
var stream = new MemoryStream();
var formatter = new BinaryFormatter();

#pragma warning disable MSLIB0003 // Issue https://github.com/dotnet/runtime/issues/39289 tracks finding an alternative to BinaryFormatter
#pragma warning disable SYSLIB0011 // Issue https://github.com/dotnet/runtime/issues/39289 tracks finding an alternative to BinaryFormatter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

dougbu added a commit to dotnet/aspnetcore that referenced this pull request Aug 30, 2020
…nsistently

- always use `$([MSBuild]::VersionXYZ(...))` for version checks
- use `$(NETCoreAppFrameworkIdentifier)` where it's available
- move `$(KnownAppHostPackOrFrameworkReferenceTfm)` setting to Directory.Build.props
  - use it to correct `@(KnownFrameworkReference)` updates
  - metadata of those items still uses `netcoreapp5.0`
  - see also dotnet/efcore#22279 (comment)

nits:
- do not assume `$(TargetFrameworkVersion)` starts with a 'v'; valid w/o it
- add `$(_IsMicrosoftNETCoreApp20OrOlder)` property in OpenAPI targets file
  - evaluate the `Condition` once instead of three times
dougbu added a commit to dotnet/aspnetcore that referenced this pull request Aug 31, 2020
…nsistently (#25428)

- always use `$([MSBuild]::VersionXYZ(...))` for version checks
- use `$(NETCoreAppFrameworkIdentifier)` where it's available
- move `$(KnownAppHostPackOrFrameworkReferenceTfm)` setting to Directory.Build.props
  - use it to correct `@(KnownFrameworkReference)` updates
  - metadata of those items still uses `netcoreapp5.0`
  - see also dotnet/efcore#22279 (comment)

nits:
- do not assume `$(TargetFrameworkVersion)` starts with a 'v'; valid w/o it
- add `$(_IsMicrosoftNETCoreApp20OrOlder)` property in OpenAPI targets file
  - evaluate the `Condition` once instead of three times
@bricelam
Copy link
Contributor Author

bricelam commented Aug 31, 2020

@smitpatel @AndriySvyryd Do you think the error on macOS and Linux is related to this PR?

System.Net.Http.HttpRequestException: No connection could be made because the remote host actively refused it. (localhost:8081)
 ---> System.Net.NetworkException: No connection could be made because the remote host actively refused it.
 ---> System.Net.Sockets.SocketException (111): Connection refused
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|283_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Connections.SocketsConnectionFactory.ConnectAsync(EndPoint endPoint, IConnectionProperties options, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Connections.SocketsConnectionFactory.ConnectAsync(EndPoint endPoint, IConnectionProperties options, CancellationToken cancellationToken)
   at System.Net.Http.ConnectHelper.ConnectAsync(ConnectionFactory factory, DnsEndPoint endPoint, IConnectionProperties options, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.ConnectAsync(ConnectionFactory factory, DnsEndPoint endPoint, IConnectionProperties options, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at Microsoft.Azure.Cosmos.DocumentClient.HttpRequestMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsync(ValueTask`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts, Boolean buffered, Boolean async, CancellationToken callerToken, Int64 timeoutTime)
   at Microsoft.Azure.Cosmos.ClientExtensions.GetAsync(HttpClient client, Uri uri, INameValueCollection additionalHeaders, CancellationToken cancellationToken)
   at Microsoft.Azure.Cosmos.GatewayAccountReader.GetDatabaseAccountAsync(Uri serviceEndpoint)
   at Microsoft.Azure.Cosmos.Routing.GlobalEndpointManager.GetDatabaseAccountFromAnyLocationsAsync(Uri defaultEndpoint, IList`1 locations, Func`2 getDatabaseAccountFn)
   at Microsoft.Azure.Cosmos.GatewayAccountReader.InitializeReaderAsync()
   at Microsoft.Azure.Cosmos.CosmosAccountServiceConfiguration.InitializeAsync()
   at Microsoft.Azure.Cosmos.DocumentClient.InitializeGatewayConfigurationReaderAsync()
   at Microsoft.Azure.Cosmos.DocumentClient.GetInitializationTaskAsync(IStoreClientFactory storeClientFactory)
   at Microsoft.Azure.Cosmos.DocumentClient.EnsureValidClientAsync()
   at Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler.EnsureValidClientAsync(RequestMessage request)
   at Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler.SendAsync(RequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler.SendAsync(String resourceUriString, ResourceType resourceType, OperationType operationType, RequestOptions requestOptions, ContainerInternal cosmosContainerCore, Nullable`1 partitionKey, Stream streamPayload, Action`1 requestEnricher, CosmosDiagnosticsContext diagnosticsContext, CancellationToken cancellationToken)
   at Microsoft.Azure.Cosmos.CosmosClient.<>c__DisplayClass30_0.<<CreateDatabaseIfNotExistsAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.Azure.Cosmos.ClientContextCore.RunWithDiagnosticsHelperAsync[TResult](CosmosDiagnosticsContext diagnosticsContext, Func`2 task)
   at Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal.CosmosClientWrapper.CreateDatabaseIfNotExistsOnceAsync(DbContext _, Object __, CancellationToken cancellationToken) in /_/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs:line 140

@AndriySvyryd
Copy link
Member

AndriySvyryd commented Aug 31, 2020

@bricelam Yes. Those tests shouldn't run on CI, so xunit is not filtering them out for some reason

@bricelam
Copy link
Contributor Author

Ah, looks like there's another level of inner exception nesting--NetworkException. I'll update the conditional skipper thingamajigger.

@ghost
Copy link

ghost commented Aug 31, 2020

Hello @bricelam!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@bricelam
Copy link
Contributor Author

C:\Users\vsagent.nuget\packages\microsoft.dotnet.helix.sdk\5.0.0-beta.20427.5\tools\Microsoft.DotNet.Helix.Sdk.MultiQueue.targets(76,5): error : Work item f8bcd0cc-e282-4976-b1f7-3696d20aa06e/Microsoft.Data.Sqlite.Tests.dll in job f8bcd0cc-e282-4976-b1f7-3696d20aa06e has failed. [F:\workspace_work\1\s\eng\helix.proj]

2020-08-31T21:19:28.471Z INFO xunit-reporter.py xunit-reporter(85) main Didn't find test results in working directory, trying upload folder
2020-08-31T21:19:28.471Z ERROR xunit-reporter.py xunit-reporter(90) main Unable to report xunit results: no test results xml file found.

Does anyone know how to debug Helix failures? 🤦‍♂️

@bricelam
Copy link
Contributor Author

bricelam commented Aug 31, 2020

D:\a\efcore\efcore\test\EFCore.Cosmos.FunctionalTests\TestUtilities\CosmosDbConfiguredConditionAttribute.cs(72,46): error CS0246: The type or namespace name 'NetworkException' could not be found (are you missing a using directive or an assembly reference?) [D:\a\efcore\efcore\test\EFCore.Cosmos.FunctionalTests\EFCore.Cosmos.FunctionalTests.csproj]

...and how to install this on GitHub Actions?

Maybe this is more trouble than it's worth. (And that's why we avoided it in the first place.)

@smitpatel
Copy link
Member

One of the helix log file https://helix.dot.net/api/2019-06-17/jobs/f8bcd0cc-e282-4976-b1f7-3696d20aa06e/workitems/Microsoft.Data.Sqlite.Tests.dll/console

Not sure helix can handle runtime differing from SDK. AFAIK, aspnet repo actually downloads .net on helix agents (like how local build does) just to run the test. Not sure if it is worth doing.

@smitpatel
Copy link
Member

Since Cosmos in github action uses same step as command line, it shouldn't be failing. Where does NetworkException type comes from?

@bricelam
Copy link
Contributor Author

bricelam commented Sep 1, 2020

Closing. We'll continue to take the path of least resistance and use the version bundled with the SDK.

@bricelam bricelam closed this Sep 1, 2020
@bricelam bricelam mentioned this pull request Sep 1, 2020
dougbu added a commit to dougbu/razor-compiler that referenced this pull request Nov 17, 2021
…nsistently (dotnet/aspnetcore#25428)

- always use `$([MSBuild]::VersionXYZ(...))` for version checks
- use `$(NETCoreAppFrameworkIdentifier)` where it's available
- move `$(KnownAppHostPackOrFrameworkReferenceTfm)` setting to Directory.Build.props
  - use it to correct `@(KnownFrameworkReference)` updates
  - metadata of those items still uses `netcoreapp5.0`
  - see also dotnet/efcore#22279 (comment)

nits:
- do not assume `$(TargetFrameworkVersion)` starts with a 'v'; valid w/o it
- add `$(_IsMicrosoftNETCoreApp20OrOlder)` property in OpenAPI targets file
  - evaluate the `Condition` once instead of three times

Commit migrated from dotnet/aspnetcore@1f84e28882da
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to RC1 SDK
5 participants