Skip to content

Commit b3af722

Browse files
rsesepeterbe
andauthored
Fix daily link checker (github#28346)
* reduce linkinator concurrency from 300 to 100 * reduce it and use self-hosted * try again * actually do concurrency of 10 * move the override to the Action workflow * Trying `DISABLE_RENDERING_CACHE` * back to 100? * super low concurrency * 3?? * 1?? * try self-hosted + 100 concurrency Co-authored-by: Peter Bengtsson <[email protected]>
1 parent 831a93b commit b3af722

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/workflows/check-all-english-links.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
check_all_english_links:
1818
name: Check all links
1919
if: github.repository == 'github/docs-internal'
20-
runs-on: ubuntu-latest
20+
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
2121
env:
2222
GITHUB_TOKEN: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
2323
FIRST_RESPONDER_PROJECT: Docs content first responder
@@ -56,10 +56,21 @@ jobs:
5656
# The default is 10s. But because this runs overnight, we can
5757
# be a lot more patient.
5858
REQUEST_TIMEOUT: 20000
59+
# The default is 300 which works OK on a fast macbook pro
60+
# but so well in Actions.
61+
LINKINATOR_CONCURRENCY: 100
5962
run: |
60-
node server.mjs &
63+
node server.mjs > /tmp/stdout.log 2> /tmp/stderr.log &
6164
sleep 5
62-
curl --retry-connrefused --retry 3 -I http://localhost:4000/
65+
curl --retry-connrefused --retry 4 -I http://localhost:4000/
66+
67+
- if: ${{ failure() }}
68+
name: Debug server outputs on errors
69+
run: |
70+
echo "____STDOUT____"
71+
cat /tmp/stdout.log
72+
echo "____STDERR____"
73+
cat /tmp/stderr.log
6374
6475
- name: Run script
6576
run: |

script/check-english-links.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ const DISPLAY_MAX_LENGTH = parseInt(process.env.DISPLAY_MAX_LENGTH || '30000', 1
4343
// Links with these codes may or may not really be broken.
4444
const retryStatusCodes = [429, 503, 'Invalid']
4545

46+
const LINKINATOR_CONCURRENCY = parseInt(process.env.LINKINATOR_CONCURRENCY || '300')
47+
4648
program
4749
.description('Check all links in the English docs.')
4850
.option(
@@ -73,7 +75,7 @@ const enterpriseReleasesToSkip = new RegExp(`${root}.+?[/@](${deprecated.join('|
7375

7476
const config = {
7577
path: program.opts().path || englishRoot,
76-
concurrency: 300,
78+
concurrency: LINKINATOR_CONCURRENCY,
7779
// If this is a dry run, turn off recursion.
7880
recurse: !program.opts().dryRun,
7981
silent: true,

0 commit comments

Comments
 (0)