Skip to content

Conversation

@ekouts
Copy link
Contributor

@ekouts ekouts commented Aug 18, 2021

Whenever the processor and device files exist but cannot be loaded (empty file, invalid syntax etc), Reframe just stops and throws a throwback. With this PR we ignore the JSONDecodeError and try to regenerate the file.
Closes #2110.

@ekouts ekouts added this to the ReFrame Sprint 21.08.1 milestone Aug 18, 2021
@ekouts ekouts requested review from teojgo, victorusu and vkarak August 18, 2021 09:36
@ekouts ekouts self-assigned this Aug 18, 2021
@pep8speaks
Copy link

pep8speaks commented Aug 18, 2021

Hello @ekouts, Thank you for updating!

Cheers! There are no PEP8 issues in this Pull Request!Do see the ReFrame Coding Style Guide

Comment last updated at 2021-08-23 09:37:00 UTC

@ekouts ekouts changed the title [bugfix] Generate json processor and device topology files in case they cannot be loaded properly [bugfix] Generate processor and device topology files in case they cannot be loaded properly Aug 18, 2021
@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2021

Codecov Report

Merging #2136 (a11f750) into master (152d697) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2136      +/-   ##
==========================================
+ Coverage   85.97%   86.00%   +0.03%     
==========================================
  Files          53       53              
  Lines        9362     9368       +6     
==========================================
+ Hits         8049     8057       +8     
+ Misses       1313     1311       -2     
Impacted Files Coverage Δ
reframe/frontend/autodetect.py 60.90% <100.00%> (+3.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 152d697...a11f750. Read the comment docs.

@ekouts ekouts changed the title [bugfix] Generate processor and device topology files in case they cannot be loaded properly [bugfix] Generate processor and device topology files in case the existing ones cannot be loaded properly Aug 18, 2021
Copy link
Contributor

@vkarak vkarak left a comment

Choose a reason for hiding this comment

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

I also think that we can add easily a unit test to test that the auto-detection is not broken if the topology files are not valid json files.

@vkarak vkarak changed the title [bugfix] Generate processor and device topology files in case the existing ones cannot be loaded properly [bugfix] Do not crash if processor and/or device topology files are not properly formatted JSON Aug 23, 2021
@vkarak vkarak changed the title [bugfix] Do not crash if processor and/or device topology files are not properly formatted JSON [bugfix] Do not crash if processor and/or device topology files are not properly formatted JSON files Aug 23, 2021
@vkarak vkarak merged commit 7364e80 into reframe-hpc:master Aug 23, 2021
@ekouts ekouts deleted the bugfix/topology_stacktrace branch August 23, 2021 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ReFrame topology stack traces

5 participants