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

Add try/except around unpackSpecialData #809

Merged
merged 5 commits into from
Aug 4, 2022

Conversation

opotowsky
Copy link
Member

@opotowsky opotowsky commented Aug 3, 2022

Description

compareDatabases should be able to continue to run even if unpackSpecialData fails.

Some parameters are not able to be compared, which in a recent scenario led to a failure inside unpackSpecialData. This PR adds the try/except so that there is just an error and not a failure, and it also adds a the traceback to the log printout so parameters that cause this step to fail can be more easily addressed / manually compared.


Checklist

  • This PR has only one purpose or idea.
  • Tests have been added/updated to verify that the new/changed code works.
  • The release notes are up-to-date with any bug fixes or new features.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in setup.py.

Compare should be able to continue to run even if unpackSpecialData
fails. Adding the traceback to the log printout so parameters that cause
this step to fail can be more easily addressed.
@jakehader jakehader removed their request for review August 3, 2022 22:37
@jakehader
Copy link
Member

I don't think im qualified for this review, so i will leave it to @john-science.

@john-science john-science added the cleanup Code/comment cleanup: Low Priority label Aug 4, 2022
Copy link
Member

@john-science john-science left a comment

Choose a reason for hiding this comment

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

The change seems good, sure.

But I don't know Why this exception would need to be here. Can we put something in the PR description, or somewhere, that would explain (roughly) why this would ever fail?

Thanks! Nice work!

@jakehader
Copy link
Member

jakehader commented Aug 4, 2022

The change seems good, sure.

But I don't know Why this exception would need to be here. Can we put something in the PR description, or somewhere, that would explain (roughly) why this would ever fail?

Thanks! Nice work!

Would including more information in the description help? I think the main thing here is that some parameters are not able to be compared between two dbs and that leads to failures on the compareDB call and then this aborts the process. This aims to note which parameters have issues and then they can be manually compared by an analyst as needed.

@john-science
Copy link
Member

The code coverage in comparedb.py went down some with this PR. We lost three lines of coverage.

I'm trying to decide HOW that happened. Did we exit a function sooner than usual, and lose the coverage after some point? Hmm...

Could be a fluke that won't happen again, of course.

@opotowsky
Copy link
Member Author

The change seems good, sure.

But I don't know Why this exception would need to be here. Can we put something in the PR description, or somewhere, that would explain (roughly) why this would ever fail?

Thanks! Nice work!

Added a little extra detail based on Jake's comment!

@john-science john-science merged commit 1660f9f into terrapower:main Aug 4, 2022
@john-science john-science deleted the special_data_dont_fail branch August 4, 2022 20:04
scottyak pushed a commit to scottyak/armi that referenced this pull request Oct 27, 2022
compareDatabases should be able to continue to run even if unpackSpecialData fails.

Some parameters are not able to be compared, which in a recent scenario led to a failure inside unpackSpecialData. This PR adds the try/except so that there is just an error and not a failure, and it also adds a the traceback to the log printout so parameters that cause this step to fail can be more easily addressed / manually compared.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code/comment cleanup: Low Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants