-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Deploy to testnet script (#2705)
# Motivation Script to deploy to testnets wasn't working `./deploy.sh`. The problem was that dfx didn't know that the wasm was gzipped. Solution: rename the wasm in dfx.json More about the discussion: https://dfinity.slack.com/archives/CGA566TPV/p1686829378681289 # Changes * [Commit 1](88360aa): * Rename nns-dapp wasm in `dfx.json`. * Add new file extension to git ignore. * [Commit2](a270f06): Make build-rs.sh emit .wasm.gz instead of .wasm (tested manually, it works) * [Commit 3](f10ef1d): Update the dockerfile so that it too emits .wasm.gz (tested manually, it works) * [Commit 4](5ec7bf7): Bulk rename .wasm to .wasm.gz, but done manually checking every case as there are quite a few exceptions. E.g. external .wasm files are not renamed and jq paths ending in .wasm must not be renamed. (tested by CI; this verifies that users of the above changes within this codebase have been updated) * [Commit 5](199081a): For backwards compatibility, include a copy of all .wasm.gz assets with just the .wasm suffix. * Non-PR change: For recent releases, I have copied every .wasm in the release to the same path with suffix .wasm.gz. See the comment in the MR for details. This is to ensure that tasks such as rollback/rollforward tests have access to .wasm.gz for existing releases. This may have to be repeated to cover any more releases created between now and the PR being merged. # Tests * There should be no change in functionality; existing CI should suffice for canister functionality. * Here is a test release, to verify that both .wasm.gz and .wasm are produced: https://github.com/dfinity/nns-dapp/releases/tag/untagged-29888d6b4b9ee251e9b5 * Here are the last releases by proposal, to verify that .wasm.gz is available to rollback tests: * https://github.com/dfinity/nns-dapp/releases/tag/proposal-123011-agg * https://github.com/dfinity/nns-dapp/releases/tag/proposal-123006 * https://github.com/dfinity/nns-dapp/releases/tag/proposal-122799 --------- Co-authored-by: Max Murphy-Skvorzov <[email protected]>
- Loading branch information
Showing
32 changed files
with
103 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,5 @@ frontend/tsconfig.spec.json | |
frontend/.env | ||
e2e-tests | ||
**/*.wasm | ||
**/*.wasm.gz | ||
/deployment-config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
**/*.wasm | ||
**/*.wasm.gz | ||
assets.tar.xz | ||
sourcemaps.tar.xz | ||
build-inputs.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,10 @@ | |
# │ ic-cdk-optimizer | ||
# │ | ||
# nns-dapp.wasm | ||
# ▲ | ||
# │ gzip | ||
# │ | ||
# nns-dapp.wasm.gz | ||
|
||
set -euo pipefail | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.