Fix undefined basis variable in interface workflow (#7571) - #7878
Open
mohanchen wants to merge 2 commits into
Open
Fix undefined basis variable in interface workflow (#7571)#7878mohanchen wants to merge 2 commits into
mohanchen wants to merge 2 commits into
Conversation
The "Create mock data & patch script" step referenced `basis` inside the Python heredoc without defining it: the matrix key `basis` was never exported to the step environment, so the step failed with "NameError: name 'basis' is not defined" before any mock data was generated. Pass matrix.basis through the BASIS environment variable and read it in the heredoc, matching the existing SCRIPT/PREFIX pattern.
Document the upstream repo/issues/PR links and two workflow facts: upstream PRs are opened from personal fork branches, and workflow_dispatch-only workflows cannot be verified by PR CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7571
The
interfaceworkflow (wannier-interfacejob) defines abasiskey in the build matrix, but the "Create mock data & patch script" step never exported it to the step environment. The Python heredoc in that step referencesbasisdirectly, so each matrix job fails withNameError: name 'basis' is not definedbefore any mock data is generated.Changes
BASIS: ${{ matrix.basis }}to the stepenvbasis = os.environ["BASIS"]inside the heredoc, matching the existingSCRIPT/PREFIXpatternVerification
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/interface.yml'))"workflow_dispatchonly, so it is not triggered by push/PR events; a manual dispatch run is needed to fully verify the fix