@suffolklitlab/alkiln 5.14.0 → 5.15.0-feat-news

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.
Files changed (40) hide show
  1. package/.github/workflows/github_server.yml +1 -1
  2. package/.github/workflows/playground.yml +2 -1
  3. package/CHANGELOG.md +34 -1
  4. package/action.yml +26 -10
  5. package/action_for_github_server/action.yml +31 -27
  6. package/docs/4_environments.md +2 -2
  7. package/docs/artifacts_folder_name.md +121 -71
  8. package/docs/decisions/2025_06_12-breaking_news_feat.md +115 -0
  9. package/docs/version_formatting_rules.md +83 -0
  10. package/lib/breaking_news.js +313 -0
  11. package/lib/docassemble/server_install.js +0 -2
  12. package/lib/docassemble/setup.js +1 -3
  13. package/lib/docassemble/takedown.js +2 -2
  14. package/lib/globals.js +10 -0
  15. package/lib/run_cucumber.js +40 -53
  16. package/lib/scope.js +32 -0
  17. package/lib/setup/TestGenerator.js +1757 -0
  18. package/lib/setup/artifacts.js +20 -0
  19. package/lib/setup/generate.js +42 -0
  20. package/lib/setup/get_Gherkin_AST.js +26 -0
  21. package/lib/setup/validate.js +89 -0
  22. package/lib/steps.js +53 -19
  23. package/lib/utils/Log.js +302 -149
  24. package/lib/utils/get_error_stacks.js +16 -0
  25. package/lib/utils/reports.js +43 -23
  26. package/lib/utils/session_vars.js +77 -57
  27. package/lib/utils/set_sources_paths.js +98 -0
  28. package/npm-shrinkwrap.json +6 -3
  29. package/package.json +19 -7
  30. package/tests/log_codes/check_codes.sh +17 -13
  31. package/tests/log_codes/log_code_expected_instances.txt +58 -0
  32. package/tests/unit_tests/breaking_news/breaking_news.test.js +82 -0
  33. package/tests/unit_tests/constrained_random_answers/invalid.fixtures.js +178 -0
  34. package/tests/unit_tests/constrained_random_answers/invalid.test.js +251 -0
  35. package/tests/unit_tests/constrained_random_answers/valid.fixtures.js +957 -0
  36. package/tests/unit_tests/constrained_random_answers/valid.test.js +563 -0
  37. package/tests/unit_tests/log.test.js +17 -41
  38. package/_alkiln_meta/gherkin_parsed_example.json +0 -1546
  39. package/_alkiln_meta/shift_logs.js +0 -75
  40. /package/docs/{expected_inernal_results.md → expected_internal_results.md} +0 -0
@@ -160,7 +160,7 @@ jobs:
160
160
  #### Developer note: You can probably leave the rest out
161
161
  #### To learn more, see https://assemblyline.suffolklitlab.org/docs/alkiln/writing/#optional-inputs
162
162
  ALKILN_TAG_EXPRESSION: "${{ env.ALKILN_TAG_EXPRESSION }}"
163
- # ALKILN_VERSION: "5.13.4-feat-textarea-1"
163
+ # ALKILN_VERSION:
164
164
 
165
165
  #### Developer note: Example of making an issue when tests fail
166
166
  #### that includes the text of the failure output file
@@ -76,9 +76,10 @@ jobs:
76
76
  DOCASSEMBLE_DEVELOPER_API_KEY: "${{ env.DOCASSEMBLE_DEVELOPER_API_KEY }}"
77
77
  #### Developer note: See https://assemblyline.suffolklitlab.org/docs/alkiln/writing/#optional-inputs
78
78
  #### You can probably leave this out
79
+ ALKILN_MAX_RANDOM_TESTS_PER_SCENARIO: 10
79
80
  # Internal: docassemble changes sometimes break @a11y tests. That is
80
81
  # a da problem, not ours. We will trigger these tests manually when we
81
82
  # want to check up on this.
82
83
  ALKILN_TAG_EXPRESSION: "${{ env.ALKILN_TAG_EXPRESSION }}"
83
84
  #### Developer note: You can probably leave this out
84
- # ALKILN_VERSION: "5.13.4-feat-textarea-1"
85
+ # ALKILN_VERSION:
package/CHANGELOG.md CHANGED
@@ -43,7 +43,40 @@ Format:
43
43
  -
44
44
  -->
45
45
 
46
- <!-- ## [Unreleased] -->
46
+ ## [Unreleased]
47
+
48
+ ### Added
49
+
50
+ - "Breaking news" feature for ALKilnInThePlayground - a way new ALKiln versions can talk directly with authors even if ALKilnInThePlayground's version stays the same. ALKilnInThePlayground will be able to get text from ALKiln that ALKilnInThePlayground can turn into Mako and then insert on a screen the author can see.
51
+
52
+ ## [5.15.0] - 2025-05-22
53
+
54
+ ### Added
55
+
56
+ - Add the `constrained random answers` Step. You must put the Step in a "constrained random test template" Scenario which goes in a "constrained random test template" file - a `.feature` file that starts with "alkiln_random". The file **MUST have ONLY 1 Scenario per template file** at the moment. The Step is pretty strict. If there are irregularities, it will probably fail, but it will fail quickly. It is flexible about number of tests, though, and will default to 1. Closes [#962](https://github.com/SuffolkLITLab/ALKiln/issues/962).
57
+ - Add `ALKILN_MAX_RANDOM_TESTS_PER_SCENARIO` optional environment variable for the above `constrained random answers` Step. Default value is `40` until we hear otherwise.
58
+ - Regular tests that have incorrect syntax will fail more quickly now - very near the start. So will invalid "constrained random test template" files. This will be a little slower for GitHub Sandbox tests right now, but still faster than it has been in the past. Closes [#972](https://github.com/SuffolkLITLab/ALKiln/issues/972).
59
+
60
+ ### Changed
61
+
62
+ - Improve report indentation and tweak styling.
63
+ - Clarify some logs, including addressing bite-sized issues like [#981](https://github.com/SuffolkLITLab/ALKiln/issues/981).
64
+ - The report now shows the name of every Step that gets run in a test.
65
+
66
+ ### Internal
67
+
68
+ - Added: `lib/globals.js` file to hold some shared constant values across the framework. It should NOT manage state. We may want to change the name to `constants.js` or `global_contants.js`. Let's see how it serves us.
69
+ - Added: executable scripts for more setup steps - managing the artifacts path (at the start of a run) and validating and generating files.
70
+ - Changed: `Log` now prioritizes what folder it stores files in in this order:
71
+ 1. Use the argument to use an existing folder and save that to runtime_config.json at root.
72
+ 2. Use the argument to make a new folder with that name and save that to runtime_config.json at root.
73
+ 3. Use the alread-existing folder name value in runtime_config.json at root
74
+ 4. Create a new folder and save that to runtime_config.json at root
75
+ - Changed: Add `.error()` to `Log` for visual clarity when storing an error to throw later. We need to discuss this behavior and its return value. To make that work Logs can now get the `error` prop without throwing an error.
76
+ - Changed: the Story Table step now accepts multiple ids and stops at whatever id it reaches first. I highly recommend that only ALKiln generated tests use this feature. We may avoid documenting it unless authors ask for it.
77
+ - Changed: `.gitignore` and `.npmignore` more things
78
+ - Fixed: log codes checker obob.
79
+ - Fixed: updated `actions/upload-artifact@v3` to `actions/upload-artifact@v4`
47
80
 
48
81
  ## [5.14.0] - 2025-05-15
49
82
 
package/action.yml CHANGED
@@ -33,6 +33,10 @@ inputs:
33
33
  description: "The version of docassemblecli to install."
34
34
  required: false
35
35
  default: "0.0.17"
36
+ ALKILN_MAX_RANDOM_TESTS_PER_SCENARIO:
37
+ description: "The maximum number of tests ALKiln will generate for every Scenario that can generate tests."
38
+ required: false
39
+ # Default will be internal to avoid duplication of data
36
40
 
37
41
  outputs:
38
42
  PATH_TO_ARTIFACTS:
@@ -68,6 +72,7 @@ runs:
68
72
  MAX_SECONDS_FOR_SETUP: ${{ inputs.MAX_SECONDS_FOR_SETUP }}
69
73
  SERVER_RELOAD_TIMEOUT_SECONDS: ${{ inputs.SERVER_RELOAD_TIMEOUT_SECONDS }}
70
74
  DOCASSEMBLECLI_VERSION: ${{ inputs.DOCASSEMBLECLI_VERSION }}
75
+ ALKILN_MAX_RANDOM_TESTS_PER_SCENARIO: ${{ inputs.ALKILN_MAX_RANDOM_TESTS_PER_SCENARIO }}
71
76
  shell: bash
72
77
  run: |
73
78
  log="šŸ’” ALK0023 INFO: Set environment variables and create artifacts folder"
@@ -91,6 +96,7 @@ runs:
91
96
  echo "DOCASSEMBLE_DEVELOPER_API_KEY=$DOCASSEMBLE_DEVELOPER_API_KEY" >> $GITHUB_ENV
92
97
  echo "ALKILN_VERSION=$ALKILN_VERSION" >> $GITHUB_ENV
93
98
  echo "MAX_SECONDS_FOR_SETUP=$MAX_SECONDS_FOR_SETUP" >> $GITHUB_ENV
99
+ echo "ALKILN_MAX_RANDOM_TESTS_PER_SCENARIO=$ALKILN_MAX_RANDOM_TESTS_PER_SCENARIO" >> $GITHUB_ENV
94
100
  echo "SERVER_RELOAD_TIMEOUT_SECONDS=$SERVER_RELOAD_TIMEOUT_SECONDS" >> $GITHUB_ENV
95
101
  echo "DOCASSEMBLECLI_VERSION=$DOCASSEMBLECLI_VERSION" >> $GITHUB_ENV
96
102
  # Hard-coded internal ALKiln vars
@@ -100,10 +106,10 @@ runs:
100
106
  run: |
101
107
  log="šŸ’” ALK0024 INFO: Confirm environment variables"
102
108
  echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
103
- vars_log="\nALKiln version is $ALKILN_VERSION\nRepo is $REPO_URL\nBranch ref is $BRANCH_PATH\nMAX_SECONDS_FOR_SETUP is $MAX_SECONDS_FOR_SETUP\nSERVER_RELOAD_TIMEOUT_SECONDS is $SERVER_RELOAD_TIMEOUT_SECONDS\n"
109
+ vars_log='\nALKiln version is ${{ env.ALKILN_VERSION }}\nRepo is "${{ env.REPO_URL }}"\nBranch ref is "${{ env.BRANCH_PATH }}"\nCustom MAX_SECONDS_FOR_SETUP is "${{ env.MAX_SECONDS_FOR_SETUP }}"\nCustom SERVER_RELOAD_TIMEOUT_SECONDS is "${{ env.SERVER_RELOAD_TIMEOUT_SECONDS }}"\nCustom ALKILN_MAX_RANDOM_TESTS_PER_SCENARIO is "${{ env.ALKILN_MAX_RANDOM_TESTS_PER_SCENARIO }}"\n'
104
110
  echo -e "$vars_log" >> "${{ env.DEBUG_PATH }}" && echo -e "$vars_log"
105
111
 
106
- # Install
112
+ # Install ALKiln during GitHub workflow
107
113
  - name: "šŸ’” ALK0025 INFO: Set up node"
108
114
  uses: actions/setup-node@v4
109
115
  with:
@@ -115,8 +121,18 @@ runs:
115
121
  echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
116
122
  npm install -g "@suffolklitlab/alkiln@$ALKILN_VERSION"
117
123
 
118
- # Install on playground
124
+ # Files prep
125
+ - shell: bash
126
+ env:
127
+ ARTIFACT_FOLDER: ${{ env.ARTIFACT_FOLDER }}
128
+ run: |
129
+ log="šŸ’” ALK0275 INFO: Prepare repository test files"
130
+ echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
131
+ alkiln-artifacts --path="${{ env.ARTIFACT_FOLDER }}"
132
+ alkiln-validate
133
+ alkiln-generate
119
134
 
135
+ # Install package on playground
120
136
  # Don't rely on the environment's version of python
121
137
  - uses: actions/setup-python@v5
122
138
  if: ${{ inputs.INSTALL_METHOD == 'playground' }}
@@ -129,7 +145,7 @@ runs:
129
145
  log="šŸ’” ALK0027 INFO: Create a Project and install the package from GitHub"
130
146
  echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
131
147
  pip install "docassemblecli==$DOCASSEMBLECLI_VERSION"
132
- alkiln-setup --path="${{ env.ARTIFACT_FOLDER }}"
148
+ alkiln-setup
133
149
  - name: "šŸ¤• ALK0028 ERROR: Unable to create a Project"
134
150
  if: ${{ inputs.INSTALL_METHOD == 'playground' && failure() }}
135
151
  shell: bash
@@ -138,15 +154,15 @@ runs:
138
154
  long_log="\n\n―――\nšŸ¤• ALK0028 ERROR: Unable to create a Project on your server's testing account or pull your package into it. Check the messages above this line.\n\n"
139
155
  echo -e "$long_log" >> "${{ env.DEBUG_PATH }}" && echo -e "$long_log"
140
156
 
141
- # Server installations - find folders and save session vars
142
- - name: "šŸ’” ALK0029 INFO: Install the GitHub package onto the server"
157
+ # Server installation
158
+ - name: "šŸ’” ALK0029 INFO: Try to install the GitHub package onto the GitHub sandbox server"
143
159
  if: ${{ inputs.INSTALL_METHOD == 'server' }}
144
160
  shell: bash
145
161
  run: |
146
162
  log="šŸ’” ALK0029 INFO: Install the GitHub package onto the server"
147
163
  echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
148
- alkiln-server-install --path="${{ env.ARTIFACT_FOLDER }}"
149
- - name: "šŸ¤• ALK0030 ERROR: Unable to install the package"
164
+ alkiln-server-install
165
+ - name: "šŸ¤• ALK0030 ERROR: Unable to install the package on the GitHub sandbox server"
150
166
  if: ${{ inputs.INSTALL_METHOD == 'server' && failure() }}
151
167
  shell: bash
152
168
  run: |
@@ -162,7 +178,7 @@ runs:
162
178
  run: |
163
179
  log="šŸ’” ALK0031 INFO: Run tests"
164
180
  echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
165
- alkiln-run "$ALKILN_TAG_EXPRESSION" --path="${{ env.ARTIFACT_FOLDER }}"
181
+ alkiln-run "$ALKILN_TAG_EXPRESSION"
166
182
 
167
183
  # on playground, delete project
168
184
  - name: "šŸ’” ALK0032 INFO: Delete the Project from the Playground"
@@ -171,7 +187,7 @@ runs:
171
187
  run: |
172
188
  log="šŸ’” ALK0032 INFO: Delete the Project from the Playground"
173
189
  echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
174
- alkiln-takedown --path="${{ env.ARTIFACT_FOLDER }}"
190
+ alkiln-takedown
175
191
 
176
192
  # Upload artifacts that subscribers can download on the Actions summary page
177
193
  - name: "šŸ’” ALK0033 INFO: Upload artifacts folder"
@@ -51,15 +51,19 @@ runs:
51
51
  run: |
52
52
  log="šŸ’” ALK0018 INFO: Get path names with date and time"
53
53
  timestamp="$(date +'%Y-%m-%d at %Hh%Mm%Ss' -u)"
54
+ # Where to get the contents for the artifact
54
55
  debug_dir="/tmp"
55
- debug_path="$debug_dir/alkiln_docker_logs-${timestamp}UTC.txt"
56
+ debug_logs_path="$debug_dir/alkiln_docker_logs-${timestamp}UTC.txt"
57
+ # Where to put the artifact
56
58
  artifact_folder="alkiln_github_server-${timestamp}UTC"
59
+ echo "debug_logs_path: $debug_logs_path"
60
+ echo "artifact_folder: $artifact_folder"
57
61
 
58
62
  mkdir -p "$debug_dir"
59
63
  mkdir -p "$artifact_folder"
60
- echo -e "$log" >> "$debug_path"
64
+ echo -e "$log" >> "$debug_logs_path"
61
65
 
62
- echo "DEBUG_PATH=$debug_path" >> $GITHUB_ENV
66
+ echo "DEBUG_LOGS_PATH=$debug_logs_path" >> $GITHUB_ENV
63
67
  echo "GITHUB_SERVER_ARTIFACT_NAME=$artifact_folder" >> $GITHUB_ENV
64
68
 
65
69
  - shell: bash
@@ -68,7 +72,7 @@ runs:
68
72
  DOCASSEMBLECLI_VERSION: ${{ inputs.DOCASSEMBLECLI_VERSION }}
69
73
  run: |
70
74
  log="šŸ’” ALK0001 INFO: Set environment variables"
71
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
75
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}"
72
76
 
73
77
  echo "MAX_SECONDS_FOR_DOCKER=$MAX_SECONDS_FOR_DOCKER" >> $GITHUB_ENV
74
78
  echo "DOCASSEMBLECLI_VERSION=$DOCASSEMBLECLI_VERSION" >> $GITHUB_ENV
@@ -81,7 +85,7 @@ runs:
81
85
  shell: bash
82
86
  run: |
83
87
  log="šŸ’” ALK0002 INFO: Create GitHub step output variables"
84
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
88
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}"
85
89
  echo "DOCASSEMBLE_DEVELOPER_API_KEY=$DA_ADMIN_API_KEY" >> "$GITHUB_OUTPUT"
86
90
  echo "DA_ADMIN_EMAIL=$DA_ADMIN_EMAIL" >> "$GITHUB_OUTPUT"
87
91
  echo "DA_ADMIN_PASSWORD=$DA_ADMIN_PASSWORD" >> "$GITHUB_OUTPUT"
@@ -92,19 +96,19 @@ runs:
92
96
  shell: bash
93
97
  run: |
94
98
  log="šŸ’” ALK0003 INFO: Get config"
95
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
99
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}"
96
100
 
97
101
  mkdir /tmp/config
98
102
  # Worth making this silent by defining a variable with > /dev/null...?
99
103
  if [ -n "$CONFIG" ]
100
104
  then
101
105
  log2="šŸ’” ALK0004 INFO: The developer did provide a custom docassemble config file as an input into this action."
102
- echo -e "\n$log2" >> "${{ env.DEBUG_PATH }}" echo "$log2"
106
+ echo -e "\n$log2" >> "${{ env.DEBUG_LOGS_PATH }}" echo "$log2"
103
107
  echo "$CONFIG" > /tmp/config/myconfig.yml
104
108
  echo "CONFIG_ARGS=--env DA_CONFIG=/tmp/config/myconfig.yml --volume /tmp/config:/tmp/config " >> $GITHUB_ENV
105
109
  else
106
110
  log3="šŸ’” ALK0005 INFO: The developer did NOT provide a custom docassemble config file as an input into this action. Docassemble will use its default config."
107
- echo -e "\n$log3" >> "${{ env.DEBUG_PATH }}" echo "$log3"
111
+ echo -e "\n$log3" >> "${{ env.DEBUG_LOGS_PATH }}" echo "$log3"
108
112
  echo "CONFIG_ARGS=" >> $GITHUB_ENV
109
113
  fi
110
114
 
@@ -120,13 +124,13 @@ runs:
120
124
  shell: bash
121
125
  run: |
122
126
  log="šŸ’” ALK0006 INFO: Determine docker logs visibility"
123
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
127
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}"
124
128
  if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
125
129
  echo "OUTPUT_DOCKER=$SHOW_DOCKER_OUTPUT" >> $GITHUB_ENV
126
- echo -e "\n$SHOW_DOCKER_OUTPUT" >> "${{ env.DEBUG_PATH }}"
130
+ echo -e "\n$SHOW_DOCKER_OUTPUT" >> "${{ env.DEBUG_LOGS_PATH }}"
127
131
  else
128
132
  echo "OUTPUT_DOCKER=false" >> $GITHUB_ENV
129
- echo -e "\nfalse" >> "${{ env.DEBUG_PATH }}"
133
+ echo -e "\nfalse" >> "${{ env.DEBUG_LOGS_PATH }}"
130
134
  fi
131
135
 
132
136
  # Messages about output
@@ -136,14 +140,14 @@ runs:
136
140
  run: |
137
141
  # šŸ’” ALK0007 INFO: ALKiln will now hide docker output
138
142
  log="===\nšŸ’” ALK0007 INFO: ALKiln will now hide docker output to avoid possibly showing details about your config. If you want to get output to see more of what is going on, use \"with:\" and set the input \"SHOW_DOCKER_OUTPUT\" to \"true\". This output will only be visible to those who can already see the action output, like people with admin or write permissions.\n==="
139
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}" && echo -e "$log"
143
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log"
140
144
  - name: "šŸ’” ALK0008 INFO: ALKiln will show docker output"
141
145
  if: ${{ env.OUTPUT_DOCKER == 'true' }}
142
146
  shell: bash
143
147
  run: |
144
148
  # šŸ’” ALK0008 INFO: ALKiln will show docker output
145
149
  log="===\nšŸ’” ALK0008 INFO: ALKiln will show docker output. ALKiln cannot control this output. If you want to prevent output, use \"with:\" and set the input \"SHOW_DOCKER_OUTPUT\" to \"false\". This output will only be visible to those who can already see the action output, like people with admin or write permissions.\n==="
146
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}" && echo -e "$log"
150
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log"
147
151
 
148
152
  # TODO: Reduce these to 1 block by putting ` > /dev/null 2>&1` into an env var
149
153
  # No docker output
@@ -154,7 +158,7 @@ runs:
154
158
  shell: bash
155
159
  run: |
156
160
  log="šŸ’” ALK0009 INFO: Download and start docker silently"
157
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
161
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}"
158
162
  docker pull jhpyle/docassemble > /dev/null 2>&1
159
163
  docker run --name docassemble_container \
160
164
  --env DA_ADMIN_EMAIL="$DA_ADMIN_EMAIL" \
@@ -171,7 +175,7 @@ runs:
171
175
  shell: bash
172
176
  run: |
173
177
  log="šŸ’” ALK0010 INFO: Download and start docker"
174
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
178
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}"
175
179
  docker pull jhpyle/docassemble
176
180
  docker run --name docassemble_container \
177
181
  --env DA_ADMIN_EMAIL="$DA_ADMIN_EMAIL" \
@@ -189,13 +193,13 @@ runs:
189
193
  run: |
190
194
  # šŸ’” ALK0011 INFO: The following messages are not docker output
191
195
  log="šŸ’” ALK0011 INFO: The following messages are NOT docker output, just ALKiln waiting for the server to start"
192
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}" && echo -e "$log"
196
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log"
193
197
 
194
198
  - name: "šŸ’” ALK0012 INFO: Waiting for server to start"
195
199
  shell: bash
196
200
  run: |
197
201
  log="šŸ’” ALK0012 INFO: Waiting for server to start"
198
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
202
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}"
199
203
 
200
204
  # Reset the SECONDS variable
201
205
  SECONDS=0
@@ -205,27 +209,27 @@ runs:
205
209
  response="start"
206
210
  while [[ $response != *"200"* ]]; do
207
211
  log2="šŸ’” ALK0013 INFO: Time elapsed: $SECONDS seconds"
208
- echo -e "\n$log2" >> "${{ env.DEBUG_PATH }}" && echo -e "$log2"
212
+ echo -e "\n$log2" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log2"
209
213
 
210
214
  # Check if max seconds till loading has passed
211
215
  if [[ $SECONDS -ge $MAX_SECONDS_FOR_DOCKER ]]; then
212
216
  log3="šŸ¤• ALK0014 ERROR: Timed out waiting for docker container to serve the site. If you want to give your docker container more timem to install, set the MAX_SECONDS_FOR_DOCKER input for this action."
213
- echo -e "\n$log3" >> "${{ env.DEBUG_PATH }}" && echo -e "$log3"
217
+ echo -e "\n$log3" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log3"
214
218
  exit 1
215
219
  fi
216
220
 
217
221
  # Set the variable to a new string value in each iteration
218
222
  response=$(curl -o /dev/null -s -w "%{http_code}\n" http://localhost:80/health_check?ready=1)
219
223
  log4="šŸ’” ALK0015 INFO: Response is $response"
220
- echo -e "\n$log4" >> "${{ env.DEBUG_PATH }}" && echo -e "$log4"
224
+ echo -e "\n$log4" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log4"
221
225
 
222
226
  # Check if the string includes the desired text
223
227
  if [[ $response == *"200"* ]]; then
224
228
  log5="šŸ’” ALK0016 SUCCESS: Success! The docker container is ready!"
225
- echo -e "\n$log5" >> "${{ env.DEBUG_PATH }}" && echo -e "$log5"
229
+ echo -e "\n$log5" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log5"
226
230
  else
227
231
  log6="šŸ’” ALK0017 INFO: The docker container is not ready yet. Will check again in 30 seconds."
228
- echo -e "\n$log6" >> "${{ env.DEBUG_PATH }}" && echo -e "$log6"
232
+ echo -e "\n$log6" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log6"
229
233
  sleep 30
230
234
  fi
231
235
 
@@ -260,23 +264,23 @@ runs:
260
264
  shell: bash
261
265
  run: |
262
266
  log="šŸ’” ALK0019 INFO: Create docker artifact data"
263
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
264
- echo "$(docker output docassemble_container)" >> "${{ env.DEBUG_PATH }}"
267
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}"
268
+ echo "$(docker output docassemble_container)" >> "${{ env.DEBUG_LOGS_PATH }}"
265
269
  - name: "šŸ’” ALK0020 INFO: Upload artifacts folder"
266
270
  if: ${{ always() && env.OUTPUT_DOCKER == 'true' }}
267
271
  uses: actions/upload-artifact@v4
268
272
  with:
269
273
  name: ${{ env.GITHUB_SERVER_ARTIFACT_NAME }}
270
- path: ${{ env.DEBUG_PATH }}
274
+ path: ${{ env.DEBUG_LOGS_PATH }}
271
275
 
272
276
  - shell: bash
273
277
  if: ${{ success() }}
274
278
  run: |
275
279
  log="šŸ’” ALK0021 SUCCESS: ALKiln created the docker container and started the server!"
276
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}" && echo -e "$log"
280
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log"
277
281
 
278
282
  - shell: bash
279
283
  if: ${{ failure() }}
280
284
  run: |
281
285
  log="šŸ¤• ALK0022 ERROR: Something went wrong. See above for more details."
282
- echo -e "\n$log" >> "${{ env.DEBUG_PATH }}" && echo -e "$log"
286
+ echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log"
@@ -223,7 +223,7 @@ This design is working within systems that limit how we can do what we need to d
223
223
 
224
224
  Alternative: Get rid of our support for some of these environments. The temporary GitHub docassemble server environment hasn't been used by a lot of authors. Other than that, the other environments have gotten a lot of use. Even though authors have not yet used the temporary GitHub environment much, they say they want that functionality. The trouble there seems to be complexity with initial set up.
225
225
 
226
- Alternative: Instead of dealing with separate runtimes, have one command and script that wraps all these currently separate processes in one runtime and handles which ones to trigger under what circumstances. If we included `./action_for_github/action.yml` in that command, we would prevent authors from customizing the temporary GitHub docassemble server. That would not be acceptable. To avoid closing off access to server customization, we can only partially integrate these different processes. Also, GitHub actions in general will still have to deal with some core business sometimes. For example, they have to create the artifacts folder name so they can use it later to upload the artifacts. This combined runtime also feels more coupled/entangled and therefore harder to maintain. The need for more command line arguments could make local development more complicated. It is still worth considering.
226
+ Alternative: Instead of dealing with separate runtimes, have one command and script that wraps all these currently separate processes in one runtime and handles which ones to trigger under what circumstances. If we included `./action_for_github/action.yml` in that command, we would prevent authors from customizing the temporary GitHub docassemble server. That would not be acceptable. To avoid closing off access to server customization, we can only partially integrate these different processes. Also, GitHub actions in general will still sometimes have to deal with some core business. For example, they have to create the artifacts folder name so they can use it later to upload the artifacts. This combined runtime also feels more coupled/entangled and therefore harder to maintain. The need for more command line arguments could make local development more complicated. It is still worth considering.
227
227
 
228
228
  <!-- Discuss: How to articulate the entanglement with more specifics and examples. -->
229
229
 
@@ -234,7 +234,7 @@ Alternative script names: `install_package`, `save_server`, `delete_package`.
234
234
  _Security, privacy, observability, etc._
235
235
 
236
236
  - Some tests need to use sensitive information. For example, some tests need a logged-in user and thus ALKiln needs the login info for a user. Different environments store this information differently and there is documentation about how to use sensitive information securely and privately.
237
- - Core ALKiln code[^2] ends up needing to handle some of the complexity of the 4 environments. Example - the `Log` class `path` takes an optional initial argument to set the artifacts path at the beginning of that runtime process. Other parts of the process have to assume that this path already exists. We have tried to abstract environment complexity out to `run_cucumber.js`, the script that wraps the core code, but there is still logic that the core code handles.
237
+ - Core ALKiln code[^2] ends up needing to handle some of the complexity of the 4 environments. Example - the `Log` class `path` takes an optional initial argument to set the artifacts path before the core code runs. The process in the core code (and elsewhere) have to assume that this path already exists and use config values. We have tried to abstract environment complexity out to `run_cucumber.js`, the script that wraps the core code, but there is still logic that the core code handles.
238
238
 
239
239
  ---
240
240