Skip to content

Commit 3e99bbb

Browse files
atergaclaude
andauthored
chore(ci): rename internet_identity_production to internet_identity_backend (#3759)
## Changes Renames the Internet Identity backend canister artifact from `internet_identity_production.wasm.gz` to `internet_identity_backend.wasm.gz` throughout the codebase. ### Files Updated - **CI/CD Workflows**: Updated `.github/workflows/canister-tests.yml` and `deploy-rc.yml` to use the new naming convention - **Release Process**: Updated `.github/actions/release/` documentation and scripts - **Documentation**: Updated `README.md` and demo configuration files to reference the new artifact name - **Build Scripts**: Updated `scripts/build` and `scripts/deploy-pr-to-beta` to use the new naming ### Backward Compatibility The release workflow now creates backward-compatible copies: - `internet_identity_backend.wasm.gz` (primary) - `internet_identity_production.wasm.gz` (copy for compatibility) - `internet_identity_dev.wasm.gz` (copy for compatibility) All three versions are published in releases with their respective `.sha256` checksums. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 971e2c8 commit 3e99bbb

File tree

6 files changed

+46
-30
lines changed

6 files changed

+46
-30
lines changed

.github/actions/release/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To try the action locally, run the following:
99
```bash
1010
$ # The list of files for which we compute the sha256
1111
$ # (those file must exist, though they don't need to have meaningful content)
12-
$ export INPUT_ASSETS='internet_identity_production.wasm.gz
12+
$ export INPUT_ASSETS='internet_identity_backend.wasm.gz
1313
internet_identity_frontend.wasm.gz
1414
archive.wasm.gz'
1515
$ export RELEASE_TAG=release-2023-08-11 # Does not need to exist

.github/actions/release/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ To build the wasm modules yourself and verify their hashes, run the following co
3636
git pull # to ensure you have the latest changes.
3737
git checkout $GITHUB_SHA
3838
./scripts/verify-hash \
39-
--ii-hash $(shasum -a 256 "internet_identity_production.wasm.gz" | cut -d ' ' -f1) \
39+
--ii-hash $(shasum -a 256 "internet_identity_backend.wasm.gz" | cut -d ' ' -f1) \
4040
--iife-hash $(shasum -a 256 internet_identity_frontend.wasm.gz | cut -d ' ' -f1)
4141
\`\`\`
4242

.github/workflows/canister-tests.yml

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
docker-build-internet_identity:
3838
# NOTE: the display name must contain the asset filename so that the release
3939
# action can map assets to job IDs (see .github/actions/release/run.sh).
40-
name: docker-build-internet_identity (internet_identity_production.wasm.gz)
40+
name: docker-build-internet_identity (internet_identity_backend.wasm.gz)
4141
runs-on: ubuntu-latest
4242
needs: docker-build-base
4343
steps:
@@ -53,7 +53,7 @@ jobs:
5353
- name: Set up docker buildx
5454
uses: docker/setup-buildx-action@v3
5555

56-
- name: Build internet_identity_production.wasm.gz
56+
- name: Build internet_identity_backend.wasm.gz
5757
uses: docker/build-push-action@v5
5858
with:
5959
context: .
@@ -65,16 +65,16 @@ jobs:
6565
outputs: ./out
6666
target: scratch_internet_identity
6767

68-
- run: mv out/internet_identity.wasm.gz internet_identity_production.wasm.gz
69-
- run: sha256sum internet_identity_production.wasm.gz
70-
- name: "Upload internet_identity_production.wasm.gz"
68+
- run: mv out/internet_identity.wasm.gz internet_identity_backend.wasm.gz
69+
- run: sha256sum internet_identity_backend.wasm.gz
70+
- name: "Upload internet_identity_backend.wasm.gz"
7171
uses: actions/upload-artifact@v4
7272
with:
7373
# name is the name used to display and retrieve the artifact
74-
name: internet_identity_production.wasm.gz
74+
name: internet_identity_backend.wasm.gz
7575
# path is the name used as the file to upload and the name of the
7676
# file when downloaded
77-
path: internet_identity_production.wasm.gz
77+
path: internet_identity_backend.wasm.gz
7878

7979
docker-build-archive:
8080
runs-on: ubuntu-latest
@@ -153,12 +153,12 @@ jobs:
153153
- name: "Download wasm"
154154
uses: actions/download-artifact@v4
155155
with:
156-
name: internet_identity_production.wasm.gz
156+
name: internet_identity_backend.wasm.gz
157157
path: .
158158
- id: record-size
159159
uses: ./.github/actions/file-size
160160
with:
161-
file: internet_identity_production.wasm.gz
161+
file: internet_identity_backend.wasm.gz
162162
save: ${{ github.ref == 'refs/heads/main' }}
163163
- name: "Check canister size"
164164
run: |
@@ -251,9 +251,9 @@ jobs:
251251
- name: "Download II wasm"
252252
uses: actions/download-artifact@v4
253253
with:
254-
name: internet_identity_production.wasm.gz
254+
name: internet_identity_backend.wasm.gz
255255
path: .
256-
- run: mv internet_identity_production.wasm.gz internet_identity.wasm.gz
256+
- run: mv internet_identity_backend.wasm.gz internet_identity.wasm.gz
257257
- name: Install PocketIC server
258258
uses: dfinity/pocketic@main
259259
with:
@@ -375,7 +375,7 @@ jobs:
375375
- name: "Download II wasm"
376376
uses: actions/download-artifact@v4
377377
with:
378-
name: internet_identity_production.wasm.gz
378+
name: internet_identity_backend.wasm.gz
379379
path: .
380380

381381
- name: "Download archive wasm"
@@ -396,7 +396,7 @@ jobs:
396396
397397
- name: Run Tests
398398
run: |
399-
mv internet_identity_production.wasm.gz internet_identity.wasm.gz
399+
mv internet_identity_backend.wasm.gz internet_identity.wasm.gz
400400
# NOTE: Here we download changing assets (i.e. the latest release) meaning that in some rare cases (after a new release)
401401
# PRs that used to be green may become red (if the new release broke something). While this is not CI best practice, it's
402402
# a relatively small price to pay to make sure PRs are always tested against the latest release.
@@ -427,7 +427,7 @@ jobs:
427427
- name: "Download II wasm"
428428
uses: actions/download-artifact@v4
429429
with:
430-
name: internet_identity_production.wasm.gz
430+
name: internet_identity_backend.wasm.gz
431431
path: .
432432

433433
- name: "Download archive wasm"
@@ -437,7 +437,7 @@ jobs:
437437
path: .
438438

439439
- name: Move wasms
440-
run: mv internet_identity_production.wasm.gz internet_identity.wasm.gz
440+
run: mv internet_identity_backend.wasm.gz internet_identity.wasm.gz
441441

442442
- name: Create dummy assets
443443
run: |
@@ -516,7 +516,7 @@ jobs:
516516
- name: "Download II backend wasm"
517517
uses: actions/download-artifact@v4
518518
with:
519-
name: internet_identity_production.wasm.gz
519+
name: internet_identity_backend.wasm.gz
520520
path: .
521521

522522
- name: "Download II frontend wasm"
@@ -548,7 +548,7 @@ jobs:
548548
- name: Deploy canisters
549549
run: |
550550
# NOTE: dfx install will run the postinstall scripts from dfx.json
551-
dfx canister install internet_identity --wasm internet_identity_production.wasm.gz --argument "(opt record { captcha_config = opt record { max_unsolved_captchas= 50:nat64; captcha_trigger = variant {Static = variant { CaptchaDisabled }}}; related_origins = opt vec { \"https://id.ai\"; \"https://identity.ic0.app\"; \"https://identity.internetcomputer.org\" }; new_flow_origins = opt vec { \"https://id.ai\" }; openid_configs = opt vec { ${{ steps.openid-configs.outputs.OPENID_CONFIGS }} } })"
551+
dfx canister install internet_identity --wasm internet_identity_backend.wasm.gz --argument "(opt record { captcha_config = opt record { max_unsolved_captchas= 50:nat64; captcha_trigger = variant {Static = variant { CaptchaDisabled }}}; related_origins = opt vec { \"https://id.ai\"; \"https://identity.ic0.app\"; \"https://identity.internetcomputer.org\" }; new_flow_origins = opt vec { \"https://id.ai\" }; openid_configs = opt vec { ${{ steps.openid-configs.outputs.OPENID_CONFIGS }} } })"
552552
II_CANISTER_ID=$(dfx canister id internet_identity)
553553
dfx canister install internet_identity_frontend --wasm internet_identity_frontend.wasm.gz --argument "(record { backend_canister_id = principal \"$II_CANISTER_ID\"; backend_origin = \"https://backend.id.ai\"; related_origins = opt vec { \"https://id.ai\"; \"https://identity.ic0.app\"; \"https://identity.internetcomputer.org\" }; fetch_root_key = opt true; dev_csp = opt true })"
554554
dfx canister install test_app --wasm demos/test-app/test_app.wasm
@@ -619,7 +619,7 @@ jobs:
619619
- name: "Download II wasm"
620620
uses: actions/download-artifact@v4
621621
with:
622-
name: internet_identity_production.wasm.gz
622+
name: internet_identity_backend.wasm.gz
623623
path: .
624624

625625
- name: "Download archive wasm"
@@ -645,7 +645,7 @@ jobs:
645645
sha=$(shasum -a 256 ./archive.wasm.gz | cut -d ' ' -f1 | sed 's/../\\&/g')
646646
dfx canister --network ic --wallet "$wallet" install --mode upgrade \
647647
--argument "(opt record {archive_config = record { module_hash = blob \"$sha\"; entries_buffer_limit = 10000:nat64; entries_fetch_limit = 1000:nat16; polling_interval_ns = 60000000000:nat64}; canister_creation_cycles_cost = opt (1000000000000:nat64); })" \
648-
--wasm internet_identity_production.wasm.gz \
648+
--wasm internet_identity_backend.wasm.gz \
649649
y2aaj-miaaa-aaaad-aacxq-cai
650650
651651
- name: "Download test app wasm"
@@ -704,10 +704,10 @@ jobs:
704704
steps:
705705
- uses: actions/checkout@v4
706706

707-
- name: "Download production build"
707+
- name: "Download backend build"
708708
uses: actions/download-artifact@v4
709709
with:
710-
name: internet_identity_production.wasm.gz
710+
name: internet_identity_backend.wasm.gz
711711
path: .
712712

713713
- name: "Download archive"
@@ -784,7 +784,7 @@ jobs:
784784
id: prepare-release
785785
with:
786786
assets: |
787-
internet_identity_production.wasm.gz
787+
internet_identity_backend.wasm.gz
788788
internet_identity_frontend.wasm.gz
789789
archive.wasm.gz
790790
changelog: ${{ steps.changelog.outputs.result }}
@@ -793,12 +793,24 @@ jobs:
793793
- name: Release notes
794794
run: cat ${{ steps.prepare-release.outputs.notes-file }}
795795

796+
# Create backward-compatible copies of the backend wasm
797+
- name: Create backward-compatible copies
798+
run: |
799+
cp internet_identity_backend.wasm.gz internet_identity_production.wasm.gz
800+
cp internet_identity_backend.wasm.gz internet_identity_dev.wasm.gz
801+
796802
# Create a sha file for dfx pull, referenced by the metadata set in the build
797803
- name: Create sha for dfx pull
798804
run: |
805+
shasum -a 256 \
806+
./internet_identity_backend.wasm.gz > \
807+
./internet_identity_backend.wasm.gz.sha256
799808
shasum -a 256 \
800809
./internet_identity_production.wasm.gz > \
801810
./internet_identity_production.wasm.gz.sha256
811+
shasum -a 256 \
812+
./internet_identity_dev.wasm.gz > \
813+
./internet_identity_dev.wasm.gz.sha256
802814
shasum -a 256 \
803815
./internet_identity_frontend.wasm.gz > \
804816
./internet_identity_frontend.wasm.gz.sha256
@@ -810,8 +822,12 @@ jobs:
810822
--tag ${{ github.ref }} \
811823
--notes-file ${{ steps.prepare-release.outputs.notes-file }} \
812824
-- \
825+
internet_identity_backend.wasm.gz \
826+
internet_identity_backend.wasm.gz.sha256 \
813827
internet_identity_production.wasm.gz \
814828
internet_identity_production.wasm.gz.sha256 \
829+
internet_identity_dev.wasm.gz \
830+
internet_identity_dev.wasm.gz.sha256 \
815831
internet_identity_frontend.wasm.gz \
816832
internet_identity_frontend.wasm.gz.sha256 \
817833
src/internet_identity/internet_identity.did \

.github/workflows/deploy-rc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
uses: actions/github-script@v7
2424
with:
2525
script: |
26-
// Find all artifacts for the production build, and filter for non-expired main artifacts
26+
// Find all artifacts for the backend build, and filter for non-expired main artifacts
2727
const allArtifacts = await github.paginate(github.rest.actions.listArtifactsForRepo, {
2828
owner: context.repo.owner,
2929
repo: context.repo.repo,
30-
name: "internet_identity_production.wasm.gz",
30+
name: "internet_identity_backend.wasm.gz",
3131
});
3232
const artifactsByBranch = {};
3333
const mainArtifacts = allArtifacts
@@ -56,7 +56,7 @@ jobs:
5656
await exec.exec('rm', ["artifact.zip" ]);
5757
5858
- name: "Print shasum of found build"
59-
run: shasum -a 256 ./internet_identity_production.wasm.gz
59+
run: shasum -a 256 ./internet_identity_backend.wasm.gz
6060

6161
- uses: dfinity/setup-dfx@e50c04f104ee4285ec010f10609483cf41e4d365
6262

@@ -75,7 +75,7 @@ jobs:
7575
# Needed to surpass dfx error to use the insecure plaintext identity
7676
export DFX_WARNING=-mainnet_plaintext_identity
7777
dfx canister --network ic --wallet "$wallet" install --mode upgrade \
78-
--wasm internet_identity_production.wasm.gz \
78+
--wasm internet_identity_backend.wasm.gz \
7979
${{ env.ii_canister_id }}
8080
8181
- name: Send RC link to slack

scripts/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ function build_canister() {
178178
release="${version_parts[1]}"
179179
if [ -n "$release" ]
180180
then
181-
asset_name="internet_identity_production.wasm.gz"
181+
asset_name="internet_identity_backend.wasm.gz"
182182
wasm_url="https://github.com/dfinity/internet-identity/releases/download/$release/$asset_name"
183183
wasm_hash_url="https://github.com/dfinity/internet-identity/releases/download/$release/$asset_name.sha256"
184184

scripts/deploy-pr-to-beta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ fi
161161
# is resilient to changes in matrix keys/order or GitHub's display-name formatting.
162162
DEPLOYMENTS=()
163163
if [ "$DEPLOY_BACK" = true ]; then
164-
DEPLOYMENTS+=("internet_identity_production.wasm.gz:$STAGING_CANISTER_ID:docker-build-internet_identity:internet_identity_production.wasm.gz")
164+
DEPLOYMENTS+=("internet_identity_backend.wasm.gz:$STAGING_CANISTER_ID:docker-build-internet_identity:internet_identity_backend.wasm.gz")
165165
fi
166166
if [ "$DEPLOY_FRONT" = true ]; then
167167
DEPLOYMENTS+=("internet_identity_frontend.wasm.gz:$FRONTEND_CANISTER_ID:docker-build-internet_identity_frontend:docker-build-internet_identity_frontend")

0 commit comments

Comments
 (0)