DM-52238: Redo the UWS pattern to call Wobbly in the worker#432
Draft
DM-52238: Redo the UWS pattern to call Wobbly in the worker#432
Conversation
2ff34ef to
db86b59
Compare
Originally, the UWS pattern stored job information directly in a PostgreSQL database specific to the service and therefore needed a separate database worker to store status and results because layering the SQLAlchemy models on top of a stack container was likely to fail. Subsequently, we switched to the Wobbly web service to store job results, which can be accessed with much lighter-weight dependencies. However, we kept the database worker to avoid major refactoring. This is that delayed major refactoring. Eliminate the separate database worker in favor of having the wrapper around the backend job function update the job status and store results directly. This eliminates all of the setup for the separate UWS worker and the code to force serialization of tracebacks in exceptions so that they could be serialized by arq in job results. Job workers no longer need to know anything about the arq queue. The (temporary) drawbacks are that safir.arq.uws gains a separate Wobbly client from the proper Pydantic-based client in safir.uws, and we temporarily lose Slack notifications of failures in the backend worker because that would require a Safir dependency. Hopefully both can be worked around in the future.
Updating dependencies on vo-cutouts tried to downgrade the Google API modules to an ancient version for some reason. Ensure this cannot happen.
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.
Originally, the UWS pattern stored job information directly in a PostgreSQL database specific to the service and therefore needed a separate database worker to store status and results because layering the SQLAlchemy models on top of a stack container was likely to fail. Subsequently, we switched to the Wobbly web service to store job results, which can be accessed with much lighter-weight dependencies. However, we kept the database worker to avoid major refactoring.
This is that delayed major refactoring. Eliminate the separate database worker in favor of having the wrapper around the backend job function update the job status and store results directly. This eliminates all of the setup for the separate UWS worker and the code to force serialization of tracebacks in exceptions so that they could be serialized by arq in job results. Job workers no longer need to know anything about the arq queue.
The (temporary) drawbacks are that safir.arq.uws gains a separate Wobbly client from the proper Pydantic-based client in safir.uws, and we temporarily lose Slack notifications of failures in the backend worker because that would require a Safir dependency. Hopefully both can be worked around in the future.