Save all test-uuids in the reportportal plugin#4953
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the ReportPortal plugin to map test UUIDs by both serial number and guest name to support multi-guest environments. Feedback identifies a potential AssertionError if guest_name remains None when result is missing, recommending a default initialization. Additionally, a fallback mechanism is suggested to prevent a KeyError during guest name lookups.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| test_link = None | ||
| test_id = None | ||
| env_vars = None | ||
| guest_name = f"{tmt.utils.DEFAULT_NAME}-0" |
There was a problem hiding this comment.
The manual construction of the default guest_name is questionable here. Would rather have it as unknown or none. Afaiu this would hit when the test was not executed and the guest is not yet known
There was a problem hiding this comment.
Using default-0 will be confusing, and it claims the test ran on a made up guest. I recommend using None, as in Optional[str] None - admit that you don't know and that you have no actual information, and deal with it where necessary in proper way. In this case it's exactly about pending results - there are results with no actual guest attached. The fact they don't have a guest suggests the assumption that every result must have a guest, and if not we can slap some default on it and it will be fine, was incorrect. Some results have no guest, yet they still have ID.
Not all test-uuids were saved because it is possible to have multiple results with the same serial number, particularly in multihost testing. This PR adds
guest_nameas an additional key, which should prevent test-uuids with the same serial number from overwriting each other.Pull Request Checklist