Skip to content

Tal.ba/feat/enhance tests - #4

Merged
gabsow merged 7 commits into
modules-nightly-upstreamfrom
tal.ba/feat/enhance_tests
Jul 20, 2026
Merged

gabsow merged 7 commits into
modules-nightly-upstreamfrom
tal.ba/feat/enhance_tests

Conversation

@TalBarYakar

Copy link
Copy Markdown
Collaborator

No description provided.

@TalBarYakar
TalBarYakar force-pushed the tal.ba/feat/enhance_tests branch from 71062ae to 37bc4ae Compare July 20, 2026 12:21
On a pull_request event github.event.inputs is empty, so the checkout
fell back to unstable and built unstable's modules.yaml — never the pin
bump that triggered the run, so a PR bumping a module to a version that
fails to build/load on some OS would still pass green. Fetch the PR merge
ref (published on the base repo, so fork PRs work too) on pull_request;
keep the use_repo/use_git_ref inputs for manual dispatch.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@gabsow

gabsow commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Pushed b2e3e9d to fix the checkout so the workflow actually builds the PR's modules.yaml change.

The bug: the checkout used github.event.inputs.use_git_ref || 'unstable'. github.event.inputs.* is only populated on workflow_dispatch — on a pull_request event it's empty, so it fell back to unstable and checked that out. Net effect: a PR bumping a module pin triggers the run (via the paths: modules/modules.yaml filter), but the job clones unstable and builds its modules.yaml, not the bumped pins. A PR raising a module to a version that fails to build/load on some OS would still go green — which defeats the trigger.

The fix: branch on the event type. On pull_request, fetch the PR merge ref (+refs/pull/<number>/merge) from the base repo — GitHub publishes that ref on the base, so it works for fork PRs too — and keep the use_repo/use_git_ref inputs for manual dispatch:

if [ "${{ github.event_name }}" = "pull_request" ]; then
  git remote add origin "https://github.com/${{ github.repository }}.git"
  git fetch --depth 1 origin "+refs/pull/${{ github.event.pull_request.number }}/merge"
else
  git remote add origin "https://github.com/${{ github.event.inputs.use_repo || 'redis/redis' }}.git"
  git fetch --depth 1 origin "${{ github.event.inputs.use_git_ref || 'unstable' }}"
fi
git checkout FETCH_HEAD

The plain git clone (rather than actions/checkout) means nothing pulls in PR code automatically, so the ref has to be fetched explicitly — this makes it match the modules.yaml change that triggered the run.

Separately (no code change, just flagging): make test all and its dispatch toggle were removed in 37bc4ae, so there's now no way to run the module suites from this workflow even manually. If pure build + MODULE LIST smoke is the intent, all good; if you want a manual escape hatch, worth re-adding a run_tests boolean input defaulting to false.

@gabsow
gabsow merged commit 80d2e37 into modules-nightly-upstream Jul 20, 2026
27 of 28 checks passed
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.

2 participants