-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fixed resolveSibling method by updating URL resource type #3413
Conversation
My project is also affected by this issue, so I really expect this fix to be released as soon as possible. Currently, I forced to rollback liquibase to 4.16.1 |
Hi @OleksandrShkurat thanks for sharing. I'll do my best to have this change ready and available to merge as soon as possible. I would need first to get some review/feedback from the team/community. Thanks, |
I've tried your change locally in my project and it helps. Thank you for contribution. |
@@ -40,7 +41,7 @@ public liquibase.resource.Resource resolve(String other) { | |||
@Override | |||
public liquibase.resource.Resource resolveSibling(String other) { | |||
try { | |||
Resource otherResource = this.resource.createRelative("../"+other); | |||
UrlResource otherResource = new UrlResource(this.resource.createRelative(other).getURL()); |
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.
I don't think this is the correct fix. Switching an existing Resource implementation to UrlResouce class is just working around the problem that there are differences between the Resource implementations that shouldn't be there.
I'm thinking maybe #3355 is the more wide-ranging fix for this?
… type, as well as removing the dots to go a level up
641ad36
to
0728255
Compare
Any updates yet? @nvoxland |
Hi @Viserius, We have a fix already implemented for this, but we are not able yet to move forward with this due to a test dependency issue we are having with one of our projects. We have part of the team already working on it and I hope we can solve that issue asap so we can move forward with this. I'll keep you guys posted here. Thanks for your patience, |
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.
Fixes the path handling.
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.
PR fixes Liquibase Springboot startup migrations for changelogs with loadData
changesets. The bug manifested when the data file (csv) was relative to the changelog because an incorrect path to the csv was constructed. This PR removes an unecessary ..\
from the path to the csv.
- Automated functional and test harness executions passing.
- No additional testing required.
APPROVED
@@ -3,6 +3,7 @@ | |||
import liquibase.exception.UnexpectedLiquibaseException; | |||
import liquibase.resource.OpenOptions; | |||
import org.springframework.core.io.Resource; | |||
import org.springframework.core.io.UrlResource; |
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.
this looks like unused import
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.
Hi @konikvranik,
Thanks for pointing this out. I'm going to remove this unused import in a different PR.
Impact
Description
This change has changed the resource type and the way it uses to create a relative path to a changelog file.
Fixes #3393
Things to be aware of
Things to worry about
Additional Context