-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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] Integrating NewSessionQueuer with Distributor. #8747
Conversation
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.
I see the way you're heading, and it makes sense, but there are some issues that need addressing. Notably, using exceptions for control flow is generally a code smell. Using the messages in exceptions for control flow is downright dangerous --- a casual developer has no idea of the importance of those messages, as they're normally assumed to be for humans to read.
I've also made a set of style nits --- I know we don't follow the style consistently on this project, but it'd be nice to follow the Google Style Guide for Java when we're coding, please.
java/server/src/org/openqa/selenium/grid/distributor/Distributor.java
Outdated
Show resolved
Hide resolved
java/server/src/org/openqa/selenium/grid/distributor/Distributor.java
Outdated
Show resolved
Hide resolved
java/server/src/org/openqa/selenium/grid/distributor/Distributor.java
Outdated
Show resolved
Hide resolved
java/server/src/org/openqa/selenium/grid/distributor/Distributor.java
Outdated
Show resolved
Hide resolved
java/server/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java
Outdated
Show resolved
Hide resolved
java/server/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java
Outdated
Show resolved
Hide resolved
java/server/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java
Outdated
Show resolved
Hide resolved
java/server/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java
Outdated
Show resolved
Hide resolved
java/server/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java
Outdated
Show resolved
Hide resolved
002bde9
to
421a2bd
Compare
java/server/src/org/openqa/selenium/grid/distributor/Distributor.java
Outdated
Show resolved
Hide resolved
java/server/src/org/openqa/selenium/grid/distributor/Distributor.java
Outdated
Show resolved
Hide resolved
java/server/src/org/openqa/selenium/grid/distributor/Distributor.java
Outdated
Show resolved
Hide resolved
java/server/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java
Outdated
Show resolved
Hide resolved
960b7a8
to
b695e3e
Compare
…in tests. Update LocalQueuer to get request timeout from config.
… in Distributor. Add RetrySessionRequestException.
…ondition for optional check to make it readable.
d7b77cb
to
8cad445
Compare
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
Integrated Distributor with the NewSessionQueuer.
Motivation and Context
A new session request is added to the queue by the NewSessionQueuer, the Distributor picks up the request and creates a session. The changes add the functionality where the Distributor has an event handler for the new session request. It also includes logic to retry if slots are busy or to reject a request immediately if no slots have the capability requested.
Types of changes
Checklist