-
Notifications
You must be signed in to change notification settings - Fork 616
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
Update swirl #1677
Merged
Merged
Update swirl #1677
Conversation
This file contains 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
New features in this version: - Codegen for jobs which reduces boilerplate when defining them - Jobs no longer need to be registered with the runner - Rework of how `run_all_pending_jobs` works so errors loading the job actually bubble up - Configurable timeout for how long to wait for a job to begin running We aren't fully taking advantage of the timeout yet, I'd eventually like to try rebuilding the runner in-process a few times when an error happens, and then crash the process if it fails a few times in a row. This needs a bit more refactoring though (I'm not sure if we want to keep the `Repository` in memory like we are now, and whether we want to assume a full re-clone is needed on error). For now I've set it to ensure our jobs don't hang forever though. Warts in this version: - Rust thinks imports only used in the job body are unused. (sgrif/swirl#6) - Worked around for now by moving the imports into the job body - `swirl::Job` has to be imported by calling code - Codegen assumes that `serde::Deserialize` and `serde::Serialize` are available. (sgrif/swirl#9) Issues with this version: - The new impl of `run_all_pending_jobs` will return an error if the DB is in read only mode. If the DB is read only, we couldn't have enqueued jobs anyway, so the workaround is "fine", but we need some more robust APIs in swirl to fix this. This only affects us in tests. - sgrif/swirl#8
Note: Diff stats are mostly just indentation changes. There's no substantial changes to the job bodies other than removing |
☔ The latest upstream changes (presumably #1679) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r+ |
📌 Commit be5f0de has been approved by |
bors
added a commit
that referenced
this pull request
Apr 1, 2019
Update swirl New features in this version: - Codegen for jobs which reduces boilerplate when defining them - Jobs no longer need to be registered with the runner - Rework of how `run_all_pending_jobs` works so errors loading the job actually bubble up - Configurable timeout for how long to wait for a job to begin running We aren't fully taking advantage of the timeout yet, I'd eventually like to try rebuilding the runner in-process a few times when an error happens, and then crash the process if it fails a few times in a row. This needs a bit more refactoring though (I'm not sure if we want to keep the `Repository` in memory like we are now, and whether we want to assume a full re-clone is needed on error). For now I've set it to ensure our jobs don't hang forever though. Warts in this version: - Rust thinks imports only used in the job body are unused. (sgrif/swirl#6) - Worked around for now by moving the imports into the job body - `swirl::Job` has to be imported by calling code - Codegen assumes that `serde::Deserialize` and `serde::Serialize` are available. (sgrif/swirl#9) Issues with this version: - The new impl of `run_all_pending_jobs` will return an error if the DB is in read only mode. If the DB is read only, we couldn't have enqueued jobs anyway, so the workaround is "fine", but we need some more robust APIs in swirl to fix this. This only affects us in tests. - sgrif/swirl#8
☀️ Test successful - checks-travis |
This was referenced Apr 1, 2019
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.
New features in this version:
run_all_pending_jobs
works so errors loading the jobactually bubble up
We aren't fully taking advantage of the timeout yet, I'd eventually like
to try rebuilding the runner in-process a few times when an error
happens, and then crash the process if it fails a few times in a row.
This needs a bit more refactoring though (I'm not sure if we want to
keep the
Repository
in memory like we are now, and whether we want toassume a full re-clone is needed on error). For now I've set it to
ensure our jobs don't hang forever though.
Warts in this version:
(Imports are warned as unused if only used in job body sgrif/swirl#6)
swirl::Job
has to be imported by calling codeserde::Deserialize
andserde::Serialize
areavailable. (
#[swirl::background_job]
assumesserde::{Deserialize, Serialize}
available sgrif/swirl#9)Issues with this version:
run_all_pending_jobs
will return an error if the DBis in read only mode. If the DB is read only, we couldn't have
enqueued jobs anyway, so the workaround is "fine", but we need some
more robust APIs in swirl to fix this. This only affects us in tests.