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

Fix prompt handling causing duplicate messages to be shown for export sql and dev-env sync #1682

Merged
merged 3 commits into from
Feb 8, 2024

Conversation

abdullah-kasim
Copy link
Contributor

Description

Fixes an issue with prompt handling that introduces a regression with the promptless flow.

The bug is as per below:

$ vip export sql @0000.production
✓ Latest backup found with timestamp 2023-11-06T10:54:14.000Z
Exporting database backup with timestamp 2023-11-06T10:54:14.000Z
✓ Preparing for backup download
✓ Creating backup copy
⠦ Checking if there's enough storage <-- shouldn't repeat
○ Requesting download link <-- shouldn't repeat
○ Downloading file <-- shouldn't repeat
✓ Checking if there's enough storage
✓ Requesting download link
✓ Downloading file - 100.00% (52.34 KB/52.34 KB)
File saved to /some/path/some-backup.sql.gz

This PR removes the lines that say 'shouldn't repeat'

Pull request checklist

New release checklist

Steps to Test

  1. Check out PR.
  2. Make sure you have a dev-env running - see here
  3. Run npm run build:watch
  4. Run ./dist/bin/vip-dev-env-sync-sql.js @0000.production --slug=local-env. Replace 0000 with your app. Bug should no longer be there.
  5. Run ./dist/bin/vip-export-sql.js @0000.production. Bug should no longer be there.

For regression test - do step 4 and 5 again, but force the prompt to always show by overriding the conditionals at here, here, and here.

Copy link
Contributor

@aswasif007 aswasif007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and tested. Worked fine for me. Thanks for addressing this.

Copy link

sonarqubecloud bot commented Feb 8, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@abdullah-kasim abdullah-kasim merged commit c4edeba into trunk Feb 8, 2024
16 checks passed
@abdullah-kasim abdullah-kasim deleted the forno-1719/fix/export-sql-progress-tracking branch February 8, 2024 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants