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

Dynamic Grid can be passed in the max number of managed sessions #1340

Closed
theddub opened this issue Jul 16, 2021 · 1 comment
Closed

Dynamic Grid can be passed in the max number of managed sessions #1340

theddub opened this issue Jul 16, 2021 · 1 comment

Comments

@theddub
Copy link
Contributor

theddub commented Jul 16, 2021

🚀 Feature Proposal

A clear and concise description of what the feature is.

So the Dynamic Grid spins up a number of sessions dynamically based on the number of available processors:

For example, using Docker Desktop with WSL2 on my local machine I get:
IE: "[NodeOptions.getSessionFactories] - Detected 4 available processors" thus spins up 4 sessions
It would be nice if we could pass in a max number of sessions in case we don't want to use all available processors for the dynamic grid for the selenium "hub".

Motivation

So the Dynamic Grid spins up a number of sessions dynamically based on the number of available processors:

IE: "[NodeOptions.getSessionFactories] - Detected 4 available processors" thus spins up 4 sessions
It would be nice if we could pass in a max number of sessions in case we don't want to use all available processors for the dynamic grid for the selenium "hub".

This is in case we want to limit the number of processors used as a resource. This is because besides the dynamic allocation, the Dynamic Grid feature is nice to manage the hub and sessions sent to be requested especially for a "standalone", or otherwise, scenario that could be used in a CI/CD sense. As the Dynamic Grid also reuses the sessions allocated in a nice managed way.

Example

Example command from your tutorial or GitHub repo:

docker run --rm --name selenium-docker -p 4444:4444
-v ${PWD}/config.toml:/opt/bin/config.toml
-v /path/on/your/host/machine:/opt/selenium/assets
selenium/standalone-docker:4.0.0-rc-1-prerelease-20210713

I would just put the max number of sessions and the manual override number of sessions in the config.toml configuration like:

[docker]
max-number-of-sessions = 2

@ghost ghost added the needs-triaging label Jul 16, 2021
@theddub theddub changed the title Dynamic Grid can be passed in the max or exact number of managed sessions Dynamic Grid can be passed in the max number of managed sessions Jul 16, 2021
@diemol
Copy link
Member

diemol commented Jul 28, 2021

This is fixed by the linked PR and I will close this because it is a duplicate of SeleniumHQ/selenium#9660.

When the PR is merged, we will do a pre-release a few days after.

@diemol diemol closed this as completed Jul 28, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants