Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,11 @@ jobs:
workspace:
clean: all
pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
variables:
LC_ALL: 'en_US.UTF-8'
LANG: 'en_US.UTF-8'
LANGUAGE: 'en_US.UTF-8'
PB_SKIPTESTS: 'true'
steps:
- checkout: self
Expand Down Expand Up @@ -294,8 +297,11 @@ jobs:
workspace:
clean: all
pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
variables:
LC_ALL: 'en_US.UTF-8'
LANG: 'en_US.UTF-8'
LANGUAGE: 'en_US.UTF-8'
PB_SKIPTESTS: 'true'
steps:
- checkout: self
Expand Down Expand Up @@ -489,8 +495,11 @@ jobs:
workspace:
clean: all
pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
variables:
LC_ALL: 'en_US.UTF-8'
LANG: 'en_US.UTF-8'
LANGUAGE: 'en_US.UTF-8'
PB_SKIPTESTS: 'true'
steps:
- checkout: self
Expand Down
6 changes: 5 additions & 1 deletion .azure/pipelines/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
testResultsFiles: 'artifacts/logs/**/*.trx'
- job: Host_Linux
pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
strategy:
maxParallel: 8
matrix:
Expand Down Expand Up @@ -113,6 +113,10 @@ jobs:
SelfContainedMacOs_Node10:
Test.RuntimeIdentifier: osx-x64
Node.Version: 10.x
variables:
LC_ALL: 'en_US.UTF-8'
LANG: 'en_US.UTF-8'
LANGUAGE: 'en_US.UTF-8'
steps:
- task: NodeTool@0
displayName: Install Node $(Node.Version)
Expand Down
5 changes: 4 additions & 1 deletion .azure/pipelines/jobs/default-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'MacOS')) }}:
vmImage: macOS-10.14
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Linux')) }}:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Windows')) }}:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: NetCorePublic-Pool
Expand All @@ -89,6 +89,9 @@ jobs:
BuildConfiguration: ${{ parameters.configuration }}
BuildDirectory: ${{ parameters.buildDirectory }}
BinlogArg: /bl:artifacts/logs/${{ parameters.agentOs }}.binlog
LC_ALL: 'en_US.UTF-8'
LANG: 'en_US.UTF-8'
LANGUAGE: 'en_US.UTF-8'
${{ if eq(parameters.agentOs, 'Windows') }}:
JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk
${{ if or(ne(parameters.codeSign, 'true'), ne(variables['System.TeamProject'], 'internal'), in(variables['Build.Reason'], 'PullRequest')) }}:
Expand Down
2 changes: 1 addition & 1 deletion build/SharedFxInstaller.targets
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
</ItemGroup>

<PropertyGroup>
<Image>ubuntu.14.04</Image>
<Image>ubuntu.18.04</Image>

<DebSharedFxDependencies>@(_DebSharedFxDependencies->'"%(Identity)": { "package_version": "%(Version)" }', ', ')</DebSharedFxDependencies>

Expand Down
4 changes: 2 additions & 2 deletions build/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<!-- These package versions may be overridden or updated by automation. -->
<PropertyGroup Label="Package Versions: Auto" Condition=" '$(DotNetPackageVersionPropsPath)' == '' ">
<!-- MicrosoftNETCoreApp21PackageVersion is assigned at the bottom so it can automatically pick up MicrosoftNETCoreAppPackageVersion in an orchestrated build. -->
<MicrosoftNETCoreAppPackageVersion>2.1.23</MicrosoftNETCoreAppPackageVersion>
<MicrosoftNETCoreDotNetAppHostPackageVersion>2.1.23</MicrosoftNETCoreDotNetAppHostPackageVersion>
<MicrosoftNETCoreAppPackageVersion>2.1.26</MicrosoftNETCoreAppPackageVersion>
<MicrosoftNETCoreDotNetAppHostPackageVersion>2.1.26</MicrosoftNETCoreDotNetAppHostPackageVersion>
</PropertyGroup>

<Import Project="$(DotNetPackageVersionPropsPath)" Condition="'$(DotNetPackageVersionPropsPath)' != ''" />
Expand Down
6 changes: 5 additions & 1 deletion build/docker/alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM microsoft/dotnet:2.1.0-preview1-runtime-deps-alpine
FROM mcr.microsoft.com/dotnet/runtime-deps:2.1-alpine
ARG USER
ARG USER_ID
ARG GROUP_ID
Expand All @@ -18,10 +18,14 @@ RUN apk add --no-cache \

USER $USER_ID:$GROUP_ID

# Use a location for .dotnet/ that's not under repo root.
ENV DOTNET_HOME /code/.dotnet

# Disable the invariant mode (set in base image)
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT false
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

# Skip package initilization
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#

# Dockerfile that creates a container suitable to build dotnet-cli
FROM ubuntu:14.04
FROM ubuntu:18.04

# Misc Dependencies for build
RUN apt-get update && \
Expand All @@ -15,31 +15,38 @@ RUN apt-get update && \
sudo \
libunwind8 \
libkrb5-3 \
libicu52 \
libicu60 \
liblttng-ust0 \
libssl1.0.0 \
locales \
zlib1g \
libuuid1 \
debhelper \
build-essential \
devscripts \
git \
cmake \
clang-3.5 \
lldb-3.6 \
clang-3.9 \
lldb-3.9 \
wget && \
Copy link
Contributor 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

apt-get clean && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* && \
locale-gen "en_US.UTF-8"

# Use clang as c++ compiler
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-3.5 100
RUN update-alternatives --set c++ /usr/bin/clang++-3.5
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-3.9 100
RUN update-alternatives --set c++ /usr/bin/clang++-3.9

# Setup User to match Host User, and give superuser permissions
ARG USER_ID=0
RUN useradd -m code_executor -u ${USER_ID} -g sudo
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Preset well-known locale
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

# With the User Change, we need to change permissions on these directories
RUN chmod -R a+rwx /usr/local
RUN chmod -R a+rwx /home
Expand Down
4 changes: 4 additions & 0 deletions dockerbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ fi
dockerfile="$DIR/build/docker/$image.Dockerfile"
tagname="aspnetcore-build-$image"

# Use a location for .dotnet/ that's not under repo root in the container and don't reuse host's folder.
mkdir "$(dirname $DIR)/.dotnet-$image"

docker build "$(dirname "$dockerfile")" \
--build-arg "USER=$(whoami)" \
--build-arg "USER_ID=$(id -u)" \
Expand All @@ -114,6 +117,7 @@ docker run \
-e PB_ASSETROOTURL \
-e PRODUCTBUILDID \
-v "$DIR:/code/build" \
-v "$(dirname $DIR)/.dotnet-$image:/code/.dotnet" \
${docker_args[@]+"${docker_args[@]}"} \
$tagname \
./build.sh \
Expand Down
4 changes: 4 additions & 0 deletions eng/PatchConfig.props
Original file line number Diff line number Diff line change
Expand Up @@ -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
Contributor 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.

<PackagesInPatch>
</PackagesInPatch>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion modules/EntityFrameworkCore
53 changes: 43 additions & 10 deletions src/Identity/test/Identity.Test/CdnScriptTaghelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Testing.xunit;
using Xunit;
using Xunit.Abstractions;

Expand All @@ -23,7 +24,9 @@ public CdnScriptTagTests(ITestOutputHelper output)
_output = output;
}

[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
Contributor 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
Contributor 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.

public async Task IdentityUI_ScriptTags_SubresourceIntegrityCheck()
{
var slnDir = GetSolutionDir();
Expand All @@ -39,7 +42,7 @@ public async Task IdentityUI_ScriptTags_SubresourceIntegrityCheck()
Assert.NotEmpty(scriptTags);

var shasum = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
using (var client = new HttpClient(new RetryHandler(new HttpClientHandler() { })))
using (var client = new HttpClient(new RetryHandler(new HttpClientHandler(), _output)))
{
foreach (var script in scriptTags)
{
Expand All @@ -63,22 +66,52 @@ public async Task IdentityUI_ScriptTags_SubresourceIntegrityCheck()
});
}

class RetryHandler : DelegatingHandler
private class RetryHandler : DelegatingHandler
{
public RetryHandler(HttpMessageHandler innerHandler) : base(innerHandler) { }
private readonly ITestOutputHelper _output;

public RetryHandler(HttpMessageHandler innerHandler, ITestOutputHelper output) : base(innerHandler)
{
_output = output;
}

protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
HttpResponseMessage result = null;
for (var i = 0; i < 10; i++)
var method = request.Method;
var url = request.RequestUri;
var waitIntervalBeforeRetry = 1;

// Try 6 times with 1, 2, 4, 8, 16 seconds between attempts. Last attempt may throw or report
// error to caller.
for (var i = 0; i < 5; i++)
{
result = await base.SendAsync(request, cancellationToken);
if (result.IsSuccessStatusCode)
try
{
return result;
_output.WriteLine($"Sending request '{method} - {url}' {i+1} attempt.");
result = await base.SendAsync(request, cancellationToken);
if (result.IsSuccessStatusCode)
{
return result;
}
else
{
_output.WriteLine($"Request '{method} - {url}' failed with {result.StatusCode}.");
}
}
catch (Exception e)
{
_output.WriteLine($"Request '{method} - {url}' failed with {e.ToString()}");
}
finally
{
await Task.Delay(TimeSpan.FromSeconds(waitIntervalBeforeRetry), cancellationToken);
waitIntervalBeforeRetry = waitIntervalBeforeRetry * 2;
}
await Task.Delay(1000);
}
return result;

// Try one last time to show the actual error.
return await base.SendAsync(request, cancellationToken);
}
}

Expand Down
Binary file removed src/Mvc/build/Key.snk
Binary file not shown.
10 changes: 0 additions & 10 deletions src/Mvc/build/buildpipeline/linux.groovy

This file was deleted.

10 changes: 0 additions & 10 deletions src/Mvc/build/buildpipeline/osx.groovy

This file was deleted.

18 changes: 0 additions & 18 deletions src/Mvc/build/buildpipeline/pipeline.groovy

This file was deleted.

12 changes: 0 additions & 12 deletions src/Mvc/build/buildpipeline/windows.groovy

This file was deleted.

2 changes: 2 additions & 0 deletions src/PackageArchive/Archive.targets
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
<Target Name="CheckForPreviousReleaseArchiveBaseline" Condition=" '$(AspNetCorePatchVersion)' != '0' AND '$(IsIncremental)' == 'true' ">
<PropertyGroup>
<PreviousStableVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$([MSBuild]::Subtract($(AspNetCorePatchVersion), 1))</PreviousStableVersion>
<PreviousStableVersion
Condition=" !$(ValidateBaseline) ">$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$([MSBuild]::Subtract($(AspNetCorePatchVersion), 2))</PreviousStableVersion>
</PropertyGroup>

<Error Text="The ArchiveBaseline for previous release (v$(PreviousStableVersion)) could not be found. This is required to build the incremental archives. See instructions in $(MSBuildThisFileDirectory)ZipManifestGenerator/README.md"
Expand Down
Loading