[build] Fix vars context not support in composite action files#3100
Conversation
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
Review Summary by QodoFix vars context support in composite action and workflows
WalkthroughsDescription• Replace unsupported vars context in composite action with input parameter • Add authors input to get-latest-upstream composite action • Update all workflow files to pass authors parameter explicitly • Replace hardcoded 'SeleniumHQ' fallback with github.repository_owner Diagramflowchart LR
A["Composite Action<br/>action.yml"] -->|"Add authors input"| B["Input Parameter<br/>authors"]
C["Workflow Files<br/>Multiple YAMLs"] -->|"Pass authors parameter"| A
D["vars Context<br/>Unsupported"] -->|"Replace with"| E["github.repository_owner<br/>Fallback"]
C -->|"Update fallback"| E
File Changes1. .github/actions/get-latest-upstream/action.yml
|
Code Review by Qodo
1. Wrong AUTHORS fallback
|
| with: | ||
| release: ${{ inputs.release || false }} | ||
| gh_cli_token: ${{ secrets.GITHUB_TOKEN }} | ||
| authors: ${{ vars.AUTHORS || github.repository_owner }} |
There was a problem hiding this comment.
1. Wrong authors fallback 🐞 Bug ✓ Correctness
Several workflows now default authors/AUTHORS to github.repository_owner when vars.AUTHORS is unset, which makes fork PR CI query https://api.github.com/repos/<forkOwner>/selenium/... and fail when that repo doesn’t exist. This breaks PR validation because build-test.yml runs on pull_request and calls docker-test.yml, which invokes get-latest-upstream using that fallback.
Agent Prompt
## Issue description
Workflows changed the default upstream Selenium org/user from `SeleniumHQ` to `github.repository_owner` when `vars.AUTHORS` is not set. In fork-based PRs (and any non-SeleniumHQ-owned clones), this causes the `get-latest-upstream` composite action to query a non-existent `${AUTHORS}/selenium` repo and fail.
## Issue Context
- `build-test.yml` runs on `pull_request` and calls reusable workflows like `docker-test.yml`.
- `get-latest-upstream` uses `AUTHORS` to build URLs like `https://api.github.com/repos/${AUTHORS}/selenium/releases`.
- The repo’s Makefile default for `AUTHORS` is `SeleniumHQ`, indicating the intended default upstream.
## Fix
- In all affected workflows, revert fallbacks to `SeleniumHQ` (e.g., `vars.AUTHORS || 'SeleniumHQ'`) instead of `github.repository_owner`.
- Optionally harden the composite action’s env to tolerate an explicitly empty input by using `AUTHORS: ${{ inputs.authors || 'SeleniumHQ' }}`.
## Fix Focus Areas
- .github/workflows/docker-test.yml[210-222]
- .github/workflows/helm-chart-test.yml[180-191]
- .github/workflows/k8s-scaling-test.yml[156-168]
- .github/workflows/nightly.yml[54-73]
- .github/workflows/deploy.yml[82-100]
- .github/workflows/build-ffmpeg.yml[44-49]
- .github/workflows/release-chrome-versions.yml[49-90]
- .github/workflows/release-chrome-for-testing-versions.yml[49-90]
- .github/workflows/release-edge-versions.yml[49-90]
- .github/workflows/release-firefox-versions.yml[49-90]
- .github/actions/get-latest-upstream/action.yml[20-25]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
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
Fixes issue in CI
Motivation and Context
Types of changes
Checklist