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

Suppress Select Output #2276

Closed
esauser opened this issue Jan 24, 2019 · 6 comments

Comments

@esauser
Copy link

commented Jan 24, 2019

Which version and edition of Flyway are you using?

5.2.4 Pro

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)?

MSSQL 2017 Linux Docker Container:latest

Which operating system are you using?

Linux Alpine:5.2.4-alpine

What did you do?

(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
flyway migrate with some migrations that SELECT data.

What did you expect to see?

No output in the console

What did you see instead?

Tons of output. We upgraded from 5.1.4 Community to 5.2.4 Pro and now we see all this output. We'd rather not see it. Is there a way to suppress it?
image

@axelfontaine

This comment has been minimized.

Copy link
Member

commented Jan 25, 2019

There is currently no way to suppress this (other than removing the SELECT statement). Added as feature request.

@axelfontaine axelfontaine added this to the Flyway 6.0.0 milestone Jan 25, 2019

@esauser

This comment has been minimized.

Copy link
Author

commented Jan 25, 2019

Ugh... the output from our tests is now massive and un-readable. I see you added a milestone for 6.0.0. A way to suppress this would be greatly appreciated. We'll see if we can get by until this without suppressing all the SELECT statements into temporary tables or variables.

In normal migrations I wouldn't expect many, or any SELECT statements, but I'm sure you can see how there are lots of them in our tests. Perhaps this is another aspect of #2256, to not show them by default.

@esauser

This comment has been minimized.

Copy link
Author

commented Jan 25, 2019

@axelfontaine per the release notes, this was added in 5.0.0? Note that we upgraded from 5.1.4 Community to 5.2.4 Pro (on the trial), so we were already above 5.0.0. Is it one of the features that comes with Pro that doesn't come with Community? If so, is that documented anywhere?

@axelfontaine

This comment has been minimized.

Copy link
Member

commented Jan 25, 2019

It's on the feature comparison page: https://flywaydb.org/download/

The reason the docs are really sparse right is because it isn't doing very much. I however agree that it should definitely be possible to get the behavior of the Community Edition with the Pro Edition.

Currently considering the following: adding a results flag (default: true) for this. Setting it to falsewould then suppress the displaying of result sets. Would this work for you?

@esauser

This comment has been minimized.

Copy link
Author

commented Jan 25, 2019

Ah... Display query results, that didn't catch my eye before.

Yes, that would work, might want to be a bit more descriptive with it though. outputQueryResults.

As I've looked at this more, it's actually very problematic in our pipeline. During PR Verify we execute all the migrations against a copy of production in a transaction that is always rolled back. This behavior allows someone to view sensitive data simply by opening a PR that they otherwise wouldn't have access to. I almost wonder if you should change the default to false and make people enable it. Existing users and anyone moving from Community to Pro would not expect this change.

@MikielAgutu

This comment has been minimized.

Copy link
Contributor

commented Aug 12, 2019

Thanks for the feature request. This will be available in the v6 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.