Extract job executor internal package - #768
Merged
Merged
Conversation
This will make it possible to build more advanced rivertest harnesses that simulate real job execution with a real work context and a real worker.
bgentry
force-pushed
the
bg-extract-job-executor-internal-package
branch
from
February 17, 2025 16:31
4daccde to
2ceac4a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will make it possible to build more advanced rivertest harnesses that simulate real job execution.
One of the main changes in here is to extract some of the top-level error types like
JobCancelErrorintorivertypeso that they can be referenced both from theinternal/jobexecutorpackage and the mainriverpackage. The only way to make this work well and continue to have the errors be considered "equal" byerrors.Is/errors.Asis for them to be the same underlying type. As such error types likeriver.JobCancelErrorare now aliases to thoserivertype.JobCancelError. I don't think this should cause problems, but thought it should be called out.I also pulled in a standalone commit to add
AttemptedByto theJobUpdatequery that's used by tests. Not because it's related to the above, but because it's self-contained and this will help keep the next PR smaller.Extracted from #766.