From 23195929f2e0ee49cf915193d212fd8cee5921bd Mon Sep 17 00:00:00 2001 From: Tingluo Huang Date: Thu, 14 Nov 2024 22:07:27 -0500 Subject: [PATCH] Bump runner to dotnet 9. --- .devcontainer/devcontainer.json | 4 +- docs/checks/sslcert.md | 2 +- images/Dockerfile | 4 +- src/Runner.Common/Runner.Common.csproj | 8 ++-- src/Runner.Listener/Runner.Listener.csproj | 6 +-- .../Runner.PluginHost.csproj | 2 +- src/Runner.Plugins/Runner.Plugins.csproj | 2 +- src/Runner.Sdk/Runner.Sdk.csproj | 6 +-- src/Runner.Worker/Runner.Worker.csproj | 8 ++-- src/Sdk/Sdk.csproj | 8 ++-- .../L0/Listener/BrokerMessageListenerL0.cs | 2 +- src/Test/L0/Listener/ErrorThrottlerL0.cs | 8 ++-- src/Test/L0/Listener/JobDispatcherL0.cs | 24 +++++----- src/Test/L0/Listener/MessageListenerL0.cs | 16 +++---- src/Test/L0/Listener/RunnerL0.cs | 14 +++--- src/Test/L0/Listener/SelfUpdaterL0.cs | 8 ++-- src/Test/L0/Listener/SelfUpdaterV2L0.cs | 6 +-- src/Test/L0/Worker/ActionManagerL0.cs | 46 +++++++++---------- src/Test/L0/Worker/ActionRunnerL0.cs | 9 ++-- .../L0/Worker/ContainerOperationProviderL0.cs | 8 ++-- src/Test/L0/Worker/OutputManagerL0.cs | 8 ++-- .../L0/Worker/SnapshotOperationProviderL0.cs | 3 +- src/Test/L0/Worker/WorkerL0.cs | 4 +- src/Test/Test.csproj | 8 ++-- src/dev.sh | 2 +- src/global.json | 2 +- 26 files changed, 111 insertions(+), 107 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 139abbc26c1..a2708375e9d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,10 +1,10 @@ { "name": "Actions Runner Devcontainer", - "image": "mcr.microsoft.com/devcontainers/base:focal", + "image": "mcr.microsoft.com/devcontainers/base:noble", "features": { "ghcr.io/devcontainers/features/docker-in-docker:1": {}, "ghcr.io/devcontainers/features/dotnet": { - "version": "8.0.404" + "version": "9.0.100" }, "ghcr.io/devcontainers/features/node:1": { "version": "20" diff --git a/docs/checks/sslcert.md b/docs/checks/sslcert.md index 2ab09b722d2..969314e9e69 100644 --- a/docs/checks/sslcert.md +++ b/docs/checks/sslcert.md @@ -41,7 +41,7 @@ To let the runner trusts your CA certificate, you will need to: - macOS: ![trust ca cert](./../res/macOStrustCA.gif) - Linux: Refer to the distribution documentation 1. RedHat: https://www.redhat.com/sysadmin/ca-certificates-cli - 2. Ubuntu: http://manpages.ubuntu.com/manpages/focal/man8/update-ca-certificates.8.html + 2. Ubuntu: https://manpages.ubuntu.com/manpages/noble/man8/update-ca-certificates.8.html 3. Google search: "trust ca certificate on [linux distribution]" 4. If all approaches failed, set environment variable `SSL_CERT_FILE` to the CA bundle `.pem` file we get. > To verify cert gets installed properly on Linux, you can try use `curl -v https://sitewithsslissue.com` and `pwsh -Command \"Invoke-WebRequest -Uri https://sitewithsslissue.com\"` diff --git a/images/Dockerfile b/images/Dockerfile index 50b4a6b2d27..a3968c05608 100644 --- a/images/Dockerfile +++ b/images/Dockerfile @@ -1,5 +1,5 @@ # Source: https://github.com/dotnet/dotnet-docker -FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-jammy as build +FROM mcr.microsoft.com/dotnet/runtime-deps:9.0-noble as build ARG TARGETOS ARG TARGETARCH @@ -32,7 +32,7 @@ RUN export RUNNER_ARCH=${TARGETARCH} \ "https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION}/buildx-v${BUILDX_VERSION}.linux-${TARGETARCH}" \ && chmod +x /usr/local/lib/docker/cli-plugins/docker-buildx -FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-jammy +FROM mcr.microsoft.com/dotnet/runtime-deps:9.0-noble ENV DEBIAN_FRONTEND=noninteractive ENV RUNNER_MANUALLY_TRAP_SIG=1 diff --git a/src/Runner.Common/Runner.Common.csproj b/src/Runner.Common/Runner.Common.csproj index 6c4635626a2..11b068a335a 100644 --- a/src/Runner.Common/Runner.Common.csproj +++ b/src/Runner.Common/Runner.Common.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 Library win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true @@ -17,9 +17,9 @@ - - - + + + diff --git a/src/Runner.Listener/Runner.Listener.csproj b/src/Runner.Listener/Runner.Listener.csproj index afd528128a5..41d8e3809ae 100644 --- a/src/Runner.Listener/Runner.Listener.csproj +++ b/src/Runner.Listener/Runner.Listener.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 Exe win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true @@ -22,8 +22,8 @@ - - + + diff --git a/src/Runner.PluginHost/Runner.PluginHost.csproj b/src/Runner.PluginHost/Runner.PluginHost.csproj index 81a8d2e4304..49272a23405 100644 --- a/src/Runner.PluginHost/Runner.PluginHost.csproj +++ b/src/Runner.PluginHost/Runner.PluginHost.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 Exe win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true diff --git a/src/Runner.Plugins/Runner.Plugins.csproj b/src/Runner.Plugins/Runner.Plugins.csproj index a786cf1cd1b..60d7662b7f7 100644 --- a/src/Runner.Plugins/Runner.Plugins.csproj +++ b/src/Runner.Plugins/Runner.Plugins.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 Library win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true diff --git a/src/Runner.Sdk/Runner.Sdk.csproj b/src/Runner.Sdk/Runner.Sdk.csproj index 55dbf12627c..bc8baf1cd3d 100644 --- a/src/Runner.Sdk/Runner.Sdk.csproj +++ b/src/Runner.Sdk/Runner.Sdk.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 Library win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true @@ -15,9 +15,9 @@ - + - + diff --git a/src/Runner.Worker/Runner.Worker.csproj b/src/Runner.Worker/Runner.Worker.csproj index 53c1610df3e..dc525ebddb5 100644 --- a/src/Runner.Worker/Runner.Worker.csproj +++ b/src/Runner.Worker/Runner.Worker.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 Exe win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true @@ -19,9 +19,9 @@ - - - + + + diff --git a/src/Sdk/Sdk.csproj b/src/Sdk/Sdk.csproj index ce7f97c8888..a6684f9f4f8 100644 --- a/src/Sdk/Sdk.csproj +++ b/src/Sdk/Sdk.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 Library win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 @@ -20,12 +20,14 @@ - - + + + + diff --git a/src/Test/L0/Listener/BrokerMessageListenerL0.cs b/src/Test/L0/Listener/BrokerMessageListenerL0.cs index 64a71515c16..60df64574a7 100644 --- a/src/Test/L0/Listener/BrokerMessageListenerL0.cs +++ b/src/Test/L0/Listener/BrokerMessageListenerL0.cs @@ -33,7 +33,7 @@ public BrokerMessageListenerL0() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void CreatesSession() + public async Task CreatesSession() { using (TestHostContext tc = CreateTestContext()) using (var tokenSource = new CancellationTokenSource()) diff --git a/src/Test/L0/Listener/ErrorThrottlerL0.cs b/src/Test/L0/Listener/ErrorThrottlerL0.cs index e4118b181f0..43afec056c0 100644 --- a/src/Test/L0/Listener/ErrorThrottlerL0.cs +++ b/src/Test/L0/Listener/ErrorThrottlerL0.cs @@ -24,7 +24,7 @@ public sealed class ErrorThrottlerL0 [InlineData(6)] [InlineData(7)] [InlineData(8)] - public async void TestIncrementAndWait(int totalAttempts) + public async Task TestIncrementAndWait(int totalAttempts) { using (TestHostContext hc = CreateTestContext()) { @@ -97,7 +97,7 @@ public async void TestIncrementAndWait(int totalAttempts) } [Fact] - public async void TestReset() + public async Task TestReset() { using (TestHostContext hc = CreateTestContext()) { @@ -151,7 +151,7 @@ public async void TestReset() } [Fact] - public async void TestReceivesCancellationToken() + public async Task TestReceivesCancellationToken() { using (TestHostContext hc = CreateTestContext()) { @@ -180,7 +180,7 @@ public async void TestReceivesCancellationToken() } [Fact] - public async void TestReceivesSender() + public async Task TestReceivesSender() { using (TestHostContext hc = CreateTestContext()) { diff --git a/src/Test/L0/Listener/JobDispatcherL0.cs b/src/Test/L0/Listener/JobDispatcherL0.cs index cc50c180456..bf0a8863653 100644 --- a/src/Test/L0/Listener/JobDispatcherL0.cs +++ b/src/Test/L0/Listener/JobDispatcherL0.cs @@ -49,7 +49,7 @@ private Pipelines.AgentJobRequestMessage CreateJobRequestMessage() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void DispatchesJobRequest() + public async Task DispatchesJobRequest() { //Arrange using (var hc = new TestHostContext(this)) @@ -99,7 +99,7 @@ public async void DispatchesJobRequest() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void DispatcherRenewJobRequest() + public async Task DispatcherRenewJobRequest() { //Arrange using (var hc = new TestHostContext(this)) @@ -157,7 +157,7 @@ public async void DispatcherRenewJobRequest() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void DispatcherRenewJobRequestStopOnJobNotFoundExceptions() + public async Task DispatcherRenewJobRequestStopOnJobNotFoundExceptions() { //Arrange using (var hc = new TestHostContext(this)) @@ -216,7 +216,7 @@ public async void DispatcherRenewJobRequestStopOnJobNotFoundExceptions() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void DispatcherRenewJobOnRunServiceStopOnJobNotFoundExceptions() + public async Task DispatcherRenewJobOnRunServiceStopOnJobNotFoundExceptions() { //Arrange using (var hc = new TestHostContext(this)) @@ -285,7 +285,7 @@ public async void DispatcherRenewJobOnRunServiceStopOnJobNotFoundExceptions() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void DispatcherRenewJobRequestStopOnJobTokenExpiredExceptions() + public async Task DispatcherRenewJobRequestStopOnJobTokenExpiredExceptions() { //Arrange using (var hc = new TestHostContext(this)) @@ -344,7 +344,7 @@ public async void DispatcherRenewJobRequestStopOnJobTokenExpiredExceptions() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void RenewJobRequestNewAgentNameUpdatesSettings() + public async Task RenewJobRequestNewAgentNameUpdatesSettings() { //Arrange using (var hc = new TestHostContext(this)) @@ -401,7 +401,7 @@ public async void RenewJobRequestNewAgentNameUpdatesSettings() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void RenewJobRequestSameAgentNameIgnored() + public async Task RenewJobRequestSameAgentNameIgnored() { //Arrange using (var hc = new TestHostContext(this)) @@ -456,7 +456,7 @@ public async void RenewJobRequestSameAgentNameIgnored() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void RenewJobRequestNullAgentNameIgnored() + public async Task RenewJobRequestNullAgentNameIgnored() { //Arrange using (var hc = new TestHostContext(this)) @@ -509,7 +509,7 @@ public async void RenewJobRequestNullAgentNameIgnored() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void DispatcherRenewJobRequestRecoverFromExceptions() + public async Task DispatcherRenewJobRequestRecoverFromExceptions() { //Arrange using (var hc = new TestHostContext(this)) @@ -570,7 +570,7 @@ public async void DispatcherRenewJobRequestRecoverFromExceptions() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void DispatcherRenewJobRequestFirstRenewRetrySixTimes() + public async Task DispatcherRenewJobRequestFirstRenewRetrySixTimes() { //Arrange using (var hc = new TestHostContext(this)) @@ -625,7 +625,7 @@ public async void DispatcherRenewJobRequestFirstRenewRetrySixTimes() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void DispatcherRenewJobRequestStopOnExpiredRequest() + public async Task DispatcherRenewJobRequestStopOnExpiredRequest() { //Arrange using (var hc = new TestHostContext(this)) @@ -691,7 +691,7 @@ public async void DispatcherRenewJobRequestStopOnExpiredRequest() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void DispatchesOneTimeJobRequest() + public async Task DispatchesOneTimeJobRequest() { //Arrange using (var hc = new TestHostContext(this)) diff --git a/src/Test/L0/Listener/MessageListenerL0.cs b/src/Test/L0/Listener/MessageListenerL0.cs index f44d4988928..690633739e2 100644 --- a/src/Test/L0/Listener/MessageListenerL0.cs +++ b/src/Test/L0/Listener/MessageListenerL0.cs @@ -51,7 +51,7 @@ private TestHostContext CreateTestContext([CallerMemberName] String testName = " [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void CreatesSession() + public async Task CreatesSession() { using (TestHostContext tc = CreateTestContext()) using (var tokenSource = new CancellationTokenSource()) @@ -95,7 +95,7 @@ public async void CreatesSession() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void CreatesSessionWithBrokerMigration() + public async Task CreatesSessionWithBrokerMigration() { using (TestHostContext tc = CreateTestContext()) using (var tokenSource = new CancellationTokenSource()) @@ -157,7 +157,7 @@ public async void CreatesSessionWithBrokerMigration() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void DeleteSession() + public async Task DeleteSession() { using (TestHostContext tc = CreateTestContext()) using (var tokenSource = new CancellationTokenSource()) @@ -204,7 +204,7 @@ public async void DeleteSession() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void DeleteSessionWithBrokerMigration() + public async Task DeleteSessionWithBrokerMigration() { using (TestHostContext tc = CreateTestContext()) using (var tokenSource = new CancellationTokenSource()) @@ -281,7 +281,7 @@ public async void DeleteSessionWithBrokerMigration() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void GetNextMessage() + public async Task GetNextMessage() { using (TestHostContext tc = CreateTestContext()) using (var tokenSource = new CancellationTokenSource()) @@ -362,7 +362,7 @@ public async void GetNextMessage() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void GetNextMessageWithBrokerMigration() + public async Task GetNextMessageWithBrokerMigration() { using (TestHostContext tc = CreateTestContext()) using (var tokenSource = new CancellationTokenSource()) @@ -468,7 +468,7 @@ public async void GetNextMessageWithBrokerMigration() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void CreateSessionWithOriginalCredential() + public async Task CreateSessionWithOriginalCredential() { using (TestHostContext tc = CreateTestContext()) using (var tokenSource = new CancellationTokenSource()) @@ -513,7 +513,7 @@ public async void CreateSessionWithOriginalCredential() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void SkipDeleteSession_WhenGetNextMessageGetTaskAgentAccessTokenExpiredException() + public async Task SkipDeleteSession_WhenGetNextMessageGetTaskAgentAccessTokenExpiredException() { using (TestHostContext tc = CreateTestContext()) using (var tokenSource = new CancellationTokenSource()) diff --git a/src/Test/L0/Listener/RunnerL0.cs b/src/Test/L0/Listener/RunnerL0.cs index b29f8835c2b..295a98736f4 100644 --- a/src/Test/L0/Listener/RunnerL0.cs +++ b/src/Test/L0/Listener/RunnerL0.cs @@ -57,7 +57,7 @@ private JobCancelMessage CreateJobCancelMessage() [Trait("Level", "L0")] [Trait("Category", "Runner")] //process 2 new job messages, and one cancel message - public async void TestRunAsync() + public async Task TestRunAsync() { using (var hc = new TestHostContext(this)) { @@ -169,7 +169,7 @@ public async void TestRunAsync() [MemberData(nameof(RunAsServiceTestData))] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestExecuteCommandForRunAsService(string[] args, bool configureAsService, Times expectedTimes) + public async Task TestExecuteCommandForRunAsService(string[] args, bool configureAsService, Times expectedTimes) { using (var hc = new TestHostContext(this)) { @@ -201,7 +201,7 @@ public async void TestExecuteCommandForRunAsService(string[] args, bool configur [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestMachineProvisionerCLI() + public async Task TestMachineProvisionerCLI() { using (var hc = new TestHostContext(this)) { @@ -235,7 +235,7 @@ public async void TestMachineProvisionerCLI() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestRunOnce() + public async Task TestRunOnce() { using (var hc = new TestHostContext(this)) { @@ -332,7 +332,7 @@ public async void TestRunOnce() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestRunOnceOnlyTakeOneJobMessage() + public async Task TestRunOnceOnlyTakeOneJobMessage() { using (var hc = new TestHostContext(this)) { @@ -433,7 +433,7 @@ public async void TestRunOnceOnlyTakeOneJobMessage() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestRunOnceHandleUpdateMessage() + public async Task TestRunOnceHandleUpdateMessage() { using (var hc = new TestHostContext(this)) { @@ -523,7 +523,7 @@ public async void TestRunOnceHandleUpdateMessage() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestRemoveLocalRunnerConfig() + public async Task TestRemoveLocalRunnerConfig() { using (var hc = new TestHostContext(this)) { diff --git a/src/Test/L0/Listener/SelfUpdaterL0.cs b/src/Test/L0/Listener/SelfUpdaterL0.cs index 26ba65e7192..bd678916f55 100644 --- a/src/Test/L0/Listener/SelfUpdaterL0.cs +++ b/src/Test/L0/Listener/SelfUpdaterL0.cs @@ -78,7 +78,7 @@ private async Task FetchLatestRunner() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestSelfUpdateAsync() + public async Task TestSelfUpdateAsync() { try { @@ -137,7 +137,7 @@ public async void TestSelfUpdateAsync() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestSelfUpdateAsync_NoUpdateOnOldVersion() + public async Task TestSelfUpdateAsync_NoUpdateOnOldVersion() { try { @@ -188,7 +188,7 @@ public async void TestSelfUpdateAsync_NoUpdateOnOldVersion() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestSelfUpdateAsync_DownloadRetry() + public async Task TestSelfUpdateAsync_DownloadRetry() { try { @@ -241,7 +241,7 @@ public async void TestSelfUpdateAsync_DownloadRetry() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestSelfUpdateAsync_ValidateHash() + public async Task TestSelfUpdateAsync_ValidateHash() { try { diff --git a/src/Test/L0/Listener/SelfUpdaterV2L0.cs b/src/Test/L0/Listener/SelfUpdaterV2L0.cs index 5115a6bbb7f..fc4c46ed5a2 100644 --- a/src/Test/L0/Listener/SelfUpdaterV2L0.cs +++ b/src/Test/L0/Listener/SelfUpdaterV2L0.cs @@ -74,7 +74,7 @@ private async Task FetchLatestRunner() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestSelfUpdateAsync() + public async Task TestSelfUpdateAsync() { try { @@ -134,7 +134,7 @@ public async void TestSelfUpdateAsync() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestSelfUpdateAsync_DownloadRetry() + public async Task TestSelfUpdateAsync_DownloadRetry() { try { @@ -183,7 +183,7 @@ public async void TestSelfUpdateAsync_DownloadRetry() [Fact] [Trait("Level", "L0")] [Trait("Category", "Runner")] - public async void TestSelfUpdateAsync_ValidateHash() + public async Task TestSelfUpdateAsync_ValidateHash() { try { diff --git a/src/Test/L0/Worker/ActionManagerL0.cs b/src/Test/L0/Worker/ActionManagerL0.cs index 91f183ae220..c9e162c1294 100644 --- a/src/Test/L0/Worker/ActionManagerL0.cs +++ b/src/Test/L0/Worker/ActionManagerL0.cs @@ -38,7 +38,7 @@ public sealed class ActionManagerL0 [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_DownloadActionFromDotCom_OnPremises_Legacy() + public async Task PrepareActions_DownloadActionFromDotCom_OnPremises_Legacy() { try { @@ -99,7 +99,7 @@ public async void PrepareActions_DownloadActionFromDotCom_OnPremises_Legacy() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_DownloadActionFromDotCom_ZipFileError() + public async Task PrepareActions_DownloadActionFromDotCom_ZipFileError() { try { @@ -156,7 +156,7 @@ public async void PrepareActions_DownloadActionFromDotCom_ZipFileError() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_DownloadUnknownActionFromGraph_OnPremises_Legacy() + public async Task PrepareActions_DownloadUnknownActionFromGraph_OnPremises_Legacy() { try { @@ -216,7 +216,7 @@ public async void PrepareActions_DownloadUnknownActionFromGraph_OnPremises_Legac [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_PullImageFromDockerHub() + public async Task PrepareActions_PullImageFromDockerHub() { try { @@ -254,7 +254,7 @@ public async void PrepareActions_PullImageFromDockerHub() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_DownloadActionFromGraph() + public async Task PrepareActions_DownloadActionFromGraph() { try { @@ -296,7 +296,7 @@ public async void PrepareActions_DownloadActionFromGraph() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_DownloadActionFromGraph_UseCache() + public async Task PrepareActions_DownloadActionFromGraph_UseCache() { try { @@ -406,7 +406,7 @@ public async void PrepareActions_DownloadActionFromGraph_UseCache() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_AlwaysClearActionsCache() + public async Task PrepareActions_AlwaysClearActionsCache() { try { @@ -436,7 +436,7 @@ public async void PrepareActions_AlwaysClearActionsCache() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_SkipDownloadActionForSelfRepo() + public async Task PrepareActions_SkipDownloadActionForSelfRepo() { try { @@ -472,7 +472,7 @@ public async void PrepareActions_SkipDownloadActionForSelfRepo() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_RepositoryActionWithDockerfile() + public async Task PrepareActions_RepositoryActionWithDockerfile() { try { @@ -511,7 +511,7 @@ public async void PrepareActions_RepositoryActionWithDockerfile() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_RepositoryActionWithDockerfileInRelativePath() + public async Task PrepareActions_RepositoryActionWithDockerfileInRelativePath() { try { @@ -552,7 +552,7 @@ public async void PrepareActions_RepositoryActionWithDockerfileInRelativePath() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_RepositoryActionWithActionfile_Dockerfile() + public async Task PrepareActions_RepositoryActionWithActionfile_Dockerfile() { try { @@ -591,7 +591,7 @@ public async void PrepareActions_RepositoryActionWithActionfile_Dockerfile() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_RepositoryActionWithActionfile_DockerfileRelativePath() + public async Task PrepareActions_RepositoryActionWithActionfile_DockerfileRelativePath() { try { @@ -631,7 +631,7 @@ public async void PrepareActions_RepositoryActionWithActionfile_DockerfileRelati [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_RepositoryActionWithActionfile_DockerHubImage() + public async Task PrepareActions_RepositoryActionWithActionfile_DockerHubImage() { try { @@ -670,7 +670,7 @@ public async void PrepareActions_RepositoryActionWithActionfile_DockerHubImage() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_RepositoryActionWithActionYamlFile_DockerHubImage() + public async Task PrepareActions_RepositoryActionWithActionYamlFile_DockerHubImage() { try { @@ -709,7 +709,7 @@ public async void PrepareActions_RepositoryActionWithActionYamlFile_DockerHubIma [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_RepositoryActionWithActionfileAndDockerfile() + public async Task PrepareActions_RepositoryActionWithActionfileAndDockerfile() { try { @@ -749,7 +749,7 @@ public async void PrepareActions_RepositoryActionWithActionfileAndDockerfile() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_NotPullOrBuildImagesMultipleTimes() + public async Task PrepareActions_NotPullOrBuildImagesMultipleTimes() { try { @@ -889,7 +889,7 @@ public async void PrepareActions_NotPullOrBuildImagesMultipleTimes() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_RepositoryActionWithActionfile_Node() + public async Task PrepareActions_RepositoryActionWithActionfile_Node() { try { @@ -926,7 +926,7 @@ public async void PrepareActions_RepositoryActionWithActionfile_Node() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_RepositoryActionWithInvalidWrapperActionfile_Node() + public async Task PrepareActions_RepositoryActionWithInvalidWrapperActionfile_Node() { try { @@ -969,7 +969,7 @@ public async void PrepareActions_RepositoryActionWithInvalidWrapperActionfile_No [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_RepositoryActionWithWrapperActionfile_PreSteps() + public async Task PrepareActions_RepositoryActionWithWrapperActionfile_PreSteps() { try { @@ -1024,7 +1024,7 @@ public async void PrepareActions_RepositoryActionWithWrapperActionfile_PreSteps( [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_CompositeActionWithActionfile_Node() + public async Task PrepareActions_CompositeActionWithActionfile_Node() { try { @@ -1067,7 +1067,7 @@ public async void PrepareActions_CompositeActionWithActionfile_Node() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_CompositeActionWithActionfile_MaxLimit() + public async Task PrepareActions_CompositeActionWithActionfile_MaxLimit() { try { @@ -1107,7 +1107,7 @@ public async void PrepareActions_CompositeActionWithActionfile_MaxLimit() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_CompositeActionWithActionfile_CompositePrestepNested() + public async Task PrepareActions_CompositeActionWithActionfile_CompositePrestepNested() { try { @@ -1149,7 +1149,7 @@ public async void PrepareActions_CompositeActionWithActionfile_CompositePrestepN [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void PrepareActions_CompositeActionWithActionfile_CompositeContainerNested() + public async Task PrepareActions_CompositeActionWithActionfile_CompositeContainerNested() { try { diff --git a/src/Test/L0/Worker/ActionRunnerL0.cs b/src/Test/L0/Worker/ActionRunnerL0.cs index 30842c99b11..e43844d5d1a 100644 --- a/src/Test/L0/Worker/ActionRunnerL0.cs +++ b/src/Test/L0/Worker/ActionRunnerL0.cs @@ -11,6 +11,7 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Threading; +using System.Threading.Tasks; using Xunit; using Pipelines = GitHub.DistributedTask.Pipelines; @@ -33,7 +34,7 @@ public sealed class ActionRunnerL0 [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void MergeDefaultInputs() + public async Task MergeDefaultInputs() { //Arrange Setup(); @@ -79,7 +80,7 @@ public async void MergeDefaultInputs() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void WriteEventPayload() + public async Task WriteEventPayload() { //Arrange Setup(); @@ -319,7 +320,7 @@ public void EvaluateDisplayNameWithoutContext() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void WarnInvalidInputs() + public async Task WarnInvalidInputs() { //Arrange Setup(); @@ -372,7 +373,7 @@ public async void WarnInvalidInputs() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void SetGitHubContextActionRepoRef() + public async Task SetGitHubContextActionRepoRef() { //Arrange Setup(); diff --git a/src/Test/L0/Worker/ContainerOperationProviderL0.cs b/src/Test/L0/Worker/ContainerOperationProviderL0.cs index 1ca7ebbb0ee..ad85740c8bc 100644 --- a/src/Test/L0/Worker/ContainerOperationProviderL0.cs +++ b/src/Test/L0/Worker/ContainerOperationProviderL0.cs @@ -32,7 +32,7 @@ public sealed class ContainerOperationProviderL0 [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void RunServiceContainersHealthcheck_UnhealthyServiceContainer_AssertFailedTask() + public async Task RunServiceContainersHealthcheck_UnhealthyServiceContainer_AssertFailedTask() { //Arrange Setup(); @@ -54,7 +54,7 @@ public async void RunServiceContainersHealthcheck_UnhealthyServiceContainer_Asse [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void RunServiceContainersHealthcheck_UnhealthyServiceContainer_AssertExceptionThrown() + public async Task RunServiceContainersHealthcheck_UnhealthyServiceContainer_AssertExceptionThrown() { //Arrange Setup(); @@ -68,7 +68,7 @@ public async void RunServiceContainersHealthcheck_UnhealthyServiceContainer_Asse [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void RunServiceContainersHealthcheck_healthyServiceContainer_AssertSucceededTask() + public async Task RunServiceContainersHealthcheck_healthyServiceContainer_AssertSucceededTask() { //Arrange Setup(); @@ -85,7 +85,7 @@ public async void RunServiceContainersHealthcheck_healthyServiceContainer_Assert [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void RunServiceContainersHealthcheck_healthyServiceContainerWithoutHealthcheck_AssertSucceededTask() + public async Task RunServiceContainersHealthcheck_healthyServiceContainerWithoutHealthcheck_AssertSucceededTask() { //Arrange Setup(); diff --git a/src/Test/L0/Worker/OutputManagerL0.cs b/src/Test/L0/Worker/OutputManagerL0.cs index 9d7f5d3f2eb..a86ca5580c9 100644 --- a/src/Test/L0/Worker/OutputManagerL0.cs +++ b/src/Test/L0/Worker/OutputManagerL0.cs @@ -647,7 +647,7 @@ public void MatcherTimeout() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void MatcherFile() + public async Task MatcherFile() { Environment.SetEnvironmentVariable("RUNNER_TEST_GET_REPOSITORY_PATH_FAILSAFE", "2"); var matchers = new IssueMatchersConfig @@ -761,7 +761,7 @@ public async void MatcherFile() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void MatcherFile_JobContainer() + public async Task MatcherFile_JobContainer() { var matchers = new IssueMatchersConfig { @@ -822,7 +822,7 @@ public async void MatcherFile_JobContainer() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void MatcherFile_StepContainer() + public async Task MatcherFile_StepContainer() { var matchers = new IssueMatchersConfig { @@ -884,7 +884,7 @@ public async void MatcherFile_StepContainer() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void MatcherFromPath() + public async Task MatcherFromPath() { var matchers = new IssueMatchersConfig { diff --git a/src/Test/L0/Worker/SnapshotOperationProviderL0.cs b/src/Test/L0/Worker/SnapshotOperationProviderL0.cs index 4f747ae8e25..cc75cc5f2e6 100644 --- a/src/Test/L0/Worker/SnapshotOperationProviderL0.cs +++ b/src/Test/L0/Worker/SnapshotOperationProviderL0.cs @@ -2,6 +2,7 @@ using System; using System.IO; using System.Runtime.CompilerServices; +using System.Threading.Tasks; using GitHub.DistributedTask.Pipelines; using GitHub.Runner.Sdk; using GitHub.Runner.Worker; @@ -22,7 +23,7 @@ public class SnapshotOperationProviderL0 [InlineData(false)] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void CreateSnapshotRequestAsync(bool shouldSnapshotDirectoryAlreadyExist) + public async Task CreateSnapshotRequestAsync(bool shouldSnapshotDirectoryAlreadyExist) { using (TestHostContext testHostContext = CreateTestHostContext()) { diff --git a/src/Test/L0/Worker/WorkerL0.cs b/src/Test/L0/Worker/WorkerL0.cs index defcc981404..91655b966bc 100644 --- a/src/Test/L0/Worker/WorkerL0.cs +++ b/src/Test/L0/Worker/WorkerL0.cs @@ -79,7 +79,7 @@ private JobCancelMessage CreateJobCancelMessage(Guid jobId) [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void DispatchRunNewJob() + public async Task DispatchRunNewJob() { //Arrange using (var hc = new TestHostContext(this)) @@ -131,7 +131,7 @@ public async void DispatchRunNewJob() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async void DispatchCancellation() + public async Task DispatchCancellation() { //Arrange using (var hc = new TestHostContext(this)) diff --git a/src/Test/Test.csproj b/src/Test/Test.csproj index aebe242096f..3df772e04d8 100644 --- a/src/Test/Test.csproj +++ b/src/Test/Test.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true NU1701;NU1603;NU1603;xUnit2013;SYSLIB0050;SYSLIB0051 @@ -15,9 +15,9 @@ - - - + + + diff --git a/src/dev.sh b/src/dev.sh index 8e23366554a..3ae7d0be240 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -17,7 +17,7 @@ LAYOUT_DIR="$SCRIPT_DIR/../_layout" DOWNLOAD_DIR="$SCRIPT_DIR/../_downloads/netcore2x" PACKAGE_DIR="$SCRIPT_DIR/../_package" DOTNETSDK_ROOT="$SCRIPT_DIR/../_dotnetsdk" -DOTNETSDK_VERSION="8.0.404" +DOTNETSDK_VERSION="9.0.100" DOTNETSDK_INSTALLDIR="$DOTNETSDK_ROOT/$DOTNETSDK_VERSION" RUNNER_VERSION=$(cat runnerversion) diff --git a/src/global.json b/src/global.json index 8c70738ad60..65324522984 100644 --- a/src/global.json +++ b/src/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "8.0.404" + "version": "9.0.100" } }