Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "docker-composer.yml" file during the build #406

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

aik099
Copy link
Member

@aik099 aik099 commented Jan 11, 2025

Ported some changes from webdriver-classic-driver.

Copy link

codecov bot commented Jan 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.85%. Comparing base (bedccba) to head (93152d9).
Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #406      +/-   ##
============================================
+ Coverage     85.45%   85.85%   +0.39%     
  Complexity      182      182              
============================================
  Files             1        1              
  Lines           502      502              
============================================
+ Hits            429      431       +2     
+ Misses           73       71       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aik099
Copy link
Member Author

aik099 commented Jan 11, 2025

@uuf6429 , do you have an idea why this doesn't work?

When Selenium tries to load the http://host.docker.internal:8002/js_test.html page from the Docker container it gets the Unable to connect page back, which is generated either by Firefox or Selenium Server (see in log: https://github.com/minkphp/MinkSelenium2Driver/actions/runs/12723843225/job/35469480643?pr=406 ).

@uuf6429
Copy link
Member

uuf6429 commented Jan 11, 2025

@aik099 my first guess would be something related to config, since the xml files are also a bit different:

How I would troubleshoot it:

  1. I would check the "PHP builtin server" (that mink launches) log - not sure if we store that somewhere..
  2. since you set up the workflow for remote access, you can just docker exec -ti to get into the selenium container and ping that url you mentioned - if it works then probably it's some configuration problem

@aik099 aik099 force-pushed the use-docker-compose branch from 3c4eb4e to 360d6b0 Compare January 11, 2025 14:53
@aik099
Copy link
Member Author

aik099 commented Jan 11, 2025

@aik099 my first guess would be something related to config, since the xml files are also a bit different:

How I would troubleshoot it:

  1. I would check the "PHP builtin server" (that mink launches) log - not sure if we store that somewhere..
  2. since you set up the workflow for remote access, you can just docker exec -ti to get into the selenium container and ping that url you mentioned - if it works then probably it's some configuration problem

Thank you. The docker exec -ti d026a18ffd9d bash command revealed, that:

  • Web Server was started on a localhost:8002
  • docker container accessed Web Server via 172.17.0.1:8002

That fixed Selenium 2 image usage, however, the Selenium 3 images keep failing with a different error.

@aik099 aik099 force-pushed the use-docker-compose branch from c7c9029 to 93152d9 Compare January 11, 2025 15:33
@aik099
Copy link
Member Author

aik099 commented Jan 11, 2025

The Selenium 3 build is also fixed now.

Turned out, that the Selenium 3 container took a bit longer to start (then Selenium 2) and while ! nc -z localhost 4444 </dev/null; do echo Waiting for remote driver to start...; sleep 1; done command wasn't accounting for that (but I thought it should). The curl --retry 5 --retry-all-errors --retry-delay 1 --max-time 10 --head -X GET http://localhost:4444/wd/hub/status command, however, worked correctly. Mystery but it works now anyway.

@uuf6429 , Ready for review.

@aik099 aik099 requested a review from uuf6429 January 11, 2025 15:41
Copy link
Member

@uuf6429 uuf6429 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small comment - looks good otherwise.

@aik099 aik099 merged commit 906ea02 into minkphp:master Jan 11, 2025
11 of 12 checks passed
@aik099 aik099 deleted the use-docker-compose branch January 11, 2025 18:44
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