-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[grid][java]: dynamic grid re-fetch browser images if they were pruned during runtime #13821
Conversation
PR Description updated to latest commit (079cc93)
|
PR Review
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
@diemol, could you please review this? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## trunk #13821 +/- ##
==========================================
- Coverage 58.82% 58.72% -0.10%
==========================================
Files 86 86
Lines 5272 5298 +26
Branches 219 226 +7
==========================================
+ Hits 3101 3111 +10
- Misses 1952 1961 +9
- Partials 219 226 +7 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Motivation and Context
Fix: SeleniumHQ/docker-selenium#1644
Steps to reproduce:
docker image prune -a
Expected behavior:
Actual behavior:
Grid fails fatally trying to spin up a browser with the now missing image.
Types of changes
Checklist
Type
enhancement, bug_fix
Description
getImage()
inContainerConfig
to facilitate image retrieval.Changes walkthrough
ContainerConfig.java
Add Method to Retrieve Image from ContainerConfig
java/src/org/openqa/selenium/docker/ContainerConfig.java
getImage()
to retrieve the image from aContainerConfig
object.
CreateContainer.java
Implement Image Re-fetch Logic for Docker Containers
java/src/org/openqa/selenium/docker/v1_41/CreateContainer.java
apply
method to handle "No suchimage" DockerException.
createContainer
method to encapsulate container creationlogic.
PullImage
to fetch the image if it's not found locally beforeretrying container creation.