Fix Polarion junitparser merge failure caused by day2ops report XML in test_results#24
Conversation
…er merge Co-authored-by: Cursor <cursoragent@cursor.com>
ekuris-redhat
left a comment
There was a problem hiding this comment.
Tushar, nice catch on the root cause. The day2ops custom XML breaking junitparser merge in the Polarion post-run makes total sense.
One thing though, main.yml still creates the report file at report_dir (line 39: dest: "{{ report_dir }}/{{day2ops_report_filename }}"), but with your change run_procedure.yml now tries to write to artifacts_dir. Since report_dir resolves to ~/artifacts/test_results and artifacts_dir is ~/artifacts, those are two different paths. So the
community.general.xml module will fail trying to modify a file that doesn't exist at the new location.
You'll need to update all three files together: main.yml needs the directory creation (line 32) and the template dest (line 39) changed to artifacts_dir, run_procedure.yml is already done in this PR, and run_procedure_no_verify.yml has the same report_dir reference that needs the same update.
Other than that the approach is solid, the day2ops report isn't JUnit XML and shouldn't live alongside files that Polarion
processes.
…e artifacts_dir Co-authored-by: Cursor <cursoragent@cursor.com>
Updated all three files. main.yml now creates the directory and writes the template to artifacts_dir, and run_procedure_no_verify.yml has the same report_path update. All day2ops report references are now consistent at artifacts_dir instead of report_dir. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ekuris-redhat, tusharjadhav3302 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Nice one @tusharjadhav3302 , have you been able to verify your new commit fixing that issue works ? running it again on the already deployed RHOSO deployment? |
|
@dlaw4608 I ran the |
Summary
Move the day2ops procedure report XML from
test_results/(report_dir) toartifacts/(artifacts_dir) to prevent the Polarion post-run
junitparser mergefrom failing onnon-JUnit XML format.
Problem
The ci-framework Polarion role (
roles/polarion/tasks/main.yml) recursively finds all*.xmlfiles intest_results/and runsjunitparser mergeper-directory. The day2opsreport (
shiftstack-qa-day2ops-results.xml) sits at the top level oftest_results/,causing the merge command to run
junitparser merge test_results/*.xmlwhich includesthe day2ops file. Since the day2ops report uses a custom
<shiftstack-day2ops>rootelement (not JUnit's
<testsuites>), junitparser throwsJUnitXmlError: Invalid format.This causes Zuul to report FAILURE in the Polarion post-run even when all shiftstack
tests pass.
Fix
One-line change: write the day2ops report to
artifacts_dirinstead ofreport_dir.The day2ops report is a custom procedure status XML, not a JUnit test result — it
doesn't belong alongside JUnit XMLs that Polarion processes.
Validation
Manually verified on serval70's shiftstackclient pod (July 15 run):
shiftstack-qa-day2ops-results.xmlfromtest_results/toartifacts/junitparser merge ~/artifacts/test_results/*/*.xml ~/artifacts/test_results/results_merged.xmlBug Card
OSPRH-32920