MigrationInfoImpl (still) violates compareTo contract #1890
What version of Flyway are you using?
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)
What database are you using (type & version)?
What operating system are you using?
What did you do?
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
What did you expect to see?
Successful upgrade - Note: the same code works just find in version 4.x
What did you see instead?
If I could I would have re-opened issue #1249. Note that the exception is intermittent - which leads me to believe that it depends on the order that the migration script candidates are scanned on the disk/JAR (and also makes it extremely difficult to pin-point which exact 2 scripts are failing - especially due to the total lack of logging messages).
The text was updated successfully, but these errors were encountered:
Here is some more information about the result when it does succeed:
One thing stands out (to me) - the repeatable scripts are marked as
The odd things are
I must admit I am a little bit at a loss as to what could be causing this. Any reproducible test case would be immensely useful to fix this.
I wish I could - however it is an intermittent problem - so much so that re-running the command without any changes usually succeeds (which indicates some non-deterministic order...). Furthermore, it happens relative rarely (especially since we added
I have not had enough time to really dwell into the comparison logic, but it seems quite complex. Perhaps one should first brainstorm from scratch (as if writing it for the 1st time), decide on the exact list of the comparison "tie-breakers" and then implement them - e.g.: