-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Make user defined SlotMatcher used everywhere in grid code #12240
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
Conversation
and where DefaultSlotMatcher is used without alternatives
…to issue_12234
Codecov ReportPatch and project coverage have no change.
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## trunk #12240 +/- ##
=======================================
Coverage 57.40% 57.40%
=======================================
Files 86 86
Lines 5369 5369
Branches 206 206
=======================================
Hits 3082 3082
Misses 2081 2081
Partials 206 206 ☔ View full report in Codecov by Sentry. |
diemol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR.
I think the code would work, but we are spreading the SlotMatcher class everywhere, and this is creating the need to serialize/de-serialize the class every time there is a Node heartbeat.
The problem is that we have put the SlotMatcher inside the Slot, and that is making things harder. I've seen that we could take out the SlotMatcher from the Slot and just pass it when the matching is needed. Let me do that change first, and I think this PR can get more compact. (A couple of conflicts will happen, sorry!)
|
Just pushed the changes. Ideally we only need to add the |
java/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java
Outdated
Show resolved
Hide resolved
java/src/org/openqa/selenium/grid/node/docker/DockerOptions.java
Outdated
Show resolved
Hide resolved
java/src/org/openqa/selenium/grid/node/docker/DockerSessionFactory.java
Outdated
Show resolved
Hide resolved
java/src/org/openqa/selenium/grid/node/local/LocalNodeFactory.java
Outdated
Show resolved
Hide resolved
|
Hello @diemol , is there something that blocks this PR ? I see that remote tests are failling, but looking at the logs, it seems it's not related to my changes Thanks |
|
I am having less time for Selenium these days. But I will get to this before the next release. |
diemol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine, but somehow we have a few failing tests. I will try to check why, maybe you have an idea why based on your changes?
diemol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @bhecquet !
Description
As discussed in issue #12234 , DefaultSlotMatcher can't be overriden is some parts of code even if 'slot-matcher' parameter is defined. This leads to situations where a slot is choosen (or rejected) based on the custom SlotMatcher, but then, when it's time to create the session, result is not the same when
slot.isSupporting()is called.Motivation and Context
This PR pushes any custom SlotMatcher everywhere DefaultSlotMatcher was hard coded. So, a new
slot-matcherparameter has been added for node so that distributor/router and node have consistent behaviour.Types of changes
Checklist
slot-matcherparameter for node. Default value is stillDefaultSlotMatcherSlot,LocalNodeFactoryandDockerSessionFactoryuse either the relevant distributor or node option to create a custom SlotMatcher