Skip to content

Commit 70ef6c4

Browse files
committed
Revert changes
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent fc257c2 commit 70ef6c4

File tree

8 files changed

+25
-22
lines changed

8 files changed

+25
-22
lines changed

.github/actions/get-latest-upstream/action.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,25 @@ runs:
1616
steps:
1717
- name: Get latest upstream
1818
shell: bash
19+
env:
20+
IS_RELEASE: ${{ github.event.inputs.release || 'true' }}
21+
GH_CLI_TOKEN: ${{ inputs.gh_cli_token }}
1922
run: |
2023
sudo apt update
21-
sudo apt install jq
22-
AUTH_HEADER="Authorization: token ${{ inputs.gh_cli_token }}"
23-
if [ "${{ inputs.release }}" = "true" ]; then
24+
sudo apt install gh
25+
echo "${GH_CLI_TOKEN}" | gh auth login --with-token
26+
if [ "${IS_RELEASE}" = "true" ]; then
2427
echo "Getting the latest stable release."
25-
RELEASE=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/SeleniumHQ/selenium/releases | jq -r '[.[] | select(.prerelease == false)] | .[0].tag_name')
28+
RELEASE=$(gh release list -R SeleniumHQ/selenium | grep -v nightly | awk '{ print $4 }' | head -1)
2629
else
2730
echo "Getting the latest Nightly release."
28-
RELEASE=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/SeleniumHQ/selenium/releases | jq -r '[.[] | select(.prerelease == true)] | .[0].tag_name')
31+
RELEASE=$(gh release list -R SeleniumHQ/selenium | grep nightly | awk '{ print $3 }' | head -1)
2932
if [ -z "${RELEASE}" ]; then
3033
echo "Nightly release not found, getting the latest stable release."
31-
RELEASE=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/SeleniumHQ/selenium/releases | jq -r '[.[] | select(.prerelease == false)] | .[0].tag_name')
34+
RELEASE=$(gh release list -R SeleniumHQ/selenium | grep -v nightly | awk '{ print $4 }' | head -1)
3235
fi
3336
fi
34-
jar_file=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/SeleniumHQ/selenium/releases/tags/${RELEASE} | jq -r '.assets[] | select(.name | endswith(".jar")) | .name' | tail -n 1)
37+
jar_file=$(gh release view -R SeleniumHQ/selenium ${RELEASE} | grep jar | awk '{ print $2 }' | tail -n 1)
3538
echo "Server package: ${jar_file}"
3639
VERSION=$(echo $jar_file | sed 's/selenium-server-//;s/\.jar//')
3740
echo "BASE_RELEASE=${RELEASE} | BASE_VERSION=${VERSION} | VERSION=${VERSION}"

.github/workflows/build-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
description: 'Test a new release process'
1313
required: false
1414
type: string
15-
default: 'false'
15+
default: 'true'
1616
workflow_dispatch:
1717
inputs:
1818
rerunFailedOnly:
@@ -49,15 +49,15 @@ jobs:
4949
name: Test Selenium Grid on Docker
5050
uses: ./.github/workflows/docker-test.yml
5151
with:
52-
release: ${{ inputs.release == 'true' }}
52+
release: ${{ github.event.inputs.release || 'true' }}
5353

5454
helm-chart-test:
5555
if: contains(toJson(github.event.commits), '[skip test]') == false
5656
name: Test Selenium Grid on Kubernetes
5757
uses: ./.github/workflows/helm-chart-test.yml
5858
secrets: inherit
5959
with:
60-
release: ${{ inputs.release == 'true' }}
60+
release: ${{ github.event.inputs.release || 'true' }}
6161

6262
rerun-workflow-when-failure:
6363
name: Rerun workflow when failure

.github/workflows/docker-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
description: 'Test a new release process'
88
required: false
99
type: string
10-
default: 'false'
10+
default: 'true'
1111
workflow_dispatch:
1212
inputs:
1313
request-timeout:
@@ -207,7 +207,7 @@ jobs:
207207
- name: Set Selenium base version
208208
uses: ./.github/actions/get-latest-upstream
209209
with:
210-
release: ${{ inputs.release || false }}
210+
release: ${{ github.event.inputs.release || 'true' }}
211211
gh_cli_token: ${{ secrets.GITHUB_TOKEN }}
212212
- name: Sets build date
213213
run: |

.github/workflows/helm-chart-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
uses: ./.github/workflows/helm-chart-test.yml
4343
secrets: inherit
4444
with:
45-
release: ${{ github.event.inputs.release == 'true' }}
45+
release: ${{ github.event.inputs.release || 'true' }}
4646

4747
release:
4848
needs:

.github/workflows/helm-chart-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
description: 'Test a new release process'
1313
required: false
1414
type: string
15-
default: 'false'
15+
default: 'true'
1616
workflow_dispatch:
1717
inputs:
1818
request-timeout:
@@ -44,7 +44,7 @@ jobs:
4444
cluster: 'minikube'
4545
helm-version: 'v3.11.3'
4646
docker-version: '26.1.4'
47-
python-version: '3.8'
47+
python-version: '3.9'
4848
test-upgrade: true
4949
service-mesh: false
5050
os: ubuntu-24.04
@@ -149,7 +149,7 @@ jobs:
149149
- name: Set Selenium base version
150150
uses: ./.github/actions/get-latest-upstream
151151
with:
152-
release: ${{ inputs.release || false }}
152+
release: ${{ github.event.inputs.release || 'true' }}
153153
gh_cli_token: ${{ secrets.GITHUB_TOKEN }}
154154
- name: Sets build date
155155
run: |

.github/workflows/k8s-scaling-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
description: 'Test a new release process'
1313
required: false
1414
type: string
15-
default: 'false'
15+
default: 'true'
1616
push-results:
1717
description: 'Publish the results to the repository'
1818
required: false
@@ -139,7 +139,7 @@ jobs:
139139
- name: Set Selenium base version
140140
uses: ./.github/actions/get-latest-upstream
141141
with:
142-
release: ${{ inputs.release || false }}
142+
release: ${{ github.event.inputs.release || 'true' }}
143143
gh_cli_token: ${{ secrets.GITHUB_TOKEN }}
144144
- name: Sets build date
145145
run: |

Video/video.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ ts_format=${SE_LOG_TIMESTAMP_FORMAT:-"%Y-%m-%d %H:%M:%S,%3N"}
2222
process_name="video.recorder"
2323

2424
if [ "${SE_VIDEO_RECORD_STANDALONE}" = "true" ]; then
25-
JQ_SESSION_ID_QUERY=".value.nodes[-1]?.slots[-1]?.session?.sessionId"
25+
JQ_SESSION_ID_QUERY=".value.nodes[]?.slots[]?.session?.sessionId"
2626
SE_NODE_PORT=${SE_NODE_PORT:-"4444"}
2727
NODE_STATUS_ENDPOINT="$(/opt/bin/video_gridUrl.sh)/status"
2828
else
29-
JQ_SESSION_ID_QUERY=".[-1]?.node?.slots | .[-1]?.session?.sessionId"
29+
JQ_SESSION_ID_QUERY=".[]?.node?.slots | .[0]?.session?.sessionId"
3030
SE_NODE_PORT=${SE_NODE_PORT:-"5555"}
3131
NODE_STATUS_ENDPOINT="${SE_SERVER_PROTOCOL}://${DISPLAY_CONTAINER_NAME}:${SE_NODE_PORT}/status"
3232
fi
@@ -259,7 +259,7 @@ else
259259
fi
260260
echo "$(date -u +"${ts_format}") [${process_name}] - Video recording started"
261261
sleep ${poll_interval}
262-
elif [[ "$recording_started" = "true" && ("$session_id" != "$prev_session_id" || "$session_id" == "null" || "$session_id" == "") ]]; then
262+
elif [[ "$session_id" != "$prev_session_id" && "$recording_started" = "true" ]]; then
263263
stop_recording
264264
wait_for_file_integrity
265265
if [[ $max_recorded_count -gt 0 ]] && [[ $recorded_count -ge $max_recorded_count ]]; then

Video/video_graphQLQuery.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
max_time=1
4-
retry_time=2
4+
retry_time=3
55

66
# Define parameters
77
SESSION_ID=$1

0 commit comments

Comments
 (0)