AbsaOSS / spline

Data Lineage Tracking And Visualization Solution
https://absaoss.github.io/spline/
Apache License 2.0
596 stars 154 forks source link

spline #1191 Admin: print a backup reminder before database migration #1195

Closed wajda closed 1 year ago

wajda commented 1 year ago

Fixes #1191

Result:

image

cerveada commented 1 year ago

What if the upgrade is run via script, not manually, will this cause issue in such a case? Should there be some -y option to agree automatically?

wajda commented 1 year ago

What if the upgrade is run via script, not manually, will this cause issue in such a case? Should there be some -y option to agree automatically?

All the user interactions are enabled when there is a console. In scripts, or e.g. when you run it from IDEA etc when the console is not attached to the process the above message won't appear. The main intention for this feature is just to remind the user about the necessity of database backup. In script it would be too late anyway.

wajda commented 1 year ago

@korbelm , do you think we should print it even in the non-interactive mode, effectively always requiring -y option in addition to db-upgrade while running it from scripts?

korbelm commented 1 year ago

i would keep -y even for automated run (other sw do) as it should make users more aware of potential risks, from my point of view there is no need to have separate behaviour

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

wajda commented 1 year ago

Added the --non-interactive flag suggested above. I didn't use -y as it implies "yes", but there are also other prompts in the Admin CLI, not just yes/no.

The updated logic is the following:

image

image

image