Skip to content

[ci] Improve build dependencies#3078

Merged
VietND96 merged 1 commit intotrunkfrom
improve-build
Feb 18, 2026
Merged

[ci] Improve build dependencies#3078
VietND96 merged 1 commit intotrunkfrom
improve-build

Conversation

@VietND96
Copy link
Member

@VietND96 VietND96 commented Feb 17, 2026

User description

Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

Enhancement


Description

  • Remove unused PostgreSQL version argument from Sessions Dockerfile

  • Replace curl with wget for downloading ChromeDriver in emulator tests

  • Simplify build dependencies by eliminating unnecessary version declarations


Diagram Walkthrough

flowchart LR
  A["Sessions Dockerfile"] -->|Remove POSTGRESQL_VERSION| B["Simplified Dependencies"]
  C["Emulator Dockerfile"] -->|Replace curl with wget| D["Improved Download Tool"]
  B --> E["Cleaner Build Configuration"]
  D --> E
Loading

File Walkthrough

Relevant files
Configuration changes
Dockerfile
Remove unused PostgreSQL version dependency                           

Sessions/Dockerfile

  • Removed unused POSTGRESQL_VERSION argument declaration
  • Removed PostgreSQL dependency from Maven fetch command for session map
    JDBC
  • Streamlined build dependencies by eliminating unnecessary version
    variables
+0/-2     
Enhancement
Dockerfile.emulator
Replace curl with wget for ChromeDriver download                 

tests/Dockerfile.emulator

  • Replaced curl command with wget for downloading ChromeDriver
  • Changed from curl ${CHROME_DRIVER_URL} -o to wget -O syntax
  • Maintains same functionality with alternative download tool
+1/-1     

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Feb 17, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Supply chain download

Description: The build downloads and unzips a ChromeDriver artifact from ${CHROME_DRIVER_URL} without
integrity verification (e.g., checksum/signature or pinned digest), enabling a
supply-chain/MITM risk where a malicious zip could be fetched and executed during the
image build.
Dockerfile.emulator [8-12]

Referred Code
RUN wget -O /tmp/chromedriver.zip ${CHROME_DRIVER_URL} \
  && rm -rf ~/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/linux \
  && mkdir -p ~/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/linux \
  && unzip /tmp/chromedriver.zip -d ~/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/linux \
  && ~/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/linux/chromedriver --version \
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Unvalidated URL input: The build arg CHROME_DRIVER_URL is used directly in a shell RUN command without
quoting/validation or integrity checking, which may allow unsafe input or unintended
downloads during image builds.

Referred Code
RUN wget -O /tmp/chromedriver.zip ${CHROME_DRIVER_URL} \
  && rm -rf ~/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/linux \

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Feb 17, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Learned
best practice
Validate and harden downloads

Quote ${CHROME_DRIVER_URL}, fail fast if it's empty, and validate the downloaded
zip with a pinned checksum (or another integrity mechanism) to avoid tampering
and accidental empty/incorrect URLs.

tests/Dockerfile.emulator [8-13]

-RUN wget -O /tmp/chromedriver.zip ${CHROME_DRIVER_URL} \
+ARG CHROME_DRIVER_SHA256
+RUN test -n "${CHROME_DRIVER_URL}" \
+  && test -n "${CHROME_DRIVER_SHA256}" \
+  && wget -O /tmp/chromedriver.zip "${CHROME_DRIVER_URL}" \
+  && echo "${CHROME_DRIVER_SHA256}  /tmp/chromedriver.zip" | sha256sum -c - \
   && rm -rf ~/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/linux \
   && mkdir -p ~/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/linux \
   && unzip /tmp/chromedriver.zip -d ~/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/linux \
   && ~/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/linux/chromedriver --version \
   && rm -rf /tmp/chromedriver.zip
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why:
Relevant best practice - When downloading external tooling/artifacts in CI/Docker, pin/validate the download and handle variables robustly by quoting and ensuring required variables are non-empty.

Low
  • Update

@qodo-code-review
Copy link
Contributor

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: Test Selenium Grid on Kubernetes / Test K8s (v1.32.10, minikube, v3.17.4, 28.5.2, 3.10, true, false, ubuntu-22.04, true, playwright_...

Failed stage: Set up containerd image store feature [❌]

Failed test name: ""

Failure summary:

  • The workflow ultimately failed at the artifact upload step because actions/upload-artifact@main was
    invoked without the required input path (log line 796: Input required and not supplied: path).
  • Earlier in the job, the make setup_dev_env command (run via nick-invision/retry@master) hit a Node
    error Error: kill EPERM while installing packages (around lines 756-760), but the log snippet does
    not show this as the final stopping error; the hard failure shown is the missing path for the
    upload-artifact action.
Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

170:  �[36;1m�[0m
171:  �[36;1m  sudo rm -rf /opt/ghc || true�[0m
172:  �[36;1m  sudo rm -rf /usr/local/.ghcup || true�[0m
173:  �[36;1m  �[0m
174:  �[36;1m  AFTER=$(getAvailableSpace)�[0m
175:  �[36;1m  SAVED=$((AFTER-BEFORE))�[0m
176:  �[36;1m  printSavedSpace $SAVED "Haskell runtime"�[0m
177:  �[36;1mfi�[0m
178:  �[36;1m�[0m
179:  �[36;1m# Option: Remove large packages�[0m
180:  �[36;1m# REF: https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh�[0m
181:  �[36;1m�[0m
182:  �[36;1mif [[ false == 'true' ]]; then�[0m
183:  �[36;1m  BEFORE=$(getAvailableSpace)�[0m
184:  �[36;1m  �[0m
185:  �[36;1m  sudo apt-get remove -y '^aspnetcore-.*' || echo "::warning::The command [sudo apt-get remove -y '^aspnetcore-.*'] failed to complete successfully. Proceeding..."�[0m
186:  �[36;1m  sudo apt-get remove -y '^dotnet-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^dotnet-.*' --fix-missing] failed to complete successfully. Proceeding..."�[0m
187:  �[36;1m  sudo apt-get remove -y '^llvm-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^llvm-.*' --fix-missing] failed to complete successfully. Proceeding..."�[0m
188:  �[36;1m  sudo apt-get remove -y 'php.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y 'php.*' --fix-missing] failed to complete successfully. Proceeding..."�[0m
189:  �[36;1m  sudo apt-get remove -y '^mongodb-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mongodb-.*' --fix-missing] failed to complete successfully. Proceeding..."�[0m
190:  �[36;1m  sudo apt-get remove -y '^mysql-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mysql-.*' --fix-missing] failed to complete successfully. Proceeding..."�[0m
191:  �[36;1m  sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || echo "::warning::The command [sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing] failed to complete successfully. Proceeding..."�[0m
192:  �[36;1m  sudo apt-get remove -y google-cloud-sdk --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-sdk --fix-missing] failed to complete successfully. Proceeding..."�[0m
193:  �[36;1m  sudo apt-get remove -y google-cloud-cli --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-cli --fix-missing] failed to complete successfully. Proceeding..."�[0m
194:  �[36;1m  sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed to complete successfully. Proceeding..."�[0m
195:  �[36;1m  sudo apt-get clean || echo "::warning::The command [sudo apt-get clean] failed to complete successfully. Proceeding..."�[0m
196:  �[36;1m�[0m
...

475:  git switch -
476:  Turn off this advice by setting config variable advice.detachedHead to false
477:  HEAD is now at 637572c Merge 969857ba94bef44969c3254608658f7495ac081b into 7872df7a11f747d040a77cb30754bcb47f7a36f0
478:  ##[endgroup]
479:  [command]/usr/bin/git log -1 --format=%H
480:  637572cab8c89552952cbd683195ee4fbd78fd64
481:  ##[group]Run nick-invision/retry@master
482:  with:
483:  timeout_minutes: 10
484:  max_attempts: 3
485:  command: make setup_dev_env
486:  
487:  retry_wait_seconds: 10
488:  polling_interval_seconds: 1
489:  warning_on_retry: true
490:  continue_on_error: false
491:  env:
...

504:  ##[endgroup]
505:  ##[group]Attempt 1
506:  ./tests/charts/make/chart_setup_env.sh ; \
507:  exit_code=$? ; \
508:  make set_containerd_image_store ; \
509:  exit $exit_code ;
510:  + echo 'Set ENV variables'
511:  Set ENV variables
512:  + CLUSTER=minikube
513:  + DOCKER_VERSION=28.5.2
514:  + DOCKER_ENABLE_QEMU=true
515:  + HELM_VERSION=v3.17.4
516:  + KUBERNETES_VERSION=v1.32.10
517:  + INSTALL_DOCKER=true
518:  + [[ true != \t\r\u\e ]]
519:  + trap on_failure ERR
520:  + echo 'Installing Docker for AMD64 / ARM64'
...

744:  Get:9 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libgcc-s1-arm64-cross all 12.3.0-1ubuntu1~22.04cross1 [39.8 kB]
745:  Get:10 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libgomp1-arm64-cross all 12.3.0-1ubuntu1~22.04cross1 [122 kB]
746:  Get:11 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libitm1-arm64-cross all 12.3.0-1ubuntu1~22.04cross1 [28.0 kB]
747:  Get:12 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libatomic1-arm64-cross all 12.3.0-1ubuntu1~22.04cross1 [10.6 kB]
748:  Get:13 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libasan6-arm64-cross all 11.4.0-1ubuntu1~22.04cross1 [2228 kB]
749:  Get:14 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 liblsan0-arm64-cross all 12.3.0-1ubuntu1~22.04cross1 [1034 kB]
750:  Get:15 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libtsan0-arm64-cross all 11.4.0-1ubuntu1~22.04cross1 [2223 kB]
751:  Get:16 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libstdc++6-arm64-cross all 12.3.0-1ubuntu1~22.04cross1 [616 kB]
752:  Get:17 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libubsan1-arm64-cross all 12.3.0-1ubuntu1~22.04cross1 [964 kB]
753:  Get:18 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libhwasan0-arm64-cross all 12.3.0-1ubuntu1~22.04cross1 [1117 kB]
754:  Get:19 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libgcc-11-dev-arm64-cross all 11.4.0-1ubuntu1~22.04cross1 [1147 kB]
755:  Get:20 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 gcc-11-aarch64-linux-gnu amd64 11.4.0-1ubuntu1~22.04cross1 [18.8 MB]
756:  /home/runner/work/_actions/nick-invision/retry/master/dist/index.js:1931
757:  throw err;
758:  ^
759:  Error: kill EPERM
760:  at process.kill (node:internal/process/per_thread:225:13)
...

781:  include-hidden-files: false
782:  env:
783:  CLUSTER: minikube
784:  KUBERNETES_VERSION: v1.32.10
785:  ARTIFACT_NAME: v1.32.10-playwright_connect_grid
786:  HELM_VERSION: v3.17.4
787:  DOCKER_VERSION: 28.5.2
788:  TEST_UPGRADE_CHART: true
789:  SERVICE_MESH: false
790:  CHECK_RECORD_OUTPUT: true
791:  SAUCE_ACCESS_KEY: ***
792:  SAUCE_USERNAME: ***
793:  SAUCE_REGION: ***
794:  TEST_PATCHED_KEDA: 
795:  ##[endgroup]
796:  ##[error]Input required and not supplied: path
797:  ##[group]Run actions/upload-artifact@main

@VietND96 VietND96 merged commit a3092ec into trunk Feb 18, 2026
54 of 56 checks passed
@VietND96 VietND96 deleted the improve-build branch February 18, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments