connector_flow: raise import script exception instead error of failed write#5
Open
paulius-sladkevicius wants to merge 1 commit into
Open
Conversation
… write This happens when chunk is created in synchronous mode. PEP-8 valid imports.
96ee16a to
0a50e2c
Compare
|
What kind of exceptions do you observe in the |
This was referenced Aug 25, 2016
Author
|
We're getting MissingError, because looks rollback is done, so chunk is not found anymore. |
| try: | ||
| chunk.write({'state': new_state}) | ||
| except: | ||
| pass |
There was a problem hiding this comment.
I think this is not correct. If an error occurs during writing the state to the chunk I think the whole transaction will roll back, so it's missleading to silently catch the exeption here.
Author
There was a problem hiding this comment.
True, but now if any error happens in read_chunk(), final error is not what happen there, but error related with failed chunk write. In such case it's hard to understand why read_chunck() failed (found out it while writing unit tests).
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 happens when chunk is created in synchronous mode.
PEP-8 valid imports.
Same issue #4 that can be closed.