Skip to content

XHarness workloads should only rename testResult.xml instead of removing it #10371

@premun

Description

@premun

Context

When client/SDK requests a work item retry because an infrastructural issue occurred, we remove the testResults.xml file so that it doesn't get uploaded to AzDO as we expect the future attempt will have a better one.

This happens here:

file_name = "testResults.xml"
test_results = os.path.join(output_directory, file_name)
if os.path.exists(test_results):
os.remove(test_results)
if os.path.exists(file_name):
os.remove(file_name)

Problem

When devs are investigating the runs, it might happen that all 3 attempts fail and there's no testResults.xml so it might be beneficial to have the XML among the uploads for them to inspect.

Goal

Either keep the file if we're on the 3rd attempt (not sure we can find this out from some env var), or just not delete the file and rename it so that it gets uploaded but not processed by the AzDO test reporter. When removing, be careful that the reporter looks for various forms of the testResult word so maybe verify how it matches it that you change it enough.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions