-
Notifications
You must be signed in to change notification settings - Fork 63
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
When using @ChangeUnit, if @Execution fails, and then @RollbackExecution fails, the original execution failure is not logged anywhere #660
Comments
Hello @oliverlockwood , thanks for raising the issue. We'll take a look and let you know as soon as possible. |
@osantana85 are there any updates on this, please? |
Hello @oliverlockwood , When a ChangeUnit execution fails it will write something like this in the output log:
Can you please attach your complete execution output log? |
@oliverlockwood is this still relevant or we can close it? |
@dieppa @osantana85 yes, it is still relevant. A log saying that the original execution failed, without giving the actual error and stacktrace of the original failure, is next to useless in diagnosing why the original execution failed. Honestly, I had not thought it would be really necessary for me to spend the time to show my copy of the logs showing exactly the same "Error in MongoCK operation" log which you have already reproduced yourself, which demonstrates the issue pretty clearly. Do you see the details of the original error in your logs? No. That is the issue. |
@oliverlockwood I see your point and it totally make sense. I haven't looked at it myself, but the change should be relatively easy. @osantana85 and myself will take of this, do a release shortly and let you know. Thanks! |
… rollback failed (non transactional execution). (#670)
@oliverlockwood released in Mongock's version 5.4.2. |
Thanks @osantana85 |
Description
When using
@ChangeUnit
, if@Execution
fails, and then@RollbackExecution
fails, the original execution failure is not logged anywhere.As a result I have to wrap every single
@Execution
method in a try/catch block to log exceptions myself.PRIORITY
NORMAL
Version and environment
Mongock
@ChangeLog/@ChangeSet
combinations, new@ChangeUnit
Environment
Steps to Reproduce
@ChangeUnit
class@Execution
method which throws an exception, and a@RollbackExecution
method which throws a different exceptionBehaviour
Expected behavior: I expect MongoDB to log the
@Execution
failure, as at least a warning, so I don't have to wrap every@Execution
method with a try-catch to do the logging.Actual behavior: No such log.
How often the bug happens: 100% of the time.
Link to repository using Mongock
Not provided.
Additional context
Here's a stacktrace showing the failure of the
@RollbackExecution
method - and nothing from the failure of the@Execution
method.The text was updated successfully, but these errors were encountered: