Skip to content

Save all test-uuids in the reportportal plugin#4953

Open
therazix wants to merge 2 commits into
mainfrom
fvagner-reportportal-test-ids
Open

Save all test-uuids in the reportportal plugin#4953
therazix wants to merge 2 commits into
mainfrom
fvagner-reportportal-test-ids

Conversation

@therazix
Copy link
Copy Markdown
Contributor

@therazix therazix commented Jun 2, 2026

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_name as an additional key, which should prevent test-uuids with the same serial number from overwriting each other.

Pull Request Checklist

  • implement the feature

@therazix therazix added this to planning Jun 2, 2026
@therazix therazix requested a review from 4N0body5 as a code owner June 2, 2026 09:24
@github-project-automation github-project-automation Bot moved this to backlog in planning Jun 2, 2026
@therazix therazix added step | report Stuff related to the report step plugin | reportportal The reportportal report plugin labels Jun 2, 2026
@therazix therazix moved this from backlog to review in planning Jun 2, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tmt/steps/report/reportportal.py Outdated
Comment thread tmt/steps/report/reportportal.py Outdated
Comment thread tmt/steps/report/reportportal.py Outdated
test_link = None
test_id = None
env_vars = None
guest_name = f"{tmt.utils.DEFAULT_NAME}-0"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin | reportportal The reportportal report plugin step | report Stuff related to the report step

Projects

Status: review

Development

Successfully merging this pull request may close these issues.

3 participants