You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing the archive tab context menu, I found the "delete" action is allowed via the context menu, even when it is disabled due to an ongoing background operation. This can lead to out of bound exceptions if the same archive is deleted twice, as show below:
Reproduction steps:
Open Vorta and navigate tot he Archive tab
Select the first archive, and click 'delete'. Confirm that you wish to delete.
While the archive delete action is occurring, observe that the delete button is now disabled.
While the archive delete action is occurring, right click the archive being deleted and observe that the delete action is available via this menu.
While the archive delete action is occurring, right click the archive being deleted and select "delete". Confirm that you wish to delete.
Wait for archive delete actions to complete
Observe that an out of bounds exception has occurred, causes by attempting to delete an archive that no longer exists.
Environment
OS: Mac OS Ventura 13.5.1
Vorta version: 0.9.0
Installed from: Source
Borg version: 1.2.4
Logs
023-08-31 13:42:56,458 - vorta.borg.borg_job - INFO - Running command /opt/homebrew/bin/borg delete --info --log-json ssh://vwxe9eus@vwxe9eus.repo.borgbase.com/./repo::This is archive 6
2023-08-31 13:42:56,626 - root - CRITICAL - Uncaught exception, file a report at https://github.com/borgbase/vorta/issues/new/choose
Traceback (most recent call last):
File "/Users/ted/Desktop/vorta_workspace/vorta/env/lib/python3.11/site-packages/peewee.py", line 7117, in get
return clone.execute(database)[0]
~~~~~~~~~~~~~~~~~~~~~~~^^^
File "/Users/ted/Desktop/vorta_workspace/vorta/env/lib/python3.11/site-packages/peewee.py", line 4481, in __getitem__
return self.row_cache[item]
~~~~~~~~~~~~~~^^^^^^
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/ted/Desktop/vorta_workspace/vorta/src/vorta/views/archive_tab.py", line 945, in delete_result
ArchiveModel.get(name=archive).delete_instance()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ted/Desktop/vorta_workspace/vorta/env/lib/python3.11/site-packages/peewee.py", line 6669, in get
return sq.get()
^^^^^^^^
File "/Users/ted/Desktop/vorta_workspace/vorta/env/lib/python3.11/site-packages/peewee.py", line 7120, in get
raise self.model.DoesNotExist('%s instance matching query does '
vorta.store.models.ArchiveModelDoesNotExist: <Model: ArchiveModel> instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."snapshot_id", "t1"."name", "t1"."repo_id", "t1"."time", "t1"."duration", "t1"."size", "t1"."trigger" FROM "archivemodel" AS "t1" WHERE ("t1"."name" = ?) LIMIT ? OFFSET ?
Params: ['This is archive 6', 1, 0]
2023-08-31 13:43:00,010 - vorta.borg.borg_job - WARNING - Archive This is archive 6 not found (1/1).
2023-08-31 13:43:00,536 - vorta.borg.jobs_manager - DEBUG - Finish job for site: 1
2023-08-31 13:43:00,537 - vorta.borg.jobs_manager - DEBUG - No more jobs for site: 1
The text was updated successfully, but these errors were encountered:
More broadly: I am seeing there is no direct connection between the buttons being toggled off in the archive tab vs the buttons being toggled in the context menu.
I think the best approach will be to link these buttons, as I can't think of a time or reason when an action should be available in the context menu when the corresponding button is disabled. Am I overlooking anything here?
Description
When testing the archive tab context menu, I found the "delete" action is allowed via the context menu, even when it is disabled due to an ongoing background operation. This can lead to out of bound exceptions if the same archive is deleted twice, as show below:
Reproduction steps:
Environment
Logs
The text was updated successfully, but these errors were encountered: