Skip to content

Commit 6205d66

Browse files
committed
Resolve merge conflicts
2 parents 098be5f + a4938d0 commit 6205d66

File tree

9 files changed

+133
-91
lines changed

9 files changed

+133
-91
lines changed

.azure/pipelines/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -621,17 +621,18 @@ stages:
621621
timeoutInMinutes: 240
622622
steps:
623623
# Build the shared framework
624-
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
624+
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs)
625625
displayName: Build shared fx
626-
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj
626+
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj $(_InternalRuntimeDownloadArgs)
627627
displayName: Restore interop projects
628628
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildNative -projects eng\helix\helix.proj
629-
/p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true
629+
/p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true $(_InternalRuntimeDownloadArgs)
630630
/p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
631631
displayName: Run build.cmd helix target
632632
env:
633633
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
634634
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
635+
635636
artifacts:
636637
- name: Helix_logs
637638
path: artifacts/log/
@@ -665,7 +666,7 @@ stages:
665666
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
666667
env:
667668
Token: $(dn-bot-dnceng-artifact-feeds-rw)
668-
- script: ./eng/scripts/ci-source-build.sh --ci --nobl --configuration Release /p:BuildManaged=true /p:BuildNodeJs=false
669+
- script: ./eng/scripts/ci-source-build.sh --ci --nobl --configuration Release /p:BuildManaged=true /p:BuildNodeJs=false $(_InternalRuntimeDownloadArgs)
669670
displayName: Run ci-source-build.sh
670671
- task: PublishBuildArtifacts@1
671672
displayName: Upload logs

eng/helix/content/InstallDotNet.ps1

Lines changed: 0 additions & 35 deletions
This file was deleted.

eng/helix/content/runtests.cmd

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ set $aspnetref=%9
1515
REM Batch only supports up to 9 arguments using the %# syntax, need to shift to get more
1616
shift
1717
set $helixTimeout=%9
18+
shift
19+
set $feedCred=%9
1820

1921
set DOTNET_HOME=%HELIX_CORRELATION_PAYLOAD%\sdk
2022
set DOTNET_ROOT=%DOTNET_HOME%\%$arch%
@@ -24,10 +26,16 @@ set DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\home
2426

2527
set PATH=%DOTNET_ROOT%;!PATH!;%HELIX_CORRELATION_PAYLOAD%\node\bin
2628
echo Set path to: %PATH%
27-
echo "Invoking InstallDotNet.ps1 %$arch% %$sdkVersion% %$runtimeVersion% %DOTNET_ROOT%"
28-
powershell.exe -NoProfile -ExecutionPolicy unrestricted -file InstallDotNet.ps1 %$arch% %$sdkVersion% %$runtimeVersion% %DOTNET_ROOT%
29+
30+
powershell.exe -noLogo -NoProfile -ExecutionPolicy unrestricted -command ". eng\common\tools.ps1; InstallDotNet %DOTNET_ROOT% %$sdkVersion% %$arch% '' $true"
31+
IF [%$feedCred%] == [] (
32+
powershell.exe -noLogo -NoProfile -ExecutionPolicy unrestricted -command ". eng\common\tools.ps1; InstallDotNet %DOTNET_ROOT% %$runtimeVersion% %$arch% dotnet $true"
33+
) else (
34+
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%"
35+
)
2936

3037
set exit_code=0
38+
3139
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..."
3240
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
3341

eng/helix/content/runtests.sh

Lines changed: 19 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -30,49 +30,24 @@ RED="\033[0;31m"
3030
YELLOW="\033[0;33m"
3131
MAGENTA="\033[0;95m"
3232

33-
curl -o dotnet-install.sh -sSL https://dot.net/v1/dotnet-install.sh
34-
if [ $? -ne 0 ]; then
35-
download_retries=3
36-
while [ $download_retries -gt 0 ]; do
37-
curl -o dotnet-install.sh -sSL https://dot.net/v1/dotnet-install.sh
38-
if [ $? -ne 0 ]; then
39-
let download_retries=download_retries-1
40-
echo -e "${YELLOW}Failed to download dotnet-install.sh. Retries left: $download_retries.${RESET}"
41-
else
42-
download_retries=0
43-
fi
44-
done
45-
fi
46-
47-
# Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs)
48-
chmod +x "dotnet-install.sh"; sync
49-
50-
./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT"
51-
if [ $? -ne 0 ]; then
52-
sdk_retries=3
53-
while [ $sdk_retries -gt 0 ]; do
54-
./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT"
55-
if [ $? -ne 0 ]; then
56-
let sdk_retries=sdk_retries-1
57-
echo -e "${YELLOW}Failed to install .NET Core SDK $version. Retries left: $sdk_retries.${RESET}"
58-
else
59-
sdk_retries=0
60-
fi
61-
done
62-
fi
63-
64-
./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir "$DOTNET_ROOT"
65-
if [ $? -ne 0 ]; then
66-
runtime_retries=3
67-
while [ $runtime_retries -gt 0 ]; do
68-
./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir "$DOTNET_ROOT"
69-
if [ $? -ne 0 ]; then
70-
let runtime_retries=runtime_retries-1
71-
echo -e "${YELLOW}Failed to install .NET Core runtime $version. Retries left: $runtime_retries.${RESET}"
72-
else
73-
runtime_retries=0
74-
fi
75-
done
33+
. eng/common/tools.sh
34+
InstallDotNet $DOTNET_ROOT $dotnet_sdk_version "" "" true || {
35+
exit_code=$?
36+
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
37+
ExitWithExitCode $exit_code
38+
}
39+
if [[ -z "${11:-}" ]]; then
40+
InstallDotNet $DOTNET_ROOT $dotnet_runtime_version "" dotnet true || {
41+
exit_code=$?
42+
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
43+
ExitWithExitCode $exit_code
44+
}
45+
else
46+
InstallDotNet $DOTNET_ROOT $dotnet_runtime_version "" dotnet true https://dotnetclimsrc.blob.core.windows.net/dotnet ${11} || {
47+
exit_code=$?
48+
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
49+
ExitWithExitCode $exit_code
50+
}
7651
fi
7752

7853
if [ -e /proc/self/coredump_filter ]; then
@@ -82,7 +57,7 @@ if [ -e /proc/self/coredump_filter ]; then
8257
echo -n 0x3F > /proc/self/coredump_filter
8358
fi
8459

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

8863
exit_code=0

eng/scripts/ci-source-build.sh

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,76 @@ reporoot="$(dirname "$(dirname "$scriptroot")")"
3333
# mv "$reporoot/global.bak.json" "$reporoot/global.json"
3434
#}" EXIT
3535

36+
dotnet_runtime_source_feed=''
37+
dotnet_runtime_source_feed_key=''
38+
other_args=()
39+
40+
#
41+
# Functions
42+
#
43+
__usage() {
44+
echo "Usage: $(basename "${BASH_SOURCE[0]}") [options] [[--] <Arguments>...]
45+
46+
Arguments:
47+
<Arguments>... Arguments passed to the command. Variable number of arguments allowed.
48+
49+
--dotnet-runtime-source-feed Additional feed that can be used when downloading .NET runtimes
50+
--dotnet-runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes
51+
52+
Description:
53+
This script is meant for testing source build by imitating some of the input parameters and conditions.
54+
"
55+
56+
if [[ "${1:-}" != '--no-exit' ]]; then
57+
exit 2
58+
fi
59+
}
60+
61+
__error() {
62+
echo -e "${RED}error: $*${RESET}" 1>&2
63+
}
64+
65+
#
66+
# main
67+
#
68+
69+
while [[ $# -gt 0 ]]; do
70+
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
71+
case "$opt" in
72+
-\?|-h|-help)
73+
__usage --no-exit
74+
exit 0
75+
;;
76+
-dotnet-runtime-source-feed|-dotnetruntimesourcefeed)
77+
shift
78+
[ -z "${1:-}" ] && __error "Missing value for parameter --dotnet-runtime-source-feed" && __usage
79+
dotnet_runtime_source_feed="${1:-}"
80+
;;
81+
-dotnet-runtime-source-feed-key|-dotnetruntimesourcefeedkey)
82+
shift
83+
[ -z "${1:-}" ] && __error "Missing value for parameter --dotnet-runtime-source-feed-key" && __usage
84+
dotnet_runtime_source_feed_key="${1:-}"
85+
;;
86+
*)
87+
other_args[${#other_args[*]}]="$1"
88+
;;
89+
esac
90+
shift
91+
done
92+
93+
# Set up additional runtime args
94+
runtime_feed_args=()
95+
if [ ! -z "$dotnet_runtime_source_feed$dotnet_runtime_source_feed_key" ]; then
96+
runtimeFeedArg="/p:DotNetRuntimeSourceFeed=$dotnet_runtime_source_feed"
97+
runtimeFeedKeyArg="/p:DotNetRuntimeSourceFeedKey=$dotnet_runtime_source_feed_key"
98+
runtime_feed_args[${#runtime_feed_args[*]}]=$runtimeFeedArg
99+
runtime_feed_args[${#runtime_feed_args[*]}]=$runtimeFeedKeyArg
100+
fi
101+
36102
# Build repo tasks
37-
"$reporoot/eng/common/build.sh" --restore --build --ci --configuration Release /p:ProjectToBuild=$reporoot/eng/tools/RepoTasks/RepoTasks.csproj
103+
"$reporoot/eng/common/build.sh" --restore --build --ci --configuration Release /p:ProjectToBuild=$reporoot/eng/tools/RepoTasks/RepoTasks.csproj ${runtime_feed_args[@]+"${runtime_feed_args[@]}"}
38104

39105
export DotNetBuildFromSource='true'
40106

41107
# Build projects
42-
"$reporoot/eng/common/build.sh" --restore --build --pack "$@"
108+
"$reporoot/eng/common/build.sh" --restore --build --pack ${other_args[@]+"${other_args[@]}"} ${runtime_feed_args[@]+"${runtime_feed_args[@]}"}

eng/targets/Helix.targets

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@
2828
<ItemGroup Condition="$(BuildHelixPayload)">
2929
<Content Include="@(HelixContent)" />
3030
<Content Include="$(RepoRoot)eng\scripts\Download.ps1" />
31+
<Content Include="$(RepoRoot)NuGet.config" />
32+
<Content Include="$(RepoRoot)global.json" />
33+
<ContentWithTargetPath Include="
34+
$(RepoRoot)eng\common\pipeline-logging-functions.*;
35+
$(RepoRoot)eng\common\tools.*">
36+
<TargetPath>eng\common\%(Filename)%(Extension)</TargetPath>
37+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
38+
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
39+
</ContentWithTargetPath>
3140
</ItemGroup>
3241

3342
<!--
@@ -117,8 +126,8 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj
117126
<TestAssembly>$(TargetFileName)</TestAssembly>
118127
<PreCommands>@(HelixPreCommand)</PreCommands>
119128
<PostCommands>@(HelixPostCommand)</PostCommands>
120-
<Command Condition="$(IsWindowsHelixQueue)">call runtests.cmd $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg $(HelixTimeout)</Command>
121-
<Command Condition="!$(IsWindowsHelixQueue)">./runtests.sh $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg $(HelixTimeout)</Command>
129+
<Command Condition="$(IsWindowsHelixQueue)">call runtests.cmd $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg $(HelixTimeout) $(DotNetRuntimeSourceFeedKey)</Command>
130+
<Command Condition="!$(IsWindowsHelixQueue)">./runtests.sh $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg $(HelixTimeout) $(DotNetRuntimeSourceFeedKey)</Command>
122131
<Command Condition="$(HelixCommand) != ''">$(HelixCommand)</Command>
123132
<Timeout>$(HelixTimeout)</Timeout>
124133
</HelixWorkItem>

src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
256256
`_framework/${icuDataResourceName}`,
257257
resourceLoader.bootConfig.resources.runtime[icuDataResourceName],
258258
'globalization');
259+
} else {
260+
// Use invariant culture if the app does not carry icu data.
261+
MONO.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1");
259262
}
260263

261264
// Override the mechanism for fetching the main wasm file so we can connect it to our cache
@@ -285,9 +288,12 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
285288

286289
if (icuDataResource) {
287290
loadICUData(icuDataResource);
291+
<<<<<<< HEAD
288292
} else {
289293
// Use invariant culture if the app does not carry icu data.
290294
MONO.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1");
295+
=======
296+
>>>>>>> internal/internal/release/5.0-preview8
291297
}
292298

293299
// Fetch the assemblies and PDBs in the background, telling Mono to wait until they are loaded
@@ -382,6 +388,15 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
382388
// Turn off full-gc to prevent browser freezing.
383389
const mono_wasm_enable_on_demand_gc = cwrap('mono_wasm_enable_on_demand_gc', null, ['number']);
384390
mono_wasm_enable_on_demand_gc(0);
391+
<<<<<<< HEAD
392+
=======
393+
394+
let timeZone = "UTC";
395+
try {
396+
timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
397+
} catch { }
398+
MONO.mono_wasm_setenv("TZ", timeZone);
399+
>>>>>>> internal/internal/release/5.0-preview8
385400
const load_runtime = cwrap('mono_wasm_load_runtime', null, ['string', 'number']);
386401
// -1 enables debugging with logging disabled. 0 disables debugging entirely.
387402
load_runtime(appBinDirName, hasDebuggingEnabled() ? -1 : 0);

src/Grpc/test/InteropTests/InteropTests.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<PropertyGroup>
44
<ContainsFunctionalTestAssets>true</ContainsFunctionalTestAssets>
55
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
6+
7+
<!-- https://github.com/dotnet/aspnetcore/issues/24182 -->
8+
<BuildHelixPayload>false</BuildHelixPayload>
69
</PropertyGroup>
710

811
<ItemGroup>

src/Grpc/test/testassets/InteropClient/InteropClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ private InteropClient(ClientOptions options)
9595
var services = new ServiceCollection();
9696
services.AddLogging(configure =>
9797
{
98-
configure.SetMinimumLevel(LogLevel.Trace);
99-
configure.AddConsole(loggerOptions =>
98+
configure.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
99+
configure.AddSimpleConsole(loggerOptions =>
100100
{
101101
#pragma warning disable CS0618 // Type or member is obsolete
102102
loggerOptions.IncludeScopes = true;

0 commit comments

Comments
 (0)