From eb4b5873ab76fe589bc2615c1711c1523b0deff0 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Wed, 26 Feb 2025 09:47:41 +0000 Subject: [PATCH 1/5] K8s: Bump new KEDA image for feature preview Signed-off-by: Viet Nguyen Duc --- .keda/README.md | 4 + .keda/scalers/selenium-grid-scaler.md | 65 ++++++++++++ .keda/scalers/selenium_grid_scaler.go | 57 +++++++---- .keda/scalers/selenium_grid_scaler_test.go | 113 ++++++++++++++++----- Makefile | 2 +- charts/selenium-grid/Chart.yaml | 2 +- 6 files changed, 191 insertions(+), 52 deletions(-) diff --git a/.keda/README.md b/.keda/README.md index 8de052b0c5..60ec1684db 100644 --- a/.keda/README.md +++ b/.keda/README.md @@ -49,6 +49,8 @@ You can involve to review and discuss the pull requests to help us early detect [kedacore/keda](https://github.com/kedacore/keda) +- https://github.com/kedacore/keda/pull/6570 (plan, v2.17.0) + - https://github.com/kedacore/keda/pull/6536 (plan, v2.17.0) - https://github.com/kedacore/keda/pull/6477 (plan, v2.17.0) @@ -61,6 +63,8 @@ You can involve to review and discuss the pull requests to help us early detect [kedacore/keda-docs](https://github.com/kedacore/keda-docs) +- https://github.com/kedacore/keda-docs/pull/1542 (plan, v2.17.0) + - https://github.com/kedacore/keda-docs/pull/1533 (plan, v2.17.0) - https://github.com/kedacore/keda-docs/pull/1522 (plan, v2.17.0) diff --git a/.keda/scalers/selenium-grid-scaler.md b/.keda/scalers/selenium-grid-scaler.md index d155347e5c..4e80dd8c20 100644 --- a/.keda/scalers/selenium-grid-scaler.md +++ b/.keda/scalers/selenium-grid-scaler.md @@ -39,6 +39,7 @@ triggers: - `activationThreshold` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds). (Default: `0`, Optional) - `platformName` - Name of the browser platform. Refer to the [Selenium Grid's](https://www.selenium.dev/documentation/en/getting_started_with_webdriver/browsers/) and [WebdriverIO's](https://webdriver.io/docs/options/#capabilities) documentation for more info. (Optional) - `nodeMaxSessions` - Number of maximum sessions that can run in parallel on a Node. Update this parameter align with node config `--max-sessions` (`SE_NODE_MAX_SESSIONS`) to have the correct scaling behavior. (Default: `1`, Optional). +- `enableManagedDownloads`- Set this for Node enabled to auto manage files downloaded for a given session on the Node. When the client requests enabling this feature, it can only be assigned to the Node that also enabled it. Otherwise, the request will wait until it timed out. (Default: `false`, Optional). - `capabilities` - Add more custom capabilities for matching specific Nodes. It should be in JSON string, see [example](https://www.selenium.dev/documentation/grid/configuration/toml_options/#setting-custom-capabilities-for-matching-specific-nodes) (Optional) **Trigger Authentication** @@ -224,6 +225,70 @@ options.set_capability('browserVersion', '131.0') driver = webdriver.Remote(options=options, command_executor=SELENIUM_GRID_URL) ``` +#### Selenium Grid scaler trigger metadata with Node `enableManagedDownloads` + +In image `selenium/node-chrome`, the environment variable `SE_NODE_ENABLE_MANAGED_DOWNLOADS` is used to append the `--enable-managed-downloads` CLI option to the Node. This option is used to enable the Node to auto manage files downloaded for a given session on the Node. The request with enabling this feature can only be assigned to the Node also enabled it, otherwise the request will be waited until request timed out. + +```yaml +kind: Deployment +metadata: + name: selenium-node-chrome + labels: + deploymentName: selenium-node-chrome +spec: + replicas: 1 + template: + spec: + containers: + - name: selenium-node-chrome + image: selenium/node-chrome:132.0 + ports: + - containerPort: 5555 + env: + - name: SE_NODE_BROWSER_VERSION + value: '132.0' + - name: SE_NODE_PLATFORM_NAME + value: 'Linux' + # https://www.selenium.dev/documentation/grid/configuration/cli_options/#node + - name: SE_NODE_ENABLE_MANAGED_DOWNLOADS + value: "true" + +--- + +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: selenium-grid-scaledobject-chrome-132 + namespace: keda + labels: + deploymentName: selenium-node-chrome-132 +spec: + maxReplicaCount: 8 + scaleTargetRef: + name: selenium-node-chrome-132 + triggers: + - type: selenium-grid + metadata: + url: 'http://selenium-hub:4444/graphql' + browserName: 'chrome' + platformName: 'Linux' + browserVersion: '132.0' + unsafeSsl: 'true' + # Scaler trigger param configuration should be aligned with Node stereotype. + enableManagedDownloads: "true" +``` + +The request to trigger this scaler should be + +```python +options = ChromeOptions() +options.set_capability('platformName', 'Linux') +options.set_capability('browserVersion', '132.0') +# https://www.selenium.dev/documentation/webdriver/drivers/remote_webdriver/#enable-downloads-in-the-grid +options.enable_downloads = True +driver = webdriver.Remote(options=options, command_executor=SELENIUM_GRID_URL) +``` + --- #### Selenium Grid scaler trigger metadata with extra `capabilities` diff --git a/.keda/scalers/selenium_grid_scaler.go b/.keda/scalers/selenium_grid_scaler.go index 8914dc25b8..727b2ba946 100644 --- a/.keda/scalers/selenium_grid_scaler.go +++ b/.keda/scalers/selenium_grid_scaler.go @@ -28,19 +28,20 @@ type seleniumGridScaler struct { type seleniumGridScalerMetadata struct { triggerIndex int - URL string `keda:"name=url, order=authParams;triggerMetadata"` - AuthType string `keda:"name=authType, order=authParams;resolvedEnv, optional"` - Username string `keda:"name=username, order=authParams;resolvedEnv, optional"` - Password string `keda:"name=password, order=authParams;resolvedEnv, optional"` - AccessToken string `keda:"name=accessToken, order=authParams;resolvedEnv, optional"` - BrowserName string `keda:"name=browserName, order=triggerMetadata, optional"` - SessionBrowserName string `keda:"name=sessionBrowserName, order=triggerMetadata, optional"` - BrowserVersion string `keda:"name=browserVersion, order=triggerMetadata, optional"` - PlatformName string `keda:"name=platformName, order=triggerMetadata, optional"` - ActivationThreshold int64 `keda:"name=activationThreshold, order=triggerMetadata, optional"` - UnsafeSsl bool `keda:"name=unsafeSsl, order=triggerMetadata, default=false"` - NodeMaxSessions int64 `keda:"name=nodeMaxSessions, order=triggerMetadata, default=1"` - Capabilities string `keda:"name=capabilities, order=triggerMetadata, optional"` + URL string `keda:"name=url, order=authParams;triggerMetadata"` + AuthType string `keda:"name=authType, order=authParams;resolvedEnv, optional"` + Username string `keda:"name=username, order=authParams;resolvedEnv, optional"` + Password string `keda:"name=password, order=authParams;resolvedEnv, optional"` + AccessToken string `keda:"name=accessToken, order=authParams;resolvedEnv, optional"` + BrowserName string `keda:"name=browserName, order=triggerMetadata, optional"` + SessionBrowserName string `keda:"name=sessionBrowserName, order=triggerMetadata, optional"` + BrowserVersion string `keda:"name=browserVersion, order=triggerMetadata, optional"` + PlatformName string `keda:"name=platformName, order=triggerMetadata, optional"` + ActivationThreshold int64 `keda:"name=activationThreshold, order=triggerMetadata, optional"` + UnsafeSsl bool `keda:"name=unsafeSsl, order=triggerMetadata, default=false"` + NodeMaxSessions int64 `keda:"name=nodeMaxSessions, order=triggerMetadata, default=1"` + EnableManagedDownloads bool `keda:"name=enableManagedDownloads, order=triggerMetadata, optional"` + Capabilities string `keda:"name=capabilities, order=triggerMetadata, optional"` TargetValue int64 } @@ -101,8 +102,10 @@ type Stereotypes []struct { Stereotype map[string]interface{} `json:"stereotype"` } +const EnableManagedDownloadsCapability = "se:downloadsEnabled" + var ExtensionCapabilitiesPrefixes = []string{"goog:", "moz:", "ms:", "se:"} -var FunctionCapabilitiesPrefixes = []string{"se:downloadsEnabled"} +var FunctionCapabilitiesPrefixes = []string{EnableManagedDownloadsCapability} // Follow pattern in https://github.com/SeleniumHQ/selenium/blob/trunk/java/src/org/openqa/selenium/grid/data/DefaultSlotMatcher.java func filterCapabilities(capabilities map[string]interface{}) map[string]interface{} { @@ -154,6 +157,16 @@ func NewSeleniumGridScaler(config *scalersconfig.ScalerConfig) (Scaler, error) { }, nil } +func parseCapabilitiesToMap(_capabilities string) (map[string]interface{}, error) { + capabilities := map[string]interface{}{} + if _capabilities != "" { + if err := json.Unmarshal([]byte(_capabilities), &capabilities); err != nil { + return nil, err + } + } + return capabilities, nil +} + func parseSeleniumGridScalerMetadata(config *scalersconfig.ScalerConfig) (*seleniumGridScalerMetadata, error) { meta := &seleniumGridScalerMetadata{ TargetValue: 1, @@ -242,7 +255,7 @@ func (s *seleniumGridScaler) getSessionsQueueLength(ctx context.Context, logger logger.Error(err, fmt.Sprintf("Error when reading Selenium Grid response body: %s", err)) return -1, -1, err } - newRequestNodes, onGoingSession, err := getCountFromSeleniumResponse(b, s.metadata.BrowserName, s.metadata.BrowserVersion, s.metadata.SessionBrowserName, s.metadata.PlatformName, s.metadata.NodeMaxSessions, s.metadata.Capabilities, logger) + newRequestNodes, onGoingSession, err := getCountFromSeleniumResponse(b, s.metadata.BrowserName, s.metadata.BrowserVersion, s.metadata.SessionBrowserName, s.metadata.PlatformName, s.metadata.NodeMaxSessions, s.metadata.EnableManagedDownloads, s.metadata.Capabilities, logger) if err != nil { logger.Error(err, fmt.Sprintf("Error when getting count from Selenium Grid response: %s", err)) return -1, -1, err @@ -370,7 +383,7 @@ func updateOrAddReservedNode(reservedNodes []ReservedNodes, nodeID string, slotC return append(reservedNodes, ReservedNodes{ID: nodeID, SlotCount: slotCount, MaxSession: maxSession}) } -func getCountFromSeleniumResponse(b []byte, browserName string, browserVersion string, sessionBrowserName string, platformName string, nodeMaxSessions int64, _capabilities string, logger logr.Logger) (int64, int64, error) { +func getCountFromSeleniumResponse(b []byte, browserName string, browserVersion string, sessionBrowserName string, platformName string, nodeMaxSessions int64, enableManagedDownloads bool, _capabilities string, logger logr.Logger) (int64, int64, error) { // Track number of available slots of existing Nodes in the Grid can be reserved for the matched requests var availableSlots int64 // Track number of matched requests in the sessions queue will be served by this scaler @@ -380,12 +393,12 @@ func getCountFromSeleniumResponse(b []byte, browserName string, browserVersion s if err := json.Unmarshal(b, &seleniumResponse); err != nil { return 0, 0, err } - capabilities := map[string]interface{}{} - if _capabilities != "" { - if err := json.Unmarshal([]byte(_capabilities), &capabilities); err != nil { - logger.Error(err, fmt.Sprintf("Error when unmarshaling trigger metadata 'capabilities': %s", err)) - return 0, 0, err - } + + capabilities, err := parseCapabilitiesToMap(_capabilities) + if err != nil { + logger.Error(err, fmt.Sprintf("Error when unmarshaling trigger metadata 'capabilities': %s", err)) + } else if enableManagedDownloads { + capabilities[EnableManagedDownloadsCapability] = true } var sessionQueueRequests = seleniumResponse.Data.SessionsInfo.SessionQueueRequests diff --git a/.keda/scalers/selenium_grid_scaler_test.go b/.keda/scalers/selenium_grid_scaler_test.go index add23d6f99..ea59871f12 100644 --- a/.keda/scalers/selenium_grid_scaler_test.go +++ b/.keda/scalers/selenium_grid_scaler_test.go @@ -11,13 +11,14 @@ import ( func Test_getCountFromSeleniumResponse(t *testing.T) { type args struct { - b []byte - browserName string - sessionBrowserName string - browserVersion string - platformName string - nodeMaxSessions int64 - capabilities string + b []byte + browserName string + sessionBrowserName string + browserVersion string + platformName string + nodeMaxSessions int64 + enableManagedDownloads bool + capabilities string } tests := []struct { name string @@ -1949,12 +1950,12 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { } } }`), - browserName: "chrome", - sessionBrowserName: "chrome", - browserVersion: "", - platformName: "linux", - nodeMaxSessions: 2, - capabilities: "{\"se:downloadsEnabled\": true}", + browserName: "chrome", + sessionBrowserName: "chrome", + browserVersion: "", + platformName: "linux", + nodeMaxSessions: 2, + enableManagedDownloads: true, }, wantNewRequestNodes: 1, wantOnGoingSessions: 1, @@ -2013,6 +2014,60 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { wantOnGoingSessions: 1, wantErr: false, }, + { + name: "4_sessions_requests_with_matching_browserName_and_platformName_when_set_extra_capabilities_and_mangaged_downloads_and_1_request_match_should_return_count_as_1_and_ongoing_1", + args: args{ + b: []byte(`{ + "data": { + "grid": { + "sessionCount": 1, + "maxSession": 1, + "totalSlots": 1 + }, + "nodesInfo": { + "nodes": [ + { + "id": "node-1", + "status": "UP", + "sessionCount": 1, + "maxSession": 1, + "slotCount": 1, + "stereotypes": "[{\"slots\": 1, \"stereotype\": {\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\", \"myApp:version\": \"beta\", \"myApp:scope\": \"internal\", \"se:downloadsEnabled\": true}}]", + "sessions": [ + { + "id": "session-1", + "capabilities": "{\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\", \"myApp:version\": \"beta\", \"myApp:scope\": \"internal\", \"se:downloadsEnabled\": true}", + "slot": { + "id": "9ce1edba-72fb-465e-b311-ee473d8d7b64", + "stereotype": "{\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\", \"myApp:version\": \"beta\", \"myApp:scope\": \"internal\", \"se:downloadsEnabled\": true}" + } + } + ] + } + ] + }, + "sessionsInfo": { + "sessionQueueRequests": [ + "{\n \"browserName\": \"chrome\",\n \"platformName\": \"linux\"\n}", + "{\n \"browserName\": \"chrome\",\n \"myApp:version\": \"beta\",\n \"platformName\": \"linux\"\n}", + "{\n \"browserName\": \"chrome\",\n \"myApp:version\": \"beta\",\n \"myApp:scope\": \"internal\",\n \"platformName\": \"linux\"\n}", + "{\n \"browserName\": \"chrome\",\n \"se:downloadsEnabled\": true,\n \"myApp:version\": \"beta\",\n \"myApp:scope\": \"internal\",\n \"platformName\": \"linux\"\n}", + "{\n \"browserName\": \"chrome\",\n \"platformName\": \"Windows 11\"\n}"] + } + } + }`), + browserName: "chrome", + sessionBrowserName: "chrome", + browserVersion: "", + platformName: "linux", + nodeMaxSessions: 1, + enableManagedDownloads: true, + capabilities: "{\"myApp:version\": \"beta\", \"myApp:scope\": \"internal\"}", + }, + wantNewRequestNodes: 1, + wantOnGoingSessions: 1, + wantErr: false, + }, { name: "Given_2_requests_include_1_without_browserVersion_When_scaler_metadata_explicit_name_version_platform_Then_scaler_should_scale_up_for_1_request_has_browserVersion_and_return_0_ongoing_sessions", args: args{ @@ -2972,7 +3027,7 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - newRequestNodes, onGoingSessions, err := getCountFromSeleniumResponse(tt.args.b, tt.args.browserName, tt.args.browserVersion, tt.args.sessionBrowserName, tt.args.platformName, tt.args.nodeMaxSessions, tt.args.capabilities, logr.Discard()) + newRequestNodes, onGoingSessions, err := getCountFromSeleniumResponse(tt.args.b, tt.args.browserName, tt.args.browserVersion, tt.args.sessionBrowserName, tt.args.platformName, tt.args.nodeMaxSessions, tt.args.enableManagedDownloads, tt.args.capabilities, logr.Discard()) if (err != nil) != tt.wantErr { t.Errorf("getCountFromSeleniumResponse() error = %v, wantErr %v", err, tt.wantErr) return @@ -3148,25 +3203,27 @@ func Test_parseSeleniumGridScalerMetadata(t *testing.T) { "password": "password", }, TriggerMetadata: map[string]string{ - "url": "http://selenium-hub:4444/graphql", - "browserName": "MicrosoftEdge", - "sessionBrowserName": "msedge", - "capabilities": "{\"se:downloadsEnabled\": true}", + "url": "http://selenium-hub:4444/graphql", + "browserName": "MicrosoftEdge", + "sessionBrowserName": "msedge", + "enableManagedDownloads": "true", + "capabilities": "{\"myApp:version\": \"beta\"}", }, }, }, wantErr: false, want: &seleniumGridScalerMetadata{ - URL: "http://selenium-hub:4444/graphql", - BrowserName: "MicrosoftEdge", - SessionBrowserName: "msedge", - TargetValue: 1, - BrowserVersion: "", - PlatformName: "", - Username: "username", - Password: "password", - NodeMaxSessions: 1, - Capabilities: "{\"se:downloadsEnabled\": true}", + URL: "http://selenium-hub:4444/graphql", + BrowserName: "MicrosoftEdge", + SessionBrowserName: "msedge", + TargetValue: 1, + BrowserVersion: "", + PlatformName: "", + Username: "username", + Password: "password", + NodeMaxSessions: 1, + EnableManagedDownloads: true, + Capabilities: "{\"myApp:version\": \"beta\"}", }, }, { diff --git a/Makefile b/Makefile index a75d41ca43..ffcb496d74 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ KEDA_TAG_PREV_VERSION := $(or $(KEDA_TAG_PREV_VERSION),$(KEDA_TAG_PREV_VERSION), KEDA_CORE_VERSION := $(or $(KEDA_CORE_VERSION),$(KEDA_CORE_VERSION),2.16.1) KEDA_TAG_VERSION := $(or $(KEDA_TAG_VERSION),$(KEDA_TAG_VERSION),2.16.1-selenium-grid) KEDA_BASED_NAME := $(or $(KEDA_BASED_NAME),$(KEDA_BASED_NAME),ndviet) -KEDA_BASED_TAG := $(or $(KEDA_BASED_TAG),$(KEDA_BASED_TAG),2.16.1-selenium-grid-20250210) +KEDA_BASED_TAG := $(or $(KEDA_BASED_TAG),$(KEDA_BASED_TAG),2.16.1-selenium-grid-20250225) TEST_PATCHED_KEDA := $(or $(TEST_PATCHED_KEDA),$(TEST_PATCHED_KEDA),true) all: hub \ diff --git a/charts/selenium-grid/Chart.yaml b/charts/selenium-grid/Chart.yaml index be29f01945..29fd6012f4 100644 --- a/charts/selenium-grid/Chart.yaml +++ b/charts/selenium-grid/Chart.yaml @@ -21,7 +21,7 @@ dependencies: - repository: https://prometheus-community.github.io/helm-charts version: 69.4.1 name: kube-prometheus-stack - condition: monitoring.enabled, prometheus-stack.enabled + condition: monitoring.enabled, kube-prometheus-stack.enabled - repository: https://charts.bitnami.com/bitnami version: 16.4.1 name: postgresql From d8d22946f67103ea9771a8b26b3a7455d3d45a95 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Wed, 26 Feb 2025 17:54:15 +0000 Subject: [PATCH 2/5] Update config for enableManagedDownloads Signed-off-by: Viet Nguyen Duc --- Makefile | 2 +- charts/selenium-grid/CONFIGURATION.md | 5 +++++ charts/selenium-grid/templates/_helpers.tpl | 7 +++++++ charts/selenium-grid/values.yaml | 10 ++++++++++ tests/charts/ci/DeploymentAutoscaling-values.yaml | 6 ++++-- tests/charts/ci/JobAutoscaling-values.yaml | 12 ++++-------- tests/charts/make/chart_test.sh | 8 -------- 7 files changed, 31 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index ffcb496d74..25e6b4014f 100644 --- a/Makefile +++ b/Makefile @@ -1004,7 +1004,7 @@ chart_test_autoscaling_job: chart_test_autoscaling_playwright_connect_grid: PLATFORMS=$(PLATFORMS) CHART_FULL_DISTRIBUTED_MODE=true CHART_ENABLE_BASIC_AUTH=true TEST_EXTERNAL_DATASTORE=redis MATRIX_TESTS=CDPTests TEST_PATCHED_KEDA=$(TEST_PATCHED_KEDA) TEST_MULTIPLE_PLATFORMS=true \ - BASIC_AUTH_USERNAME=docker-selenium BASIC_AUTH_PASSWORD=2NMI4jdBi6k7bENoeUfV25295VvzwAE9chM24a+2VL95uOHozo DISABLE_HPA_CAPABILITIES_SET=true \ + BASIC_AUTH_USERNAME=docker-selenium BASIC_AUTH_PASSWORD=2NMI4jdBi6k7bENoeUfV25295VvzwAE9chM24a+2VL95uOHozo \ SECURE_INGRESS_ONLY_DEFAULT=true SECURE_USE_EXTERNAL_CERT=true SELENIUM_GRID_PROTOCOL=https SELENIUM_GRID_HOST=$$(hostname -I | cut -d' ' -f1) SELENIUM_GRID_PORT=443 \ VERSION=$(TAG_VERSION) VIDEO_TAG=$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) KEDA_BASED_NAME=$(KEDA_BASED_NAME) KEDA_BASED_TAG=$(KEDA_BASED_TAG) NAMESPACE=$(NAMESPACE) BINDING_VERSION=$(BINDING_VERSION) BASE_VERSION=$(BASE_VERSION) \ TEMPLATE_OUTPUT_FILENAME="k8s_playwright_connect_grid_basicAuth_secureIngress_ingressPublicIP_autoScaling_patchKEDA.yaml" \ diff --git a/charts/selenium-grid/CONFIGURATION.md b/charts/selenium-grid/CONFIGURATION.md index 018cffbadf..54f25b9795 100644 --- a/charts/selenium-grid/CONFIGURATION.md +++ b/charts/selenium-grid/CONFIGURATION.md @@ -49,6 +49,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | global.seleniumGrid.affinity | object | `{}` | Specify affinity for all components, can be overridden individually | | global.seleniumGrid.topologySpreadConstraints | list | `[]` | Specify topologySpreadConstraints for all components, can be overridden individually | | global.seleniumGrid.nodeMaxSessions | int | `1` | Specify number of max sessions per node. Can be overridden by individual component (this is also set to scaler trigger parameter `nodeMaxSessions` if `autoscaling` is enabled) | +| global.seleniumGrid.nodeEnableManagedDownloads | bool | `false` | This causes the Node to auto manage files downloaded for a given session on the Node (https://www.selenium.dev/documentation/webdriver/drivers/remote_webdriver/#enable-downloads-in-the-grid) | | global.seleniumGrid.nodeRegisterPeriod | int | `120` | How long, in seconds, will the Node try to register to the Distributor for the first time. After this period is completed, the Node will not attempt to register again. | | global.seleniumGrid.nodeRegisterCycle | int | `5` | How often, in seconds, the Node will try to register itself for the first time to the Distributor. | | tls.create | bool | `true` | Create a Secret resource for TLS certificate and key. If using an external secret set to false and provide its name in `nameOverride` below | @@ -456,6 +457,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | chromeNode.extraVolumeMounts | list | `[]` | Extra volume mounts for chrome-node container | | chromeNode.extraVolumes | list | `[]` | Extra volumes for chrome-node pod | | chromeNode.nodeMaxSessions | string | `nil` | Override the number of max sessions per node | +| chromeNode.nodeEnableManagedDownloads | string | `nil` | Override the managed downloads in node | | chromeNode.nodeRegisterPeriod | string | `nil` | Override the same config at the global level | | chromeNode.nodeRegisterCycle | string | `nil` | Override the same config at the global level | | chromeNode.scaledOptions | string | `nil` | Override the scaled options for chrome nodes | @@ -513,6 +515,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | firefoxNode.extraVolumeMounts | list | `[]` | Extra volume mounts for firefox-node container | | firefoxNode.extraVolumes | list | `[]` | Extra volumes for firefox-node pod | | firefoxNode.nodeMaxSessions | string | `nil` | Override the number of max sessions per node | +| firefoxNode.nodeEnableManagedDownloads | string | `nil` | Override the managed downloads in node | | firefoxNode.nodeRegisterPeriod | string | `nil` | Override the same config at the global level | | firefoxNode.nodeRegisterCycle | string | `nil` | Override the same config at the global level | | firefoxNode.scaledOptions | string | `nil` | Override the scaled options for firefox nodes | @@ -570,6 +573,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | edgeNode.extraVolumeMounts | list | `[]` | Extra volume mounts for edge-node container | | edgeNode.extraVolumes | list | `[]` | Extra volumes for edge-node pod | | edgeNode.nodeMaxSessions | string | `nil` | Override the number of max sessions per node | +| edgeNode.nodeEnableManagedDownloads | string | `nil` | Override the managed downloads in node | | edgeNode.nodeRegisterPeriod | string | `nil` | Override the same config at the global level | | edgeNode.nodeRegisterCycle | string | `nil` | Override the same config at the global level | | edgeNode.scaledOptions | string | `nil` | Override the scaled options for edge nodes | @@ -627,6 +631,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | relayNode.extraVolumeMounts | list | `[]` | Extra volume mounts for relay-node container | | relayNode.extraVolumes | list | `[]` | Extra volumes for relay-node pod | | relayNode.nodeMaxSessions | string | `nil` | Override the number of max sessions per node | +| relayNode.nodeEnableManagedDownloads | string | `nil` | Override the managed downloads in node | | relayNode.nodeRegisterPeriod | string | `nil` | Override the same config at the global level | | relayNode.nodeRegisterCycle | string | `nil` | Override the same config at the global level | | relayNode.scaledOptions | string | `nil` | Override the scaled options for relay nodes | diff --git a/charts/selenium-grid/templates/_helpers.tpl b/charts/selenium-grid/templates/_helpers.tpl index ac62ba77db..a781fa981f 100644 --- a/charts/selenium-grid/templates/_helpers.tpl +++ b/charts/selenium-grid/templates/_helpers.tpl @@ -208,6 +208,7 @@ Common autoscaling spec template {{- define "seleniumGrid.autoscalingTemplate" -}} {{- $spec := toYaml (dict) -}} {{- $nodeMaxSessions := default $.Values.global.seleniumGrid.nodeMaxSessions .node.nodeMaxSessions | int64 -}} +{{- $nodeEnableManagedDownloads := default $.Values.global.seleniumGrid.nodeEnableManagedDownloads .node.nodeEnableManagedDownloads -}} {{/* Merge with precedence from right to left */}} {{- with $.Values.autoscaling.scaledOptions -}} {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} @@ -245,6 +246,9 @@ triggers: {{- if not .nodeMaxSessions }} nodeMaxSessions: {{ $nodeMaxSessions | quote }} {{- end }} + {{- if not .enableManagedDownloads }} + enableManagedDownloads: {{ $nodeEnableManagedDownloads | quote }} + {{- end }} {{- end }} authenticationRef: name: {{ template "seleniumGrid.autoscaling.authenticationRef.fullname" $ }} @@ -284,6 +288,7 @@ Common pod template {{- $videoImageRegistry := default $.Values.global.seleniumGrid.imageRegistry .recorder.imageRegistry -}} {{- $videoImageTag := default $.Values.global.seleniumGrid.videoImageTag .recorder.imageTag -}} {{- $nodeMaxSessions := default $.Values.global.seleniumGrid.nodeMaxSessions .node.nodeMaxSessions | int64 -}} +{{- $nodeEnableManagedDownloads := default $.Values.global.seleniumGrid.nodeEnableManagedDownloads .node.nodeEnableManagedDownloads -}} {{- $nodeRegisterPeriod := default $.Values.global.seleniumGrid.nodeRegisterPeriod .node.nodeRegisterPeriod | int64 -}} {{- $nodeRegisterCycle := default $.Values.global.seleniumGrid.nodeRegisterCycle .node.nodeRegisterCycle | int64 -}} template: @@ -353,6 +358,8 @@ template: - name: SE_NODE_OVERRIDE_MAX_SESSIONS value: "true" {{- end }} + - name: SE_NODE_ENABLE_MANAGED_DOWNLOADS + value: {{ $nodeEnableManagedDownloads | quote }} - name: SE_DRAIN_AFTER_SESSION_COUNT value: {{ and (eq (include "seleniumGrid.useKEDA" $) "true") (eq .Values.autoscaling.scalingType "job") | ternary $nodeMaxSessions 0 | quote }} {{- if and (eq (include "seleniumGrid.useKEDA" $) "true") }} diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 421e287490..f52f8ae6ee 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -50,6 +50,8 @@ global: # Note: If not define labelSelector, it will be added automatically based on "app" label in each component # -- Specify number of max sessions per node. Can be overridden by individual component (this is also set to scaler trigger parameter `nodeMaxSessions` if `autoscaling` is enabled) nodeMaxSessions: 1 + # -- This causes the Node to auto manage files downloaded for a given session on the Node (https://www.selenium.dev/documentation/webdriver/drivers/remote_webdriver/#enable-downloads-in-the-grid) + nodeEnableManagedDownloads: false # -- How long, in seconds, will the Node try to register to the Distributor for the first time. After this period is completed, the Node will not attempt to register again. nodeRegisterPeriod: 120 # -- How often, in seconds, the Node will try to register itself for the first time to the Distributor. @@ -1263,6 +1265,8 @@ chromeNode: # -- Override the number of max sessions per node nodeMaxSessions: + # -- Override the managed downloads in node + nodeEnableManagedDownloads: # -- Override the same config at the global level nodeRegisterPeriod: # -- Override the same config at the global level @@ -1458,6 +1462,8 @@ firefoxNode: # -- Override the number of max sessions per node nodeMaxSessions: + # -- Override the managed downloads in node + nodeEnableManagedDownloads: # -- Override the same config at the global level nodeRegisterPeriod: # -- Override the same config at the global level @@ -1652,6 +1658,8 @@ edgeNode: # -- Override the number of max sessions per node nodeMaxSessions: + # -- Override the managed downloads in node + nodeEnableManagedDownloads: # -- Override the same config at the global level nodeRegisterPeriod: # -- Override the same config at the global level @@ -1846,6 +1854,8 @@ relayNode: # -- Override the number of max sessions per node nodeMaxSessions: + # -- Override the managed downloads in node + nodeEnableManagedDownloads: # -- Override the same config at the global level nodeRegisterPeriod: # -- Override the same config at the global level diff --git a/tests/charts/ci/DeploymentAutoscaling-values.yaml b/tests/charts/ci/DeploymentAutoscaling-values.yaml index a7c4beb9f2..cb0b103c5f 100644 --- a/tests/charts/ci/DeploymentAutoscaling-values.yaml +++ b/tests/charts/ci/DeploymentAutoscaling-values.yaml @@ -1,3 +1,7 @@ +global: + seleniumGrid: + nodeEnableManagedDownloads: ${SELENIUM_ENABLE_MANAGED_DOWNLOADS} + autoscaling: scalingType: deployment scaledOptions: @@ -37,8 +41,6 @@ chromeNode: value: "--disable-features=OptimizationGuideModelDownloading,OptimizationHintsFetching,OptimizationTargetPrediction,OptimizationHints" - name: SE_BROWSER_ARGS_DISABLE_SEARCH_ENGINE value: "--disable-search-engine-choice-screen" - - name: SE_NODE_ENABLE_MANAGED_DOWNLOADS - value: "${SELENIUM_ENABLE_MANAGED_DOWNLOADS}" - name: SE_VNC_NO_PASSWORD value: "true" - name: SE_SCREEN_WIDTH diff --git a/tests/charts/ci/JobAutoscaling-values.yaml b/tests/charts/ci/JobAutoscaling-values.yaml index 5ed2394ab4..d19412cc17 100644 --- a/tests/charts/ci/JobAutoscaling-values.yaml +++ b/tests/charts/ci/JobAutoscaling-values.yaml @@ -1,3 +1,7 @@ +global: + seleniumGrid: + nodeEnableManagedDownloads: ${SELENIUM_ENABLE_MANAGED_DOWNLOADS} + autoscaling: scalingType: job scaledJobOptions: @@ -12,8 +16,6 @@ autoscaling: # Configuration for chrome nodes chromeNode: extraEnvironmentVariables: &extraEnvironmentVariables - - name: SE_NODE_ENABLE_MANAGED_DOWNLOADS - value: "${SELENIUM_ENABLE_MANAGED_DOWNLOADS}" - name: SE_VNC_NO_PASSWORD value: "true" - name: SE_SCREEN_WIDTH @@ -30,8 +32,6 @@ chromeNode: enabled: &readinessProbe false livenessProbe: enabled: &livenessProbe true - hpa: - capabilities: "{\"se:downloadsEnabled\": ${SELENIUM_ENABLE_MANAGED_DOWNLOADS}}" # Configuration for edge nodes edgeNode: extraEnvironmentVariables: *extraEnvironmentVariables @@ -39,8 +39,6 @@ edgeNode: enabled: *readinessProbe livenessProbe: enabled: *livenessProbe - hpa: - capabilities: "{\"se:downloadsEnabled\": ${SELENIUM_ENABLE_MANAGED_DOWNLOADS}}" # Configuration for firefox nodes firefoxNode: extraEnvironmentVariables: *extraEnvironmentVariables @@ -48,5 +46,3 @@ firefoxNode: enabled: *readinessProbe livenessProbe: enabled: *livenessProbe - hpa: - capabilities: "{\"se:downloadsEnabled\": ${SELENIUM_ENABLE_MANAGED_DOWNLOADS}}" diff --git a/tests/charts/make/chart_test.sh b/tests/charts/make/chart_test.sh index 5c4d960e8c..2be142ac1c 100755 --- a/tests/charts/make/chart_test.sh +++ b/tests/charts/make/chart_test.sh @@ -187,14 +187,6 @@ if [ -n "${TRACING_EXPORTER_ENDPOINT}" ]; then " fi -if [ "${DISABLE_HPA_CAPABILITIES_SET}" = "true" ]; then - HELM_COMMAND_SET_IMAGES="${HELM_COMMAND_SET_IMAGES} \ - --set chromeNode.hpa.capabilities=null \ - --set edgeNode.hpa.capabilities=null \ - --set firefoxNode.hpa.capabilities=null \ - " -fi - if [ "${SELENIUM_GRID_AUTOSCALING}" = "true" ] && [ "${TEST_EXISTING_KEDA}" = "true" ]; then HELM_COMMAND_SET_IMAGES="${HELM_COMMAND_SET_IMAGES} \ --set autoscaling.enabled=false \ From 8549f5d02907740a8d5b31ba986845e25647d5bc Mon Sep 17 00:00:00 2001 From: Selenium CI Bot Date: Wed, 26 Feb 2025 19:28:35 +0000 Subject: [PATCH 3/5] [ci] Upload autoscaling in K8s test results [skip ci] --- ...s_test_k8s_autoscaling_deployment_count.md | 40 +++++++++---------- ...s_autoscaling_deployment_count_in_chaos.md | 40 +++++++++---------- ...deployment_count_with_node_max_sessions.md | 40 +++++++++---------- ..._autoscaling_job_count_strategy_default.md | 40 +++++++++---------- ...ing_job_count_strategy_default_in_chaos.md | 40 +++++++++---------- ...strategy_default_with_node_max_sessions.md | 40 +++++++++---------- 6 files changed, 120 insertions(+), 120 deletions(-) diff --git a/.keda/results_test_k8s_autoscaling_deployment_count.md b/.keda/results_test_k8s_autoscaling_deployment_count.md index 1258520fd3..a57292d563 100644 --- a/.keda/results_test_k8s_autoscaling_deployment_count.md +++ b/.keda/results_test_k8s_autoscaling_deployment_count.md @@ -1,22 +1,22 @@ | Iteration | New request sessions | Sessions created time | Sessions failed to create | New pods scaled up | Total running sessions | Total running pods | Max sessions per pod | Gaps | Sessions closed | | --------- | -------------------- | --------------------- | ------------------------- | ------------------ | ---------------------- | ------------------ | -------------------- | ---- | --------------- | -| 1 | 2 | 39.74 s | 0 | 2 | 2 | 2 | 1 | 0 | 2 | -| 2 | 2 | 39.03 s | 0 | 1 | 2 | 3 | 1 | 1 | 0 | -| 3 | 3 | 37.15 s | 0 | 2 | 5 | 5 | 1 | 0 | 0 | -| 4 | 2 | 41.82 s | 0 | 2 | 7 | 7 | 1 | 0 | 0 | -| 5 | 3 | 31.94 s | 0 | 3 | 10 | 10 | 1 | 0 | 0 | -| 6 | 1 | 43.87 s | 0 | 1 | 11 | 11 | 1 | 0 | 11 | -| 7 | 2 | 14.33 s | 0 | 0 | 2 | 11 | 1 | 9 | 0 | -| 8 | 3 | 13.85 s | 0 | 0 | 5 | 11 | 1 | 6 | 0 | -| 9 | 1 | 4.96 s | 0 | 0 | 6 | 11 | 1 | 5 | 0 | -| 10 | 1 | 4.99 s | 0 | 0 | 7 | 11 | 1 | 4 | 0 | -| 11 | 1 | 6.82 s | 0 | 0 | 8 | 11 | 1 | 3 | 8 | -| 12 | 3 | 13.87 s | 0 | 0 | 3 | 11 | 1 | 8 | 0 | -| 13 | 3 | 13.72 s | 0 | 0 | 6 | 11 | 1 | 5 | 0 | -| 14 | 2 | 46.82 s | 0 | 1 | 8 | 12 | 1 | 4 | 0 | -| 15 | 1 | 6.90 s | 0 | 0 | 9 | 12 | 1 | 3 | 0 | -| 16 | 2 | 30.70 s | 0 | 0 | 11 | 12 | 1 | 1 | 11 | -| 17 | 2 | 14.22 s | 0 | 0 | 2 | 12 | 1 | 10 | 0 | -| 18 | 2 | 5.97 s | 0 | 0 | 4 | 12 | 1 | 8 | 0 | -| 19 | 1 | 4.91 s | 0 | 0 | 5 | 12 | 1 | 7 | 0 | -| 20 | 1 | 6.39 s | 0 | 0 | 6 | 12 | 1 | 6 | 0 | \ No newline at end of file +| 1 | 3 | 44.69 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 2 | 3 | 13.48 s | 0 | 0 | 3 | 3 | 1 | 0 | 0 | +| 3 | 1 | 38.04 s | 0 | 1 | 4 | 4 | 1 | 0 | 0 | +| 4 | 2 | 40.46 s | 0 | 2 | 6 | 6 | 1 | 0 | 0 | +| 5 | 2 | 41.35 s | 0 | 2 | 8 | 8 | 1 | 0 | 0 | +| 6 | 2 | 40.06 s | 0 | 2 | 10 | 10 | 1 | 0 | 10 | +| 7 | 2 | 14.33 s | 0 | 0 | 2 | 10 | 1 | 8 | 0 | +| 8 | 1 | 14.18 s | 0 | 0 | 3 | 10 | 1 | 7 | 0 | +| 9 | 2 | 7.38 s | 0 | 0 | 5 | 10 | 1 | 5 | 0 | +| 10 | 2 | 7.38 s | 0 | 0 | 7 | 10 | 1 | 3 | 0 | +| 11 | 1 | 5.07 s | 0 | 0 | 8 | 10 | 1 | 2 | 8 | +| 12 | 1 | 15.03 s | 0 | 0 | 1 | 10 | 1 | 9 | 0 | +| 13 | 3 | 7.91 s | 0 | 0 | 4 | 10 | 1 | 6 | 0 | +| 14 | 3 | 33.14 s | 0 | 1 | 7 | 11 | 1 | 4 | 0 | +| 15 | 1 | 14.30 s | 0 | 0 | 8 | 11 | 1 | 3 | 0 | +| 16 | 3 | 41.38 s | 0 | 3 | 11 | 11 | 1 | 0 | 11 | +| 17 | 2 | 5.35 s | 0 | 0 | 2 | 11 | 1 | 9 | 0 | +| 18 | 2 | 14.37 s | 0 | 0 | 4 | 11 | 1 | 7 | 0 | +| 19 | 1 | 15.08 s | 0 | 0 | 5 | 11 | 1 | 6 | 0 | +| 20 | 3 | 49.11 s | 0 | 1 | 8 | 12 | 1 | 4 | 0 | \ No newline at end of file diff --git a/.keda/results_test_k8s_autoscaling_deployment_count_in_chaos.md b/.keda/results_test_k8s_autoscaling_deployment_count_in_chaos.md index ee8cd5732e..b1101a6959 100644 --- a/.keda/results_test_k8s_autoscaling_deployment_count_in_chaos.md +++ b/.keda/results_test_k8s_autoscaling_deployment_count_in_chaos.md @@ -1,22 +1,22 @@ | Iteration | New request sessions | Sessions created time | Sessions failed to create | New pods scaled up | Total running sessions | Total running pods | Max sessions per pod | Gaps | Sessions closed | | --------- | -------------------- | --------------------- | ------------------------- | ------------------ | ---------------------- | ------------------ | -------------------- | ---- | --------------- | -| 1 | 6 | 58.42 s | 0 | 6 | 6 | 6 | 1 | 0 | 6 | -| 2 | 4 | 28.58 s | 0 | 1 | 4 | 7 | 1 | 3 | 4 | -| 3 | 6 | 13.46 s | 0 | 0 | 6 | 7 | 1 | 1 | 6 | -| 4 | 3 | 13.18 s | 0 | 0 | 3 | 7 | 1 | 4 | 3 | -| 5 | 6 | 52.92 s | 0 | 3 | 6 | 10 | 1 | 4 | 6 | -| 6 | 6 | 34.61 s | 0 | 1 | 6 | 11 | 1 | 5 | 6 | -| 7 | 4 | 13.40 s | 0 | 0 | 4 | 11 | 1 | 7 | 4 | -| 8 | 3 | 6.88 s | 0 | 0 | 3 | 11 | 1 | 8 | 3 | -| 9 | 4 | 6.87 s | 0 | 0 | 4 | 11 | 1 | 7 | 4 | -| 10 | 6 | 13.73 s | 0 | 0 | 6 | 11 | 1 | 5 | 6 | -| 11 | 3 | 12.84 s | 0 | 0 | 3 | 11 | 1 | 8 | 3 | -| 12 | 4 | 7.10 s | 0 | 0 | 4 | 11 | 1 | 7 | 3 | -| 13 | 3 | 12.33 s | 0 | 0 | 4 | 11 | 1 | 7 | 4 | -| 14 | 6 | 47.84 s | 0 | 1 | 6 | 9 | 1 | 3 | 6 | -| 15 | 4 | 38.24 s | 0 | 1 | 4 | 10 | 1 | 6 | 4 | -| 16 | 3 | 13.47 s | 0 | 0 | 3 | 10 | 1 | 7 | 3 | -| 17 | 3 | 12.70 s | 0 | 0 | 3 | 10 | 1 | 7 | 3 | -| 18 | 3 | 15.10 s | 0 | 0 | 3 | 10 | 1 | 7 | 3 | -| 19 | 5 | 16.24 s | 0 | 0 | 5 | 9 | 1 | 4 | 5 | -| 20 | 4 | 13.44 s | 0 | 0 | 4 | 8 | 1 | 4 | 4 | \ No newline at end of file +| 1 | 4 | 57.26 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | +| 2 | 4 | 41.11 s | 0 | 2 | 4 | 6 | 1 | 2 | 4 | +| 3 | 3 | 6.93 s | 0 | 0 | 3 | 6 | 1 | 3 | 3 | +| 4 | 5 | 44.98 s | 0 | 3 | 5 | 9 | 1 | 4 | 5 | +| 5 | 4 | 14.10 s | 0 | 0 | 4 | 9 | 1 | 5 | 4 | +| 6 | 6 | 38.45 s | 0 | 1 | 6 | 10 | 1 | 4 | 6 | +| 7 | 4 | 13.80 s | 0 | 0 | 4 | 10 | 1 | 6 | 4 | +| 8 | 6 | 14.17 s | 0 | 0 | 6 | 10 | 1 | 4 | 6 | +| 9 | 5 | 14.94 s | 0 | 0 | 5 | 10 | 1 | 5 | 5 | +| 10 | 6 | 48.45 s | 0 | 1 | 6 | 11 | 1 | 5 | 3 | +| 11 | 3 | 42.64 s | 0 | 2 | 6 | 11 | 1 | 5 | 6 | +| 12 | 4 | 14.88 s | 0 | 0 | 4 | 11 | 1 | 7 | 4 | +| 13 | 5 | 13.35 s | 0 | 0 | 5 | 10 | 1 | 5 | 5 | +| 14 | 3 | 7.37 s | 0 | 0 | 3 | 10 | 1 | 7 | 3 | +| 15 | 3 | 4.99 s | 0 | 0 | 3 | 10 | 1 | 7 | 3 | +| 16 | 6 | 13.80 s | 0 | 0 | 6 | 10 | 1 | 4 | 3 | +| 17 | 6 | 38.17 s | 0 | 2 | 9 | 12 | 1 | 3 | 6 | +| 18 | 5 | 13.32 s | 0 | 0 | 8 | 12 | 1 | 4 | 7 | +| 19 | 3 | 14.14 s | 0 | -2 | 4 | 10 | 1 | 6 | 4 | +| 20 | 6 | 13.28 s | 0 | 0 | 6 | 10 | 1 | 4 | 3 | \ No newline at end of file diff --git a/.keda/results_test_k8s_autoscaling_deployment_count_with_node_max_sessions.md b/.keda/results_test_k8s_autoscaling_deployment_count_with_node_max_sessions.md index 29fffba11c..4011b56b0a 100644 --- a/.keda/results_test_k8s_autoscaling_deployment_count_with_node_max_sessions.md +++ b/.keda/results_test_k8s_autoscaling_deployment_count_with_node_max_sessions.md @@ -1,22 +1,22 @@ | Iteration | New request sessions | Sessions created time | Sessions failed to create | New pods scaled up | Total running sessions | Total running pods | Max sessions per pod | Gaps | Sessions closed | | --------- | -------------------- | --------------------- | ------------------------- | ------------------ | ---------------------- | ------------------ | -------------------- | ---- | --------------- | -| 1 | 3 | 44.48 s | 0 | 2 | 3 | 2 | 3 | 3 | 3 | -| 2 | 2 | 16.45 s | 0 | 0 | 2 | 2 | 3 | 4 | 0 | -| 3 | 2 | 46.62 s | 0 | 2 | 4 | 5 | 3 | 11 | 0 | -| 4 | 1 | 10.26 s | 0 | 1 | 5 | 6 | 3 | 13 | 0 | -| 5 | 1 | 10.21 s | 0 | 1 | 6 | 7 | 3 | 15 | 0 | -| 6 | 3 | 10.32 s | 0 | 0 | 9 | 7 | 3 | 12 | 9 | -| 7 | 2 | 13.59 s | 0 | 0 | 2 | 10 | 3 | 28 | 0 | -| 8 | 1 | 5.54 s | 0 | 0 | 3 | 10 | 3 | 27 | 0 | -| 9 | 3 | 15.14 s | 0 | 2 | 6 | 12 | 3 | 30 | 0 | -| 10 | 2 | 16.27 s | 0 | 1 | 8 | 13 | 3 | 31 | 0 | -| 11 | 1 | 6.24 s | 0 | 0 | 9 | 13 | 3 | 30 | 9 | -| 12 | 1 | 8.35 s | 0 | 0 | 1 | 13 | 3 | 38 | 0 | -| 13 | 1 | 6.11 s | 0 | 0 | 2 | 13 | 3 | 37 | 0 | -| 14 | 1 | 5.87 s | 0 | 0 | 3 | 13 | 3 | 36 | 0 | -| 15 | 1 | 6.72 s | 0 | 0 | 4 | 13 | 3 | 35 | 0 | -| 16 | 1 | 16.36 s | 0 | 0 | 5 | 13 | 3 | 34 | 5 | -| 17 | 1 | 5.20 s | 0 | 0 | 1 | 9 | 3 | 26 | 0 | -| 18 | 2 | 12.65 s | 0 | 0 | 3 | 9 | 3 | 24 | 0 | -| 19 | 1 | 4.55 s | 0 | 0 | 4 | 9 | 3 | 23 | 0 | -| 20 | 3 | 13.34 s | 0 | 0 | 7 | 9 | 3 | 20 | 0 | \ No newline at end of file +| 1 | 1 | 0.08 s | 1 | 0 | 0 | 0 | 3 | 0 | 0 | +| 2 | 1 | 40.81 s | 0 | 1 | 1 | 1 | 3 | 2 | 0 | +| 3 | 1 | 52.72 s | 0 | 1 | 2 | 2 | 3 | 4 | 0 | +| 4 | 3 | 44.05 s | 0 | 2 | 5 | 4 | 3 | 7 | 0 | +| 5 | 2 | 18.00 s | 0 | 2 | 7 | 7 | 3 | 14 | 0 | +| 6 | 3 | 18.68 s | 0 | 2 | 10 | 9 | 3 | 17 | 10 | +| 7 | 1 | 16.99 s | 0 | 0 | 1 | 9 | 3 | 26 | 0 | +| 8 | 2 | 14.09 s | 0 | 0 | 3 | 9 | 3 | 24 | 0 | +| 9 | 3 | 7.93 s | 0 | 0 | 6 | 9 | 3 | 21 | 0 | +| 10 | 1 | 14.16 s | 0 | 0 | 7 | 10 | 3 | 23 | 0 | +| 11 | 2 | 18.09 s | 0 | 2 | 9 | 12 | 3 | 27 | 9 | +| 12 | 2 | 16.61 s | 0 | 0 | 2 | 12 | 3 | 34 | 0 | +| 13 | 2 | 10.58 s | 0 | 0 | 4 | 12 | 3 | 32 | 0 | +| 14 | 1 | 4.84 s | 0 | 0 | 5 | 12 | 3 | 31 | 0 | +| 15 | 1 | 7.01 s | 0 | 0 | 6 | 12 | 3 | 30 | 0 | +| 16 | 3 | 13.69 s | 0 | -1 | 9 | 11 | 3 | 24 | 9 | +| 17 | 3 | 7.37 s | 0 | 0 | 3 | 11 | 3 | 30 | 0 | +| 18 | 1 | 13.59 s | 0 | 0 | 4 | 11 | 3 | 29 | 0 | +| 19 | 3 | 14.45 s | 0 | 0 | 7 | 11 | 3 | 26 | 0 | +| 20 | 3 | 6.84 s | 0 | 1 | 10 | 12 | 3 | 26 | 0 | \ No newline at end of file diff --git a/.keda/results_test_k8s_autoscaling_job_count_strategy_default.md b/.keda/results_test_k8s_autoscaling_job_count_strategy_default.md index 036a203b96..ae0d94a732 100644 --- a/.keda/results_test_k8s_autoscaling_job_count_strategy_default.md +++ b/.keda/results_test_k8s_autoscaling_job_count_strategy_default.md @@ -1,22 +1,22 @@ | Iteration | New request sessions | Sessions created time | Sessions failed to create | New pods scaled up | Total running sessions | Total running pods | Max sessions per pod | Gaps | Sessions closed | | --------- | -------------------- | --------------------- | ------------------------- | ------------------ | ---------------------- | ------------------ | -------------------- | ---- | --------------- | -| 1 | 1 | 35.13 s | 0 | 1 | 1 | 1 | 1 | 0 | 1 | -| 2 | 1 | 43.07 s | 0 | 1 | 1 | 1 | 1 | 0 | 0 | -| 3 | 1 | 42.94 s | 0 | 1 | 2 | 2 | 1 | 0 | 0 | -| 4 | 2 | 45.04 s | 0 | 2 | 4 | 4 | 1 | 0 | 0 | -| 5 | 1 | 53.27 s | 0 | 1 | 5 | 5 | 1 | 0 | 0 | -| 6 | 2 | 43.10 s | 0 | 2 | 7 | 7 | 1 | 0 | 7 | -| 7 | 1 | 47.31 s | 0 | 1 | 1 | 1 | 1 | 0 | 0 | -| 8 | 3 | 51.78 s | 0 | 3 | 4 | 4 | 1 | 0 | 0 | -| 9 | 3 | 46.58 s | 0 | 3 | 7 | 7 | 1 | 0 | 0 | -| 10 | 3 | 44.91 s | 0 | 3 | 10 | 10 | 1 | 0 | 0 | -| 11 | 1 | 44.41 s | 0 | 1 | 11 | 11 | 1 | 0 | 11 | -| 12 | 1 | 42.87 s | 0 | 1 | 1 | 1 | 1 | 0 | 0 | -| 13 | 1 | 35.68 s | 0 | 1 | 2 | 2 | 1 | 0 | 0 | -| 14 | 3 | 54.88 s | 0 | 3 | 5 | 5 | 1 | 0 | 0 | -| 15 | 1 | 41.84 s | 0 | 1 | 6 | 6 | 1 | 0 | 0 | -| 16 | 2 | 41.32 s | 0 | 2 | 8 | 8 | 1 | 0 | 8 | -| 17 | 3 | 38.96 s | 0 | 3 | 3 | 3 | 1 | 0 | 0 | -| 18 | 1 | 35.87 s | 0 | 1 | 4 | 4 | 1 | 0 | 0 | -| 19 | 2 | 45.35 s | 0 | 2 | 6 | 6 | 1 | 0 | 0 | -| 20 | 1 | 51.70 s | 0 | 1 | 7 | 7 | 1 | 0 | 0 | \ No newline at end of file +| 1 | 2 | 42.66 s | 0 | 2 | 2 | 2 | 1 | 0 | 2 | +| 2 | 2 | 41.25 s | 0 | 2 | 2 | 2 | 1 | 0 | 0 | +| 3 | 3 | 45.79 s | 0 | 3 | 5 | 5 | 1 | 0 | 0 | +| 4 | 1 | 37.48 s | 0 | 1 | 6 | 6 | 1 | 0 | 0 | +| 5 | 1 | 49.74 s | 0 | 1 | 7 | 7 | 1 | 0 | 0 | +| 6 | 3 | 41.19 s | 0 | 3 | 10 | 10 | 1 | 0 | 10 | +| 7 | 2 | 54.11 s | 0 | 2 | 2 | 2 | 1 | 0 | 0 | +| 8 | 3 | 40.34 s | 0 | 3 | 5 | 5 | 1 | 0 | 0 | +| 9 | 1 | 50.03 s | 0 | 1 | 6 | 6 | 1 | 0 | 0 | +| 10 | 2 | 37.67 s | 0 | 2 | 8 | 8 | 1 | 0 | 0 | +| 11 | 2 | 52.58 s | 0 | 2 | 10 | 10 | 1 | 0 | 10 | +| 12 | 2 | 38.79 s | 0 | 2 | 2 | 2 | 1 | 0 | 0 | +| 13 | 1 | 46.70 s | 0 | 1 | 3 | 3 | 1 | 0 | 0 | +| 14 | 3 | 51.09 s | 0 | 3 | 6 | 6 | 1 | 0 | 0 | +| 15 | 3 | 45.11 s | 0 | 3 | 9 | 9 | 1 | 0 | 0 | +| 16 | 1 | 35.01 s | 0 | 1 | 10 | 10 | 1 | 0 | 10 | +| 17 | 2 | 37.59 s | 0 | 2 | 2 | 2 | 1 | 0 | 0 | +| 18 | 3 | 45.48 s | 0 | 3 | 5 | 5 | 1 | 0 | 0 | +| 19 | 1 | 43.97 s | 0 | 1 | 6 | 6 | 1 | 0 | 0 | +| 20 | 3 | 51.72 s | 0 | 3 | 9 | 9 | 1 | 0 | 0 | \ No newline at end of file diff --git a/.keda/results_test_k8s_autoscaling_job_count_strategy_default_in_chaos.md b/.keda/results_test_k8s_autoscaling_job_count_strategy_default_in_chaos.md index f9edda79e2..3a577346ff 100644 --- a/.keda/results_test_k8s_autoscaling_job_count_strategy_default_in_chaos.md +++ b/.keda/results_test_k8s_autoscaling_job_count_strategy_default_in_chaos.md @@ -1,22 +1,22 @@ | Iteration | New request sessions | Sessions created time | Sessions failed to create | New pods scaled up | Total running sessions | Total running pods | Max sessions per pod | Gaps | Sessions closed | | --------- | -------------------- | --------------------- | ------------------------- | ------------------ | ---------------------- | ------------------ | -------------------- | ---- | --------------- | -| 1 | 3 | 40.81 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | -| 2 | 3 | 39.98 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | -| 3 | 5 | 41.27 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | -| 4 | 5 | 38.49 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | -| 5 | 6 | 55.50 s | 0 | 6 | 6 | 6 | 1 | 0 | 4 | -| 6 | 6 | 38.91 s | 0 | 6 | 8 | 8 | 1 | 0 | 8 | -| 7 | 4 | 51.64 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | -| 8 | 4 | 38.01 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | -| 9 | 5 | 38.35 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | -| 10 | 3 | 53.03 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | -| 11 | 5 | 32.21 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | -| 12 | 3 | 39.93 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | -| 13 | 6 | 51.98 s | 0 | 6 | 6 | 6 | 1 | 0 | 6 | -| 14 | 4 | 51.21 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | -| 15 | 3 | 36.22 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | -| 16 | 6 | 41.34 s | 0 | 6 | 6 | 6 | 1 | 0 | 6 | -| 17 | 5 | 54.39 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | -| 18 | 5 | 55.02 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | -| 19 | 5 | 37.55 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | -| 20 | 4 | 52.47 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | \ No newline at end of file +| 1 | 6 | 0.08 s | 6 | 0 | 0 | 0 | 1 | 0 | 0 | +| 2 | 4 | 49.41 s | 0 | 4 | 4 | 4 | 1 | 0 | 3 | +| 3 | 3 | 30.92 s | 0 | 3 | 4 | 4 | 1 | 0 | 4 | +| 4 | 4 | 47.38 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | +| 5 | 5 | 56.94 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | +| 6 | 6 | 45.39 s | 0 | 6 | 6 | 6 | 1 | 0 | 6 | +| 7 | 3 | 44.07 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 8 | 6 | 60.72 s | 0 | 6 | 6 | 6 | 1 | 0 | 3 | +| 9 | 6 | 51.08 s | 0 | 6 | 9 | 9 | 1 | 0 | 5 | +| 10 | 6 | 45.21 s | 0 | 6 | 10 | 10 | 1 | 0 | 3 | +| 11 | 4 | 59.73 s | 0 | 4 | 11 | 11 | 1 | 0 | 8 | +| 12 | 6 | 51.91 s | 0 | 6 | 9 | 9 | 1 | 0 | 9 | +| 13 | 4 | 42.14 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | +| 14 | 5 | 50.23 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | +| 15 | 3 | 50.02 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 16 | 5 | 41.06 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | +| 17 | 6 | 58.60 s | 0 | 6 | 6 | 6 | 1 | 0 | 5 | +| 18 | 4 | 48.93 s | 0 | 4 | 5 | 5 | 1 | 0 | 5 | +| 19 | 5 | 50.18 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | +| 20 | 3 | 43.45 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | \ No newline at end of file diff --git a/.keda/results_test_k8s_autoscaling_job_count_strategy_default_with_node_max_sessions.md b/.keda/results_test_k8s_autoscaling_job_count_strategy_default_with_node_max_sessions.md index 9dd8b88c56..1afada2156 100644 --- a/.keda/results_test_k8s_autoscaling_job_count_strategy_default_with_node_max_sessions.md +++ b/.keda/results_test_k8s_autoscaling_job_count_strategy_default_with_node_max_sessions.md @@ -1,22 +1,22 @@ | Iteration | New request sessions | Sessions created time | Sessions failed to create | New pods scaled up | Total running sessions | Total running pods | Max sessions per pod | Gaps | Sessions closed | | --------- | -------------------- | --------------------- | ------------------------- | ------------------ | ---------------------- | ------------------ | -------------------- | ---- | --------------- | -| 1 | 2 | 42.74 s | 0 | 2 | 2 | 2 | 3 | 4 | 2 | -| 2 | 1 | 13.04 s | 0 | 0 | 1 | 2 | 3 | 5 | 0 | -| 3 | 2 | 53.17 s | 0 | 2 | 3 | 4 | 3 | 9 | 0 | -| 4 | 2 | 35.57 s | 0 | 2 | 5 | 6 | 3 | 13 | 0 | -| 5 | 1 | 16.43 s | 0 | 0 | 6 | 6 | 3 | 12 | 0 | -| 6 | 3 | 18.11 s | 0 | 3 | 9 | 10 | 3 | 21 | 9 | -| 7 | 3 | 15.75 s | 0 | 0 | 3 | 9 | 3 | 24 | 0 | -| 8 | 2 | 15.64 s | 0 | 1 | 5 | 11 | 3 | 28 | 0 | -| 9 | 1 | 16.46 s | 0 | 0 | 6 | 11 | 3 | 27 | 0 | -| 10 | 2 | 13.45 s | 0 | 1 | 8 | 12 | 3 | 28 | 0 | -| 11 | 3 | 14.04 s | 0 | 0 | 11 | 12 | 3 | 25 | 11 | -| 12 | 1 | 13.91 s | 0 | 0 | 1 | 11 | 3 | 32 | 0 | -| 13 | 1 | 10.47 s | 0 | 0 | 2 | 11 | 3 | 31 | 0 | -| 14 | 1 | 12.39 s | 0 | 0 | 3 | 11 | 3 | 30 | 0 | -| 15 | 3 | 14.61 s | 0 | 0 | 6 | 11 | 3 | 27 | 0 | -| 16 | 2 | 13.81 s | 0 | 0 | 8 | 11 | 3 | 25 | 8 | -| 17 | 3 | 13.87 s | 0 | 0 | 3 | 9 | 3 | 24 | 0 | -| 18 | 1 | 5.04 s | 0 | 0 | 4 | 9 | 3 | 23 | 0 | -| 19 | 1 | 12.96 s | 0 | 0 | 5 | 9 | 3 | 22 | 0 | -| 20 | 2 | 16.01 s | 0 | 0 | 7 | 9 | 3 | 20 | 0 | \ No newline at end of file +| 1 | 1 | 29.29 s | 0 | 1 | 1 | 1 | 3 | 2 | 1 | +| 2 | 2 | 53.55 s | 0 | 1 | 2 | 2 | 3 | 4 | 0 | +| 3 | 3 | 42.01 s | 0 | 3 | 5 | 5 | 3 | 10 | 0 | +| 4 | 1 | 7.82 s | 0 | 0 | 6 | 5 | 3 | 9 | 0 | +| 5 | 1 | 17.63 s | 0 | 1 | 7 | 7 | 3 | 14 | 0 | +| 6 | 1 | 7.95 s | 0 | 0 | 8 | 7 | 3 | 13 | 8 | +| 7 | 3 | 17.18 s | 0 | 0 | 3 | 6 | 3 | 15 | 0 | +| 8 | 2 | 13.31 s | 0 | 0 | 5 | 6 | 3 | 13 | 0 | +| 9 | 1 | 15.54 s | 0 | 0 | 6 | 7 | 3 | 15 | 0 | +| 10 | 3 | 13.88 s | 0 | 0 | 9 | 7 | 3 | 12 | 0 | +| 11 | 1 | 10.01 s | 0 | 1 | 10 | 10 | 3 | 20 | 10 | +| 12 | 1 | 8.10 s | 0 | 0 | 1 | 7 | 3 | 20 | 0 | +| 13 | 2 | 9.76 s | 0 | 0 | 3 | 7 | 3 | 18 | 0 | +| 14 | 2 | 16.99 s | 0 | 0 | 5 | 7 | 3 | 16 | 0 | +| 15 | 3 | 13.53 s | 0 | 0 | 8 | 7 | 3 | 13 | 0 | +| 16 | 3 | 36.09 s | 0 | 3 | 11 | 11 | 3 | 22 | 11 | +| 17 | 2 | 8.04 s | 0 | 0 | 2 | 6 | 3 | 16 | 0 | +| 18 | 2 | 7.95 s | 0 | 0 | 4 | 6 | 3 | 14 | 0 | +| 19 | 1 | 15.48 s | 0 | 1 | 5 | 8 | 3 | 19 | 0 | +| 20 | 1 | 4.69 s | 0 | 0 | 6 | 8 | 3 | 18 | 0 | \ No newline at end of file From 2af207affb0946bdd90b9609a5a24742a35de3b5 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Wed, 26 Feb 2025 19:31:12 +0000 Subject: [PATCH 4/5] Update KEDA resource Signed-off-by: Viet Nguyen Duc --- .keda/scalers/selenium_grid_scaler.go | 25 +++- .keda/scalers/selenium_grid_scaler_test.go | 158 ++++++++++++++++++--- 2 files changed, 163 insertions(+), 20 deletions(-) diff --git a/.keda/scalers/selenium_grid_scaler.go b/.keda/scalers/selenium_grid_scaler.go index 727b2ba946..e202b49e66 100644 --- a/.keda/scalers/selenium_grid_scaler.go +++ b/.keda/scalers/selenium_grid_scaler.go @@ -109,7 +109,7 @@ var FunctionCapabilitiesPrefixes = []string{EnableManagedDownloadsCapability} // Follow pattern in https://github.com/SeleniumHQ/selenium/blob/trunk/java/src/org/openqa/selenium/grid/data/DefaultSlotMatcher.java func filterCapabilities(capabilities map[string]interface{}) map[string]interface{} { - filteredCapabilities := make(map[string]interface{}) + filteredCapabilities := map[string]interface{}{} for key, value := range capabilities { retain := true @@ -308,12 +308,28 @@ func countMatchingSessions(sessions Sessions, browserName string, browserVersion return matchingSessions } +func managedDownloadsEnabled(stereotype map[string]interface{}, capabilities map[string]interface{}) bool { + // First lets check if user wanted a Node with managed downloads enabled + value1, ok1 := capabilities[EnableManagedDownloadsCapability] + if !ok1 || !value1.(bool) { + // User didn't ask. So lets move on to the next matching criteria + return true + } + // User wants managed downloads enabled to be done on this Node, let's check the stereotype + value2, ok2 := stereotype[EnableManagedDownloadsCapability] + // Try to match what the user requested + return ok2 && value2.(bool) +} + func extensionCapabilitiesMatch(stereotype map[string]interface{}, capabilities map[string]interface{}) bool { capabilities = filterCapabilities(capabilities) if len(capabilities) == 0 { return true } for key, value := range capabilities { + if key == EnableManagedDownloadsCapability { + continue + } if stereotypeValue, ok := stereotype[key]; !ok || stereotypeValue != value { return false } @@ -338,7 +354,7 @@ func checkRequestCapabilitiesMatch(request map[string]interface{}, browserName s platformNameMatch := (_platformName == "" || strings.EqualFold("any", _platformName) || strings.EqualFold(platformName, _platformName)) && (platformName == "" || platformName == "any" || strings.EqualFold(platformName, _platformName)) - return browserNameMatch && browserVersionMatch && platformNameMatch && extensionCapabilitiesMatch(request, capabilities) + return browserNameMatch && browserVersionMatch && platformNameMatch && managedDownloadsEnabled(capabilities, request) && extensionCapabilitiesMatch(request, capabilities) } // This function checks if Node stereotypes or ongoing sessions match the scaler metadata @@ -359,7 +375,7 @@ func checkStereotypeCapabilitiesMatch(capability map[string]interface{}, browser platformNameMatch := (_platformVersion == "" || strings.EqualFold("any", _platformVersion) || strings.EqualFold(platformName, _platformVersion)) && (platformName == "" || platformName == "any" || strings.EqualFold(platformName, _platformVersion)) - return browserNameMatch && browserVersionMatch && platformNameMatch && extensionCapabilitiesMatch(capability, capabilities) + return browserNameMatch && browserVersionMatch && platformNameMatch && managedDownloadsEnabled(capabilities, capability) && extensionCapabilitiesMatch(capability, capabilities) } func checkNodeReservedSlots(reservedNodes []ReservedNodes, nodeID string, availableSlots int64) int64 { @@ -397,7 +413,8 @@ func getCountFromSeleniumResponse(b []byte, browserName string, browserVersion s capabilities, err := parseCapabilitiesToMap(_capabilities) if err != nil { logger.Error(err, fmt.Sprintf("Error when unmarshaling trigger metadata 'capabilities': %s", err)) - } else if enableManagedDownloads { + } + if enableManagedDownloads { capabilities[EnableManagedDownloadsCapability] = true } diff --git a/.keda/scalers/selenium_grid_scaler_test.go b/.keda/scalers/selenium_grid_scaler_test.go index ea59871f12..12a0f56e9f 100644 --- a/.keda/scalers/selenium_grid_scaler_test.go +++ b/.keda/scalers/selenium_grid_scaler_test.go @@ -100,10 +100,11 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { } } `), - browserName: "chrome", - sessionBrowserName: "chrome", - browserVersion: "", - platformName: "linux", + browserName: "chrome", + sessionBrowserName: "chrome", + browserVersion: "", + enableManagedDownloads: true, + platformName: "linux", }, wantNewRequestNodes: 4, wantOnGoingSessions: 0, @@ -276,10 +277,11 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { } } `), - browserName: "firefox", - sessionBrowserName: "firefox", - browserVersion: "", - platformName: "linux", + browserName: "firefox", + sessionBrowserName: "firefox", + browserVersion: "", + enableManagedDownloads: true, + platformName: "linux", }, wantNewRequestNodes: 0, wantOnGoingSessions: 4, @@ -326,10 +328,11 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { } } `), - browserName: "chrome", - sessionBrowserName: "chrome", - browserVersion: "", - platformName: "linux", + browserName: "chrome", + sessionBrowserName: "chrome", + browserVersion: "", + enableManagedDownloads: true, + platformName: "linux", }, wantNewRequestNodes: 1, wantOnGoingSessions: 0, @@ -1909,7 +1912,7 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { wantErr: false, }, { - name: "4_sessions_requests_with_matching_browserName_and_platformName_when_set_nodeMaxSessions_2_and_3_requests_match_should_return_count_as_1_and_1_ongoing_session", + name: "4_sessions_requests_with_matching_browserName_and_platformName_when_set_nodeMaxSessions_2_and_4_requests_match_should_return_count_as_2_and_1_ongoing_session", args: args{ b: []byte(`{ "data": { @@ -1957,10 +1960,62 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { nodeMaxSessions: 2, enableManagedDownloads: true, }, - wantNewRequestNodes: 1, + wantNewRequestNodes: 2, wantOnGoingSessions: 1, wantErr: false, }, + { + name: "4_sessions_requests_with_matching_browserName_and_platformName_when_set_nodeMaxSessions_2_disable_managed_downloads_and_1_requests_match_should_return_count_as_1_and_0_ongoing_session", + args: args{ + b: []byte(`{ + "data": { + "grid": { + "sessionCount": 1, + "maxSession": 2, + "totalSlots": 2 + }, + "nodesInfo": { + "nodes": [ + { + "id": "node-1", + "status": "UP", + "sessionCount": 1, + "maxSession": 1, + "slotCount": 1, + "stereotypes": "[{\"slots\": 1, \"stereotype\": {\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\", \"se:downloadsEnabled\": true}}]", + "sessions": [ + { + "id": "session-1", + "capabilities": "{\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\", \"se:downloadsEnabled\": true}", + "slot": { + "id": "9ce1edba-72fb-465e-b311-ee473d8d7b64", + "stereotype": "{\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\", \"se:downloadsEnabled\": true}" + } + } + ] + } + ] + }, + "sessionsInfo": { + "sessionQueueRequests": [ + "{\n \"browserName\": \"chrome\",\n \"platformName\": \"linux\"\n}", + "{\n \"browserName\": \"chrome\",\n \"se:downloadsEnabled\": true,\n \"platformName\": \"linux\"\n}", + "{\n \"browserName\": \"chrome\",\n \"se:downloadsEnabled\": true,\n \"platformName\": \"linux\"\n}", + "{\n \"browserName\": \"chrome\",\n \"se:downloadsEnabled\": true,\n \"platformName\": \"linux\"\n}", + "{\n \"browserName\": \"chrome\",\n \"platformName\": \"Windows 11\"\n}"] + } + } + }`), + browserName: "chrome", + sessionBrowserName: "chrome", + browserVersion: "", + platformName: "linux", + nodeMaxSessions: 2, + }, + wantNewRequestNodes: 1, + wantOnGoingSessions: 0, + wantErr: false, + }, { name: "4_sessions_requests_with_matching_browserName_and_platformName_when_set_extra_capabilities_and_2_requests_match_should_return_count_as_2_and_ongoing_1", args: args{ @@ -2015,7 +2070,7 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { wantErr: false, }, { - name: "4_sessions_requests_with_matching_browserName_and_platformName_when_set_extra_capabilities_and_mangaged_downloads_and_1_request_match_should_return_count_as_1_and_ongoing_1", + name: "4_sessions_requests_with_matching_browserName_and_platformName_when_set_extra_capabilities_and_mangaged_downloads_and_1_request_match_should_return_count_as_2_and_ongoing_1", args: args{ b: []byte(`{ "data": { @@ -2064,10 +2119,81 @@ func Test_getCountFromSeleniumResponse(t *testing.T) { enableManagedDownloads: true, capabilities: "{\"myApp:version\": \"beta\", \"myApp:scope\": \"internal\"}", }, - wantNewRequestNodes: 1, + wantNewRequestNodes: 2, wantOnGoingSessions: 1, wantErr: false, }, + { + name: "4_sessions_requests_with_matching_browserName_and_platformName_when_set_extra_capabilities_and_mangaged_downloads_and_4_request_match_should_return_count_as_4_and_ongoing_2", + args: args{ + b: []byte(`{ + "data": { + "grid": { + "sessionCount": 1, + "maxSession": 1, + "totalSlots": 1 + }, + "nodesInfo": { + "nodes": [ + { + "id": "node-1", + "status": "UP", + "sessionCount": 1, + "maxSession": 1, + "slotCount": 1, + "stereotypes": "[{\"slots\": 1, \"stereotype\": {\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\", \"myApp:version\": \"beta\", \"myApp:scope\": \"internal\", \"se:downloadsEnabled\": true}}]", + "sessions": [ + { + "id": "session-1", + "capabilities": "{\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\", \"myApp:version\": \"beta\", \"myApp:scope\": \"internal\", \"se:downloadsEnabled\": true}", + "slot": { + "id": "9ce1edba-72fb-465e-b311-ee473d8d7b64", + "stereotype": "{\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\", \"myApp:version\": \"beta\", \"myApp:scope\": \"internal\", \"se:downloadsEnabled\": true}" + } + } + ] + }, + { + "id": "node-2", + "status": "UP", + "sessionCount": 1, + "maxSession": 1, + "slotCount": 1, + "stereotypes": "[{\"slots\": 1, \"stereotype\": {\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\", \"myApp:version\": \"beta\", \"myApp:scope\": \"internal\"}}]", + "sessions": [ + { + "id": "session-1", + "capabilities": "{\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\", \"myApp:version\": \"beta\", \"myApp:scope\": \"internal\"}", + "slot": { + "id": "9ce1edba-72fb-465e-b311-ee473d8d7b64", + "stereotype": "{\"browserName\": \"chrome\", \"browserVersion\": \"\", \"platformName\": \"linux\", \"myApp:version\": \"beta\", \"myApp:scope\": \"internal\"}" + } + } + ] + } + ] + }, + "sessionsInfo": { + "sessionQueueRequests": [ + "{\n \"browserName\": \"chrome\",\n \"platformName\": \"linux\"\n}", + "{\n \"browserName\": \"chrome\",\n \"myApp:version\": \"beta\",\n \"platformName\": \"linux\"\n}", + "{\n \"browserName\": \"chrome\",\n \"myApp:version\": \"beta\",\n \"myApp:scope\": \"internal\",\n \"platformName\": \"linux\"\n}", + "{\n \"browserName\": \"chrome\",\n \"myApp:version\": \"beta\",\n \"myApp:scope\": \"internal\",\n \"platformName\": \"linux\"\n}", + "{\n \"browserName\": \"chrome\",\n \"platformName\": \"Windows 11\"\n}"] + } + } + }`), + browserName: "chrome", + sessionBrowserName: "chrome", + browserVersion: "", + platformName: "linux", + nodeMaxSessions: 1, + enableManagedDownloads: true, + }, + wantNewRequestNodes: 4, + wantOnGoingSessions: 2, + wantErr: false, + }, { name: "Given_2_requests_include_1_without_browserVersion_When_scaler_metadata_explicit_name_version_platform_Then_scaler_should_scale_up_for_1_request_has_browserVersion_and_return_0_ongoing_sessions", args: args{ From 4d07d5ebddadce53ac3bc6151325ce132fea8fbf Mon Sep 17 00:00:00 2001 From: Selenium CI Bot Date: Thu, 27 Feb 2025 04:29:59 +0000 Subject: [PATCH 5/5] [ci] Upload autoscaling in K8s test results [skip ci] --- ...s_test_k8s_autoscaling_deployment_count.md | 40 +++++++++---------- ...s_autoscaling_deployment_count_in_chaos.md | 40 +++++++++---------- ...deployment_count_with_node_max_sessions.md | 40 +++++++++---------- ..._autoscaling_job_count_strategy_default.md | 40 +++++++++---------- ...ing_job_count_strategy_default_in_chaos.md | 40 +++++++++---------- ...strategy_default_with_node_max_sessions.md | 40 +++++++++---------- 6 files changed, 120 insertions(+), 120 deletions(-) diff --git a/.keda/results_test_k8s_autoscaling_deployment_count.md b/.keda/results_test_k8s_autoscaling_deployment_count.md index a57292d563..3c8a416594 100644 --- a/.keda/results_test_k8s_autoscaling_deployment_count.md +++ b/.keda/results_test_k8s_autoscaling_deployment_count.md @@ -1,22 +1,22 @@ | Iteration | New request sessions | Sessions created time | Sessions failed to create | New pods scaled up | Total running sessions | Total running pods | Max sessions per pod | Gaps | Sessions closed | | --------- | -------------------- | --------------------- | ------------------------- | ------------------ | ---------------------- | ------------------ | -------------------- | ---- | --------------- | -| 1 | 3 | 44.69 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | -| 2 | 3 | 13.48 s | 0 | 0 | 3 | 3 | 1 | 0 | 0 | -| 3 | 1 | 38.04 s | 0 | 1 | 4 | 4 | 1 | 0 | 0 | -| 4 | 2 | 40.46 s | 0 | 2 | 6 | 6 | 1 | 0 | 0 | -| 5 | 2 | 41.35 s | 0 | 2 | 8 | 8 | 1 | 0 | 0 | -| 6 | 2 | 40.06 s | 0 | 2 | 10 | 10 | 1 | 0 | 10 | -| 7 | 2 | 14.33 s | 0 | 0 | 2 | 10 | 1 | 8 | 0 | -| 8 | 1 | 14.18 s | 0 | 0 | 3 | 10 | 1 | 7 | 0 | -| 9 | 2 | 7.38 s | 0 | 0 | 5 | 10 | 1 | 5 | 0 | -| 10 | 2 | 7.38 s | 0 | 0 | 7 | 10 | 1 | 3 | 0 | -| 11 | 1 | 5.07 s | 0 | 0 | 8 | 10 | 1 | 2 | 8 | -| 12 | 1 | 15.03 s | 0 | 0 | 1 | 10 | 1 | 9 | 0 | -| 13 | 3 | 7.91 s | 0 | 0 | 4 | 10 | 1 | 6 | 0 | -| 14 | 3 | 33.14 s | 0 | 1 | 7 | 11 | 1 | 4 | 0 | -| 15 | 1 | 14.30 s | 0 | 0 | 8 | 11 | 1 | 3 | 0 | -| 16 | 3 | 41.38 s | 0 | 3 | 11 | 11 | 1 | 0 | 11 | -| 17 | 2 | 5.35 s | 0 | 0 | 2 | 11 | 1 | 9 | 0 | -| 18 | 2 | 14.37 s | 0 | 0 | 4 | 11 | 1 | 7 | 0 | -| 19 | 1 | 15.08 s | 0 | 0 | 5 | 11 | 1 | 6 | 0 | -| 20 | 3 | 49.11 s | 0 | 1 | 8 | 12 | 1 | 4 | 0 | \ No newline at end of file +| 1 | 3 | 59.17 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 2 | 3 | 45.61 s | 0 | 2 | 3 | 5 | 1 | 2 | 0 | +| 3 | 2 | 29.41 s | 0 | 1 | 5 | 6 | 1 | 1 | 0 | +| 4 | 3 | 30.83 s | 0 | 2 | 8 | 8 | 1 | 0 | 0 | +| 5 | 1 | 37.48 s | 0 | 1 | 9 | 9 | 1 | 0 | 0 | +| 6 | 3 | 48.26 s | 0 | 3 | 12 | 12 | 1 | 0 | 12 | +| 7 | 1 | 7.48 s | 0 | 0 | 1 | 12 | 1 | 11 | 0 | +| 8 | 1 | 6.47 s | 0 | 0 | 2 | 12 | 1 | 10 | 0 | +| 9 | 1 | 12.95 s | 0 | 0 | 3 | 12 | 1 | 9 | 0 | +| 10 | 1 | 7.10 s | 0 | 0 | 4 | 12 | 1 | 8 | 0 | +| 11 | 1 | 7.22 s | 0 | 0 | 5 | 12 | 1 | 7 | 5 | +| 12 | 1 | 13.54 s | 0 | 0 | 1 | 12 | 1 | 11 | 0 | +| 13 | 1 | 7.51 s | 0 | 0 | 2 | 12 | 1 | 10 | 0 | +| 14 | 2 | 14.64 s | 0 | 0 | 4 | 12 | 1 | 8 | 0 | +| 15 | 1 | 14.69 s | 0 | 0 | 5 | 12 | 1 | 7 | 0 | +| 16 | 3 | 7.38 s | 0 | 0 | 8 | 12 | 1 | 4 | 8 | +| 17 | 3 | 15.45 s | 0 | 0 | 3 | 9 | 1 | 6 | 0 | +| 18 | 2 | 16.28 s | 0 | 0 | 5 | 9 | 1 | 4 | 0 | +| 19 | 2 | 46.58 s | 0 | 2 | 7 | 11 | 1 | 4 | 0 | +| 20 | 2 | 44.58 s | 0 | 1 | 9 | 12 | 1 | 3 | 0 | \ No newline at end of file diff --git a/.keda/results_test_k8s_autoscaling_deployment_count_in_chaos.md b/.keda/results_test_k8s_autoscaling_deployment_count_in_chaos.md index b1101a6959..ad0766dea6 100644 --- a/.keda/results_test_k8s_autoscaling_deployment_count_in_chaos.md +++ b/.keda/results_test_k8s_autoscaling_deployment_count_in_chaos.md @@ -1,22 +1,22 @@ | Iteration | New request sessions | Sessions created time | Sessions failed to create | New pods scaled up | Total running sessions | Total running pods | Max sessions per pod | Gaps | Sessions closed | | --------- | -------------------- | --------------------- | ------------------------- | ------------------ | ---------------------- | ------------------ | -------------------- | ---- | --------------- | -| 1 | 4 | 57.26 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | -| 2 | 4 | 41.11 s | 0 | 2 | 4 | 6 | 1 | 2 | 4 | -| 3 | 3 | 6.93 s | 0 | 0 | 3 | 6 | 1 | 3 | 3 | -| 4 | 5 | 44.98 s | 0 | 3 | 5 | 9 | 1 | 4 | 5 | -| 5 | 4 | 14.10 s | 0 | 0 | 4 | 9 | 1 | 5 | 4 | -| 6 | 6 | 38.45 s | 0 | 1 | 6 | 10 | 1 | 4 | 6 | -| 7 | 4 | 13.80 s | 0 | 0 | 4 | 10 | 1 | 6 | 4 | -| 8 | 6 | 14.17 s | 0 | 0 | 6 | 10 | 1 | 4 | 6 | -| 9 | 5 | 14.94 s | 0 | 0 | 5 | 10 | 1 | 5 | 5 | -| 10 | 6 | 48.45 s | 0 | 1 | 6 | 11 | 1 | 5 | 3 | -| 11 | 3 | 42.64 s | 0 | 2 | 6 | 11 | 1 | 5 | 6 | -| 12 | 4 | 14.88 s | 0 | 0 | 4 | 11 | 1 | 7 | 4 | -| 13 | 5 | 13.35 s | 0 | 0 | 5 | 10 | 1 | 5 | 5 | -| 14 | 3 | 7.37 s | 0 | 0 | 3 | 10 | 1 | 7 | 3 | -| 15 | 3 | 4.99 s | 0 | 0 | 3 | 10 | 1 | 7 | 3 | -| 16 | 6 | 13.80 s | 0 | 0 | 6 | 10 | 1 | 4 | 3 | -| 17 | 6 | 38.17 s | 0 | 2 | 9 | 12 | 1 | 3 | 6 | -| 18 | 5 | 13.32 s | 0 | 0 | 8 | 12 | 1 | 4 | 7 | -| 19 | 3 | 14.14 s | 0 | -2 | 4 | 10 | 1 | 6 | 4 | -| 20 | 6 | 13.28 s | 0 | 0 | 6 | 10 | 1 | 4 | 3 | \ No newline at end of file +| 1 | 3 | 43.71 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 2 | 5 | 40.29 s | 0 | 3 | 5 | 6 | 1 | 1 | 5 | +| 3 | 4 | 14.20 s | 0 | 0 | 4 | 6 | 1 | 2 | 4 | +| 4 | 3 | 13.66 s | 0 | 0 | 3 | 6 | 1 | 3 | 3 | +| 5 | 3 | 15.25 s | 0 | 0 | 3 | 6 | 1 | 3 | 3 | +| 6 | 5 | 38.91 s | 0 | 1 | 5 | 7 | 1 | 2 | 5 | +| 7 | 5 | 34.07 s | 0 | 1 | 5 | 8 | 1 | 3 | 5 | +| 8 | 6 | 14.35 s | 0 | 0 | 6 | 8 | 1 | 2 | 6 | +| 9 | 3 | 14.74 s | 0 | 0 | 3 | 7 | 1 | 4 | 3 | +| 10 | 3 | 13.67 s | 0 | 0 | 3 | 6 | 1 | 3 | 3 | +| 11 | 3 | 6.90 s | 0 | 0 | 3 | 6 | 1 | 3 | 3 | +| 12 | 6 | 46.67 s | 0 | 1 | 6 | 7 | 1 | 1 | 6 | +| 13 | 6 | 48.16 s | 0 | 1 | 6 | 8 | 1 | 2 | 6 | +| 14 | 4 | 15.18 s | 0 | 0 | 4 | 8 | 1 | 4 | 4 | +| 15 | 5 | 31.38 s | 0 | 2 | 5 | 10 | 1 | 5 | 5 | +| 16 | 5 | 14.41 s | 0 | 0 | 5 | 10 | 1 | 5 | 5 | +| 17 | 4 | 14.63 s | 0 | 0 | 4 | 10 | 1 | 6 | 4 | +| 18 | 3 | 14.58 s | 0 | 0 | 3 | 10 | 1 | 7 | 3 | +| 19 | 3 | 13.55 s | 0 | 0 | 3 | 10 | 1 | 7 | 3 | +| 20 | 3 | 7.15 s | 0 | 0 | 3 | 10 | 1 | 7 | 3 | \ No newline at end of file diff --git a/.keda/results_test_k8s_autoscaling_deployment_count_with_node_max_sessions.md b/.keda/results_test_k8s_autoscaling_deployment_count_with_node_max_sessions.md index 4011b56b0a..32cd4a9df2 100644 --- a/.keda/results_test_k8s_autoscaling_deployment_count_with_node_max_sessions.md +++ b/.keda/results_test_k8s_autoscaling_deployment_count_with_node_max_sessions.md @@ -1,22 +1,22 @@ | Iteration | New request sessions | Sessions created time | Sessions failed to create | New pods scaled up | Total running sessions | Total running pods | Max sessions per pod | Gaps | Sessions closed | | --------- | -------------------- | --------------------- | ------------------------- | ------------------ | ---------------------- | ------------------ | -------------------- | ---- | --------------- | -| 1 | 1 | 0.08 s | 1 | 0 | 0 | 0 | 3 | 0 | 0 | -| 2 | 1 | 40.81 s | 0 | 1 | 1 | 1 | 3 | 2 | 0 | -| 3 | 1 | 52.72 s | 0 | 1 | 2 | 2 | 3 | 4 | 0 | -| 4 | 3 | 44.05 s | 0 | 2 | 5 | 4 | 3 | 7 | 0 | -| 5 | 2 | 18.00 s | 0 | 2 | 7 | 7 | 3 | 14 | 0 | -| 6 | 3 | 18.68 s | 0 | 2 | 10 | 9 | 3 | 17 | 10 | -| 7 | 1 | 16.99 s | 0 | 0 | 1 | 9 | 3 | 26 | 0 | -| 8 | 2 | 14.09 s | 0 | 0 | 3 | 9 | 3 | 24 | 0 | -| 9 | 3 | 7.93 s | 0 | 0 | 6 | 9 | 3 | 21 | 0 | -| 10 | 1 | 14.16 s | 0 | 0 | 7 | 10 | 3 | 23 | 0 | -| 11 | 2 | 18.09 s | 0 | 2 | 9 | 12 | 3 | 27 | 9 | -| 12 | 2 | 16.61 s | 0 | 0 | 2 | 12 | 3 | 34 | 0 | -| 13 | 2 | 10.58 s | 0 | 0 | 4 | 12 | 3 | 32 | 0 | -| 14 | 1 | 4.84 s | 0 | 0 | 5 | 12 | 3 | 31 | 0 | -| 15 | 1 | 7.01 s | 0 | 0 | 6 | 12 | 3 | 30 | 0 | -| 16 | 3 | 13.69 s | 0 | -1 | 9 | 11 | 3 | 24 | 9 | -| 17 | 3 | 7.37 s | 0 | 0 | 3 | 11 | 3 | 30 | 0 | -| 18 | 1 | 13.59 s | 0 | 0 | 4 | 11 | 3 | 29 | 0 | -| 19 | 3 | 14.45 s | 0 | 0 | 7 | 11 | 3 | 26 | 0 | -| 20 | 3 | 6.84 s | 0 | 1 | 10 | 12 | 3 | 26 | 0 | \ No newline at end of file +| 1 | 1 | 0.07 s | 1 | 0 | 0 | 0 | 3 | 0 | 0 | +| 2 | 1 | 43.26 s | 0 | 1 | 1 | 1 | 3 | 2 | 0 | +| 3 | 2 | 44.61 s | 0 | 2 | 3 | 3 | 3 | 6 | 0 | +| 4 | 3 | 51.71 s | 0 | 3 | 6 | 6 | 3 | 12 | 0 | +| 5 | 2 | 15.21 s | 0 | 1 | 8 | 7 | 3 | 13 | 0 | +| 6 | 3 | 10.63 s | 0 | 2 | 11 | 10 | 3 | 19 | 11 | +| 7 | 3 | 10.05 s | 0 | 0 | 3 | 11 | 3 | 30 | 0 | +| 8 | 2 | 5.29 s | 0 | 0 | 5 | 11 | 3 | 28 | 0 | +| 9 | 3 | 13.48 s | 0 | 0 | 8 | 11 | 3 | 25 | 0 | +| 10 | 2 | 47.69 s | 0 | 2 | 10 | 13 | 3 | 29 | 0 | +| 11 | 1 | 5.31 s | 0 | 0 | 11 | 13 | 3 | 28 | 11 | +| 12 | 1 | 17.53 s | 0 | 0 | 1 | 13 | 3 | 38 | 0 | +| 13 | 2 | 17.81 s | 0 | 0 | 3 | 13 | 3 | 36 | 0 | +| 14 | 3 | 7.73 s | 0 | 0 | 6 | 13 | 3 | 33 | 0 | +| 15 | 2 | 7.19 s | 0 | -1 | 8 | 12 | 3 | 28 | 0 | +| 16 | 2 | 14.71 s | 0 | 1 | 10 | 13 | 3 | 29 | 10 | +| 17 | 3 | 5.07 s | 0 | 0 | 3 | 13 | 3 | 36 | 0 | +| 18 | 2 | 4.86 s | 0 | 0 | 5 | 13 | 3 | 34 | 0 | +| 19 | 2 | 16.71 s | 0 | 0 | 7 | 14 | 3 | 35 | 0 | +| 20 | 2 | 8.28 s | 0 | 0 | 9 | 14 | 3 | 33 | 0 | \ No newline at end of file diff --git a/.keda/results_test_k8s_autoscaling_job_count_strategy_default.md b/.keda/results_test_k8s_autoscaling_job_count_strategy_default.md index ae0d94a732..606de2a721 100644 --- a/.keda/results_test_k8s_autoscaling_job_count_strategy_default.md +++ b/.keda/results_test_k8s_autoscaling_job_count_strategy_default.md @@ -1,22 +1,22 @@ | Iteration | New request sessions | Sessions created time | Sessions failed to create | New pods scaled up | Total running sessions | Total running pods | Max sessions per pod | Gaps | Sessions closed | | --------- | -------------------- | --------------------- | ------------------------- | ------------------ | ---------------------- | ------------------ | -------------------- | ---- | --------------- | -| 1 | 2 | 42.66 s | 0 | 2 | 2 | 2 | 1 | 0 | 2 | -| 2 | 2 | 41.25 s | 0 | 2 | 2 | 2 | 1 | 0 | 0 | -| 3 | 3 | 45.79 s | 0 | 3 | 5 | 5 | 1 | 0 | 0 | -| 4 | 1 | 37.48 s | 0 | 1 | 6 | 6 | 1 | 0 | 0 | -| 5 | 1 | 49.74 s | 0 | 1 | 7 | 7 | 1 | 0 | 0 | -| 6 | 3 | 41.19 s | 0 | 3 | 10 | 10 | 1 | 0 | 10 | -| 7 | 2 | 54.11 s | 0 | 2 | 2 | 2 | 1 | 0 | 0 | -| 8 | 3 | 40.34 s | 0 | 3 | 5 | 5 | 1 | 0 | 0 | -| 9 | 1 | 50.03 s | 0 | 1 | 6 | 6 | 1 | 0 | 0 | -| 10 | 2 | 37.67 s | 0 | 2 | 8 | 8 | 1 | 0 | 0 | -| 11 | 2 | 52.58 s | 0 | 2 | 10 | 10 | 1 | 0 | 10 | -| 12 | 2 | 38.79 s | 0 | 2 | 2 | 2 | 1 | 0 | 0 | -| 13 | 1 | 46.70 s | 0 | 1 | 3 | 3 | 1 | 0 | 0 | -| 14 | 3 | 51.09 s | 0 | 3 | 6 | 6 | 1 | 0 | 0 | -| 15 | 3 | 45.11 s | 0 | 3 | 9 | 9 | 1 | 0 | 0 | -| 16 | 1 | 35.01 s | 0 | 1 | 10 | 10 | 1 | 0 | 10 | -| 17 | 2 | 37.59 s | 0 | 2 | 2 | 2 | 1 | 0 | 0 | -| 18 | 3 | 45.48 s | 0 | 3 | 5 | 5 | 1 | 0 | 0 | -| 19 | 1 | 43.97 s | 0 | 1 | 6 | 6 | 1 | 0 | 0 | -| 20 | 3 | 51.72 s | 0 | 3 | 9 | 9 | 1 | 0 | 0 | \ No newline at end of file +| 1 | 3 | 42.71 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 2 | 2 | 38.73 s | 0 | 2 | 2 | 2 | 1 | 0 | 0 | +| 3 | 2 | 39.09 s | 0 | 2 | 4 | 4 | 1 | 0 | 0 | +| 4 | 1 | 45.67 s | 0 | 1 | 5 | 5 | 1 | 0 | 0 | +| 5 | 2 | 50.59 s | 0 | 2 | 7 | 7 | 1 | 0 | 0 | +| 6 | 2 | 46.75 s | 0 | 2 | 9 | 9 | 1 | 0 | 9 | +| 7 | 1 | 38.03 s | 0 | 1 | 1 | 1 | 1 | 0 | 0 | +| 8 | 1 | 44.01 s | 0 | 1 | 2 | 2 | 1 | 0 | 0 | +| 9 | 2 | 51.12 s | 0 | 2 | 4 | 4 | 1 | 0 | 0 | +| 10 | 3 | 45.92 s | 0 | 3 | 7 | 7 | 1 | 0 | 0 | +| 11 | 2 | 40.09 s | 0 | 2 | 9 | 9 | 1 | 0 | 9 | +| 12 | 3 | 30.59 s | 0 | 3 | 3 | 3 | 1 | 0 | 0 | +| 13 | 2 | 43.73 s | 0 | 2 | 5 | 5 | 1 | 0 | 0 | +| 14 | 1 | 51.07 s | 0 | 1 | 6 | 6 | 1 | 0 | 0 | +| 15 | 1 | 36.64 s | 0 | 1 | 7 | 7 | 1 | 0 | 0 | +| 16 | 2 | 44.63 s | 0 | 2 | 9 | 9 | 1 | 0 | 9 | +| 17 | 1 | 33.20 s | 0 | 1 | 1 | 1 | 1 | 0 | 0 | +| 18 | 2 | 29.16 s | 0 | 2 | 3 | 3 | 1 | 0 | 0 | +| 19 | 3 | 50.89 s | 0 | 3 | 6 | 6 | 1 | 0 | 0 | +| 20 | 3 | 40.07 s | 0 | 3 | 9 | 9 | 1 | 0 | 0 | \ No newline at end of file diff --git a/.keda/results_test_k8s_autoscaling_job_count_strategy_default_in_chaos.md b/.keda/results_test_k8s_autoscaling_job_count_strategy_default_in_chaos.md index 3a577346ff..46c70944a6 100644 --- a/.keda/results_test_k8s_autoscaling_job_count_strategy_default_in_chaos.md +++ b/.keda/results_test_k8s_autoscaling_job_count_strategy_default_in_chaos.md @@ -1,22 +1,22 @@ | Iteration | New request sessions | Sessions created time | Sessions failed to create | New pods scaled up | Total running sessions | Total running pods | Max sessions per pod | Gaps | Sessions closed | | --------- | -------------------- | --------------------- | ------------------------- | ------------------ | ---------------------- | ------------------ | -------------------- | ---- | --------------- | -| 1 | 6 | 0.08 s | 6 | 0 | 0 | 0 | 1 | 0 | 0 | -| 2 | 4 | 49.41 s | 0 | 4 | 4 | 4 | 1 | 0 | 3 | -| 3 | 3 | 30.92 s | 0 | 3 | 4 | 4 | 1 | 0 | 4 | -| 4 | 4 | 47.38 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | -| 5 | 5 | 56.94 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | -| 6 | 6 | 45.39 s | 0 | 6 | 6 | 6 | 1 | 0 | 6 | -| 7 | 3 | 44.07 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | -| 8 | 6 | 60.72 s | 0 | 6 | 6 | 6 | 1 | 0 | 3 | -| 9 | 6 | 51.08 s | 0 | 6 | 9 | 9 | 1 | 0 | 5 | -| 10 | 6 | 45.21 s | 0 | 6 | 10 | 10 | 1 | 0 | 3 | -| 11 | 4 | 59.73 s | 0 | 4 | 11 | 11 | 1 | 0 | 8 | -| 12 | 6 | 51.91 s | 0 | 6 | 9 | 9 | 1 | 0 | 9 | -| 13 | 4 | 42.14 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | -| 14 | 5 | 50.23 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | -| 15 | 3 | 50.02 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | -| 16 | 5 | 41.06 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | -| 17 | 6 | 58.60 s | 0 | 6 | 6 | 6 | 1 | 0 | 5 | -| 18 | 4 | 48.93 s | 0 | 4 | 5 | 5 | 1 | 0 | 5 | -| 19 | 5 | 50.18 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | -| 20 | 3 | 43.45 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | \ No newline at end of file +| 1 | 6 | 45.77 s | 0 | 6 | 6 | 6 | 1 | 0 | 3 | +| 2 | 3 | 34.64 s | 0 | 3 | 6 | 6 | 1 | 0 | 6 | +| 3 | 4 | 42.47 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | +| 4 | 4 | 31.70 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | +| 5 | 4 | 43.52 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | +| 6 | 5 | 45.90 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | +| 7 | 3 | 49.90 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 8 | 3 | 41.51 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 9 | 4 | 29.48 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | +| 10 | 3 | 42.55 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 11 | 4 | 49.52 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | +| 12 | 4 | 36.99 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | +| 13 | 4 | 53.95 s | 0 | 4 | 4 | 4 | 1 | 0 | 4 | +| 14 | 3 | 37.69 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 15 | 5 | 41.56 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | +| 16 | 5 | 47.75 s | 0 | 5 | 5 | 5 | 1 | 0 | 5 | +| 17 | 3 | 44.29 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 18 | 3 | 30.08 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 19 | 3 | 48.17 s | 0 | 3 | 3 | 3 | 1 | 0 | 3 | +| 20 | 6 | 43.60 s | 0 | 6 | 6 | 6 | 1 | 0 | 3 | \ No newline at end of file diff --git a/.keda/results_test_k8s_autoscaling_job_count_strategy_default_with_node_max_sessions.md b/.keda/results_test_k8s_autoscaling_job_count_strategy_default_with_node_max_sessions.md index 1afada2156..a576758a19 100644 --- a/.keda/results_test_k8s_autoscaling_job_count_strategy_default_with_node_max_sessions.md +++ b/.keda/results_test_k8s_autoscaling_job_count_strategy_default_with_node_max_sessions.md @@ -1,22 +1,22 @@ | Iteration | New request sessions | Sessions created time | Sessions failed to create | New pods scaled up | Total running sessions | Total running pods | Max sessions per pod | Gaps | Sessions closed | | --------- | -------------------- | --------------------- | ------------------------- | ------------------ | ---------------------- | ------------------ | -------------------- | ---- | --------------- | -| 1 | 1 | 29.29 s | 0 | 1 | 1 | 1 | 3 | 2 | 1 | -| 2 | 2 | 53.55 s | 0 | 1 | 2 | 2 | 3 | 4 | 0 | -| 3 | 3 | 42.01 s | 0 | 3 | 5 | 5 | 3 | 10 | 0 | -| 4 | 1 | 7.82 s | 0 | 0 | 6 | 5 | 3 | 9 | 0 | -| 5 | 1 | 17.63 s | 0 | 1 | 7 | 7 | 3 | 14 | 0 | -| 6 | 1 | 7.95 s | 0 | 0 | 8 | 7 | 3 | 13 | 8 | -| 7 | 3 | 17.18 s | 0 | 0 | 3 | 6 | 3 | 15 | 0 | -| 8 | 2 | 13.31 s | 0 | 0 | 5 | 6 | 3 | 13 | 0 | -| 9 | 1 | 15.54 s | 0 | 0 | 6 | 7 | 3 | 15 | 0 | -| 10 | 3 | 13.88 s | 0 | 0 | 9 | 7 | 3 | 12 | 0 | -| 11 | 1 | 10.01 s | 0 | 1 | 10 | 10 | 3 | 20 | 10 | -| 12 | 1 | 8.10 s | 0 | 0 | 1 | 7 | 3 | 20 | 0 | -| 13 | 2 | 9.76 s | 0 | 0 | 3 | 7 | 3 | 18 | 0 | -| 14 | 2 | 16.99 s | 0 | 0 | 5 | 7 | 3 | 16 | 0 | -| 15 | 3 | 13.53 s | 0 | 0 | 8 | 7 | 3 | 13 | 0 | -| 16 | 3 | 36.09 s | 0 | 3 | 11 | 11 | 3 | 22 | 11 | -| 17 | 2 | 8.04 s | 0 | 0 | 2 | 6 | 3 | 16 | 0 | -| 18 | 2 | 7.95 s | 0 | 0 | 4 | 6 | 3 | 14 | 0 | -| 19 | 1 | 15.48 s | 0 | 1 | 5 | 8 | 3 | 19 | 0 | -| 20 | 1 | 4.69 s | 0 | 0 | 6 | 8 | 3 | 18 | 0 | \ No newline at end of file +| 1 | 3 | 42.91 s | 0 | 3 | 3 | 3 | 3 | 6 | 3 | +| 2 | 3 | 13.21 s | 0 | 0 | 3 | 3 | 3 | 6 | 0 | +| 3 | 1 | 7.04 s | 0 | 0 | 4 | 3 | 3 | 5 | 0 | +| 4 | 2 | 20.36 s | 0 | 2 | 6 | 6 | 3 | 12 | 0 | +| 5 | 2 | 15.87 s | 0 | 0 | 8 | 6 | 3 | 10 | 0 | +| 6 | 1 | 7.93 s | 0 | 0 | 9 | 8 | 3 | 15 | 9 | +| 7 | 2 | 10.21 s | 0 | 0 | 2 | 7 | 3 | 19 | 0 | +| 8 | 1 | 10.90 s | 0 | 0 | 3 | 7 | 3 | 18 | 0 | +| 9 | 2 | 41.68 s | 0 | 1 | 5 | 8 | 3 | 19 | 0 | +| 10 | 2 | 6.86 s | 0 | 0 | 7 | 8 | 3 | 17 | 0 | +| 11 | 2 | 17.19 s | 0 | 0 | 9 | 9 | 3 | 18 | 9 | +| 12 | 1 | 10.31 s | 0 | 0 | 1 | 8 | 3 | 23 | 0 | +| 13 | 3 | 13.32 s | 0 | 0 | 4 | 8 | 3 | 20 | 0 | +| 14 | 3 | 41.59 s | 0 | 2 | 7 | 10 | 3 | 23 | 0 | +| 15 | 3 | 13.85 s | 0 | 0 | 10 | 10 | 3 | 20 | 0 | +| 16 | 1 | 8.47 s | 0 | 0 | 11 | 10 | 3 | 19 | 11 | +| 17 | 2 | 7.50 s | 0 | 0 | 2 | 7 | 3 | 19 | 0 | +| 18 | 1 | 6.93 s | 0 | 0 | 3 | 7 | 3 | 18 | 0 | +| 19 | 3 | 16.11 s | 0 | 2 | 6 | 10 | 3 | 24 | 0 | +| 20 | 3 | 69.63 s | 0 | 1 | 9 | 11 | 3 | 24 | 0 | \ No newline at end of file