Skip to content

ci(behat): shard jobs and disable PHP server workers - #2

Open
lfals wants to merge 15 commits into
mainfrom
felps/behat-shard-workers-0
Open

lfals wants to merge 15 commits into
mainfrom
felps/behat-shard-workers-0

Conversation

@lfals

@lfals lfals commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Split each Behat DB workflow into four feature-path shards and run php -S with workers 0 so each job gets a shorter suite and a single-process server, reducing cURL 52 / server-death cascades.

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

Split each Behat DB workflow into four feature-path shards and run
php -S with workers 0 so each job gets a shorter suite and a
single-process server, reducing cURL 52 / server-death cascades.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
workers 0 deadlocked nested same-server HTTP for develop/pdf, so
Mailpit never received sign-notification emails. Keep shards and
use two workers so those fetches can complete.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Fork main is behind upstream. Bring in the Nextcloud IUserFolder
mock updates so PHPUnit CI can pass on this Behat shard branch.

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

# Conflicts:
#	tests/integration/config/behat.yml
The built-in server still dies with cURL 52 after sharding and
workers 2. Intercept PhpBuiltin's php -S in CI with FrankenPHP
php-server so concurrent and nested requests share a stable process.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
The PATH wrapper rewrote every php -S, so the TSA mock lost its /tsr
router and JSignPdf failed with 422. Only Nextcloud document roots now
go through FrankenPHP.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Skip FrankenPHP for one CI pass so the built-in server can fail with
cURL 52 under workers 2. Force BEHAT_VERBOSE=1 and keep the diagnostic
files on failure.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
The worker dies in zend_objects_store_del. Always install gdb so the
verbose listener and a failure step can dump bt full, and disable JIT
so the next core has a readable PHP frame.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Keep the php -S crash probe (workers 2, JIT off, verbose, gdb) while
going back to one Behat job per database so the flake can be compared
against the pre-shard layout.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Match the original PhpBuiltin config so the remaining crash probe
runs against the same worker count the flake was seen with.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
The flake is a php -S worker SIGSEGV, not app code. Restore the stock
Behat workflows and remove the unused FrankenPHP wrapper; workers stay
at 10 from behat.yml.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
The worker dies in zend_objects_store_del under JIT. Keep JIT on, run
only features/sign, and open the core with gdb + php-src zbacktrace so
the next crash names the PHP method.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
php -S workers SIGSEGV in zend_objects_store_del under JIT and drop
request-signature with cURL 52. FrankenPHP php-server has no worker
fork; TSA and fixture servers keep the real php -S.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
The parallel-done webhook returns 500 for lfals/libresign because
Coveralls is registered only on LibreSign/libresign. Keep the job on
upstream main and stop failing green PHPUnit runs on the fork.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Leave the upstream PHPUnit coverage job as-is. Coveralls 500 on this
fork is ignored.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Keep the built-in server. Cores die in zend_objects_store_del under a
JIT frame; turning JIT off removes that path instead of swapping servers.

Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
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.

1 participant