-
Notifications
You must be signed in to change notification settings - Fork 52
Use new constraints field for cluster assignment
#462
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
Conversation
|
I added @mewil, as he knows the constraint stuff better than I! |
| env_vars=self.env_vars, | ||
| priority=priority, | ||
| ) | ||
| .with_constraint("cluster", [clusters] if isinstance(clusters, str) else clusters) |
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.
Nice!
| experiment, | ||
| strict=True, | ||
| quiet=True, | ||
| timeout=6.0, | ||
| poll_interval=5.0, | ||
| ) | ||
| time.sleep(2.0) | ||
| time.sleep(5.0) |
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.
Eases back the volume of requests FYI @codeviking
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.
So this will make a request every 5 seconds, instead of every 2, per job -- is that right?
This still feels like a lot. Most of our jobs are quite long. Plus, it often takes at least a minute or two for Beaker to start the job by shoveling around datasets, containers and the like.
So I'd propose ratcheting this way back. What if we only asked for a job's status twice per minute?
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.
+1 to doing fewer requests for long-running jobs. Here's a potentially simple heuristic:
If time observing < 5 minutes: poll every 5 seconds
If time observing >= 5 minutes: poll ever 1 minute
If time observing >= 30 minutes: poll every 5 minutes
What do you think?
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.
I think we can just keep it simple and always poll twice per minute
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.
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.
Haven't run it yet, but code looks good.
No description provided.