[CI] Fix Panther tests Chrome user data directory conflict #18469
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves the "user data directory is already in use" error that causes all Panther tests to fail on Symfony 5.4 matrix jobs after upgrading to BuildTestAppAction v3.0.1.
The issue occurs because BuildTestAppAction v3.0.1 starts a background Chrome process (for Chromedriver on port 9222) without specifying a user-data-dir, which conflicts with Panther's Chrome instance attempting to use the same default directory.
Root Cause
The Sylius behat.yml.dist configuration was incorrectly placing Chrome arguments under
options.browser_arguments, which is completely ignored by the behat-panther-extension. The correct configuration path ismanager_options.capabilities.goog:chromeOptions.args.This configuration error was introduced in commit 04a222b and went unnoticed because it only manifested when BuildTestAppAction v3.0.1 removed the default Chrome installation (which was already running with a user-data-dir).
Changes
sessions.panther.panther.options.browser_arguments(ignored)sessions.panther.panther.manager_options.capabilities.goog:chromeOptions.args(correct)--user-data-dir=/tmp/panther-chrome-datato prevent conflicts with Chromedriver's Chrome instanceThis ensures Panther's Chrome process uses a unique user data directory, allowing it to run alongside BuildTestAppAction's Chrome instance without conflicts.
Technical Details
/tmp/chrome-chromedriver-behatin future versions)/tmp/panther-chrome-data