Comments
1 comment
-
Official commentHi Dave P,
Hope you are doing well today, sorry to hear you are having a little trouble with your Flyway CLI when trying to pass your own SQLFluff through. Could I trouble you for the full CLI syntax you are utilizing? Better yet, if we could get the relevant portion of your GitHub Actions workflow YAML, specifically the steps for setting up Flyway, Python/SQLFluff, and running the flyway check command, that should give us more context as to where to look next.
Reviewing what you have provided thus far, setting the environment variable to
FLYWAY_ENV_NATIVE_SQLFLUFF=falseseems the correct step to take if you are utilizing your own SQL Fluff application. One thing to note on the environment variable, is to ensure that the environment variable is created in an environment that the GitHub Actions pipeline has access too. That being said, I am curious if perhaps we also need to pass in acheck.code.sqlfluffEnabledparameter in the CLI syntax to get this to work. Including some documentation below in case its helpful.https://documentation.red-gate.com/flyway/reference/commands/check/check-code
https://documentation.red-gate.com/fd/flyway-check-rules-config-setting-306940980.html
https://documentation.red-gate.com/fd/flyway-check-sqlfluff-enabled-setting-296816565.html
Lastly, if you add a -X to the Flyway check command, you can run the command in debug mode and it may give you better information as to what the exact cause is.
Best,
Christian Perez
Product Support Engineer
Add comment
Please sign in to leave a comment.
I am using the Community version of Flyway CLI, 12.4.0.
I am trying to run a “flyway check” in a Github Action as part of a CI/CD process. I am using the “red-gate/setup-flyway@v3.3.1” github action to configure the CLI.
I'm installing sqlfluff via a “pip install” command after using the “actions/setup-python” action. (I have tried both 3.4.0 and the latest, which is 4.1.0.)
‘which sqlfluff’ reports a path to the executable, and ‘sqlfluff --version’ reports its version correctly.
I have tried with the environment variable “FLYWAY_ENV_NATIVE_SQLFLUFF” set to both false and true.
Regardless, during the check process, I get the following output:
{"level":"INFO","message":"SqlFluff version null"}{"level":"INFO","message":"SQLFluff code analysis summary: operation skipped as no migration SQL files detected"}I read that the “null” is due to flyway not being able to find the executable? But I've read through the documentation and can't find any way mentioned to tell flyway explicitly where the sqlfluff executable is.
Thanks for any advice. :-)