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

Machine readable output for commands #2507

Closed
MikielAgutu opened this issue Sep 16, 2019 · 3 comments
Closed

Machine readable output for commands #2507

MikielAgutu opened this issue Sep 16, 2019 · 3 comments

Comments

@MikielAgutu
Copy link

We propose introducing machine readable output for the Flyway commands.

We'd like every command to produce machine readable output, although the Info command wants the most attention. Info has this has already been requested (#2254), and we'd also like Info to output more information while we're at it (#2491).

JSON is the obvious format, although we may consider others if people want them.

We're thinking the following:

  • Introduce a -json or -format:json, or something to that effect to the CLI
  • Output a success or error object after execution of a command
  • Produce a JSON version of the ASCII table that Info currently produces
    • Including metadata; schema version etc
  • Add extra data to Info, comprising of the entire schema_history table, e.g:
    • Execution time
    • Filename
    • Checksum
    • Installed by
  • Progress messages on stderr (perhaps only for Migrate)
  • Output nested or multiple errors
  • Output currently deployed version
  • Support all clients (Gradle specifically has been requested)

Please share any thoughts, or just thumb up this post if you'd like to see this feature 😄

@alextercete alextercete added this to the Flyway 6.x milestone Dec 16, 2019
@juliahayward
Copy link
Contributor

Some notes from today's meeting:

  • all commands to return success/(failure+reason)
  • would be helpful for validate to return a list of validation failures
  • would be helpful for migrate to include a list of which migrations happened

@MikielAgutu
Copy link
Author

Another important consideration is that the API could produce more information about the commands. For instance, Validate currently throws exceptions on validation errors. We could make it produce an object instead, so users can decide what to do based on the result of certain validation failures. One case that could help is #1662.

@MikielAgutu
Copy link
Author

Related #2662

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