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

BREAKING: SnapController.installSnaps Refactor & Rollback Functionality Added #1023

Merged
merged 39 commits into from Dec 7, 2022

Conversation

hmalik88
Copy link
Contributor

@hmalik88 hmalik88 commented Dec 1, 2022

This PR adds to @FrederikBolding 's work for #893. His work addresses changing to a pattern of throwing errors instead of returning and also rolling back installs to help ensure atomicity for multi-snap calls to installSnaps in the SnapsController. My work added rollback functionality for updates.

Fixes #893
Fixes #612

@hmalik88 hmalik88 requested a review from a team as a code owner December 1, 2022 17:05
@hmalik88 hmalik88 changed the title Install Snaps Refactor & Rollback Functionality Added SnapController.installSnaps Refactor & Rollback Functionality Added Dec 1, 2022
@FrederikBolding FrederikBolding changed the title SnapController.installSnaps Refactor & Rollback Functionality Added BREAKING: SnapController.installSnaps Refactor & Rollback Functionality Added Dec 1, 2022
Mrtenz
Mrtenz previously requested changes Dec 6, 2022
Copy link
Member

@Mrtenz Mrtenz left a comment

Choose a reason for hiding this comment

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

Mostly nits.

Can you add some JSDoc to all the new functions too?

packages/snaps-controllers/src/snaps/SnapController.ts Outdated Show resolved Hide resolved
packages/snaps-controllers/src/snaps/SnapController.ts Outdated Show resolved Hide resolved
packages/snaps-controllers/src/snaps/SnapController.ts Outdated Show resolved Hide resolved
packages/snaps-controllers/src/snaps/SnapController.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/versions.ts Outdated Show resolved Hide resolved
@hmalik88 hmalik88 dismissed Mrtenz’s stale review December 6, 2022 17:46

Addressed changes

@FrederikBolding FrederikBolding merged commit ac80ba6 into main Dec 7, 2022
@FrederikBolding FrederikBolding deleted the hm/update-rollback-mechanism branch December 7, 2022 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants