-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
[16.0][FIX] edi_storage_oca: do not silently ignore OSError/FileNotFoundError #88
base: 16.0
Are you sure you want to change the base?
[16.0][FIX] edi_storage_oca: do not silently ignore OSError/FileNotFoundError #88
Conversation
89a8317
to
e885c6a
Compare
e885c6a
to
7fccb13
Compare
a13626b
to
3458c52
Compare
@nilshamerlinck is there a reason why you don't keep the logging? Besides that, the changes look good to me and solve #70 |
3458c52
to
488e7c3
Compare
good catch @JordiMForgeFlow I can definitely keep it for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG. Could you please take the chance to add a test for this? 🙏
Also, one consideration:
another action_exchange_receive Job will be created next time scheduled action "EDI exchange check input sync" runs, to try again to receive it, hopefully successfully this time
Wouldn't be better to raise a RetryableJobError
then, instead of getting another job?
Of course, if we go this way we should go ahead w/ the fix on queue_job we discussed together regarding matching existing jobs when on error+retry counter>0 😉
@nilshamerlinck ping :) |
- by default, _get_remote_file will still ignore FileNotFoundError when used for checks purpose - but not when actually getting remote file to get processed Co-authored-by: JordiMForgeFlow <[email protected]>
when a non-final error occurs, the exception is raised (e.g. OSError), for `Receive` exchange: - the job fails - the record state stays as "input_pending" - another action_exchange_receive Job will be created next time scheduled action "EDI exchange check input sync" runs, to try again to receive it, hopefully successfully this time we want to change it to rely more on the RetryableJobError mechanism than on the "EDI exchange check input sync" scheduled action
ece7106
to
c5f835d
Compare
Hello @simahawk
|
Depends on OCA/queue#674
if an
OSError
is raised, there can be different cases but it's likely a transient issue (e.g. connection error):the record state will stay as "input_pending" (as exception won't be catched in edi.backend:exchange_receive)and as such, anotheraction_exchange_receive
Job will be created next time scheduled action "EDI exchange check input sync" runs, to try again to receive it, hopefully successfully this timeRetryableJobError
will be raised in order to retry itmax_retries
, record state will be changed to "input_receive_error"if a
FileNotFoundError
is raised, it's not a transient issue, so record should be marked as "input_receive_error":