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

Merge preview8 branch to public #25280

Merged
merged 49 commits into from
Sep 6, 2020
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
f5538cb
Merged PR 9144: [5.0-preview8] Pass RequestAborted to SendFileAsync
Tratcher Jul 17, 2020
609b55f
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 20, 2020
77435c3
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 20, 2020
3ad9e57
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 20, 2020
869d8f5
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 21, 2020
542031b
Merged PR 9196: Modify WebSockets ValueTaskSource
BrennanConroy Jul 21, 2020
6654c8f
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 21, 2020
ab7a11f
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 22, 2020
f437647
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 22, 2020
c88efce
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 22, 2020
2bac45c
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 22, 2020
43b68e3
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 23, 2020
dc3a864
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 23, 2020
716598e
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 24, 2020
2827037
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 24, 2020
670f952
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 24, 2020
4d23ec0
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 24, 2020
21a5f39
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 25, 2020
cba2275
Merged PR 9296: [internal/release/5.0-preview8] Update dependencies f…
dotnet-bot Jul 26, 2020
864a292
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 28, 2020
3e7a106
Merged PR 9371: Revive support for globalization and localization in …
Jul 28, 2020
6c665aa
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 28, 2020
f172d20
[internal/release/5.0-preview8] Update dependencies from dnceng/inter…
dotnet-bot Jul 29, 2020
4581307
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 29, 2020
c60c278
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 29, 2020
f22aa71
Merge in 'release/5.0-preview8' changes
dotnet-bot Jul 29, 2020
5dc9931
[internal/release/5.0-preview8] Update dependencies from dnceng/inter…
dotnet-bot Jul 30, 2020
fed1953
[internal/release/5.0-preview8] Update dependencies from dnceng/inter…
dotnet-bot Jul 31, 2020
d2ccb49
[internal/release/5.0-preview8] Update dependencies from dnceng/inter…
dotnet-bot Jul 31, 2020
06fbd7e
Merge in 'release/5.0-preview8' changes
dotnet-bot Aug 3, 2020
3516b8d
[internal/release/5.0-preview8] Update dependencies from dnceng/inter…
dotnet-bot Aug 3, 2020
6aa8cec
Merge remote-tracking branch 'origin/release/5.0-preview8' into prkri…
pranavkm Aug 4, 2020
7f8e21f
Merged PR 9531: Merge remote-tracking branch 'origin/release/5.0-prev…
Aug 4, 2020
a1df872
[internal/release/5.0-preview8] Update dependencies from dnceng/inter…
dotnet-bot Aug 8, 2020
929a89b
[internal/release/5.0-preview8] Update dependencies from dnceng/inter…
dotnet-bot Aug 10, 2020
cb4a16a
Merged PR 9643: [internal/release/5.0-preview8] Update dependencies f…
dotnet-bot Aug 10, 2020
b8e176e
Merge remote-tracking branch 'origin/release/5.0-preview8' into inter…
pranavkm Aug 12, 2020
a4938d0
Merge in 'release/5.0-preview8' changes
dotnet-bot Aug 15, 2020
6205d66
Resolve merge conflicts
wtgodbe Aug 26, 2020
663915b
Resolve last conflict
wtgodbe Aug 26, 2020
b32dfa8
Update MonoPlatform.ts
pranavkm Aug 26, 2020
f883065
Update InteropTests.csproj
wtgodbe Aug 27, 2020
72a7635
Fix InteropClient testasset
wtgodbe Aug 28, 2020
96b1c23
Merge branch 'wtgodbe/MergePreview8' of https://github.com/dotnet/asp…
wtgodbe Aug 28, 2020
e6a163b
Merge branch 'release/5.0' into wtgodbe/MergePreview8
wtgodbe Sep 1, 2020
08309b1
Fix tools.ps1
wtgodbe Sep 1, 2020
b02309f
merge
wtgodbe Sep 1, 2020
d1ab8ef
Use -nopath
wtgodbe Sep 2, 2020
cd0ec1f
Add dotnet-install-scripts files to Helix content
dougbu Sep 4, 2020
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
9 changes: 5 additions & 4 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -621,17 +621,18 @@ stages:
timeoutInMinutes: 240
steps:
# Build the shared framework
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs)
displayName: Build shared fx
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj $(_InternalRuntimeDownloadArgs)
displayName: Restore interop projects
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildNative -projects eng\helix\helix.proj
/p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true
/p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true $(_InternalRuntimeDownloadArgs)
/p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Run build.cmd helix target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops

artifacts:
- name: Helix_logs
path: artifacts/log/
Expand Down Expand Up @@ -665,7 +666,7 @@ stages:
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- script: ./eng/scripts/ci-source-build.sh --ci --nobl --configuration Release /p:BuildManaged=true /p:BuildNodeJs=false
- script: ./eng/scripts/ci-source-build.sh --ci --nobl --configuration Release /p:BuildManaged=true /p:BuildNodeJs=false $(_InternalRuntimeDownloadArgs)
displayName: Run ci-source-build.sh
- task: PublishBuildArtifacts@1
displayName: Upload logs
Expand Down
8 changes: 5 additions & 3 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
return $installScript
}

function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '') {
InstallDotNet $dotnetRoot $version $architecture '' $false $runtimeSourceFeed $runtimeSourceFeedKey
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '', [switch] $noPath) {
InstallDotNet $dotnetRoot $version $architecture '' $false $runtimeSourceFeed $runtimeSourceFeedKey -noPath:$noPath
}

function InstallDotNet([string] $dotnetRoot,
Expand All @@ -250,7 +250,8 @@ function InstallDotNet([string] $dotnetRoot,
[string] $runtime = '',
[bool] $skipNonVersionedFiles = $false,
[string] $runtimeSourceFeed = '',
[string] $runtimeSourceFeedKey = '') {
[string] $runtimeSourceFeedKey = '',
[switch] $noPath) {

$installScript = GetDotNetInstallScript $dotnetRoot
$installParameters = @{
Expand All @@ -261,6 +262,7 @@ function InstallDotNet([string] $dotnetRoot,
if ($architecture) { $installParameters.Architecture = $architecture }
if ($runtime) { $installParameters.Runtime = $runtime }
if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles }
if ($noPath) { $installParameters.NoPath = $True }

try {
& $installScript @installParameters
Expand Down
35 changes: 0 additions & 35 deletions eng/helix/content/InstallDotNet.ps1

This file was deleted.

12 changes: 10 additions & 2 deletions eng/helix/content/runtests.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ shift
set $aspnetref=%9
shift
set $helixTimeout=%9
shift
set $feedCred=%9

set DOTNET_HOME=%HELIX_CORRELATION_PAYLOAD%\sdk
set DOTNET_ROOT=%DOTNET_HOME%\%$arch%
Expand All @@ -26,10 +28,16 @@ set DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\home

set PATH=%DOTNET_ROOT%;!PATH!;%HELIX_CORRELATION_PAYLOAD%\node\bin
echo Set path to: %PATH%
echo "Invoking InstallDotNet.ps1 %$arch% %$sdkVersion% %$runtimeVersion% %DOTNET_ROOT%"
powershell.exe -NoProfile -ExecutionPolicy unrestricted -file InstallDotNet.ps1 %$arch% %$sdkVersion% %$runtimeVersion% %DOTNET_ROOT%

powershell.exe -noLogo -NoProfile -ExecutionPolicy unrestricted -command ". eng\common\tools.ps1; InstallDotNet %DOTNET_ROOT% %$sdkVersion% %$arch% '' $true"
IF [%$feedCred%] == [] (
powershell.exe -noLogo -NoProfile -ExecutionPolicy unrestricted -command ". eng\common\tools.ps1; InstallDotNet %DOTNET_ROOT% %$runtimeVersion% %$arch% dotnet $true"
) else (
powershell.exe -noLogo -NoProfile -ExecutionPolicy unrestricted -command ". eng\common\tools.ps1; InstallDotNet %DOTNET_ROOT% %$runtimeVersion% %$arch% dotnet $true https://dotnetclimsrc.blob.core.windows.net/dotnet %$feedCred%"
dougbu marked this conversation as resolved.
Show resolved Hide resolved
)

set exit_code=0

echo "Restore: dotnet restore RunTests\RunTests.csproj --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --source https://api.nuget.org/v3/index.json --ignore-failed-sources..."
dotnet restore RunTests\RunTests.csproj --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --source https://api.nuget.org/v3/index.json --ignore-failed-sources

Expand Down
63 changes: 19 additions & 44 deletions eng/helix/content/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,49 +30,24 @@ RED="\033[0;31m"
YELLOW="\033[0;33m"
MAGENTA="\033[0;95m"

curl -o dotnet-install.sh -sSL https://dot.net/v1/dotnet-install.sh
if [ $? -ne 0 ]; then
download_retries=3
while [ $download_retries -gt 0 ]; do
curl -o dotnet-install.sh -sSL https://dot.net/v1/dotnet-install.sh
if [ $? -ne 0 ]; then
let download_retries=download_retries-1
echo -e "${YELLOW}Failed to download dotnet-install.sh. Retries left: $download_retries.${RESET}"
else
download_retries=0
fi
done
fi

# Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs)
chmod +x "dotnet-install.sh"; sync

./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT"
if [ $? -ne 0 ]; then
sdk_retries=3
while [ $sdk_retries -gt 0 ]; do
./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT"
if [ $? -ne 0 ]; then
let sdk_retries=sdk_retries-1
echo -e "${YELLOW}Failed to install .NET Core SDK $version. Retries left: $sdk_retries.${RESET}"
else
sdk_retries=0
fi
done
fi

./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir "$DOTNET_ROOT"
if [ $? -ne 0 ]; then
runtime_retries=3
while [ $runtime_retries -gt 0 ]; do
./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir "$DOTNET_ROOT"
if [ $? -ne 0 ]; then
let runtime_retries=runtime_retries-1
echo -e "${YELLOW}Failed to install .NET Core runtime $version. Retries left: $runtime_retries.${RESET}"
else
runtime_retries=0
fi
done
. eng/common/tools.sh
InstallDotNet $DOTNET_ROOT $dotnet_sdk_version "" "" true || {
exit_code=$?
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
if [[ -z "${11:-}" ]]; then
InstallDotNet $DOTNET_ROOT $dotnet_runtime_version "" dotnet true || {
exit_code=$?
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
else
InstallDotNet $DOTNET_ROOT $dotnet_runtime_version "" dotnet true https://dotnetclimsrc.blob.core.windows.net/dotnet ${11} || {
exit_code=$?
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
fi

if [ -e /proc/self/coredump_filter ]; then
Expand All @@ -82,7 +57,7 @@ if [ -e /proc/self/coredump_filter ]; then
echo -n 0x3F > /proc/self/coredump_filter
fi

# dontet-install.sh seems to affect the Linux filesystem and causes test flakiness unless we sync the filesystem before running tests
# dotnet-install.sh seems to affect the Linux filesystem and causes test flakiness unless we sync the filesystem before running tests
sync

exit_code=0
Expand Down
70 changes: 68 additions & 2 deletions eng/scripts/ci-source-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,76 @@ reporoot="$(dirname "$(dirname "$scriptroot")")"
# mv "$reporoot/global.bak.json" "$reporoot/global.json"
#}" EXIT

dotnet_runtime_source_feed=''
dotnet_runtime_source_feed_key=''
other_args=()

#
# Functions
#
__usage() {
echo "Usage: $(basename "${BASH_SOURCE[0]}") [options] [[--] <Arguments>...]

Arguments:
<Arguments>... Arguments passed to the command. Variable number of arguments allowed.

--dotnet-runtime-source-feed Additional feed that can be used when downloading .NET runtimes
--dotnet-runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes

Description:
This script is meant for testing source build by imitating some of the input parameters and conditions.
"

if [[ "${1:-}" != '--no-exit' ]]; then
exit 2
fi
}

__error() {
echo -e "${RED}error: $*${RESET}" 1>&2
}

#
# main
#

while [[ $# -gt 0 ]]; do
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
case "$opt" in
-\?|-h|-help)
__usage --no-exit
exit 0
;;
-dotnet-runtime-source-feed|-dotnetruntimesourcefeed)
shift
[ -z "${1:-}" ] && __error "Missing value for parameter --dotnet-runtime-source-feed" && __usage
dotnet_runtime_source_feed="${1:-}"
;;
-dotnet-runtime-source-feed-key|-dotnetruntimesourcefeedkey)
shift
[ -z "${1:-}" ] && __error "Missing value for parameter --dotnet-runtime-source-feed-key" && __usage
dotnet_runtime_source_feed_key="${1:-}"
;;
*)
other_args[${#other_args[*]}]="$1"
;;
esac
shift
done

# Set up additional runtime args
runtime_feed_args=()
if [ ! -z "$dotnet_runtime_source_feed$dotnet_runtime_source_feed_key" ]; then
runtimeFeedArg="/p:DotNetRuntimeSourceFeed=$dotnet_runtime_source_feed"
runtimeFeedKeyArg="/p:DotNetRuntimeSourceFeedKey=$dotnet_runtime_source_feed_key"
runtime_feed_args[${#runtime_feed_args[*]}]=$runtimeFeedArg
runtime_feed_args[${#runtime_feed_args[*]}]=$runtimeFeedKeyArg
fi

# Build repo tasks
"$reporoot/eng/common/build.sh" --restore --build --ci --configuration Release /p:ProjectToBuild=$reporoot/eng/tools/RepoTasks/RepoTasks.csproj
"$reporoot/eng/common/build.sh" --restore --build --ci --configuration Release /p:ProjectToBuild=$reporoot/eng/tools/RepoTasks/RepoTasks.csproj ${runtime_feed_args[@]+"${runtime_feed_args[@]}"}

export DotNetBuildFromSource='true'

# Build projects
"$reporoot/eng/common/build.sh" --restore --build --pack "$@"
"$reporoot/eng/common/build.sh" --restore --build --pack ${other_args[@]+"${other_args[@]}"} ${runtime_feed_args[@]+"${runtime_feed_args[@]}"}
9 changes: 9 additions & 0 deletions eng/targets/Helix.targets
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
<ItemGroup Condition="$(BuildHelixPayload)">
<Content Include="@(HelixContent)" />
<Content Include="$(RepoRoot)eng\scripts\Download.ps1" />
<Content Include="$(RepoRoot)NuGet.config" />
Copy link
Member

Choose a reason for hiding this comment

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

I realized after doing this that we probably don't need to add as many sources in eng/helix/content/RunTests/TestRunner.cs anymore. That file also adds a bunch of environment variables that are set in the runtests.* scripts. Please file a follow-up issue for cleanup after this goes in. Or, just open another PR to remove the redundancy.

I'm keeping this separate because it's not really part of the merge.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Plz file follow-up issue(s) to

  1. Remove TestRunner NuGet source additions that should already be in this file (copied from the build and, likely enhanced in the case of internal builds)
  2. Reduce the duplication between TestRunner and the runtests.* scripts if possible
  • might be more there than just environment variables
  1. Add the new dotnet-install.* scripts from eng/common/dotnet-install-scripts/ to the Helix payload (placing them in a dotnet-install-scripts/ folder relative to where the tools.* files land

Copy link
Member

Choose a reason for hiding this comment

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

Addressed the third bullet in my commit to your branch @wtgodbe

<Content Include="$(RepoRoot)global.json" />
<ContentWithTargetPath Include="
$(RepoRoot)eng\common\pipeline-logging-functions.*;
$(RepoRoot)eng\common\tools.*">
<TargetPath>eng\common\%(Filename)%(Extension)</TargetPath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</ContentWithTargetPath>
</ItemGroup>

<!--
Expand Down