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
Fix load relative file for LoadDataChange, CreateProcedureChange or CreateViewChange #2073
Conversation
…quibase into smainz-fix_load_ralative_file
I pushed the current version of master to your fork to fix the build issue. |
Hi @smainz Thanks for creating this PR. A member of the Liquibase team will take a look at your contribution and may suggest:
The PR will be prioritized according to our internal development and testing capacity. We’ll let you know when it’s ready to move to the next step or if any changes are needed. |
Is there anything I can help to get this PR reviewed/approved? |
Thanks you for the very good PR! |
➤ Erzsebet Carmean commented: To reproduce this bug, it is necessary to have a . in the directory path where the changelog is located. This is similar to https://datical.atlassian.net/browse/LB-2178 ( https://datical.atlassian.net/browse/LB-2178|smart-link ) (Liquibase Internal ticket), which maps to the GH PR #2066 ( https://github.com/liquibase/liquibase/pull/2066|smart-link ) . |
Environment
Liquibase Version: 4.4.3 (and all 4.x before)
Liquibase Integration & Version: any
Liquibase Extension(s) & Version: liquibase-core
Database Vendor & Version: H2 (and all others)
Operating System Type & Version: Windows 10 (and all others)
Pull Request Type
Description
See #1277, but for LoadDataChange, CreateProcedureChange or CreateViewChange.
Testcases showing the problem are included in this PR.
Same as #2060 but with different branch name. My branch name had chars which broke the build.
Steps To Reproduce
List the steps to reproduce the behavior.
data/some_data.csv
sql/proc.sql
sql/view.sql
Actual Behavior
Liquibase throws an exception complaining about missing file (a different one for each changeset):
Expected/Desired Behavior
Liquibase does not complain about missing files and works flawlessly.
Additional Context
Same bug has already been fixed in #1798 for a diffenent change. The changes above have been overlooked.
I had to fix an existing testcase which used a changeset not included in an changelog.
Fast Track PR Acceptance Checklist:
Dev Handoff Notes (Internal Use)
Links
Testing
Dev Verification
Created a changeset with the above example changes and saw they failed in 4.6.2 with "cannot find file" errors. With the PR, they all correctly find the files.
Test Requirements (Internal Liquibase QA)
data/names.csv
sql/proc.sql
sql/view.sql
Manual Test Requirements
Verify update is successful with load relative files.
liquibase update --changelog-file lb-2179-changelog.xml
populated
existspopulated
contains data fromnames.csv
someview
existsSomeProcedure
exists┆Issue is synchronized with this Jira Bug by Unito