Skip to content

Commit 3f3d9b0

Browse files
Extend --check to check Results-Receiver service. (actions#3078)
* Extend --check to check Results-Receiver service. * Update docs/checks/actions.md Co-authored-by: Christopher Schleiden <[email protected]> --------- Co-authored-by: Christopher Schleiden <[email protected]>
1 parent af485fb commit 3f3d9b0

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

docs/checks/actions.md

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Make sure the runner has access to actions service for GitHub.com or GitHub Ente
1010
- The runner needs to access `https://codeload.github.com` for downloading actions tar.gz/zip.
1111
- The runner needs to access `https://vstoken.actions.githubusercontent.com/_apis/.../` for requesting an access token.
1212
- The runner needs to access `https://pipelines.actions.githubusercontent.com/_apis/.../` for receiving workflow jobs.
13+
- The runner needs to access `https://results-receiver.actions.githubusercontent.com/.../` for reporting progress and uploading logs during a workflow job execution.
1314
---
1415
**NOTE:** for the full list of domains that are required to be in the firewall allow list refer to the [GitHub self-hosted runners requirements documentation](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github).
1516

@@ -20,6 +21,7 @@ Make sure the runner has access to actions service for GitHub.com or GitHub Ente
2021
curl -v https://codeload.github.com/_ping
2122
curl -v https://vstoken.actions.githubusercontent.com/_apis/health
2223
curl -v https://pipelines.actions.githubusercontent.com/_apis/health
24+
curl -v https://results-receiver.actions.githubusercontent.com/health
2325
```
2426
2527
- For GitHub Enterprise Server
@@ -60,6 +62,10 @@ Make sure the runner has access to actions service for GitHub.com or GitHub Ente
6062
- Ping pipelines.actions.githubusercontent.com using dotnet
6163
- Make HTTP GET to https://pipelines.actions.githubusercontent.com/_apis/health or https://myGHES.com/_services/pipelines/_apis/health using dotnet, check response headers contains `x-vss-e2eid`
6264
- Make HTTP POST to https://pipelines.actions.githubusercontent.com/_apis/health or https://myGHES.com/_services/pipelines/_apis/health using dotnet, check response headers contains `x-vss-e2eid`
65+
---
66+
- DNS lookup for results-receiver.actions.githubusercontent.com using dotnet
67+
- Ping results-receiver.actions.githubusercontent.com using dotnet
68+
- Make HTTP GET to https://results-receiver.actions.githubusercontent.com/health using dotnet, check response headers contains `X-GitHub-Request-Id`
6369
6470
## How to fix the issue?
6571

docs/checks/network.md

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ If you are having trouble connecting, try these steps:
4242
- https://api.github.com/
4343
- https://vstoken.actions.githubusercontent.com/_apis/health
4444
- https://pipelines.actions.githubusercontent.com/_apis/health
45+
- https://results-receiver.actions.githubusercontent.com/health
4546
- For GHES/GHAE
4647
- https://myGHES.com/_services/vstoken/_apis/health
4748
- https://myGHES.com/_services/pipelines/_apis/health

src/Runner.Listener/Checks/ActionsCheck.cs

+11
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public async Task<bool> RunCheck(string url, string pat)
3939
string githubApiUrl = null;
4040
string actionsTokenServiceUrl = null;
4141
string actionsPipelinesServiceUrl = null;
42+
string resultsReceiverServiceUrl = null;
4243
var urlBuilder = new UriBuilder(url);
4344
if (UrlUtil.IsHostedServer(urlBuilder))
4445
{
@@ -47,6 +48,7 @@ public async Task<bool> RunCheck(string url, string pat)
4748
githubApiUrl = urlBuilder.Uri.AbsoluteUri;
4849
actionsTokenServiceUrl = "https://vstoken.actions.githubusercontent.com/_apis/health";
4950
actionsPipelinesServiceUrl = "https://pipelines.actions.githubusercontent.com/_apis/health";
51+
resultsReceiverServiceUrl = "https://results-receiver.actions.githubusercontent.com/health";
5052
}
5153
else
5254
{
@@ -56,6 +58,7 @@ public async Task<bool> RunCheck(string url, string pat)
5658
actionsTokenServiceUrl = urlBuilder.Uri.AbsoluteUri;
5759
urlBuilder.Path = "_services/pipelines/_apis/health";
5860
actionsPipelinesServiceUrl = urlBuilder.Uri.AbsoluteUri;
61+
resultsReceiverServiceUrl = string.Empty; // we don't have Results service in GHES yet.
5962
}
6063

6164
var codeLoadUrlBuilder = new UriBuilder(url);
@@ -72,6 +75,14 @@ public async Task<bool> RunCheck(string url, string pat)
7275
checkTasks.Add(CheckUtil.CheckPing(codeLoadUrlBuilder.Uri.AbsoluteUri));
7376
checkTasks.Add(HostContext.CheckHttpsGetRequests(codeLoadUrlBuilder.Uri.AbsoluteUri, pat, expectedHeader: "X-GitHub-Request-Id"));
7477

78+
// check results-receiver service
79+
if (!string.IsNullOrEmpty(resultsReceiverServiceUrl))
80+
{
81+
checkTasks.Add(CheckUtil.CheckDns(resultsReceiverServiceUrl));
82+
checkTasks.Add(CheckUtil.CheckPing(resultsReceiverServiceUrl));
83+
checkTasks.Add(HostContext.CheckHttpsGetRequests(resultsReceiverServiceUrl, pat, expectedHeader: "X-GitHub-Request-Id"));
84+
}
85+
7586
// check actions token service
7687
checkTasks.Add(CheckUtil.CheckDns(actionsTokenServiceUrl));
7788
checkTasks.Add(CheckUtil.CheckPing(actionsTokenServiceUrl));

0 commit comments

Comments
 (0)