Consensys / starknet-snap

The MetaMask Snap for Starknet
https://snaps.consensys.net/starknet
Apache License 2.0
77 stars 26 forks source link

Proposal: Split the Deployment Workflow into Two Stages #361

Open khanti42 opened 2 hours ago

khanti42 commented 2 hours ago

Context:

We currently have a single deployment workflow that handles building and publishing the StarkNet Snap, along with deploying get-starknet and wallet-ui. This workflow works fine for full deployments, but when we need to request allowlisting (which depends on the Snap’s shasum), we are required to wait before deploying the other components.

Problem:

The current workflow deploys everything at once, which creates the following issues:

  1. Both wallet-ui and get-starknet target the new, not-yet-allowlisted Snap. This means any user trying to use the latest version will encounter failures.
  2. Users attempting to upgrade to the latest version of the Snap will also experience failures, as the Snap hasn't been allowlisted yet.
  3. We need to manually intervene to ensure that the Snap is allowlisted before deploying the wallet-ui and get-starknet, otherwise these components would target a Snap that isn't functional yet.

Proposed Solution:

We propose splitting the deployment process into two distinct workflows to improve the flexibility and streamline the allowlisting process:

  1. Workflow 1: Build and Publish the Snap

    • Build the Snap with the correct version and environment settings.
    • Publish the Snap to npm.
    • Output the Snap’s shasum (snap.manifest.json) in the logs.
    • This will allow us to quickly request allowlisting using the published shasum without deploying get-starknet or wallet-ui.
  2. Workflow 2: Publish Get-Starknet and Wallet-UI (after allowlisting)

    • After the Snap is allowlisted, trigger this workflow.
    • Deploy get-starknet and wallet-ui to AWS.
    • Ensure all components are correctly deployed after the Snap is verified and allowlisted.

Benefits:

Proposed Workflow Structure:

Workflow 1: Build and Publish Snap

Workflow 2: Publish Get-Starknet and Wallet-UI

Request for Feedback:

I’d like to gather feedback on:

khanti42 commented 2 hours ago

@stanleyyconsensys wdyt ?