-
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
Liquibase sql comment validation bug #3017
Projects
Comments
@stephen-lev thanks for the details and feedback; we will definitely review |
To add on the issue, I encountered a similar behavior when using a comment that contains the word 'comment';
Which I guess is caused by the same parsing error. Also present in liquibase |
This has been fixed with #3037 in 4.14.0, including for things like |
3 tasks
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Liquibase Version: 4.10.0
Liquibase Integration & Version: maven
Liquibase Extension(s) & Version: irrelevant
Database Vendor & Version: irrelevant
Operating System Type & Version: irrelevant
Infrastructure Type/Provider: irrelevant
Description
Since the #2761 pull request the validation of formatted SQL changelogs changed, as far as i can comprehend the intention was partly to detect invalid patterns in the SQL files, however this resulted in a side effect, right now it will fail on any sql comment which has the word 'property' in it and it is not a liquibase property definition.
c30dddf
For every line the decision looks like this: If it is a valid property definition then parse it, else if it matches to 'altPropertyOneDashPattern' it is invalid and exception is thrown with an error message which is completely useles because it does not tell you the filename of the SQL file.
Steps To Reproduce
I provide you an example made with a little modification of your VALID_CHANGELOG from the FormattedSqlChangeLogParserTest.groovy test:
Actual Behavior
SQL comments containing the word 'property' will cause the FormattedSqlChangeLogParser to fail with a very vague error message which don't even mention the file name.
Expected/Desired Behavior
I believe that such comments should be allowed, prior to 4.10.0 version there was no such problem, also the error message should tell me at least the file name of the SQL file which contains the error.
Screenshots (if appropriate)
Thank you for your work and I hope that i can help to improve this project with this issue.
The text was updated successfully, but these errors were encountered: