Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix add_time_report_to_email keyError issue #8704

Conversation

dahorak
Copy link
Contributor

@dahorak dahorak commented Oct 18, 2023

This fix should avoid following issues:

INTERNALERROR>   File "/home/jenkins/workspace/qe-deploy-ocs-cluster/ocs-ci/ocs_ci/framework/pytest_customization/reports.py", line 166, in pytest_report_teststatus
INTERNALERROR>     GV.TIMEREPORT_DICT[report.nodeid]["total"] += round(report.duration, 2)
INTERNALERROR> KeyError: 'total'

and

email_reports(session)
  File "/home/jenkins/workspace/qe-deploy-ocs-cluster/ocs-ci/ocs_ci/utility/utils.py", line 1744, in email_reports
    add_time_report_to_email(session, soup)
  File "/home/jenkins/workspace/qe-deploy-ocs-cluster/ocs-ci/ocs_ci/utility/utils.py", line 4497, in add_time_report_to_email
    sorted(data.items(), key=lambda item: item[1]["total"], reverse=True)
  File "/home/jenkins/workspace/qe-deploy-ocs-cluster/ocs-ci/ocs_ci/utility/utils.py", line 4497, in <lambda>
    sorted(data.items(), key=lambda item: item[1]["total"], reverse=True)
KeyError: 'total'

Signed-off-by: Daniel Horak <dahorak@redhat.com>
@dahorak dahorak self-assigned this Oct 18, 2023
@dahorak dahorak requested a review from a team as a code owner October 18, 2023 10:49
@dahorak
Copy link
Contributor Author

dahorak commented Oct 18, 2023

Verification job: https://url.corp.redhat.com/9ce11a5 (the failures are for different reason).

@dahorak dahorak added the Verified Mark when PR was verified and log provided label Oct 18, 2023
@openshift-ci
Copy link

openshift-ci bot commented Oct 18, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dahorak, shivamdurgbuns, vavuthu

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dahorak dahorak merged commit a5db2d5 into red-hat-storage:master Oct 18, 2023
5 of 6 checks passed
@dahorak dahorak deleted the fix-add-time-report-to-email-key-error-total branch October 18, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm size/XS Verified Mark when PR was verified and log provided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants