Skip to content

Conversation

@FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Aug 28, 2025

Allow updating preinstalled Snaps by updating their entry in the registry. This is accomplished by searching the registry for updates whenever updateRegistry is called and triggering #updateSnap. As part of this PR the previously named updateBlockedSnaps has been renamed to updateRegistry and a flag to allow automatic updates has been added to #updateSnap.

When an update is automatic, the permissions requested by the Snap are applied automatically similarly to how a preinstalled Snap is initialized. Preinstalled Snaps can still be installed and updated via the constructor. In case of any errors applying the update, the Snap is rolled back to its previous state.

This behavior is put behind a feature flag that we can decide to enable at a later date.

Closes #3593

@codecov
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.28%. Comparing base (770eafa) to head (b8d5836).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3616   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files         417      417           
  Lines       11768    11793   +25     
  Branches     1830     1841   +11     
=======================================
+ Hits        11566    11591   +25     
  Misses        202      202           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from fb/hash-private-refactor to main September 2, 2025 09:16
@FrederikBolding FrederikBolding changed the title wip: OTA prototype feat: Allow updating preinstalled Snaps via the registry Sep 2, 2025
@FrederikBolding FrederikBolding changed the title feat: Allow updating preinstalled Snaps via the registry feat!: Allow updating preinstalled Snaps via the registry Sep 2, 2025
@FrederikBolding FrederikBolding marked this pull request as ready for review September 2, 2025 10:06
@FrederikBolding FrederikBolding requested a review from a team as a code owner September 2, 2025 10:06
@FrederikBolding FrederikBolding added this pull request to the merge queue Sep 2, 2025
Merged via the queue into main with commit a8e0d22 Sep 2, 2025
120 checks passed
@FrederikBolding FrederikBolding deleted the fb/ota branch September 2, 2025 10:18
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.

Consider allowing automatic updates of preinstalled Snaps (OTA)

3 participants