@suffolklitlab/alkiln 5.15.4-ref-paths-1 → 5.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Use docassemble image version
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
show_docker_output:
|
|
9
|
+
required: false
|
|
10
|
+
default: false
|
|
11
|
+
type: boolean
|
|
12
|
+
description: 'Show the docker logs while building the GitHub server container. It will also save the docker log artifact. This might show sensitive config information.'
|
|
13
|
+
# Experimental
|
|
14
|
+
enable_tmate:
|
|
15
|
+
type: boolean
|
|
16
|
+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
|
|
17
|
+
required: false
|
|
18
|
+
default: false
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
|
|
22
|
+
github-server-tests:
|
|
23
|
+
# Avoids running double tests when someone on the team makes a pull request
|
|
24
|
+
# 1: Trigger job on push or dispatch from this repository
|
|
25
|
+
# 2: Trigger job on pull request from a fork
|
|
26
|
+
if: (
|
|
27
|
+
github.event_name != 'pull_request'
|
|
28
|
+
&& ! github.event.pull_request.head.repo.fork
|
|
29
|
+
) || (
|
|
30
|
+
github.event_name == 'pull_request'
|
|
31
|
+
&& github.event.pull_request.head.repo.fork
|
|
32
|
+
)
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
strategy:
|
|
35
|
+
matrix:
|
|
36
|
+
node-version: [24.x]
|
|
37
|
+
|
|
38
|
+
steps:
|
|
39
|
+
# Place the root directory in this branch to access relative paths to
|
|
40
|
+
# action files
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- name: "ALKiln - Use a specific docassemble image version to start the isolated temporary docassemble server on GitHub"
|
|
44
|
+
id: github_server
|
|
45
|
+
uses: ./action_for_github_server
|
|
46
|
+
with:
|
|
47
|
+
SHOW_DOCKER_OUTPUT: "${{ github.event.inputs.show_docker_output }}"
|
|
48
|
+
DOCASSEMBLE_IMAGE: "ghcr.io/suffolklitlab/docassemble:sha-7d13853"
|
|
49
|
+
- run: echo "ALKiln finished starting the isolated GitHub docassemble server"
|
|
50
|
+
shell: bash
|
|
51
|
+
|
|
52
|
+
## Optional debugging to explore things like docker issues
|
|
53
|
+
#- name: Docker debug tmate session
|
|
54
|
+
# #if: ${{ failure() && github.event.inputs.enable_tmate == 'true' }}
|
|
55
|
+
# uses: mxschmitt/action-tmate@v3
|
|
56
|
+
|
|
57
|
+
- name: "ALKiln - Confirm docassemble packages get installed correctly"
|
|
58
|
+
if: ${{ success() }}
|
|
59
|
+
id: alkiln
|
|
60
|
+
uses: ./
|
|
61
|
+
with:
|
|
62
|
+
# Required inputs. See
|
|
63
|
+
# https://assemblyline.suffolklitlab.org/docs/alkiln/writing/#sandbox-inputs
|
|
64
|
+
SERVER_URL: "${{ steps.github_server.outputs.SERVER_URL }}"
|
|
65
|
+
DOCASSEMBLE_DEVELOPER_API_KEY: "${{ steps.github_server.outputs.DOCASSEMBLE_DEVELOPER_API_KEY }}"
|
|
66
|
+
INSTALL_METHOD: "server"
|
|
67
|
+
ALKILN_TAG_EXPRESSION: "@e3" # One very simple test
|
package/CHANGELOG.md
CHANGED
|
@@ -43,15 +43,26 @@ Format:
|
|
|
43
43
|
-
|
|
44
44
|
-->
|
|
45
45
|
|
|
46
|
-
## [
|
|
46
|
+
## [5.16.0] - 2026-05-14
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- Adds a new optional parameter to `action_for_github_server/action.yml`, the full name of the docassemble image. It defaults to `jhpyle/docassemble:latest`, what we previously used, but can also be changed to an earlier version (`jhpyle/docassemble:1.9.8`) or a different fork of docassemble (`ghcr.io/suffolklitlab/docassemble:latest`). Note that old docassemble versions may sometimes get removed.
|
|
47
51
|
|
|
48
52
|
### Changed
|
|
49
53
|
|
|
50
|
-
-
|
|
54
|
+
- Changed the default version of docassemblecli to 0.0.25
|
|
55
|
+
- Use `cwd` as the base of file paths. Motivated by ALKiP's upcoming need to change the way it handles its own file paths.
|
|
56
|
+
- Handle curl failures while waiting for docassemble server startup. Wrapped the curl call with set +e / set -e so GitHub Actions does not exit on curl failures. All non-zero curl exit codes are treated as "not ready yet" and retried - this covers transient errors like exit code 56 (connection dropped) and exit code 7 (connection refused) that may come up during startup. Added a comment explaining the permissive approach. Changed response value from "000" to "missing" for clarity in logs. See [#1044](https://github.com/SuffolkLITLab/ALKiln/issues/1044).
|
|
51
57
|
|
|
52
58
|
### Fixed
|
|
53
59
|
|
|
54
60
|
- Print error correctly when missing sources paths
|
|
61
|
+
- Changed the default version of docassemblecli to 0.0.25
|
|
62
|
+
|
|
63
|
+
### Security
|
|
64
|
+
|
|
65
|
+
- Security: Gave our main action's `npm install` call the arguments ` --ignore-scripts --min-release-age=7` to improve security against malicious `pre-install` and `post-install` scripts. See [#1053](https://github.com/SuffolkLITLab/ALKiln/issues/1053).
|
|
55
66
|
|
|
56
67
|
## [5.15.4] - 2025-11-29
|
|
57
68
|
|
|
@@ -1243,4 +1254,4 @@ Note: published on incorrect commit
|
|
|
1243
1254
|
- `example.feature` - an example test to get a project started
|
|
1244
1255
|
- `github/workflows/run_form_tests.yml` - Automated github workflow to run tests when code is pushed and a manual trigger for testing without needing to push
|
|
1245
1256
|
- `.gitignore` - ignores files that are generated by the tests and shouldn't be added to the repo
|
|
1246
|
-
- `package.json` - keep up-to-date version of this test repository and hold scripts that the automated tests run
|
|
1257
|
+
- `package.json` - keep up-to-date version of this test repository and hold scripts that the automated tests run
|
package/action.yml
CHANGED
|
@@ -120,7 +120,9 @@ runs:
|
|
|
120
120
|
run: |
|
|
121
121
|
log="💡 ALK0026 INFO: Install ALKiln directly from npm"
|
|
122
122
|
echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
|
|
123
|
-
npm install -g "@suffolklitlab/alkiln@$ALKILN_VERSION"
|
|
123
|
+
npm install --ignore-scripts --min-release-age=7 -g "@suffolklitlab/alkiln@$ALKILN_VERSION"
|
|
124
|
+
npm rebuild -g puppeteer --update-binary
|
|
125
|
+
|
|
124
126
|
|
|
125
127
|
# Files prep
|
|
126
128
|
- shell: bash
|
|
@@ -23,10 +23,14 @@ inputs:
|
|
|
23
23
|
description: "Default is 600 seconds. Maximum amount of seconds to give the docassemble docker container to serve the site."
|
|
24
24
|
required: false
|
|
25
25
|
default: 600 # 10 min
|
|
26
|
+
DOCASSEMBLE_IMAGE:
|
|
27
|
+
description: "The specific docassemble image to use."
|
|
28
|
+
required: false
|
|
29
|
+
default: jhpyle/docassemble
|
|
26
30
|
DOCASSEMBLECLI_VERSION:
|
|
27
31
|
description: "The version of docassemblecli to install."
|
|
28
32
|
required: false
|
|
29
|
-
default: "0.0.
|
|
33
|
+
default: "0.0.25"
|
|
30
34
|
|
|
31
35
|
outputs:
|
|
32
36
|
DOCASSEMBLE_DEVELOPER_API_KEY:
|
|
@@ -155,35 +159,37 @@ runs:
|
|
|
155
159
|
if: ${{ env.OUTPUT_DOCKER == 'false' }}
|
|
156
160
|
env:
|
|
157
161
|
CONFIG_ARGS: ${{ env.CONFIG_ARGS }}
|
|
162
|
+
DOCASSEMBLE_IMAGE: "${{ inputs.DOCASSEMBLE_IMAGE }}"
|
|
158
163
|
shell: bash
|
|
159
164
|
run: |
|
|
160
165
|
log="💡 ALK0009 INFO: Download and start docker silently"
|
|
161
166
|
echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}"
|
|
162
|
-
docker pull
|
|
167
|
+
docker pull "$DOCASSEMBLE_IMAGE" > /dev/null 2>&1
|
|
163
168
|
docker run --name docassemble_container \
|
|
164
169
|
--env DA_ADMIN_EMAIL="$DA_ADMIN_EMAIL" \
|
|
165
170
|
--env DA_ADMIN_PASSWORD="$DA_ADMIN_PASSWORD" \
|
|
166
171
|
--env DA_ADMIN_API_KEY="$DA_ADMIN_API_KEY" \
|
|
167
172
|
$CONFIG_ARGS \
|
|
168
173
|
--cap-add SYS_PTRACE \
|
|
169
|
-
--memory="4gb" -d -p 80:80
|
|
174
|
+
--memory="4gb" -d -p 80:80 "$DOCASSEMBLE_IMAGE" > /dev/null 2>&1
|
|
170
175
|
# With output
|
|
171
176
|
- name: "💡 ALK0010 INFO: Download and start docker"
|
|
172
177
|
if: ${{ env.OUTPUT_DOCKER == 'true' }}
|
|
173
178
|
env:
|
|
174
179
|
CONFIG_ARGS: ${{ env.CONFIG_ARGS }}
|
|
180
|
+
DOCASSEMBLE_IMAGE: "${{ inputs.DOCASSEMBLE_IMAGE }}"
|
|
175
181
|
shell: bash
|
|
176
182
|
run: |
|
|
177
183
|
log="💡 ALK0010 INFO: Download and start docker"
|
|
178
184
|
echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}"
|
|
179
|
-
docker pull
|
|
185
|
+
docker pull "$DOCASSEMBLE_IMAGE"
|
|
180
186
|
docker run --name docassemble_container \
|
|
181
187
|
--env DA_ADMIN_EMAIL="$DA_ADMIN_EMAIL" \
|
|
182
188
|
--env DA_ADMIN_PASSWORD="$DA_ADMIN_PASSWORD" \
|
|
183
189
|
--env DA_ADMIN_API_KEY="$DA_ADMIN_API_KEY" \
|
|
184
190
|
$CONFIG_ARGS \
|
|
185
191
|
--cap-add SYS_PTRACE \
|
|
186
|
-
--memory="4gb" -d -p 80:80
|
|
192
|
+
--memory="4gb" -d -p 80:80 "$DOCASSEMBLE_IMAGE"
|
|
187
193
|
|
|
188
194
|
# Section for showing the time it takes to start the server.
|
|
189
195
|
|
|
@@ -213,14 +219,25 @@ runs:
|
|
|
213
219
|
|
|
214
220
|
# Check if max seconds till loading has passed
|
|
215
221
|
if [[ $SECONDS -ge $MAX_SECONDS_FOR_DOCKER ]]; then
|
|
216
|
-
log3="🤕 ALK0014 ERROR: Timed out waiting for docker container to serve the site. If you want to give your docker container more
|
|
222
|
+
log3="🤕 ALK0014 ERROR: Timed out waiting for docker container to serve the site. If you want to give your docker container more time to install, set the MAX_SECONDS_FOR_DOCKER input for this action."
|
|
217
223
|
echo -e "\n$log3" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log3"
|
|
218
224
|
exit 1
|
|
219
225
|
fi
|
|
220
226
|
|
|
221
227
|
# Set the variable to a new string value in each iteration
|
|
222
|
-
|
|
223
|
-
|
|
228
|
+
# We intentionally skip all non-zero curl exit codes here instead of handling specific ones.
|
|
229
|
+
# During server startup there are several transient errors that can come up and since we already log the exit code and have a timeout,
|
|
230
|
+
# retrying on all of them is safer than trying to maintain a list of specific codes to handle.
|
|
231
|
+
set +e
|
|
232
|
+
response=$(curl -o /dev/null -s -w "%{http_code}" http://localhost:80/health_check?ready=1)
|
|
233
|
+
status=$?
|
|
234
|
+
set -e
|
|
235
|
+
|
|
236
|
+
if [[ $status -ne 0 ]]; then
|
|
237
|
+
response="missing"
|
|
238
|
+
fi
|
|
239
|
+
|
|
240
|
+
log4="💡 ALK0015 INFO: Response is $response (curl exit code: $status)"
|
|
224
241
|
echo -e "\n$log4" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log4"
|
|
225
242
|
|
|
226
243
|
# Check if the string includes the desired text
|
|
@@ -228,7 +245,7 @@ runs:
|
|
|
228
245
|
log5="💡 ALK0016 SUCCESS: Success! The docker container is ready!"
|
|
229
246
|
echo -e "\n$log5" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log5"
|
|
230
247
|
else
|
|
231
|
-
log6="💡 ALK0017 INFO: The docker container is not ready yet. Will check again in 30 seconds."
|
|
248
|
+
log6="💡 ALK0017 INFO: The docker container is not ready yet (HTTP=$response, curl exit code=$status). Will check again in 30 seconds."
|
|
232
249
|
echo -e "\n$log6" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log6"
|
|
233
250
|
sleep 30
|
|
234
251
|
fi
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Root path
|
|
2
2
|
|
|
3
|
-
This code assumes the current
|
|
3
|
+
This code assumes the current working directory (cwd) will contain the necessary files and folders to get files like `.feature` files and the test run runtime config file.
|
|
4
4
|
|
|
5
5
|
When you run ALKiln on the command line, run the tests in the root directory of the docassemble package with the tests. There are other ways to tell processes where the root directory is. For example, ALKiP, a docassemble package that uses ALKiln inside an author's server, runs `subprocess.run()` or `subprocess.Popen()` with `cwd=`. In ALKiP the `cwd` is most likely `/tmp`.
|
|
6
6
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suffolklitlab/alkiln",
|
|
3
|
-
"version": "5.15.
|
|
3
|
+
"version": "5.15.1-update-deps2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@suffolklitlab/alkiln",
|
|
9
|
-
"version": "5.15.
|
|
9
|
+
"version": "5.15.1-update-deps2",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@axe-core/puppeteer": "4.7.3",
|
|
@@ -380,6 +380,7 @@
|
|
|
380
380
|
"version": "4.0.1",
|
|
381
381
|
"resolved": "https://registry.npmjs.org/@cucumber/message-streams/-/message-streams-4.0.1.tgz",
|
|
382
382
|
"integrity": "sha512-Kxap9uP5jD8tHUZVjTWgzxemi/0uOsbGjd4LBOSxcJoOCRbESFwemUzilJuzNTB8pcTQUh8D5oudUyxfkJOKmA==",
|
|
383
|
+
"peer": true,
|
|
383
384
|
"peerDependencies": {
|
|
384
385
|
"@cucumber/messages": ">=17.1.1"
|
|
385
386
|
}
|
|
@@ -388,6 +389,7 @@
|
|
|
388
389
|
"version": "19.1.4",
|
|
389
390
|
"resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-19.1.4.tgz",
|
|
390
391
|
"integrity": "sha512-Pksl0pnDz2l1+L5Ug85NlG6LWrrklN9qkMxN5Mv+1XZ3T6u580dnE6mVaxjJRdcOq4tR17Pc0RqIDZMyVY1FlA==",
|
|
392
|
+
"peer": true,
|
|
391
393
|
"dependencies": {
|
|
392
394
|
"@types/uuid": "8.3.4",
|
|
393
395
|
"class-transformer": "0.5.1",
|
|
@@ -1482,7 +1484,8 @@
|
|
|
1482
1484
|
"node_modules/devtools-protocol": {
|
|
1483
1485
|
"version": "0.0.1312386",
|
|
1484
1486
|
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz",
|
|
1485
|
-
"integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA=="
|
|
1487
|
+
"integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA==",
|
|
1488
|
+
"peer": true
|
|
1486
1489
|
},
|
|
1487
1490
|
"node_modules/diff": {
|
|
1488
1491
|
"version": "5.0.0",
|
|
@@ -3008,6 +3011,7 @@
|
|
|
3008
3011
|
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.15.0.tgz",
|
|
3009
3012
|
"integrity": "sha512-XjCY1SiSEi1T7iSYuxS82ft85kwDJUS7wj1Z0eGVXKdtr5g4xnVcbjwxhq5xBnpK/E7x1VZZoJDxpjAOasHT4Q==",
|
|
3010
3013
|
"hasInstallScript": true,
|
|
3014
|
+
"peer": true,
|
|
3011
3015
|
"dependencies": {
|
|
3012
3016
|
"@puppeteer/browsers": "2.3.0",
|
|
3013
3017
|
"cosmiconfig": "^9.0.0",
|