Skip to content

[build] Fix vars context not support in composite action files#3100

Merged
VietND96 merged 1 commit into
trunkfrom
fix-composite-action
Mar 28, 2026
Merged

[build] Fix vars context not support in composite action files#3100
VietND96 merged 1 commit into
trunkfrom
fix-composite-action

Conversation

@VietND96
Copy link
Copy Markdown
Member

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

Error: /home/runner/work/docker-selenium/docker-selenium/./.github/actions/get-latest-upstream/action.yml (Line: 20, Col: 18): Unrecognized named-value: 'vars'. Located at position 1 within expression: vars.AUTHORS || 'SeleniumHQ'
Error: GitHub.DistributedTask.ObjectTemplating.TemplateValidationException: The template is not valid. /home/runner/work/docker-selenium/docker-selenium/./.github/actions/get-latest-upstream/action.yml (Line: 20, Col: 18): Unrecognized named-value: 'vars'. Located at position 1 within expression: vars.AUTHORS || 'SeleniumHQ'
   at GitHub.DistributedTask.ObjectTemplating.TemplateValidationErrors.Check()
   at GitHub.Runner.Worker.ActionManifestManagerLegacy.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String fileRelativePath, MappingToken outputs)
   at GitHub.Runner.Worker.ActionManifestManagerLegacy.Load(IExecutionContext executionContext, String manifestFile)
Error: Failed to load /home/runner/work/docker-selenium/docker-selenium/./.github/actions/get-latest-upstream/action.yml

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.

Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
@qodo-code-review
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Fix vars context support in composite action and workflows

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• 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
Diagram
flowchart 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
Loading

Grey Divider

File Changes

1. .github/actions/get-latest-upstream/action.yml 🐞 Bug fix +5/-1

Add authors input parameter to composite action

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


2. .github/workflows/build-ffmpeg.yml ⚙️ Configuration changes +1/-1

Update AUTHORS fallback to github.repository_owner

.github/workflows/build-ffmpeg.yml


3. .github/workflows/deploy.yml ⚙️ Configuration changes +2/-1

Add authors parameter and update fallback value

.github/workflows/deploy.yml


View more (8)
4. .github/workflows/docker-test.yml ⚙️ Configuration changes +2/-1

Add authors parameter and update fallback value

.github/workflows/docker-test.yml


5. .github/workflows/helm-chart-test.yml ⚙️ Configuration changes +2/-1

Add authors parameter and update fallback value

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


6. .github/workflows/k8s-scaling-test.yml ⚙️ Configuration changes +2/-1

Add authors parameter and update fallback value

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


7. .github/workflows/nightly.yml ⚙️ Configuration changes +2/-1

Add authors parameter and update fallback value

.github/workflows/nightly.yml


8. .github/workflows/release-chrome-for-testing-versions.yml ⚙️ Configuration changes +2/-1

Add authors parameter and update fallback value

.github/workflows/release-chrome-for-testing-versions.yml


9. .github/workflows/release-chrome-versions.yml ⚙️ Configuration changes +2/-1

Add authors parameter and update fallback value

.github/workflows/release-chrome-versions.yml


10. .github/workflows/release-edge-versions.yml ⚙️ Configuration changes +2/-1

Add authors parameter and update fallback value

.github/workflows/release-edge-versions.yml


11. .github/workflows/release-firefox-versions.yml ⚙️ Configuration changes +2/-1

Add authors parameter and update fallback value

.github/workflows/release-firefox-versions.yml


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown
Contributor

qodo-code-review Bot commented Mar 28, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 📐 Spec deviations (0)

Grey Divider


Action required

1. Wrong AUTHORS fallback 🐞 Bug ✓ Correctness
Description
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.
Code

.github/workflows/docker-test.yml[215]

+          authors: ${{ vars.AUTHORS || github.repository_owner }}
Evidence
build-test.yml runs on pull_request and calls the reusable docker-test.yml workflow.
docker-test.yml passes authors: ${{ vars.AUTHORS || github.repository_owner }} into
get-latest-upstream, and the composite action uses AUTHORS to build GitHub API URLs under
https://api.github.com/repos/${AUTHORS}/selenium/..., so the fallback value must be a GitHub
org/user that actually hosts a selenium repo. The repository’s own defaults (Makefile) indicate
the intended default upstream author/org is SeleniumHQ, not the current repo owner (which differs
in forks).

.github/workflows/build-test.yml[33-89]
.github/workflows/docker-test.yml[210-222]
.github/actions/get-latest-upstream/action.yml[20-46]
Makefile[1-18]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## 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


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

with:
release: ${{ inputs.release || false }}
gh_cli_token: ${{ secrets.GITHUB_TOKEN }}
authors: ${{ vars.AUTHORS || github.repository_owner }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

@VietND96 VietND96 merged commit 2dbdf70 into trunk Mar 28, 2026
28 checks passed
@VietND96 VietND96 deleted the fix-composite-action branch March 28, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant