Add stage override variable to shiftstack role - #4072
Conversation
|
Hi @tusharjadhav3302. Thanks for your PR. I'm waiting for a openstack-k8s-operators member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 42m 01s |
|
/ok-to-test |
|
/retest |
19c15ef to
da95617
Compare
da95617 to
5ec6e8b
Compare
|
/retest |
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 31m 43s |
|
Job: cifmw-molecule-shiftstack It was downloading openstack-cloud-2.2.0 from galaxy.ansible.com inside the shiftstackclient pod and the node lost outbound network. |
5ec6e8b to
e45958c
Compare
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 13m 00s |
|
recheck |
|
/ok-to-test |
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 33m 32s |
|
recheck |
imatza-rh
left a comment
There was a problem hiding this comment.
Please see the Commit message prefix: the verify-prefix check requires [shiftstack] at the start (e.g. [shiftstack] Add stages override for phased CI)
| {% if cifmw_shiftstack_stages_override | default([]) | length > 0 %}-e "{\"stages\":{{ cifmw_shiftstack_stages_override | to_json | replace(' ', '') }}}}"{% endif %} | ||
| ansible.builtin.include_tasks: exec_command_in_pod.yml | ||
|
|
||
| rescue: |
There was a problem hiding this comment.
}}}} renders invalid JSON when cifmw_shiftstack_stages_override is non-empty - produces {"stages":[...]}} (extra }). Fix: change }}}} to }}}.
Verified:
from jinja2 import Environment
t = Environment().from_string(r'{"stages":{{ v | tojson }}}}')
print(t.render(v=["install"])) # extra }The molecule test doesn't catch this because the default [] skips the {% if %} block.
There was a problem hiding this comment.
Fixed — dropped the extra } so a non-empty override renders valid JSON ({"stages":[...]}). Also rebased onto latest main, squashed to a single commit, and updated the subject to [shiftstack] Add stages override for phased CI for the verify-prefix check.
See df54b4df.
The shiftstack role runs ocp_testing.yaml with a testconfig that bundles all stages (install and verification) in one ansible-navigator call. The phased shiftstack pipeline needs to run install stages in one Zuul job and test stages in another while reusing the same testconfig file. Add cifmw_shiftstack_stages_override (default: []). When set, the role appends extra-vars that override the stages list from the testconfig. An empty list preserves current monolithic behavior. Per-phase testconfig files in shiftstack-qa were not added because CI jobs can pass the stage list directly and the single testconfig remains the source of truth for all other variables. Related-Issue: OSPRH-33128 Signed-off-by: Tushar Jadhav <tjadhav@redhat.com> Co-authored-by: Cursor AI <noreply@cursor.com>
e45958c to
df54b4d
Compare
|
New changes are detected. LGTM label has been removed. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Addressed both review notes from @imatza-rh:
Branch is rebased on latest |
The shiftstack role invokes
ocp_testing.yamlwith a testconfig that bundles all stages (install + test) in a single ansible-navigator call. The upcoming phased pipeline needs to run install stages in one Zuul job and test stages in another, using the same testconfig file.Add
cifmw_shiftstack_stages_override(default: []) that appends--extra-varsto the ansible-navigator command when non-empty, overriding the stages list from the testconfig. This avoids creating per-phase testconfig files in shiftstack-qa and keeps the monolithic job unchanged (empty list = no override = all stages run as before).Related-Issue: OSPRH-33128