diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index e6e2c969d..1acd270e7 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -40,12 +40,14 @@ env: jobs: docker-test: + if: !contains(toJson(github.event.commits), '[skip test]') name: Test Seleium Grid on Docker uses: ./.github/workflows/docker-test.yml with: release: ${{ inputs.release == 'true' }} helm-chart-test: + if: !contains(toJson(github.event.commits), '[skip test]') name: Test Selenium Grid on Kubernetes uses: ./.github/workflows/helm-chart-test.yml secrets: inherit diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6c7a2f897..b5a923b9e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -174,7 +174,7 @@ jobs: run: | git config --local user.email "selenium-ci@users.noreply.github.com" git config --local user.name "Selenium CI Bot" - git commit -m "Update tag ${RELEASE_TAG} in docs and files" -a + git commit -m "[ci] Update tag ${RELEASE_TAG} in docs and files" -m "[skip test]" -a env: RELEASE_TAG: "${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }}" - name: Push changes diff --git a/.github/workflows/helm-chart-release.yml b/.github/workflows/helm-chart-release.yml index 9dc78cf37..ea98e7f03 100644 --- a/.github/workflows/helm-chart-release.yml +++ b/.github/workflows/helm-chart-release.yml @@ -33,7 +33,7 @@ env: jobs: helm-chart-test: - if: github.event.inputs.skip-test != 'true' + if: github.event.inputs.skip-test != 'true' && !contains(toJson(github.event.commits), '[skip test]') uses: ./.github/workflows/helm-chart-test.yml with: release: ${{ github.event.inputs.release == 'true' }} @@ -114,7 +114,7 @@ jobs: run: | git config --local user.email "selenium-ci@users.noreply.github.com" git config --local user.name "Selenium CI Bot" - git commit -m "Update chart ${LATEST_CHART_VERSION} changelog [skip ci]" -a || true + git commit -m "[ci] Update chart ${LATEST_CHART_VERSION} changelog" -m "[skip ci]" -a || true - name: Push changes if: github.event.inputs.skip-commit != 'true' diff --git a/.github/workflows/k8s-scaling-test.yml b/.github/workflows/k8s-scaling-test.yml index 48bbc3297..ff296c185 100644 --- a/.github/workflows/k8s-scaling-test.yml +++ b/.github/workflows/k8s-scaling-test.yml @@ -218,7 +218,7 @@ jobs: git config --local user.email "selenium-ci@users.noreply.github.com" git config --local user.name "Selenium CI Bot" git add .keda/. - git commit -m "[ci] Upload autoscaling in K8s test results [skip ci]" -a + git commit -m "[ci] Upload autoscaling in K8s test results" -m "[skip ci]" -a - name: Push changes uses: ad-m/github-push-action@master with: diff --git a/.github/workflows/update-chart-readme.yml b/.github/workflows/update-chart-readme.yml index 8ec190c2c..c78e87df4 100644 --- a/.github/workflows/update-chart-readme.yml +++ b/.github/workflows/update-chart-readme.yml @@ -43,7 +43,7 @@ jobs: run: | git config --local user.email "selenium-ci@users.noreply.github.com" git config --local user.name "Selenium CI Bot" - git commit -m "Update chart configuration table" -a + git commit -m "[ci] Update chart configuration table" -m "[skip test]" -a - name: Push changes if: env.diff == 'true' uses: ad-m/github-push-action@master diff --git a/.keda/README.md b/.keda/README.md index 19a86ab1b..cc683e15f 100644 --- a/.keda/README.md +++ b/.keda/README.md @@ -49,9 +49,9 @@ 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/6437 +- ~~https://github.com/kedacore/keda/pull/6437 (merged, v2.16.1)~~ -- https://github.com/kedacore/keda/pull/6368 +- ~~https://github.com/kedacore/keda/pull/6368 (merged, v2.16.1)~~ - ~~https://github.com/kedacore/keda/pull/6169 (merged, v2.16.0)~~ diff --git a/Makefile b/Makefile index 5e3db752d..c995f8b91 100644 --- a/Makefile +++ b/Makefile @@ -29,9 +29,11 @@ CHROMIUM_VERSION := $(or $(CHROMIUM_VERSION),$(CHROMIUM_VERSION),latest) FIREFOX_DOWNLOAD_URL := $(or $(FIREFOX_DOWNLOAD_URL),$(FIREFOX_DOWNLOAD_URL),https://download-installer.cdn.mozilla.net/pub/firefox/nightly/2024/10/2024-10-28-09-56-35-mozilla-central/firefox-133.0a1.en-US.linux-aarch64.tar.bz2) SBOM_OUTPUT := $(or $(SBOM_OUTPUT),$(SBOM_OUTPUT),package_versions.txt) KEDA_TAG_PREV_VERSION := $(or $(KEDA_TAG_PREV_VERSION),$(KEDA_TAG_PREV_VERSION),2.16.0-selenium-grid) -KEDA_TAG_VERSION := $(or $(KEDA_TAG_VERSION),$(KEDA_TAG_VERSION),2.16.0-selenium-grid) +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.0-selenium-grid-20241224) +KEDA_BASED_TAG := $(or $(KEDA_BASED_TAG),$(KEDA_BASED_TAG),2.16.1-selenium-grid-20241224) +TEST_PATCHED_KEDA := $(or $(TEST_PATCHED_KEDA),$(TEST_PATCHED_KEDA),false) all: hub \ distributor \ @@ -938,7 +940,7 @@ chart_test_autoscaling_deployment_https: ./tests/charts/make/chart_test.sh DeploymentAutoscaling chart_test_autoscaling_deployment: - PLATFORMS=$(PLATFORMS) TEST_EXISTING_KEDA=true RELEASE_NAME=selenium CHART_ENABLE_TRACING=true TEST_PATCHED_KEDA=true \ + PLATFORMS=$(PLATFORMS) TEST_EXISTING_KEDA=true RELEASE_NAME=selenium CHART_ENABLE_TRACING=true TEST_PATCHED_KEDA=$(TEST_PATCHED_KEDA) \ SECURE_CONNECTION_SERVER=true SECURE_USE_EXTERNAL_CERT=true SERVICE_TYPE_NODEPORT=true SELENIUM_GRID_PROTOCOL=https SELENIUM_GRID_HOST=$$(hostname -I | cut -d' ' -f1) SELENIUM_GRID_PORT=31444 \ SELENIUM_GRID_AUTOSCALING_MIN_REPLICA=1 SET_MAX_REPLICAS=3 TEST_DELAY_AFTER_TEST=2 SELENIUM_GRID_MONITORING=false \ 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) \ @@ -954,7 +956,7 @@ chart_test_autoscaling_job_https: ./tests/charts/make/chart_test.sh JobAutoscaling chart_test_autoscaling_job_hostname: - PLATFORMS=$(PLATFORMS) CHART_ENABLE_TRACING=true CHART_ENABLE_BASIC_AUTH=true BASIC_AUTH_EMBEDDED_URL=true TEST_PATCHED_KEDA=true \ + PLATFORMS=$(PLATFORMS) CHART_ENABLE_TRACING=true CHART_ENABLE_BASIC_AUTH=true BASIC_AUTH_EMBEDDED_URL=true TEST_PATCHED_KEDA=$(TEST_PATCHED_KEDA) \ 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_enableTracing_basicAuth_secureIngress_externalCerts_ingressPublicIP_autoScaling_originKEDA_scaledJob_subPath.yaml" \ @@ -992,7 +994,7 @@ test_k8s_autoscaling_job_count_strategy_default_with_node_max_sessions: test_k8s_autoscaling_job_count_strategy_default: MATRIX_TESTS=$(or $(MATRIX_TESTS), "AutoscalingTestsScaleUp") SCALING_STRATEGY=$(or $(SCALING_STRATEGY), "default") \ - PLATFORMS=$(PLATFORMS) RELEASE_NAME=selenium TEST_PATCHED_KEDA=true SELENIUM_GRID_PROTOCOL=http SELENIUM_GRID_HOST=localhost SELENIUM_GRID_PORT=80 \ + PLATFORMS=$(PLATFORMS) RELEASE_NAME=selenium TEST_PATCHED_KEDA=$(TEST_PATCHED_KEDA) SELENIUM_GRID_PROTOCOL=http SELENIUM_GRID_HOST=localhost SELENIUM_GRID_PORT=80 \ SELENIUM_GRID_MONITORING=false CLEAR_POD_HISTORY=true SET_MAX_REPLICAS=100 ENABLE_VIDEO_RECORDER=false \ 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) \ ./tests/charts/make/chart_test.sh JobAutoscaling @@ -1007,7 +1009,7 @@ test_k8s_autoscaling_deployment_count_with_node_max_sessions: test_k8s_autoscaling_deployment_count: MATRIX_TESTS=$(or $(MATRIX_TESTS), "AutoscalingTestsScaleUp") \ - PLATFORMS=$(PLATFORMS) RELEASE_NAME=selenium TEST_PATCHED_KEDA=true SELENIUM_GRID_PROTOCOL=http SELENIUM_GRID_HOST=localhost SELENIUM_GRID_PORT=80 \ + PLATFORMS=$(PLATFORMS) RELEASE_NAME=selenium TEST_PATCHED_KEDA=$(TEST_PATCHED_KEDA) SELENIUM_GRID_PROTOCOL=http SELENIUM_GRID_HOST=localhost SELENIUM_GRID_PORT=80 \ SELENIUM_GRID_MONITORING=false CLEAR_POD_HISTORY=true SET_MAX_REPLICAS=100 ENABLE_VIDEO_RECORDER=false \ 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) \ ./tests/charts/make/chart_test.sh DeploymentAutoscaling diff --git a/charts/selenium-grid/CONFIGURATION.md b/charts/selenium-grid/CONFIGURATION.md index d8f5197ac..0a3fefddd 100644 --- a/charts/selenium-grid/CONFIGURATION.md +++ b/charts/selenium-grid/CONFIGURATION.md @@ -407,7 +407,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | chromeNode.hpa.browserName | string | `"chrome"` | browserName from the capability | | chromeNode.hpa.sessionBrowserName | string | `"chrome"` | sessionBrowserName if the browserName is different from the sessionBrowserName | | chromeNode.hpa.browserVersion | string | `""` | browserVersion from the capability | -| chromeNode.hpa.platformName | string | `"linux"` | platformName from the capability | +| chromeNode.hpa.platformName | string | `"Linux"` | platformName from the capability | | chromeNode.hpa.unsafeSsl | string | `"{{ template \"seleniumGrid.graphqlURL.unsafeSsl\" . }}"` | Skip check SSL when connecting to the Graphql endpoint | | chromeNode.initContainers | list | `[]` | It is used to add initContainers in the same pod of the browser node. It should be set using the --set-json option | | chromeNode.sidecars | list | `[]` | It is used to add sidecars proxy in the same pod of the browser node. It means it will add a new container to the deployment itself. It should be set using the --set-json option | @@ -459,7 +459,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | firefoxNode.hpa.browserName | string | `"firefox"` | browserName from the capability | | firefoxNode.hpa.sessionBrowserName | string | `"firefox"` | sessionBrowserName if the browserName is different from the sessionBrowserName | | firefoxNode.hpa.browserVersion | string | `""` | browserVersion from the capability | -| firefoxNode.hpa.platformName | string | `"linux"` | platformName from the capability | +| firefoxNode.hpa.platformName | string | `"Linux"` | platformName from the capability | | firefoxNode.hpa.unsafeSsl | string | `"{{ template \"seleniumGrid.graphqlURL.unsafeSsl\" . }}"` | Skip check SSL when connecting to the Graphql endpoint | | firefoxNode.initContainers | list | `[]` | It is used to add initContainers in the same pod of the browser node. It should be set using the --set-json option | | firefoxNode.sidecars | list | `[]` | It is used to add sidecars proxy in the same pod of the browser node. It means it will add a new container to the deployment itself. It should be set using the --set-json option | @@ -511,7 +511,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | edgeNode.hpa.browserName | string | `"MicrosoftEdge"` | browserName from the capability | | edgeNode.hpa.sessionBrowserName | string | `"msedge"` | sessionBrowserName if the browserName is different from the sessionBrowserName | | edgeNode.hpa.browserVersion | string | `""` | browserVersion from the capability | -| edgeNode.hpa.platformName | string | `"linux"` | platformName from the capability | +| edgeNode.hpa.platformName | string | `"Linux"` | platformName from the capability | | edgeNode.hpa.unsafeSsl | string | `"{{ template \"seleniumGrid.graphqlURL.unsafeSsl\" . }}"` | Skip check SSL when connecting to the Graphql endpoint | | edgeNode.initContainers | list | `[]` | It is used to add initContainers in the same pod of the browser node. It should be set using the --set-json option | | edgeNode.sidecars | list | `[]` | It is used to add sidecars proxy in the same pod of the browser node. It means it will add a new container to the deployment itself. It should be set using the --set-json option | @@ -595,7 +595,6 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | videoRecorder.extraVolumes | list | `[]` | Extra volumes for video recorder pod | | videoRecorder.s3 | object | `{"args":[],"command":[],"extraEnvironmentVariables":null,"imageName":"aws-cli","imagePullPolicy":"IfNotPresent","imageRegistry":"bitnami","imageTag":"latest","securityContext":{"runAsUser":0}}` | Container spec for the uploader if above it is defined as "uploader.name: s3" | | customLabels | object | `{}` | Custom labels for k8s resources | -| keda.image | object | `{"keda":{"registry":"selenium","repository":"keda","tag":"2.16.0-selenium-grid-20241204"},"metricsApiServer":{"registry":"selenium","repository":"keda-metrics-apiserver","tag":"2.16.0-selenium-grid-20241204"},"webhooks":{"registry":"selenium","repository":"keda-admission-webhooks","tag":"2.16.0-selenium-grid-20241204"}}` | Specify image for KEDA components | | keda.additionalAnnotations | string | `nil` | Annotations for KEDA resources | | keda.http.timeout | int | `60000` | | | keda.webhooks | object | `{"enabled":false}` | Enable KEDA admission webhooks component | diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 1bc13903f..08c2e2f70 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -1120,7 +1120,7 @@ chromeNode: # -- browserVersion from the capability browserVersion: "" # -- platformName from the capability - platformName: "linux" + platformName: "Linux" # browserVersion: '91.0' # Optional. Only required when supporting multiple versions of browser in your Selenium Grid. # -- Skip check SSL when connecting to the Graphql endpoint unsafeSsl: '{{ template "seleniumGrid.graphqlURL.unsafeSsl" . }}' # Optional @@ -1305,7 +1305,7 @@ firefoxNode: # -- browserVersion from the capability browserVersion: "" # -- platformName from the capability - platformName: "linux" + platformName: "Linux" # -- Skip check SSL when connecting to the Graphql endpoint unsafeSsl: '{{ template "seleniumGrid.graphqlURL.unsafeSsl" . }}' # Optional @@ -1489,7 +1489,7 @@ edgeNode: # -- browserVersion from the capability browserVersion: "" # -- platformName from the capability - platformName: "linux" + platformName: "Linux" # -- Skip check SSL when connecting to the Graphql endpoint unsafeSsl: '{{ template "seleniumGrid.graphqlURL.unsafeSsl" . }}' # Optional @@ -1826,19 +1826,19 @@ customLabels: {} keda: # enabled: false # -- Specify image for KEDA components - image: - keda: - registry: selenium - repository: keda - tag: "2.16.0-selenium-grid-20241204" - metricsApiServer: - registry: selenium - repository: keda-metrics-apiserver - tag: "2.16.0-selenium-grid-20241204" - webhooks: - registry: selenium - repository: keda-admission-webhooks - tag: "2.16.0-selenium-grid-20241204" +# image: +# keda: +# registry: selenium +# repository: keda +# tag: "2.16.0-selenium-grid-20241204" +# metricsApiServer: +# registry: selenium +# repository: keda-metrics-apiserver +# tag: "2.16.0-selenium-grid-20241204" +# webhooks: +# registry: selenium +# repository: keda-admission-webhooks +# tag: "2.16.0-selenium-grid-20241204" # -- Annotations for KEDA resources additionalAnnotations: http: diff --git a/generate_chart_changelog.sh b/generate_chart_changelog.sh index 49d8607fa..0228ea7cb 100755 --- a/generate_chart_changelog.sh +++ b/generate_chart_changelog.sh @@ -8,8 +8,10 @@ DEFAULT_TAG="trunk" SET_TAG=${1:-$(git rev-parse --abbrev-ref HEAD)} function get_keda_version() { + KEDA_CORE_VERSION=$(grep KEDA_CORE_VERSION Makefile | sed 's/.*,\([^)]*\))/\1/p' | head -n 1) KEDA_TAG_VERSION=$(grep KEDA_TAG_VERSION Makefile | sed 's/.*,\([^)]*\))/\1/p' | head -n 1) KEDA_IMAGE_TAG=$(find . \( -type d -name .git -prune \) -o -type f -wholename '*/selenium-grid/values.yaml' -print0 | xargs -0 cat | grep $KEDA_TAG_VERSION | head -n 1 | cut -d ':' -f 2 | tr -d '[:space:]' | tr -d '"') + IS_PATCHED_VERSION=$(grep TEST_PATCHED_KEDA Makefile | sed 's/.*,\([^)]*\))/\1/p' | head -n 1) } # Get current chart app version @@ -88,10 +90,14 @@ generate_changelog() { fi get_keda_version - echo "### Experimental" >>"$temp_file" - echo "- Selenium Grid Scaler implementation preview. [README](https://github.com/seleniumhq/docker-selenium/tree/trunk/.keda/README.md)" >>"$temp_file" - if [ -n "$KEDA_IMAGE_TAG" ]; then - echo "- Chart is tested autoscaling capabilities with KEDA image tag: $KEDA_IMAGE_TAG" >>"$temp_file" + if [ "${IS_PATCHED_VERSION}" == "true" ]; then + echo "### Experimental" >>"$temp_file" + echo "- Selenium Grid Scaler implementation preview. [README](https://github.com/seleniumhq/docker-selenium/tree/trunk/.keda/README.md)" >>"$temp_file" + if [ -n "$KEDA_IMAGE_TAG" ]; then + echo "- Chart is tested autoscaling capabilities with KEDA image tag: $KEDA_IMAGE_TAG" >>"$temp_file" + fi + else + echo "- Chart is tested autoscaling capabilities with KEDA image tag: $KEDA_CORE_VERSION" >>"$temp_file" fi echo "" >>"$temp_file" diff --git a/tests/charts/make/chart_test.sh b/tests/charts/make/chart_test.sh index f9207de8f..55fdddde4 100755 --- a/tests/charts/make/chart_test.sh +++ b/tests/charts/make/chart_test.sh @@ -59,7 +59,7 @@ MAX_SESSIONS_CHROME=${MAX_SESSIONS_CHROME:-${TEST_NODE_MAX_SESSIONS}} MAX_SESSIONS_FIREFOX=${MAX_SESSIONS_FIREFOX:-${TEST_NODE_MAX_SESSIONS}} MAX_SESSIONS_EDGE=${MAX_SESSIONS_EDGE:-${TEST_NODE_MAX_SESSIONS}} TEST_NAME_OVERRIDE=${TEST_NAME_OVERRIDE:-"false"} -TEST_PATCHED_KEDA=${TEST_PATCHED_KEDA:-"true"} +TEST_PATCHED_KEDA=${TEST_PATCHED_KEDA:-"false"} BASIC_AUTH_EMBEDDED_URL=${BASIC_AUTH_EMBEDDED_URL:-"false"} SELENIUM_GRID_MONITORING=${SELENIUM_GRID_MONITORING:-"true"} TEST_EXISTING_PTS=${TEST_EXISTING_PTS:-"false"}