vorta icon indicating copy to clipboard operation
vorta copied to clipboard

[Enhancement] Avoid blocking UI while adding existing repo

Open DaffyTheDuck opened this issue 2 years ago • 22 comments

Description

Related Issue

Closes #1306

Motivation and Context

When adding a existing repository the UI freezes, this change might solve this issue

How Has This Been Tested?

I've tested this by adding a repository which is used to crash the UI

Screenshots (if appropriate):

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] I have read the CONTRIBUTING guide.
  • [x] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.

DaffyTheDuck avatar Mar 12 '23 12:03 DaffyTheDuck

Hi! @real-yfprojects , is this right ? like the UI is not freezing now, but after reverting back to the old changes I cant reproduce the issue anymore, I've tried editing the settings.db and even deleted the testing version. Any clue what I did wrong ?

DaffyTheDuck avatar Mar 12 '23 12:03 DaffyTheDuck

the UI is not freezing now, but after reverting back to the old changes I cant reproduce the issue anymore

I don't know what you were experiencing before, but this looks good. What happens when you close the dialog, the main window, quit vorta or try to edit anything inside vorta?

real-yfprojects avatar Mar 13 '23 13:03 real-yfprojects

the UI is not freezing now, but after reverting back to the old changes I cant reproduce the issue anymore

I don't know what you were experiencing before, but this looks good. What happens when you close the dialog, the main window, quit vorta or try to edit anything inside vorta?

Hi! Actually that was my mistake 😓 , I was running vorta from the backup repo and reverted the changes in main repo 😓

But is this the required solution ? like are there more changes required ?

DaffyTheDuck avatar Mar 13 '23 17:03 DaffyTheDuck

But is this the required solution ? like are there more changes required ?

As I said. This is the right approach. What happens when you close the dialog, the main window or quit vorta?

real-yfprojects avatar Mar 14 '23 08:03 real-yfprojects

Hi! this seems to work on my machine! waiting for your review 😄

also I've had a question about migrations, how can I perform the migrations 🤔

DaffyTheDuck avatar Mar 14 '23 17:03 DaffyTheDuck

@m3nu What was your Intention with the PR, would you consider it fine when the GUI stays responsive but you still can't do anything else while borg is running?

real-yfprojects avatar Mar 14 '23 19:03 real-yfprojects

This code was written long ago. It didn't seem important to do, anything else, while adding a repo. No specific consideration.

m3nu avatar Mar 14 '23 21:03 m3nu

This code was written long ago. It didn't seem important to do, anything else, while adding a repo. No specific consideration.

But as per the current GUI, you can not do anything until you close the dialog displayed 🤔

DaffyTheDuck avatar Mar 15 '23 13:03 DaffyTheDuck

also I've had a question about migrations, how can I perform the migrations thinking

Which migrations? Usually vorta migrates its database automatically.

real-yfprojects avatar Mar 15 '23 14:03 real-yfprojects

also I've had a question about migrations, how can I perform the migrations thinking

Which migrations? Usually vorta migrates its database automatically.

Oh, okay, means whenever I run vorta it applies the migrations ?

DaffyTheDuck avatar Mar 15 '23 14:03 DaffyTheDuck

Yes, if needed.

real-yfprojects avatar Mar 15 '23 15:03 real-yfprojects

Is this right ? pip_freezeeeeee

DaffyTheDuck avatar Mar 15 '23 17:03 DaffyTheDuck

I noticed that the cancel button no longer works.

real-yfprojects avatar Mar 21 '23 08:03 real-yfprojects

I noticed that the cancel button no longer works.

when we try to cancel (close) the add repo dialog without hitting the OK? I noticed that too, I added a try-except block for that in cancel_job 👍🏼 I'll push the code once the default queue change is done 😄

DaffyTheDuck avatar Mar 21 '23 09:03 DaffyTheDuck

I noticed that the cancel button no longer works.

The cancel button should work now 👍🏼

DaffyTheDuck avatar Apr 07 '23 06:04 DaffyTheDuck

Hi! and sorry I was away leaving this PR open with no activity, I was actually having my Practical exams 😅

I've updated the code accordingly, waiting for your review @real-yfprojects 😄

DaffyTheDuck avatar Apr 21 '23 17:04 DaffyTheDuck

Pls also show a status message while borg init/borg info is running.

real-yfprojects avatar Apr 21 '23 18:04 real-yfprojects

Pls also show a status message while borg init/borg info is running.

Sorry! did not get that exactly

DaffyTheDuck avatar Apr 21 '23 19:04 DaffyTheDuck

Pls also show a status message while borg init/borg info is running.

Hi! Did you mean, while the app is backing up the data? l instead of messages like Received SIGTERM or ERROR: Connection closed by remote host it should show Cancelled Adding Repository ? Because it shows the Cancelled adding repository message in AddRepoDialog 🤔

DaffyTheDuck avatar Apr 22 '23 12:04 DaffyTheDuck

No it should show a message while the repository is accessed (verified) for the first time. Something like Adding repository or something more specific and preferably progress updates if available.

real-yfprojects avatar Apr 22 '23 15:04 real-yfprojects

Hi! @real-yfprojects, sorry, this is taking longer than expected, I'm completely engrossed in preparation of my upcoming semester exam from May 8th. I will be completing this in a slow pace till then.

Sorry for inconvenience :)

DaffyTheDuck avatar Apr 30 '23 02:04 DaffyTheDuck

No worries.

real-yfprojects avatar Apr 30 '23 05:04 real-yfprojects