Skip to content

Fix the source-lane shell dispatch; pin cudaq to the 0.16.0 release - #51

Open
wsttiger wants to merge 2 commits into
NVIDIA:mainfrom
wsttiger:fix/source_lane_016_pin
Open

wsttiger wants to merge 2 commits into
NVIDIA:mainfrom
wsttiger:fix/source_lane_016_pin

Conversation

@wsttiger

@wsttiger wsttiger commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Description

Follow-up to #50, carrying the .cudaq_version bump that was split out
of it — together with the fix for what its first run caught.

The bug (pre-existing since #42, first exercised by #50's pin
change): the Run tests step in lib_algorithms.yaml branches on
if [[ "$cudaq_source" == "source" ]], but the step has no shell:
and resolves to sh (dash) inside the CI container — where [[ does
not exist. The failed condition silently took the pip branch
(--pip-cudaq, which deliberately puts no source install on
PYTHONPATH and whose pip install is gated to pip lanes), producing
ModuleNotFoundError: No module named 'cudaq' on all four source
lanes. The masking was perfect on ordinary PRs: for pip lanes the
broken conditional happens to take the correct branch. Evidence: the
run log shows shell: sh -e {0} and [[: not found one line before
the import error; the CUDA-Q 0.16.0 build itself succeeded and
installed cudaq/__init__.py exactly where --cudaq-prefix looks.

The fix: a workflow-level defaults: run: shell: bash on
lib_algorithms.yaml (with a comment on the dash hazard), covering
this step and the same latent issue in the Configure step.

The pin: .cudaq_version moves to the 0.16.0 release tag commit
(51671baa), so this PR's own CI fires the from-source lanes through
the repaired conditional — building the released source (the build
from #50's run is already cached under the matching key) and running
the suite against it. That run is the validation.


Update (commit 638e76d): the pin change also surfaced a second
latent bug — both reusable build workflows keyed their concurrency
group on github.ref alone, so when pr_workflow invokes
lib_algorithms twice in one run (pip + source lanes) the second
invocation cancelled the first (visible as the Algorithms lanes
repeatedly cancelling). Fixed by scoping the group with the
cudaq_source / cudaq_wheels input. Two-for-one: the source lanes
were designed to catch exactly this class of "only shows up when the
pin moves" breakage.

@wsttiger
wsttiger requested a review from anjbur September 14, 2026 21:27
Bump .cudaq_version to the CUDA-Q 0.16.0 release tag commit
(51671baac373c545c9651c3cfa1a8d371aa67ec7).

The from-source Algorithms lanes failed at pytest with
'No module named cudaq' even though the CUDA-Q build succeeded and
installed cudaq/__init__.py at the /cudaq-install prefix root. The
'Run tests' step in lib_algorithms.yaml has no explicit shell, and
inside the cuda-quantum devcontainer the runner's default resolves to
sh (dash). Its 'if [[ "${{ inputs.cudaq_source }}" == "source" ]]'
condition fails under dash ('[[: not found'), and a failing command in
an if condition does not trip 'sh -e' — so the step silently took the
else branch and ran the test script with --pip-cudaq, which leaves the
source build off PYTHONPATH. The 'Configure' step's cache_key_suffix
[[ test has the same latent problem.

Set a workflow-level 'defaults: run: shell: bash' so every plain run
step in this workflow gets bash (the container has it; the composite
actions already use it explicitly).

Signed-off-by: Scott Thornton <wsttiger@gmail.com>
@wsttiger
wsttiger force-pushed the fix/source_lane_016_pin branch from c37b8f2 to 36635f7 Compare September 14, 2026 22:57
A .cudaq_version change makes pr_workflow invoke lib_algorithms twice
in one run (pip lanes + pin-triggered source lanes) and wheel_algorithms
in both PyPI and Custom modes. Both reusable workflows keyed their
concurrency group on github.ref alone, so the second invocation
cancelled the first — the source and pip Algorithms lanes kept
cancelling each other on this PR. Add the source/mode input to each
group so the concurrent invocations are distinct.

Signed-off-by: Scott Thornton <wsttiger@gmail.com>

@anjbur anjbur left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me as long as PR #50 is merged first, so that the CI can verify that the version bumps don't introduce any breaks in the Custom wheel flow.

This branch has not been deployed

No deployments
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