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

[release/2.1] Update branding to 2.1.28 #31547

Merged
merged 13 commits into from
Apr 9, 2021
Merged

Conversation

dougbu
Copy link
Member

@dougbu dougbu commented Apr 5, 2021

  • update branding to 2.1.28
  • bump $(MicrosoftNETCoreAppPackageVersion)
  • get SharedFx.UnitTests working after rebranding
    • skip SharedFxTests.BaselineTest(...) between rebranding and baseline updates
      • previous runtime is not available in this window
    • reduce retries in RetryHelper
      • download will usually fail repeatedly if it fails even once
    • previous maximum duration (105 min.) was greater than the job timeout
  • avoid NETSDK1023 warnings
  • use Ubuntu 18.04 build agents

dougbu added 2 commits April 5, 2021 14:03
- version flows into `$(MicrosoftNETCoreApp21PackageVersion)` automatically
- cherry-picked from #30729 internal branch
@dougbu dougbu added area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework tell-mode Indicates a PR which is being merged during tell-mode labels Apr 5, 2021
@dougbu dougbu requested a review from a team April 5, 2021 21:15
@dougbu dougbu added this to the 2.1.28 milestone Apr 5, 2021
Copy link
Contributor

@TanayParikh TanayParikh left a comment

Choose a reason for hiding this comment

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

Overall LGTM, not sure if other changes are required to make this official.

@@ -100,4 +100,8 @@ Later on, this will be checked using this condition:
@aspnet/signalr-protocol-msgpack;
</PackagesInPatch>
</PropertyGroup>
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.1.28' ">
Copy link
Contributor

Choose a reason for hiding this comment

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

Above changes are for 2.1.26 and this is .28 is that intentional?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, my changes in build/dependencies.props are just to use the packages that are already public in rolling and PR builds. We'll move to 2.1.27 when updating the baselines on Patch Tuesday.

@dougbu
Copy link
Member Author

dougbu commented Apr 5, 2021

Thanks @TanayParikh I'll get this in tomorrow, when the branches are slated to open.

@dougbu
Copy link
Member Author

dougbu commented Apr 6, 2021

@wtgodbe @JunTaoLuo not sure if the commits I just added are needed for 3.1 or 5.0. Decided they made sense here because the Docker images we were using were very old.

But, this bulks up the PR. Let me know if you'd prefer I did some parts in separate PRs.

@dougbu
Copy link
Member Author

dougbu commented Apr 6, 2021

Holding for a actions/runner-images#3120 fix (or at least a workaround). Leaving this alone to make it easier for Azure / GitHub Actions team to see the problem.

Will open another PR without Ubuntu upgrade in a bit…

@dougbu dougbu force-pushed the dougbu/branding.2.1.28 branch from 471a5ce to fde8f9a Compare April 7, 2021 20:47
@dougbu
Copy link
Member Author

dougbu commented Apr 7, 2021

/fyi this may take a bit more time because

  1. https://status.dev.azure.com/_event/235501110
  2. Saw one test that likely won't be fixed by the environment variable workaround. Expect to need another bit from my [release/2.1] Correct and streamline internal builds #30729 internal branch.

@dougbu dougbu force-pushed the dougbu/branding.2.1.28 branch from fde8f9a to f0cf5f3 Compare April 8, 2021 00:22
@@ -29,7 +30,8 @@ RUN apt-get update && \
lldb-3.6 \
wget && \
Copy link
Member Author

Choose a reason for hiding this comment

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

If this long list can be pared down because the Ubuntu 18.04 image contains them already, I'll do that in #30729

@@ -96,6 +96,36 @@ public async Task FallbackSrcContent_Matches_CDNContent(ScriptTag scriptTag)
Assert.Equal(RemoveLineEndings(cdnContent), RemoveLineEndings(fallbackSrcContent));
}

class RetryHandler : DelegatingHandler
Copy link
Member Author

Choose a reason for hiding this comment

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

Surprisingly, it's the tests in src/Identity/test/Identity.Test/CdnScriptTaghelperTests.cs that have been flaky in this PR. The RetryHelper should be helpful in any case.

dougbu added 8 commits April 7, 2021 21:45
- skip `SharedFxTests.BaselineTest(...)` between rebranding and baseline updates
    - previous runtime is not available in this window
- reduce retries in `RetryHelper`
    - download will usually fail repeatedly if it fails even once
    - previous maximum duration (105 min.) was greater than the job timeout
- avoid NETSDK1023 warnings
    - eng/targets/CSharp.Common.props adds packages removed from project
- create archives based on one that actually exists between rebranding and baseline updates
- mostly cherry-picked from #30729 internal branch

nit: remove unused `GetTotalRetriesUsed()` method
- set locale consistently on all platforms
    - default locale on newer agents is unloved `C.UTF-8`
- run `locale-gen` to avoid "setlocale: LC_ALL: cannot change locale" and similar
    - needs `locales` package
- move to still-supported Ubuntu 18.04 image
    - image needs slightly-newer `libicu60`, `clang` and `lldb` packages
    - rename Dockerfile to match
- cherry-picked from #30729 internal branch for Ubuntu image update

nit: set locale-related environment variables to match Python default
- avoid MSB4011 warnings (about repeated Directory.Build.targets imports)
    - place `$DOTNET_HOME` beside repo root, not under it
- cherry-picked from #30729 internal branch for image update

nits:
- use current Docker image for 2.1 alpine
- set `$LANGUAGE` with other locale-related environment variables
- minor change shouldn't affect submodule build but best to keep up
- apply efe9b95 to similar template test
@dougbu dougbu force-pushed the dougbu/branding.2.1.28 branch from 3d58e38 to 10e5c3b Compare April 8, 2021 04:49
@dougbu
Copy link
Member Author

dougbu commented Apr 8, 2021

/fyi I've been testing internal builds and addressing failures there. Test failures in PR validation builds appear to be flaky tests

  • extra debug information for IdentityUI_ScriptTags_SubresourceIntegrityCheck tests didn't help much since SSL failure throws and IdentityUI_ScriptTags_SubresourceIntegrityCheck.RetryHandler doesn't catch the Exception
  • Sockets.FunctionalTest/netcoreapp2.1 test group fails occasionally during teardown

@dougbu
Copy link
Member Author

dougbu commented Apr 8, 2021

Still blocked on Microsoft.AspNetCore.Identity.Test.CdnScriptTagTests.IdentityUI_ScriptTags_SubresourceIntegrityCheck failures.


Error message
System.Net.Http.HttpRequestException : An error occurred while sending the request.
---- System.Net.WebException : The request was aborted: Could not create SSL/TLS secure channel.


Stack trace
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Identity.Test.CdnScriptTagTests.RetryHandler.<SendAsync>d__2.MoveNext() in /_/src/Identity/test/Identity.Test/CdnScriptTaghelperTests.cs:line 81
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.Http.HttpClient.<FinishGetStreamAsync>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Identity.Test.CdnScriptTagTests.<IdentityUI_ScriptTags_SubresourceIntegrityCheck>d__2.MoveNext() in /_/src/Identity/test/Identity.Test/CdnScriptTaghelperTests.cs:line 52
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
----- Inner Stack Trace -----
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)

I'm working to duplicate @javiercn's 3368ea6 / #13646 fix but can't get https://github.com/dotnet/aspnetcore/blob/release/3.1/src/Identity/test/Identity.Test/RetryHandler.cs#L57 to compile in this branch. Suspect updating https://github.com/dotnet/aspnetcore/blob/release/2.1/eng/targets/CSharp.Common.props#L4 to 8.0 or changing https://github.com/dotnet/aspnetcore/blob/release/2.1/src/Identity/test/Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj to override that default would be sufficient. If increasing the C# language version is a breaking change, I'd do the second. Thoughts @dotnet/aspnet-build❔

@dougbu
Copy link
Member Author

dougbu commented Apr 8, 2021

/btw https://dev.azure.com/dnceng/internal/_build/results?buildId=1077719 confirmed our official builds (where we don't test 'natch) will succeed once this is in.

- based on  @javiercn's 3368ea6 / #13646 fix
- avoid `TimeSpan` arithmetic and did not match refactoring done in 'release/3.1'
    - c# 8.0 is not supported in this branch
@Pilchie
Copy link
Member

Pilchie commented Apr 8, 2021

@karelz @scalablecory - any ideas on the failure above in Details.

It's coming from here, and only seems to be failing in 2.1.

@dougbu I don't think you can update to compile with C# 8, because that requires a .NET SDK of 3.0 or later. What is the error you are seeing?

@dougbu
Copy link
Member Author

dougbu commented Apr 8, 2021

@dougbu I don't think you can update to compile with C# 8, because that requires a .NET SDK of 3.0 or later. What is the error you are seeing?

In local runs with C# 7.2, I saw

CdnScriptTaghelperTests.cs(105,51): error CS0019: Operator '*' cannot be applied to operands of type 'TimeSpan' and 'int' [...\src\Identity\test\Identity.Test\Microsoft.AspNetCore.Identity.Test.csproj]

To work around this, I ended up multiplying an int by 2 and creating a TimeSpan each time through the loop. See
https://github.com/dotnet/aspnetcore/pull/31547/files#diff-3b3c01f3096f00f0578c36dc3234ed37af00a870920fe3d79eafe8292f4cb47fR114
and
https://github.com/dotnet/aspnetcore/pull/31547/files#diff-3b3c01f3096f00f0578c36dc3234ed37af00a870920fe3d79eafe8292f4cb47fR139-R140

@dougbu
Copy link
Member Author

dougbu commented Apr 8, 2021

only seems to be failing in 2.1

Successful test results don't show much information but could at least see success of IdentityUI_ScriptTags_SubresourceIntegrityCheck tests at https://dev.azure.com/dnceng/public/_build/results?buildId=1078781&view=ms.vss-test-web.build-test-results-tab. That's for 'main', where the test is a [Theory] and somewhat refactored but otherwise much like we have here.

@Pilchie
Copy link
Member

Pilchie commented Apr 8, 2021

To be pendantic, that's not a C# compiler change, that's about the set of operators on System.TimeSpan. A static TimeSpan operator*(TimeSpan left, int right) have been added after .NET Core 2.1.

@dougbu
Copy link
Member Author

dougbu commented Apr 8, 2021

@dougbu
Copy link
Member Author

dougbu commented Apr 9, 2021

@karelz @scalablecory @Pilchie

Problem might be specific to .NET Framework runs and look relatively new. I saw it succeed on Monday in this branch (https://dev.azure.com/dnceng/public/_build/results?buildId=1073196) but it looked flaky in my internal builds for #30729 last week (https://dev.azure.com/dnceng/internal/_build?definitionId=21&branchFilter=150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570%2C150570).

I'm going to try skipping on .NET Framework. But, would very much like to know why this test went South.

- failures appear specific to that platform
- leave src/Templating/test/Templates.Test/CdnScriptTagTests.cs unchanged
    - test project does not target .NET Framework
[Fact]
// Because this test runs on .NET Core and seems reliable there, likely not worth running on .NET Framework.
[ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "At least flaky on .NET Framework.")]
Copy link
Member Author

Choose a reason for hiding this comment

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

@Pilchie @dotnet/aspnet-build thoughts about filing a follow-up issue❔ I'm leaning toward no because the test is about external resources. Also realized the test runs fine on Linux and macOS.
image

Copy link
Member

Choose a reason for hiding this comment

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

I think we should at least file an issue about figuring out why the test failed

Copy link
Member

Choose a reason for hiding this comment

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

If that's in dotnet/runtime, so be it

Copy link
Member Author

Choose a reason for hiding this comment

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

@wtgodbe I agree and wasn't really questioning that. My question was more whether we needed an issue about removing the [FrameworkSkipCondition(...)]. Hearing none 😃

@karelz @scalablecory where should I file an issue about the .NET Framework HttpClient class and the underlying SSL libraries❔

Copy link
Member

Choose a reason for hiding this comment

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

@dougbu I believe we do not run dotnet/runtime tests on .NET Framework anymore. Before we stopped to run them, we saw quite some flakiness on .NET Framework in networking. I wonder if this is similar ...
If you're able to isolate it to HttpClient/SslStream repro, we can take a look -- I would start email thread with our team as a starting point.

@dougbu
Copy link
Member Author

dougbu commented Apr 9, 2021

CI is green now 🎉 Just waiting for a response on adding an issue tracking restoring the skipped .NET Framework test. (Would link to the issue in the new SkipReason.)


Just checked and MusicStore.csproj targets only .NET Core in 'release/3.1' and 'release/5.0', which might explain why we haven't seen failures in those branches.

@dougbu dougbu merged commit 2c42322 into release/2.1 Apr 9, 2021
@dougbu dougbu deleted the dougbu/branding.2.1.28 branch April 9, 2021 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework tell-mode Indicates a PR which is being merged during tell-mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants