Skip to content

Add-on store: fix various upgrading bugs#15132

Merged
seanbudd merged 1 commit into
masterfrom
try-fix-14991
Jul 13, 2023
Merged

Add-on store: fix various upgrading bugs#15132
seanbudd merged 1 commit into
masterfrom
try-fix-14991

Conversation

@seanbudd

@seanbudd seanbudd commented Jul 12, 2023

Copy link
Copy Markdown
Member

Link to issue number:

Fixes #14991

Summary of the issue:

There are various bugs with updating add-ons

  • An externally sourced add-on replacing an add-on store add-on does not correctly flush the add-on store version JSON cache. This causes the outdated add-on version information to be used by the externally installed add-on.
  • Updating an add-on through via the store does not correctly reflect the state: this allows an add-on to be updated multiple times. Instead the "download, pending install" state must be tracked better.
  • Updating an add-on externally does not correctly reflect the state: instead "pending removal" is shown, instead of pending install.
  • Updating an add-on externally is not handled correctly, causing the updated add-on to never be installed correctly
  • Updating an add-on through the store is not handled correctly, the new bundle should be installed before the previous bundle is marked for removal. This allows the add-on to run install/uninstall tasks in an expected way

Description of user facing changes

Fix various bugs with updating an add-on

Description of development approach

  • match the addonHandler installation / removal order when updating an add-on through the add-on store
  • check download status when determining state
  • Reflect "pending install" rather than "pending removal" for add-ons being updated.
  • include downloaded, pending installs in the installed add-ons tab
  • ensure add-ons are detected correctly when removing pending installs

Testing strategy:

Manual testing. Completed the steps for installing and updating add-ons:

Known issues with pull request:

None

Change log entries:

N/A

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • Security precautions taken.

@seanbudd seanbudd requested a review from a team as a code owner July 12, 2023 05:40
@seanbudd seanbudd requested a review from michaelDCurran July 12, 2023 05:40
# However, if the addon is disabled, then it needs to remain disabled so that
# the status in add-on store continues to say "disabled"
state[AddonStateCategory.PENDING_INSTALL].discard(self.name)
state[AddonStateCategory.PENDING_DISABLE].discard(self.name)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this change fixes a bug brought it when updating the AddonStateCategory values

installingDialog.done()
# let the dialog exit.
super().onClose(evt)
super(AddonStoreDialog, self).onClose(evt)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

fixes a minor regression from #15105

@seanbudd seanbudd merged commit 68dacc7 into master Jul 13, 2023
@seanbudd seanbudd deleted the try-fix-14991 branch July 13, 2023 23:43
@nvaccessAuto nvaccessAuto added this to the 2023.2 milestone Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: Unable to update add-ons containing dynamic link libraries.

3 participants