Skip to content

Commit 548a436

Browse files
authored
Merge branch 'main' into fix-sentry-hydro-error
2 parents 93b7821 + b559b1c commit 548a436

15 files changed

Lines changed: 232 additions & 67 deletions

.github/ISSUE_COMMENT_TEMPLATE/quick-status.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
2-
name: A Brief status Update
2+
name: A brief status update
33
description: A brief status update.
44
body:
55
- type: dropdown
66
attributes:
77
label: Status
88
options:
9-
- label: "GREEN \U0001F34F (All good, smooth sailing)"
9+
- label: 'GREY ⚪️ (Not started, paused, not currently being worked on)'
10+
value: 'Status: GREY'
11+
- label: 'GREEN 🟢 (All good, smooth sailing)'
1012
value: 'Status: GREEN'
1113
- label: "YELLOW \U0001F7E1 (On track, with hurdles to work through)"
1214
value: 'Status: YELLOW'

.github/commands/remove.yaml

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

content/actions/guides/building-and-testing-java-with-ant.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ jobs:
5858
5959
steps:
6060
- uses: actions/checkout@v2
61-
- name: Set up JDK 1.8
62-
uses: actions/setup-java@v1
61+
- name: Set up JDK 11
62+
uses: actions/setup-java@v2
6363
with:
64-
java-version: 1.8
64+
java-version: '11'
65+
distribution: 'adopt'
6566
- name: Build with Ant
6667
run: ant -noinput -buildfile build.xml
6768
```
@@ -70,7 +71,7 @@ jobs:
7071
This workflow performs the following steps:
7172

7273
1. The `checkout` step downloads a copy of your repository on the runner.
73-
2. The `setup-java` step configures the Java 1.8 JDK.
74+
2. The `setup-java` step configures the Java 11 JDK by Adoptium.
7475
3. The "Build with Ant" step runs the default target in your `build.xml` in non-interactive mode.
7576

7677
The default workflow templates are excellent starting points when creating your build and test workflow, and you can customize the template to suit your project’s needs.
@@ -91,9 +92,10 @@ If you use different commands to build your project, or you want to run a differ
9192
```yaml{:copy}
9293
steps:
9394
- uses: actions/checkout@v2
94-
- uses: actions/setup-java@v1
95+
- uses: actions/setup-java@v2
9596
with:
96-
java-version: 1.8
97+
java-version: '11'
98+
distribution: 'adopt'
9799
- name: Run the Ant jar target
98100
run: ant -noinput -buildfile build-ci.xml jar
99101
```
@@ -109,7 +111,11 @@ Ant will usually create output files like JARs, EARs, or WARs in the `build/jar`
109111
```yaml{:copy}
110112
steps:
111113
- uses: actions/checkout@v2
112-
- uses: actions/setup-java@v1
114+
- uses: actions/setup-java@v2
115+
with:
116+
java-version: '11'
117+
distribution: 'adopt'
118+
113119
- run: ant -noinput -buildfile build.xml
114120
- uses: actions/upload-artifact@v2
115121
with:

content/actions/guides/building-and-testing-java-with-gradle.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ jobs:
5858
5959
steps:
6060
- uses: actions/checkout@v2
61-
- name: Set up JDK 1.8
62-
uses: actions/setup-java@v1
61+
- name: Set up JDK 11
62+
uses: actions/setup-java@v2
6363
with:
64-
java-version: 1.8
64+
java-version: '11'
65+
distribution: 'adopt'
6566
- name: Build with Gradle
6667
run: ./gradlew build
6768
```
@@ -70,7 +71,7 @@ jobs:
7071
This workflow performs the following steps:
7172

7273
1. The `checkout` step downloads a copy of your repository on the runner.
73-
2. The `setup-java` step configures the Java 1.8 JDK.
74+
2. The `setup-java` step configures the Java 11 JDK by Adoptium.
7475
3. The "Build with Gradle" step runs the `gradlew` wrapper script to ensure that your code builds, tests pass, and a package can be created.
7576

7677
The default workflow templates are excellent starting points when creating your build and test workflow, and you can customize the template to suit your project’s needs.
@@ -91,9 +92,10 @@ If you use different commands to build your project, or you want to use a differ
9192
```yaml{:copy}
9293
steps:
9394
- uses: actions/checkout@v2
94-
- uses: actions/setup-java@v1
95+
- uses: actions/setup-java@v2
9596
with:
96-
java-version: 1.8
97+
java-version: '11'
98+
distribution: 'adopt'
9799
- name: Run the Gradle package task
98100
run: ./gradlew -b ci.gradle package
99101
```
@@ -107,10 +109,11 @@ When using {% data variables.product.prodname_dotcom %}-hosted runners, you can
107109
```yaml{:copy}
108110
steps:
109111
- uses: actions/checkout@v2
110-
- name: Set up JDK 1.8
111-
uses: actions/setup-java@v1
112+
- name: Set up JDK 11
113+
uses: actions/setup-java@v2
112114
with:
113-
java-version: 1.8
115+
java-version: '11'
116+
distribution: 'adopt'
114117
- name: Cache Gradle packages
115118
uses: actions/cache@v2
116119
with:
@@ -143,7 +146,11 @@ Gradle will usually create output files like JARs, EARs, or WARs in the `build/l
143146
```yaml{:copy}
144147
steps:
145148
- uses: actions/checkout@v2
146-
- uses: actions/setup-java@v1
149+
- uses: actions/setup-java@v2
150+
with:
151+
java-version: '11'
152+
distribution: 'adopt'
153+
147154
- run: ./gradlew build
148155
- uses: actions/upload-artifact@v2
149156
with:

content/actions/guides/building-and-testing-java-with-maven.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ jobs:
5858
5959
steps:
6060
- uses: actions/checkout@v2
61-
- name: Set up JDK 1.8
62-
uses: actions/setup-java@v1
61+
- name: Set up JDK 11
62+
uses: actions/setup-java@v2
6363
with:
64-
java-version: 1.8
64+
java-version: '11'
65+
distribution: 'adopt'
6566
- name: Build with Maven
6667
run: mvn --batch-mode --update-snapshots verify
6768
```
@@ -70,7 +71,7 @@ jobs:
7071
This workflow performs the following steps:
7172

7273
1. The `checkout` step downloads a copy of your repository on the runner.
73-
2. The `setup-java` step configures the Java 1.8 JDK.
74+
2. The `setup-java` step configures the Java 11 JDK by Adoptium.
7475
3. The "Build with Maven" step runs the Maven `package` target in non-interactive mode to ensure that your code builds, tests pass, and a package can be created.
7576

7677
The default workflow templates are excellent starting points when creating your build and test workflow, and you can customize the template to suit your project’s needs.
@@ -91,9 +92,10 @@ If you use different commands to build your project, or you want to use a differ
9192
```yaml{:copy}
9293
steps:
9394
- uses: actions/checkout@v2
94-
- uses: actions/setup-java@v1
95+
- uses: actions/setup-java@v2
9596
with:
96-
java-version: 1.8
97+
java-version: '11'
98+
distribution: 'adopt'
9799
- name: Run the Maven verify phase
98100
run: mvn --batch-mode --update-snapshots verify
99101
```
@@ -107,10 +109,11 @@ When using {% data variables.product.prodname_dotcom %}-hosted runners, you can
107109
```yaml{:copy}
108110
steps:
109111
- uses: actions/checkout@v2
110-
- name: Set up JDK 1.8
111-
uses: actions/setup-java@v1
112+
- name: Set up JDK 11
113+
uses: actions/setup-java@v2
112114
with:
113-
java-version: 1.8
115+
java-version: '11'
116+
distribution: 'adopt'
114117
- name: Cache Maven packages
115118
uses: actions/cache@v2
116119
with:
@@ -134,7 +137,10 @@ Maven will usually create output files like JARs, EARs, or WARs in the `target`
134137
```yaml{:copy}
135138
steps:
136139
- uses: actions/checkout@v2
137-
- uses: actions/setup-java@v1
140+
- uses: actions/setup-java@v2
141+
with:
142+
java-version: '11'
143+
distribution: 'adopt'
138144
- run: mvn --batch-mode --update-snapshots verify
139145
- run: mkdir staging && cp target/*.jar staging
140146
- uses: actions/upload-artifact@v2

content/actions/guides/publishing-java-packages-with-gradle.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ jobs:
8585
steps:
8686
- uses: actions/checkout@v2
8787
- name: Set up Java
88-
uses: actions/setup-java@v1
88+
uses: actions/setup-java@v2
8989
with:
90-
java-version: 1.8
90+
java-version: '11'
91+
distribution: 'adopt'
9192
- name: Publish package
9293
run: gradle publish
9394
env:
@@ -143,9 +144,10 @@ jobs:
143144
runs-on: ubuntu-latest
144145
steps:
145146
- uses: actions/checkout@v2
146-
- uses: actions/setup-java@v1
147+
- uses: actions/setup-java@v2
147148
with:
148-
java-version: 1.8
149+
java-version: '11'
150+
distribution: 'adopt'
149151
- name: Publish package
150152
run: gradle publish
151153
env:
@@ -209,9 +211,10 @@ jobs:
209211
steps:
210212
- uses: actions/checkout@v2
211213
- name: Set up Java
212-
uses: actions/setup-java@v1
214+
uses: actions/setup-java@v2
213215
with:
214-
java-version: 1.8
216+
java-version: '11'
217+
distribution: 'adopt'
215218
- name: Publish to the Maven Central Repository
216219
run: gradle publish
217220
env:

content/actions/guides/publishing-java-packages-with-maven.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ jobs:
8585
steps:
8686
- uses: actions/checkout@v2
8787
- name: Set up Maven Central Repository
88-
uses: actions/setup-java@v1
88+
uses: actions/setup-java@v2
8989
with:
90-
java-version: 1.8
90+
java-version: '11'
91+
distribution: 'adopt'
9192
server-id: ossrh
9293
server-username: MAVEN_USERNAME
9394
server-password: MAVEN_PASSWORD
@@ -147,9 +148,10 @@ jobs:
147148
runs-on: ubuntu-latest
148149
steps:
149150
- uses: actions/checkout@v2
150-
- uses: actions/setup-java@v1
151+
- uses: actions/setup-java@v2
151152
with:
152-
java-version: 1.8
153+
java-version: '11'
154+
distribution: 'adopt'
153155
- name: Publish package
154156
run: mvn --batch-mode deploy
155157
env:
@@ -183,9 +185,10 @@ jobs:
183185
steps:
184186
- uses: actions/checkout@v2
185187
- name: Set up Java for publishing to Maven Central Repository
186-
uses: actions/setup-java@v1
188+
uses: actions/setup-java@v2
187189
with:
188-
java-version: 1.8
190+
java-version: '11'
191+
distribution: 'adopt'
189192
server-id: ossrh
190193
server-username: MAVEN_USERNAME
191194
server-password: MAVEN_PASSWORD
@@ -195,9 +198,10 @@ jobs:
195198
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
196199
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
197200
- name: Set up Java for publishing to GitHub Packages
198-
uses: actions/setup-java@v1
201+
uses: actions/setup-java@v2
199202
with:
200-
java-version: 1.8
203+
java-version: '11'
204+
distribution: 'adopt'
201205
- name: Publish to GitHub Packages
202206
run: mvn --batch-mode deploy
203207
env:

data/reusables/github-actions/java-jvm-architecture.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
The starter workflow template sets up the `PATH` to contain OpenJDK 8 for the x64 platform. If you want to use a different version of Java, or target a different architecture (`x64` or `x86`), you can use the `setup-java` action to choose a different Java runtime environment.
44

5-
For example, to use version 9.0.4 of the JDK for the x64 platform, you can use the `setup-java` action and configure the `java-version` and `architecture` parameters to `'9.0.4'` and `x64`.
5+
For example, to use version 11 of the JDK provided by Adoptium for the x64 platform, you can use the `setup-java` action and configure the `java-version`, `distribution` and `architecture` parameters to `'11'`, `'adopt'` and `x64`.
66

77
{% raw %}
88
```yaml{:copy}
99
steps:
1010
- uses: actions/checkout@v2
11-
- name: Set up JDK 9.0.4 for x64
12-
uses: actions/setup-java@v1
11+
- name: Set up JDK 11 for x64
12+
uses: actions/setup-java@v2
1313
with:
14-
java-version: '9.0.4'
14+
java-version: '11'
15+
distribution: 'adopt'
1516
architecture: x64
1617
```
1718
{% endraw %}

lib/excluded-links.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ module.exports = [
1313
'https://haveibeenpwned.com/',
1414
'https://www.ilo.org/dyn/normlex/en/f\\?p=NORMLEXPUB:12100:0::NO::P12100_ILO_CODE:P029',
1515
'https://www.linkedin.com/company/github',
16-
'https://www.facebook.com/'
16+
'https://www.facebook.com/',
17+
'https://ko-fi.com/'
1718
]

lib/redis-accessor.js

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ const { CI, NODE_ENV, REDIS_URL } = process.env
88
const useRealRedis = !CI && NODE_ENV !== 'test' && !!REDIS_URL
99

1010
class RedisAccessor {
11-
constructor ({ databaseNumber = 0, prefix = null, allowSetFailures = false, name = null } = {}) {
11+
constructor ({
12+
databaseNumber = 0,
13+
prefix = null,
14+
allowSetFailures = false,
15+
allowGetFailures = false,
16+
name = null
17+
} = {}) {
1218
const redisClient = useRealRedis
1319
? createRedisClient({
1420
url: REDIS_URL,
@@ -23,6 +29,9 @@ class RedisAccessor {
2329

2430
// Allow for graceful failures if a Redis SET operation fails?
2531
this._allowSetFailures = allowSetFailures === true
32+
33+
// Allow for graceful failures if a Redis GET operation fails?
34+
this._allowGetFailures = allowGetFailures === true
2635
}
2736

2837
/** @private */
@@ -105,8 +114,24 @@ Error: ${err.message}`
105114

106115
async get (key) {
107116
const getAsync = promisify(this._client.get).bind(this._client)
108-
const value = await getAsync(this.prefix(key))
109-
return value
117+
const fullKey = this.prefix(key)
118+
119+
try {
120+
const value = await getAsync(fullKey)
121+
return value
122+
} catch (err) {
123+
const errorText = `Failed to get value from Redis.
124+
Key: ${fullKey}
125+
Error: ${err.message}`
126+
127+
if (this._allowGetFailures === true) {
128+
// Allow for graceful failure
129+
console.error(errorText)
130+
return null
131+
}
132+
133+
throw new Error(errorText)
134+
}
110135
}
111136
}
112137

0 commit comments

Comments
 (0)