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

[DDW-780] Daedalus start impovement #2716

Merged
merged 27 commits into from Nov 10, 2021

Conversation

danielmain
Copy link
Contributor

@danielmain danielmain commented Oct 20, 2021

This PR Improves the Daedalus startup by avoiding unnecessary cardano-node restarts and extends the exit/update/kill timeouts to 5 minutes.


Testing Checklist

In order to test this you need to run Daedalus in an environment with less than 2 GB disk free space. In Linux, you can use for instance fallocate -l 125G test.img in order to create big files, so you overpass the 2 GB free space.

  • Daedalus start with not enough space left

    • User does not free up space
    • Cardano Node is not running
  • Daedalus start with not enough space left

    • User does free up space
    • Check restart in logs. Should happen only once
    • Cardano node starts

Review Checklist

Test Scenarios

Scenario 1:Red screen shown when disk space less than 2GB
Given I have Daedalus installed
And the disk space on my machine is less than 2GB
When I run Daedalus
Then I can see the red screen

Scenario 2:Freeing disk space will “restart” Daedalus
Given I have Daedalus installed
And the disk space on my machine is less than 2GB
And I run Daedalus
And I can see the red screen
When I free disk space to be more than 2GB
Then red screen disappears
And Daedalus is working as normal again
And the “restart” in Daedalus log only occurs once
And the node is working as expected
And the node log is free of any unexpected issue

Basics

  • PR has been assigned and has appropriate labels (feature/bug/chore, release-x.x.x)
  • PR is updated to the most recent version of the target branch (and there are no conflicts)
  • PR has a good description that summarizes all changes
  • PR has default-sized Daedalus window screenshots or animated GIFs of important UI changes:
    • In English
    • In Japanese
  • CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
  • Automated tests: All acceptance and unit tests are passing (yarn test)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn dev)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn package / CI builds)
  • There are no flow errors or warnings (yarn flow:test)
  • There are no lint errors or warnings (yarn lint)
  • There are no prettier errors or warnings (yarn prettier:check)
  • There are no missing translations (running yarn manage:translations produces no changes)
  • Text changes are proofread and approved (Jane Wild / Amy Reeve)
  • Japanese text changes are proofread and approved (Junko Oda)
  • UI changes look good in all themes (Alexander Rukin)
  • Storybook works and no stories are broken (yarn storybook)
  • In case of dependency changes yarn.lock file is updated

Code Quality

  • Important parts of the code are properly commented and documented
  • Code is properly typed with flow
  • React components are split-up enough to avoid unnecessary re-renderings
  • Any code that only works in main process is neatly separated from components

Testing

  • New feature/change is covered by acceptance tests
  • New feature/change is manually tested and approved by QA team
  • All existing acceptance tests are still up-to-date
  • New feature/change is covered by Daedalus Testing scenario
  • All existing Daedalus Testing scenarios are still up-to-date

After Review

  • Merge the PR
  • Delete the source branch
  • Move the ticket to done column on the YouTrack board
  • Update Slack QA thread by marking it with a green checkmark

@danielmain danielmain changed the title [DDW-780] Added more checks before restarting cardano-node [DDW-780] Daedalus start impovement Oct 20, 2021
source/main/index.js Outdated Show resolved Hide resolved
@danielmain danielmain added the WIP label Oct 25, 2021
@danielmain danielmain removed the WIP label Oct 26, 2021
@danielmain danielmain added the WIP label Oct 27, 2021
@danielmain danielmain removed the WIP label Oct 28, 2021
@gabriela-ponce
Copy link

gabriela-ponce commented Oct 28, 2021

@danielmain I compared the latest build with develop and found some issues on this PR:

  • In the build 19457, if you start Daedalus with insufficient space, all the options in the menu that are disabled on the initial setup, are also disabled (or not visible) in this state (About, Redeem ITN rewards, Settings, Wallet Settings, Daedalus diagnostics).
    On develop, these options are enabled, even when the red screen is displayed. Maybe in this case, not all of them are required, (as some can't actually be used) but I think at least "Daedalus diagnostics" should be enabled.
    If you free some space and reload or restart, then the options are enabled again, but I think this is inconvenient.

  • The path of the state directory is not visible on "Daedalus diagnostics". If you reload it's visible, but if you restart Daedalus, then it's hidden again.

@nikolaglumac nikolaglumac removed the WIP label Nov 10, 2021
Copy link

@miorsufianiohk miorsufianiohk left a comment

Choose a reason for hiding this comment

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

LGTM. Tested on 19620. Great work @danielmain 👍

Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

Great work @danielmain 💯

@nikolaglumac nikolaglumac merged commit 5b329b9 into develop Nov 10, 2021
@iohk-bors iohk-bors bot deleted the chore/ddw-780-improve-startup-diskspace-check branch November 10, 2021 16:20
@nikolaglumac nikolaglumac added release-4.5.0 Daedalus Mainnet and removed ⏳release-vNext labels Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore release-4.5.0 Daedalus Mainnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants