Skip to content

fix crash in create_test_report with --upload-test-report --from-pr when one or more test installations failed#3708

Merged
akesandgren merged 2 commits intoeasybuilders:developfrom
Flamefire:fix_upload_test_report
May 28, 2021
Merged

fix crash in create_test_report with --upload-test-report --from-pr when one or more test installations failed#3708
akesandgren merged 2 commits intoeasybuilders:developfrom
Flamefire:fix_upload_test_report

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

@Flamefire Flamefire commented May 28, 2021

PR numbers are integers which cannot be joined to a string directly but need to be converted first

Introduced by #3605

Error:

  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/h3/s3248973/.local/EasyBuildDev/easybuild-framework/easybuild/main.py", line 548, in <module>
    main()
  File "/home/h3/s3248973/.local/EasyBuildDev/easybuild-framework/easybuild/main.py", line 527, in main
    test_report_msg = overall_test_report(ecs_with_res, len(paths), overall_success, success_msg, init_session_state)
  File "/home/s3248973/.local/EasyBuildDev/easybuild-framework/easybuild/tools/testing.py", line 351, in overall_test_report
    easyblock_pr_nrs=easyblock_pr_nrs)
  File "/home/s3248973/.local/EasyBuildDev/easybuild-framework/easybuild/tools/testing.py", line 196, in create_test_report
    descr += " (PR #%s)" % ', #'.join(pr_nrs)
TypeError: sequence item 0: expected string, int found

PR numbers are integers which cannot be joined to a string directly but
need to be converted first
akesandgren
akesandgren previously approved these changes May 28, 2021
Copy link
Copy Markdown
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

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

LGTM

@akesandgren akesandgren added this to the 4.4.0 milestone May 28, 2021
@boegel boegel changed the title Fix upload-test-report fix crash in create_test_report with --upload-test-report --from-pr when one or more test installations failed May 28, 2021
@boegel
Copy link
Copy Markdown
Member

boegel commented May 28, 2021

I squeezed in a test that triggers the fixed bug.

Copy link
Copy Markdown
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

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

LGTM

@akesandgren
Copy link
Copy Markdown
Contributor

Going in, thanks @Flamefire!

@akesandgren akesandgren merged commit 6b1db3a into easybuilders:develop May 28, 2021
@Flamefire Flamefire deleted the fix_upload_test_report branch May 28, 2021 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants