[shiftstack] Use GitHub for shiftstack-qa clone and fix false-positive test results#3922
Draft
imatza-rh wants to merge 1 commit into
Draft
Conversation
Contributor
|
Skipping CI for Draft Pull Request. |
22a3c0d to
4dd8af5
Compare
…e test results shiftstack-qa moved code review to GitHub PRs (shiftstack/ shiftstack-qa#2). The role default still clones from GerritHub, which is no longer maintained. - Change cifmw_shiftstack_qa_repo default to GitHub - Rename cifmw_shiftstack_qa_gerrithub_change to cifmw_shiftstack_qa_change_ref Also fix a false-positive bug in exec_command_in_pod.yml where oc rsh could return rc=0 before the inner command finished, causing the test to report PASS when the playbook actually failed. Observed in tp!2297 build d078ccbd - the shiftstack test ran for only 145s (vs typical 1.5-2h), OCP was never installed, yet the job reported SUCCESS. The fix writes the inner command exit code to a marker file on the pod, then verifies it in a separate oc exec call. This catches failures even if the first oc exec connection drops mid-execution. Also switches from oc rsh to oc exec for non-interactive pod commands. Related-Issue: #OSPRH-29506 Assisted-By: Claude Code Signed-off-by: Itay Matza <imatza@redhat.com>
4dd8af5 to
b2ab112
Compare
Contributor
|
[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 |
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
Two fixes for the shiftstack CI role:
1. Clone shiftstack-qa from GitHub instead of GerritHub
shiftstack-qa moved code review to GitHub PRs (shiftstack/shiftstack-qa#2). The role default still clones from GerritHub, which is no longer maintained. GerritHub main is 3+ commits behind GitHub main - missing the
4-stableOCP channel switch,lb_testsdisable, and.gitreviewremoval.cifmw_shiftstack_qa_repodefault tohttps://github.com/shiftstack/shiftstack-qacifmw_shiftstack_qa_gerrithub_changetocifmw_shiftstack_qa_change_ref- supports both GitHub PR refs (refs/pull/N/head) and GerritHub change refs (refs/changes/...)2. Fix false-positive test results in exec_command_in_pod.yml
In tp!2297 build d078ccbd,
oc rshreturned rc=0 after 145s while the inner ansible-navigator playbook continued running in the pod for 21 minutes before failing. The shiftstack test reported PASS when OCP was never installed and zero Nova VMs were created. Verified on the live environment (serval70) - inner ansible-log.txt on the pod showedfailed=1at 10:59 UTC, but the outeroc rshtask had already completed withchanged: [localhost]at 10:39 UTC.The fix decouples the test result from the
oc execexit code:/tmp/cifmw_cmd_rc)oc execcall after the main command returnsoc rshtooc execfor non-interactive pod commandsTest plan
false(exit 1) while passingecho hello(exit 0)