Skip to content
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

Unable to parse dot separated placeholder in v10.8.1 cli #3845

Open
vzdm opened this issue Feb 19, 2024 · 3 comments
Open

Unable to parse dot separated placeholder in v10.8.1 cli #3845

vzdm opened this issue Feb 19, 2024 · 3 comments

Comments

@vzdm
Copy link

vzdm commented Feb 19, 2024

Which version and edition of Flyway are you using?

In Teams v10.8.1

If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Command-Line

Which database are you using? (Type & version)

Postgres 15

Which operating system are you using?

Windows 10

What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)

flyway -url="jdbc:postgresql://<server>:<port>/database" -user=<user> -password=<password> -mixed=true -defaultSchema=<schema> -ignoreMigrationPatterns="repeatable:missing" "-placeholders.holder_key1=<value>" "-placeholders.holder-key2=<value>" "-placeholders.this.causes.a.parse.error=<value>" -locations="filesystem:<.../sql/>" migrate

What did you expect to see?

No error. This syntax was supported in v9.20.0 which is the most recent version we used before attempting to upgrade.

What did you see instead?

ERROR: Unable to parse command line params.

@Barry-RG
Copy link
Contributor

Barry-RG commented Mar 5, 2024

Thank you for your issue @vzdm
This would be caused by changes to our configuration structure over the last year. Unfortunately dot separated placeholders were not a consideration in the redesign as we had not had a use case using them previously. Currently, placeholders.this.causes.a.parse.error would be considered multiple levels of depth in the new configuration model and not simple as a key and value in the placeholders map. We would need to investigate if this is something we could support.

@onavratil-monetplus
Copy link

onavratil-monetplus commented May 15, 2024

I have a schema history that already contains dot separated placeholders. I chose placeholder labels based on the way placeholders are passed in command line - with a . separation, like this

-placeholders.myscope:config.username="mock-config-username"

There was no limitation/best practice for placeholder label charset in the previous versions. I do not think that my choice of label notation would be in any way obviously misconceptional, taking into consideration that flyway already used . within the command line argument syntax.

Now with this update, I am unable to migrate to any newer version of flyway, because i either lose the ability to start a new instance of the DB from scratch (if i keep the old scripts as they are - because they contain dot-separated placeholder labels which i have no way of interpolating in the old scripts) or I lose the ability to maintain the existing (prod) databases using flyway (if i change the placeholder label notation in my existing scripts to be conform with the newest restriction, it will mess up flyway history hashes).
This is a serious deal-breaker.

@onavratil-monetplus
Copy link

Could we at least get a way to escape the dot on the command line? That seems to me like the least painful solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants