Skip to content

Felps/behat shard matrix 66bd - #1

Closed
lfals wants to merge 15 commits into
mainfrom
felps/behat-shard-matrix-66bd
Closed

lfals wants to merge 15 commits into
mainfrom
felps/behat-shard-matrix-66bd

Conversation

@lfals

@lfals lfals commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Resolves: #

📝 Summary

A concise description of what this PR does and why.

🧪 How to test

How to see this running using GitHub Codespaces

1. Open the Codespace

  • Authenticate to GitHub
  • Go to the branch: chore/reduce-configure-check-time
  • Click the Code button and select the Codespaces tab.
  • Click "Create codespace on feat/customize-signature-stamp"

2. Wait for the environment to start

  • A progress bar will appear on the left.
  • After that, the terminal will show the build process.
  • Wait until you see the message:
    ✍️ LibreSign is up!
    This may take a few minutes.

3. Access LibreSign in the browser

  • Open the Ports tab (next to the Terminal).
  • Look for the service running on port 80.
  • Hover over the URL and click the globe icon 🌐 to open it in your browser.

4. (Optional) Make the service public

  • If you want to share the app with people not logged in to GitHub, you must change the port visibility:
    • Click the three dots ⋮ on the row for port 80.
    • Select Change visibility → Public.

5. Login credentials

  • Username: admin
  • Password: admin

Done! 🎉
You're now ready to test this.

🎨 UI / Front‑end changes

  • ...
  • Screenshots before/after (add images or links)
🏚️ Before 🏡 After
Screenshot before Screenshot after
  • Tested in multiple browsers (Chrome, Firefox, Safari) – optional but appreciated
  • Components, Unit (with vitest) and/or e2e (with Playwright) tests added - Required
  • Accessibility verified (contrast, keyboard navigation, screen reader friendly) – if applicable
  • Design review approved – optional, link to feedback if available
  • Documentation updated (if applicable) – docs repository

🚧 Tasks

  • ...

⚙️ API / Back‑end changes

  • ...
  • Unit and/or integration tests added – required for backend changes
  • Capabilities updated (if applicable) – if adding/modifying Nextcloud capabilities
  • Documentation updated (if applicable) - docs repository
  • API documentation updated with the command composer openapi if necessary

🚧 Tasks

  • ...

✅ Checklist

🤖 AI (if applicable)

  • The content of this PR was partially or fully generated using AI

Luis Amorim and others added 15 commits September 24, 2026 00:28
Split each Behat DB workflow into four feature-path shards so every
job gets a fresh PHP built-in server with a shorter suite lifetime,
reducing cURL 52 / server-death cascade risk under load.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
apt without -y hangs under act waiting for [Y/n] confirmation.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
mysqladmin ping without credentials logs Access denied for root
(using password: NO) and can leave the service unhealthy under act.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Fixed 4444/1025 host binds collide when act expands the shard matrix on
one Docker host. Publish container ports only, resolve them via
job.services on GHA, and use service DNS under ACT=true. Flatten shard
so --matrix shard:sign selects a single cell.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
act puts the job on host networking, so Docker DNS names like mariadb
do not resolve. Bind unique host ports per matrix cell and connect
through 127.0.0.1, matching GHA runner-job networking.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Early setup failures leave no data/nextcloud.log; keep the always()
diagnostic step non-fatal under act.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
act local checkout often leaves the 3rdparty gitlink empty, so composer
classmap fails on 3rdparty/composer. Clone the pinned submodule when
missing.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
RunServerListener uses ps to detect the PHP built-in server; act images
lack procps so isRunning() always fails. Also ensure the runner user
owns the Nextcloud tree when BEHAT_RUN_AS=runner under act.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
FeatureContext requires the Behat process UID to match file owner.
Under act, chown to runner then runuser so php -S and behat share one user.
Unset GITHUB_ACTIONS in that process to avoid sudo wrapping without NOPASSWD.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Sharding shortens suites but each cell still ran PhpBuiltin with
workers:10, which amplifies Empty-reply crashes under act/Docker.
Lower default workers to 2 (still enough for nested self-HTTP), set
BEHAT_WORKERS=2 in CI, and under act point Mailpit at the published
host UI port with verbose Behat output for diagnosis.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
localhost can resolve to ::1 while Guzzle prefers IPv4, so the built-in
server health check passes but every OCS call fails or cascades. Force
BEHAT_HOST=127.0.0.1, trust that domain in Nextcloud, and print php -S
process state with the nextcloud.log tail on failure.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Single-process php -S (no PHP_CLI_SERVER_WORKERS) to compare Empty-reply
behavior under act. Nested same-server HTTP may deadlock with workers 0.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
PhpBuiltin\RunServerListener still spawns via `php -S`, but the Behat
job prepends a PATH wrapper that runs FrankenPHP php-server on the same
listen address. CLI php (occ, behat) keeps using setup-php. Avoids the
experimental PHP_CLI_SERVER_WORKERS built-in server in CI/act only.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
FrankenPHP moved failures past request-signature onto inbox assertions.
Under act (host network) Nextcloud must send SMTP to 127.0.0.1 on the
published host port; GHA still uses mailpit:1025. Also set mail_smtpmode
and preflight Mailpit API/SMTP before Behat under act.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
act hits transient archive.ubuntu.com hash mismatches mid-mirror-sync.
Retry apt-get update up to 5 times before installing poppler/procps, and
make Print logs tolerate missing ps when that step never ran.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Luis Amorim <luisfelipeamorim@hotmail.com>
@lfals lfals closed this Sep 25, 2026
@lfals
lfals deleted the felps/behat-shard-matrix-66bd branch September 25, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants