Skip to content
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

Exceptions from write_cache_metadata() are not caught #833

Closed
jc-harrison opened this issue May 21, 2019 · 0 comments · Fixed by #840
Closed

Exceptions from write_cache_metadata() are not caught #833

jc-harrison opened this issue May 21, 2019 · 0 comments · Fixed by #840
Labels
bug Something isn't working FlowMachine Issues related to FlowMachine

Comments

@jc-harrison
Copy link
Member

Describe the bug
In flowmachine.core.query.write_query_to_cache(), the call to write_cache_metadata() happens outside the try/except block, so if write_cache_metadata() raises an exception this will not be caught. As a result, neither q_state_machine.finish() nor q_state_machine.raise_error() is called, and the query state is incorrectly left as "executing".

To Reproduce

  1. Run all steps in the "To reproduce" section of issue events.* tables think they're stored after resetting the cache, but Query.get_stored() disagrees #832. This will raise an error from write_cache_metadata().
  2. Check the query state:
>>> dl_query.query_state
<QueryState.EXECUTING: 'executing'>

Expected behavior
The query state should be changed to "errored" if an error occurs at any point while writing the query to cache.

@jc-harrison jc-harrison added bug Something isn't working FlowMachine Issues related to FlowMachine labels May 21, 2019
greenape added a commit that referenced this issue May 22, 2019
@greenape greenape mentioned this issue May 22, 2019
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working FlowMachine Issues related to FlowMachine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants