Allow for a custom timeout on exec ops#42
Conversation
vladaionescu
left a comment
There was a problem hiding this comment.
It would be nice to report back to the user that the command has exceeded the max time.
Agreed - I think this is critical - otherwise we'll just get a ton of questions about it.
Perhaps we can do something similar to this in a defer, such that we repackage the error with something more meaningful: https://github.com/earthly/buildkit/blob/earthly-main/solver/jobs.go#L933C1-L942C4.
|
I'm just thinking about edge cases here -- Have you tested that the process gets killed versus go returning an error while the process continues to run? e.g. does |
|
side note: should we have earthly filter out error messages like "async force execution" and "unlazy force execution", and just print the underlying errors? I don't think the unlazy message is useful to anyone aside from core developers. |
|
also, is there a corresponding earthly PR for this? We require the two to stay in sync for test coverage, as outlined under https://github.com/earthly/earthly/blob/main/CONTRIBUTING.md#updates-to-buildkit-or-fsutil |
|
@vladaionescu ok, I'll take a closer look at customizing the error message text. |
Not yet, but good idea. |
I haven't had a chance yet but I will 🙂 |
Yeah, I think |
|
Good news! |
|
nit: squash these commits prior to merging. |
2197f89 to
de54320
Compare
|
@alexcb Squashed. Look good? |
you can wrap it in a hint error and/or handle the error type in run.go |
|
@idodod Thanks. That'll be something to potentially clean up on the Earthly side. Here's an example with this BK version: |
Agreed - on the Earthly side we might want to say a bit more explicitly something like "Unverified accounts have a limit on the duration of RUN commands. Verify your account to lift this restriction". I think that what you have now in this PR is a good string to grep for on the Earthly side. |
I accidentally merged this [Core PR](#3794) before the [BK one](earthly/buildkit#42). This PR updates the correct `earthly-main` commit SHA.
This is working well, but it doesn't look fantastic. It would be nice to report back to the user that the command has exceeded the max time.