Skip to content

Commit

Permalink
Merge pull request #3 from mattrwi/feature/s390x-support-gb-3-314-1-s…
Browse files Browse the repository at this point in the history
…ync-main

Sync feature/s390x-support-gb-3-314-1-sync-main into feature/s390x-support-rename-sync-main
  • Loading branch information
mattrwi authored Oct 10, 2024
2 parents 015c693 + 5995099 commit f2711c1
Show file tree
Hide file tree
Showing 93 changed files with 1,639 additions and 718 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:1": {},
"ghcr.io/devcontainers/features/dotnet": {
"version": "6.0.419"
"version": "6.0.425"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "16"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ jobs:
- name: Compute image version
id: image
uses: actions/github-script@v7
env:
RUNNER_VERSION: ${{ github.event.inputs.runnerVersion }}
with:
script: |
const fs = require('fs');
const inputRunnerVersion = "${{ github.event.inputs.runnerVersion }}"
const inputRunnerVersion = process.env.RUNNER_VERSION;
if (inputRunnerVersion) {
console.log(`Using input runner version ${inputRunnerVersion}`)
core.setOutput('version', inputRunnerVersion);
Expand Down
46 changes: 39 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ jobs:
working-directory: _package
# Upload runner package tar.gz/zip as artifact.
# Since each package name is unique, so we don't need to put ${{matrix}} info into artifact name
- name: Publish Artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: runner-package-${{ matrix.runtime }}
path: _package/${{ steps.runnerInfo.outputs.package_name }}
name: runner-packages-${{ matrix.runtime }}
path: |
_package
release:
permissions:
Expand All @@ -150,13 +150,45 @@ jobs:
- uses: actions/checkout@v4

# Download runner package tar.gz/zip produced by 'build' job
- name: Download Artifact
- name: Download Artifact (win-x64)
uses: actions/download-artifact@v4
with:
name: runner-packages-win-x64
path: ./
pattern: runner-package-*
merge-multiple: true

- name: Download Artifact (win-arm64)
uses: actions/download-artifact@v4
with:
name: runner-packages-win-arm64
path: ./
- name: Download Artifact (osx-x64)
uses: actions/download-artifact@v4
with:
name: runner-packages-osx-x64
path: ./
- name: Download Artifact (osx-arm64)
uses: actions/download-artifact@v4
with:
name: runner-packages-osx-arm64
path: ./
- name: Download Artifact (linux-x64)
uses: actions/download-artifact@v4
with:
name: runner-packages-linux-x64
path: ./
- name: Download Artifact (linux-arm)
uses: actions/download-artifact@v4
with:
name: runner-packages-linux-arm
path: ./
- name: Download Artifact (linux-arm64)
uses: actions/download-artifact@v4
with:
name: runner-packages-linux-arm64
- name: Download Artifact (linux-s390x)
uses: actions/download-artifact@v4
with:
name: runner-packages-linux-s390x

# Create ReleaseNote file
- name: Create ReleaseNote
id: releaseNote
Expand Down
11 changes: 1 addition & 10 deletions docs/start/envlinux.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,7 @@

## Supported Distributions and Versions

x64
- Red Hat Enterprise Linux 7+
- CentOS 7+
- Oracle Linux 7+
- Fedora 29+
- Debian 9+
- Ubuntu 16.04+
- Linux Mint 18+
- openSUSE 15+
- SUSE Enterprise Linux (SLES) 12 SP2+
Please see "[Supported architectures and operating systems for self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#linux)."


## Install .NET 6.0 Linux Dependencies
Expand Down
3 changes: 1 addition & 2 deletions docs/start/envosx.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

## Supported Versions

- macOS High Sierra (10.13) and later versions
- x64 and arm64 (Apple Silicon)
Please see "[Supported architectures and operating systems for self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#macos)."

## [More .Net Core Prerequisites Information](https://docs.microsoft.com/en-us/dotnet/core/macos-prerequisites?tabs=netcore30)
7 changes: 1 addition & 6 deletions docs/start/envwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

## Supported Versions

- Windows 7 64-bit
- Windows 8.1 64-bit
- Windows 10 64-bit
- Windows Server 2012 R2 64-bit
- Windows Server 2016 64-bit
- Windows Server 2019 64-bit
Please see "[Supported architectures and operating systems for self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#windows)."

## [More .NET Core Prerequisites Information](https://docs.microsoft.com/en-us/dotnet/core/windows-prerequisites?tabs=netcore30)
18 changes: 11 additions & 7 deletions images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ FROM mcr.microsoft.com/dotnet/runtime-deps:6.0-jammy as build
ARG TARGETOS
ARG TARGETARCH
ARG RUNNER_VERSION
ARG RUNNER_CONTAINER_HOOKS_VERSION=0.5.1
ARG DOCKER_VERSION=25.0.2
ARG BUILDX_VERSION=0.12.1
ARG RUNNER_CONTAINER_HOOKS_VERSION=0.6.1
ARG DOCKER_VERSION=27.1.1
ARG BUILDX_VERSION=0.16.2

RUN apt update -y && apt install curl unzip -y

Expand Down Expand Up @@ -39,12 +39,16 @@ ENV RUNNER_MANUALLY_TRAP_SIG=1
ENV ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT=1
ENV ImageOS=ubuntu22

RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
sudo \
lsb-release \
# 'gpg-agent' and 'software-properties-common' are needed for the 'add-apt-repository' command that follows
RUN apt update -y \
&& apt install -y --no-install-recommends sudo lsb-release gpg-agent software-properties-common curl jq unzip \
&& rm -rf /var/lib/apt/lists/*

# Configure git-core/ppa based on guidance here: https://git-scm.com/download/linux
RUN add-apt-repository ppa:git-core/ppa \
&& apt update -y \
&& apt install -y --no-install-recommends git

RUN adduser --disabled-password --gecos "" --uid 1001 runner \
&& groupadd docker --gid 123 \
&& usermod -aG sudo runner \
Expand Down
34 changes: 23 additions & 11 deletions releaseNote.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
## What's Changed
* Refer to release to [GitHub Actions Runner v2.314.1 for the full list of changes](https://github.com/actions/runner/releases/tag/v2.314.1)

## New Contributors
* Refer to release to [GitHub Actions Runner v2.314.1 for the full list of contributors](https://github.com/actions/runner/releases/tag/v2.314.1)
- Adding Snapshot additional mapping tokens https://github.com/actions/runner/pull/3468
- Create launch httpclient using the right handler and setting https://github.com/actions/runner/pull/3476
- Fix missing default user-agent for jitconfig runner https://github.com/actions/runner/pull/3473
- Cleanup back-compat code for interpreting Run Service status codes https://github.com/actions/runner/pull/3456
- Add runner or worker to the useragent https://github.com/actions/runner/pull/3457
- Handle Error Body in Responses from Broker https://github.com/actions/runner/pull/3454
- Fix issues for composite actions (Run Service flow) https://github.com/actions/runner/pull/3446
- Trace GitHub RequestId to log https://github.com/actions/runner/pull/3442
- Add `jq`, `git`, `unzip` and `curl` to default packages installed https://github.com/actions/runner/pull/3056
- Add pid to user-agent and session owner https://github.com/actions/runner/pull/3432

**Full Changelog**: https://github.com/mattrwi/runner/compare/v3.313.0...v3.314.1
**Full Changelog**: https://github.com/actions/runner/compare/v2.319.1...v2.320.0

_Note: Actions Runner follows a progressive release policy, so the latest release might not be available to your enterprise, organization, or repository yet.
To confirm which version of the Actions Runner you should expect, please view the download instructions for your enterprise, organization, or repository.
See https://docs.github.com/en/enterprise-cloud@latest/actions/hosting-your-own-runners/adding-self-hosted-runners_

## Windows x64

We recommend configuring the runner in a root folder of the Windows drive (e.g. "C:\actions-runner"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.

The following snipped needs to be run on `powershell`:
``` powershell

```powershell
# Create a folder under the drive root
mkdir \actions-runner ; cd \actions-runner
# Download the latest runner package
Expand All @@ -25,12 +34,14 @@ Add-Type -AssemblyName System.IO.Compression.FileSystem ;
```

## [Pre-release] Windows arm64

**Warning:** Windows arm64 runners are currently in preview status and use [unofficial versions of nodejs](https://unofficial-builds.nodejs.org/). They are not intended for production workflows.

We recommend configuring the runner in a root folder of the Windows drive (e.g. "C:\actions-runner"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.

The following snipped needs to be run on `powershell`:
``` powershell

```powershell
# Create a folder under the drive root
mkdir \actions-runner ; cd \actions-runner
# Download the latest runner package
Expand All @@ -42,7 +53,7 @@ Add-Type -AssemblyName System.IO.Compression.FileSystem ;

## OSX x64

``` bash
```bash
# Create a folder
mkdir actions-runner && cd actions-runner
# Download the latest runner package
Expand All @@ -53,7 +64,7 @@ tar xzf ./actions-runner-osx-x64-<RUNNER_VERSION>.tar.gz

## OSX arm64 (Apple silicon)

``` bash
```bash
# Create a folder
mkdir actions-runner && cd actions-runner
# Download the latest runner package
Expand All @@ -64,7 +75,7 @@ tar xzf ./actions-runner-osx-arm64-<RUNNER_VERSION>.tar.gz

## Linux x64

``` bash
```bash
# Create a folder
mkdir actions-runner && cd actions-runner
# Download the latest runner package
Expand All @@ -75,7 +86,7 @@ tar xzf ./actions-runner-linux-x64-<RUNNER_VERSION>.tar.gz

## Linux arm64

``` bash
```bash
# Create a folder
mkdir actions-runner && cd actions-runner
# Download the latest runner package
Expand All @@ -86,7 +97,7 @@ tar xzf ./actions-runner-linux-arm64-<RUNNER_VERSION>.tar.gz

## Linux arm

``` bash
```bash
# Create a folder
mkdir actions-runner && cd actions-runner
# Download the latest runner package
Expand All @@ -107,6 +118,7 @@ tar xzf ./actions-runner-linux-s390x-<RUNNER_VERSION>.tar.gz
```

## Using your self hosted runner

For additional details about configuring, running, or shutting down the runner please check out our [product docs.](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/adding-self-hosted-runners)

## SHA-256 Checksums
Expand Down
1 change: 0 additions & 1 deletion src/Misc/contentHash/dotnetRuntime/linux-arm

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/dotnetRuntime/linux-arm64

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/dotnetRuntime/linux-x64

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/dotnetRuntime/osx-arm64

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/dotnetRuntime/osx-x64

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/dotnetRuntime/win-arm64

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/dotnetRuntime/win-x64

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/externals/linux-arm

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/externals/linux-arm64

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/externals/linux-x64

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/externals/osx-arm64

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/externals/osx-x64

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/externals/win-arm64

This file was deleted.

1 change: 0 additions & 1 deletion src/Misc/contentHash/externals/win-x64

This file was deleted.

7 changes: 4 additions & 3 deletions src/Misc/externals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ PRECACHE=$2
NODE_URL=https://nodejs.org/dist
UNOFFICIAL_NODE_URL=https://unofficial-builds.nodejs.org/download/release
NODE_ALPINE_URL=https://github.com/actions/alpine_nodejs/releases/download
# When you update Node versions you must also create a new release of alpine_nodejs at that updated version.
# Follow the instructions here: https://github.com/actions/alpine_nodejs?tab=readme-ov-file#getting-started
NODE16_VERSION="16.20.2"
NODE20_VERSION="20.8.1"
# used only for win-arm64, remove node16 unofficial version when official version is available
NODE16_UNOFFICIAL_VERSION="16.20.0"
NODE20_VERSION="20.13.1"
NODE16_UNOFFICIAL_VERSION="16.20.0" # used only for win-arm64, remove node16 unofficial version when official version is available

get_abs_path() {
# exploits the fact that pwd will print abs path when no args
Expand Down
5 changes: 5 additions & 0 deletions src/Misc/layoutbin/RunnerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ var runService = function () {
);
stopping = true;
}
} else if (code === 5) {
console.log(
"Runner listener exit with Session Conflict error, stop the service, no retry needed."
);
stopping = true;
} else {
var messagePrefix = "Runner listener exit with undefined return code";
unknownFailureRetryCount++;
Expand Down
5 changes: 5 additions & 0 deletions src/Misc/layoutroot/run-helper.cmd.template
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,10 @@ if %ERRORLEVEL% EQU 4 (
exit /b 1
)

if %ERRORLEVEL% EQU 5 (
echo "Runner listener exit with Session Conflict error, stop the service, no retry needed."
exit /b 0
)

echo "Exiting after unknown error code: %ERRORLEVEL%"
exit /b 0
3 changes: 3 additions & 0 deletions src/Misc/layoutroot/run-helper.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ elif [[ $returnCode == 4 ]]; then
"$DIR"/safe_sleep.sh 1
done
exit 2
elif [[ $returnCode == 5 ]]; then
echo "Runner listener exit with Session Conflict error, stop the service, no retry needed."
exit 0
else
echo "Exiting with unknown error code: ${returnCode}"
exit 0
Expand Down
4 changes: 2 additions & 2 deletions src/Misc/layoutroot/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ runWithManualTrap() {
cp -f "$DIR"/run-helper.sh.template "$DIR"/run-helper.sh
"$DIR"/run-helper.sh $* &
PID=$!
wait -f $PID
wait $PID
returnCode=$?
if [[ $returnCode -eq 2 ]]; then
echo "Restarting runner..."
Expand Down Expand Up @@ -84,4 +84,4 @@ if [[ -z "$RUNNER_MANUALLY_TRAP_SIG" ]]; then
run $*
else
runWithManualTrap $*
fi
fi
6 changes: 3 additions & 3 deletions src/Runner.Common/ActionsRunServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ public sealed class ActionsRunServer : RunnerService, IActionsRunServer
{
private bool _hasConnection;
private VssConnection _connection;
private TaskAgentHttpClient _taskAgentClient;
private ActionsRunServerHttpClient _actionsRunServerClient;

public async Task ConnectAsync(Uri serverUrl, VssCredentials credentials)
{
_connection = await EstablishVssConnection(serverUrl, credentials, TimeSpan.FromSeconds(100));
_taskAgentClient = _connection.GetClient<TaskAgentHttpClient>();
_actionsRunServerClient = _connection.GetClient<ActionsRunServerHttpClient>();
_hasConnection = true;
}

Expand All @@ -42,7 +42,7 @@ public Task<AgentJobRequestMessage> GetJobMessageAsync(string id, CancellationTo
CheckConnection();
var jobMessage = RetryRequest<AgentJobRequestMessage>(async () =>
{
return await _taskAgentClient.GetJobMessageAsync(id, cancellationToken);
return await _actionsRunServerClient.GetJobMessageAsync(id, cancellationToken);
}, cancellationToken);

return jobMessage;
Expand Down
Loading

0 comments on commit f2711c1

Please sign in to comment.