Skip to content

Commit 216bb65

Browse files
swissspidyclaude
andauthored
Set up the database server in the foreground (#321)
* Retry the database server setup when it fails in the background The MySQL setup runs in the background alongside setup-php and the Ghostscript install. The action unpacks its binaries with the system tar, which fails to load libpcre2-8.so.0 while apt upgrades that library. Let the background step fail softly and retry it in the foreground once the other setup steps are done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWTd5qGVcfTHmYNMmJgdGu * Set up the database server in the foreground Replaces the retry from the previous commit. The action unpacks its binaries with the system tar, which fails to load libpcre2-8.so.0 while setup-php or the Ghostscript install upgrade that library with apt. Running it before those steps instead of in the background avoids the race altogether. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWTd5qGVcfTHmYNMmJgdGu --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9c9115a commit 216bb65

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

‎.github/workflows/reusable-functional.yml‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,12 @@ jobs:
115115
echo "authentication_policy=mysql_native_password," >> $GITHUB_OUTPUT
116116
echo "EOF" >> $GITHUB_OUTPUT
117117
118-
# Downloading and starting the database server is the slowest part of the
119-
# setup, and nothing needs it until the test database is prepared. Run it
120-
# in the background alongside the PHP and Composer setup below, and wait
121-
# for it right before it is first used. The action only downloads its own
122-
# binaries, so it cannot contend with apt, Homebrew or Chocolatey.
118+
# Not run in the background alongside the setup below: the action unpacks
119+
# its binaries with the system `tar`, which fails to load libpcre2 while
120+
# setup-php or the Ghostscript install upgrade that library with apt.
123121
- name: Setup MySQL Server
124122
id: setup-mysql
125123
if: ${{ inputs.dbtype != 'sqlite' }}
126-
background: true
127124
uses: shogo82148/actions-setup-mysql@13a38f2af408e58a0c80168fc620a63a15357339 # v1
128125
with:
129126
mysql-version: ${{ inputs.mysql }}
@@ -223,9 +220,9 @@ jobs:
223220
env:
224221
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
225222

226-
# Waits for the database server and the Windows dependencies. `wait-all`
227-
# rather than `wait: setup-mysql`, as either background step may have been
228-
# skipped by its condition. A failure in either fails the job here.
223+
# Waits for the Windows dependencies. `wait-all` rather than a named `wait`,
224+
# as the background step may have been skipped by its condition. A failure
225+
# there fails the job here.
229226
- name: Wait for background setup steps
230227
wait-all:
231228

0 commit comments

Comments
 (0)