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

DM-27835: pipetask run should always print stack trace and exception details #108

Merged
merged 2 commits into from Dec 9, 2020

Conversation

n8pease
Copy link
Contributor

@n8pease n8pease commented Dec 7, 2020

No description provided.

Copy link
Collaborator

@andy-slac andy-slac left a comment

Choose a reason for hiding this comment

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

Looks good.

if result.exit_code != 0:
raise RuntimeError(f"Failure getting default args from 'pipetask run': {result}")
_, args = Mocker.mock.call_args
raise RuntimeError("Failure getting default args from 'pipetask run'.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you drop "{result}" from message intentionally? It was helpful for me to debug things, without that I could not figure out what was happening in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll clean this up some to be more clear; the message is misleading; it's not calling "pipetask run", it's calling the "fake" run function (defined a few lines before this), which has the same options as the "real" run function.

It's worth keeping result in too, in case the options fail it may be well explained by result. Or, you may just have to pdb (sorry 🙃), but hopefully it all Just Works all the time!

@n8pease n8pease merged commit 834ab33 into master Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants