SeleniumHQ / docker-selenium

Provides a simple way to run Selenium Grid with Chrome, Firefox, and Edge using Docker, making it easier to perform browser automation
http://www.selenium.dev/docker-selenium/
Other
7.86k stars 2.51k forks source link

[🐛 Bug]: ScaledObject errors out when ServiceName has been used - GKE #2231

Open gitissuepost opened 4 months ago

gitissuepost commented 4 months ago

What happened?

I have setup my Cluster in GKE. Attached are my Configs fro my cluser and selenium grid.

When I use the service name in my ScaledObject trigger, it doesn't instantiate the POD. However, if I use the ClusterIP directly, then only it works.

It should work with the service name as well unless I am missing anything. It adds the request to queue using the service name. Hence I am ruling out the connectivity issues with service name. However, it doesn't create a new node/pod that was suppossed to be spinned up by ScaledObject making the node available for execution.

image selenium-grid-config.txt

Command used to start Selenium Grid with Docker (or Kubernetes)

Added to description

Relevant log output

Attached in Description

Operating System

Kubernetes (GKE)

Docker Selenium version (image tag)

4.20

Selenium Grid chart version (chart version)

0.29

github-actions[bot] commented 4 months ago

@gitissuepost, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

VietND96 commented 4 months ago

How about if you try this config for the triggers as below?

  triggers:
    - type: selenium-grid
      metadata:
        browserName: chrome
        sessionBrowserName: chrome
        unsafeSsl: 'true'
        url: 'http://selenium-hub-ci:4444/graphql'
gitissuepost commented 4 months ago

@VietND96 - No luck.. It doesn't respond. I see the request in Queue to be assigned to a node. But my browser deployment doesn't splin up a pod. The script fails after 3 minute with a SessionNotCreatedException.

Moreover, I observed that using IP, creates a POD for me and keep it idle when the minReplica in ScaledObject and Replica count in deployment are 0. If I am not missing anything, I am expecting the deployment to be created/modified with out any pod available. Based on request, the pods should get splinned up dynamically

gitissuepost commented 4 months ago

Moreover, the test fails if the pod doesn't get spinned up with in 3 minutes. My ingress timeout has been set to 100 minutes.

image