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

added guide to test upgrade locally #437

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,48 @@ Build and upgrade the canisters deployed. You can pass `-s` flag to skip the tes
scripts/canisters/local_deploy/upgrade_all_canisters.sh [-s]
```


## Testing Upgrades Locally
Before pushing changes to canisters on mainnet we make sure the upgrade will run successfully. Right now there is no automated way to do it. To test it locally follow the steps.

### Step 0
Run clean dfx

```sh
dfx start --clean --background
```

### Step 1
Checkout to last git tag
```sh
git checkout vx.y.z
```

### Step 2
Run install script to install last upgrade that ran successfully on mainnet
```sh
scripts/canisters/local_deploy/install_all_canisters.sh [-s]
```

### Step 3
Checkout to the head of main branch that we need to deploy
```sh
git checkout main
```

### Step 4
Run upgrade script to upgrade canistesr locally
```sh
scripts/canisters/local_deploy/upgrade_all_canisters.sh [-s]
```

### Step 5
Check version for any of the individual canisters deployed locally. If version is greater than `v1.0.0` then the upgrades were successful.

```sh
dfx canister call <individual-canister-id> get_version
```

## Mainnet Deployment

### Mainnet Deployment Checks
Expand Down
Loading