-
Notifications
You must be signed in to change notification settings - Fork 198
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
Make deliberately scaled-in unstarted blocks not be failures #3594
Conversation
validated that it fails when run against master 789ee82
…ause scaled down blocks are no longer failures, so this test should not do any scale down
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The block comment is unfortunately necessary, so thank you for including it. The rest are window dressing suggestions for clarity.
# permanent htex failure, and so the task execution below would raise | ||
# a BadStateException rather than attempt to run the task. | ||
|
||
assert htex.provider.launcher.prepend != "", "Pre-req: prepend attribute should exist and be non-empty" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would use of .startswith()
work? If so, it makes for a stronger assertion / good faith in the test. Perhaps:
_inf_sleep = "sleep inf ; "
...
launcher=WrappedLauncher(prepend=_inf_sleep),
...
assert htex.provider.launcher.prepend.startswith(_inf_sleep), "..."
try_assert(lambda: len(htex.status_facade) == 1 and htex.status_facade['0'].terminal, | ||
timeout_ms=10000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using the fail_msg
argument to explain that this is a block. (Analogous to assert ..., "fail_msg"
)
htex.provider.launcher.prepend = "" | ||
assert task().result() == 7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you distill the comment above into the fail msg for this assert? Not an easy task, I know, but when this does fail, makes it that easier to dig in.
This PR adds a new terminal job state, SCALED_IN. None of the existing providers will return it, but the scaling layer will use it to mark a job as deliberately scaled in, so that error handling code will not regard it as failed.
Fixes #3568