Skip to content

Commit 4722c29

Browse files
authored
chore(docs): add manual allowlist check to promote runbook (#4034)
1 parent eb478df commit 4722c29

File tree

13 files changed

+1036
-739
lines changed

13 files changed

+1036
-739
lines changed

Cargo.lock

Lines changed: 992 additions & 714 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deny.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ allow = [
1616
"MIT",
1717
"MPL-2.0",
1818
"Zlib",
19-
"Unicode-DFS-2016"
19+
"Unicode-DFS-2016",
20+
"Unicode-3.0",
2021
]
2122

2223
deny = [

docs/dfx-json-schema.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@
475475
"optimize": {
476476
"title": "Optimize Canister Wasm",
477477
"description": "Invoke wasm level optimizations after building the canister. Optimization level can be set to \"cycles\" to optimize for cycle usage, \"size\" to optimize for binary size, or any of \"O4, O3, O2, O1, O0, Oz, Os\". Disabled by default. If this option is specified, the `shrink` option will be ignored.",
478+
"default": null,
478479
"anyOf": [
479480
{
480481
"$ref": "#/definitions/WasmOptLevel"
@@ -497,6 +498,7 @@
497498
"pullable": {
498499
"title": "Pullable",
499500
"description": "Defines required properties so that this canister is ready for `dfx deps pull` by other projects.",
501+
"default": null,
500502
"anyOf": [
501503
{
502504
"$ref": "#/definitions/Pullable"
@@ -509,6 +511,7 @@
509511
"remote": {
510512
"title": "Remote Configuration",
511513
"description": "Used to mark the canister as 'remote' on certain networks.",
514+
"default": null,
512515
"anyOf": [
513516
{
514517
"$ref": "#/definitions/ConfigCanistersCanisterRemote"
@@ -537,6 +540,7 @@
537540
"tech_stack": {
538541
"title": "Tech Stack",
539542
"description": "Defines the tech stack used to build this canister.",
543+
"default": null,
540544
"anyOf": [
541545
{
542546
"$ref": "#/definitions/TechStack"
@@ -668,6 +672,7 @@
668672
"nodes": {
669673
"title": "Available Nodes",
670674
"description": "Addresses of nodes to connect to (in case discovery from seeds is not possible/sufficient).",
675+
"default": null,
671676
"type": [
672677
"array",
673678
"null"
@@ -947,6 +952,7 @@
947952
"compute_allocation": {
948953
"title": "Compute Allocation",
949954
"description": "Must be a number between 0 and 100, inclusively. It indicates how much compute power should be guaranteed to this canister, expressed as a percentage of the maximum compute power that a single canister can allocate.",
955+
"default": null,
950956
"anyOf": [
951957
{
952958
"$ref": "#/definitions/PossiblyStr_for_uint64"
@@ -959,6 +965,7 @@
959965
"freezing_threshold": {
960966
"title": "Freezing Threshold",
961967
"description": "Freezing threshould of the canister, measured in seconds. Valid inputs are numbers (seconds) or strings parsable by humantime (e.g. \"15days 2min 2s\").",
968+
"default": null,
962969
"type": [
963970
"string",
964971
"null"
@@ -967,6 +974,7 @@
967974
"log_visibility": {
968975
"title": "Log Visibility",
969976
"description": "Specifies who is allowed to read the canister's logs.\n\nCan be \"public\", \"controllers\" or \"allowed_viewers\" with a list of principals.",
977+
"default": null,
970978
"anyOf": [
971979
{
972980
"$ref": "#/definitions/CanisterLogVisibility"
@@ -979,6 +987,7 @@
979987
"memory_allocation": {
980988
"title": "Memory Allocation",
981989
"description": "Maximum memory (in bytes) this canister is allowed to occupy. Can be specified as an integer, or as an SI unit string (e.g. \"4KB\", \"2 MiB\")",
990+
"default": null,
982991
"anyOf": [
983992
{
984993
"$ref": "#/definitions/Byte"
@@ -991,6 +1000,7 @@
9911000
"reserved_cycles_limit": {
9921001
"title": "Reserved Cycles Limit",
9931002
"description": "Specifies the upper limit of the canister's reserved cycles balance.\n\nReserved cycles are cycles that the system sets aside for future use by the canister. If a subnet's storage exceeds 450 GiB, then every time a canister allocates new storage bytes, the system sets aside some amount of cycles from the main balance of the canister. These reserved cycles will be used to cover future payments for the newly allocated bytes. The reserved cycles are not transferable and the amount of reserved cycles depends on how full the subnet is.\n\nA setting of 0 means that the canister will trap if it tries to allocate new storage while the subnet's memory usage exceeds 450 GiB.",
1003+
"default": null,
9941004
"type": [
9951005
"integer",
9961006
"null"
@@ -1001,6 +1011,7 @@
10011011
"wasm_memory_limit": {
10021012
"title": "Wasm Memory Limit",
10031013
"description": "Specifies a soft limit (in bytes) on the Wasm memory usage of the canister.\n\nUpdate calls, timers, heartbeats, installs, and post-upgrades fail if the Wasm memory usage exceeds this limit. The main purpose of this setting is to protect against the case when the canister reaches the hard 4GiB limit.\n\nMust be a number of bytes between 0 and 2^48 (i.e. 256 TiB), inclusive. Can be specified as an integer, or as an SI unit string (e.g. \"4KB\", \"2 MiB\")",
1014+
"default": null,
10041015
"anyOf": [
10051016
{
10061017
"$ref": "#/definitions/Byte"

docs/networks-json-schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"nodes": {
4747
"title": "Available Nodes",
4848
"description": "Addresses of nodes to connect to (in case discovery from seeds is not possible/sufficient).",
49+
"default": null,
4950
"type": [
5051
"array",
5152
"null"

docs/process/release.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ Once the beta releases are ready to be promoted:
6868
6969
## Stage 4: Draft PRs to prepare for promotion - day 3
7070
71-
All following PRs should be created as "draft".
71+
The following three PRs should be created as "draft". Obtain approval, but do not merge them yet.
7272
73-
Obtain approval, but do not merge them yet.
73+
The fourth PR (the one that updates the Motoko playground whitelist) needs to be merged and deployed before moving on to the next stage.
7474
7575
### Promote the release in [sdk](https://github.com/dfinity/sdk)
7676
@@ -79,6 +79,7 @@ Obtain approval, but do not merge them yet.
7979
- Set `.tags.latest` to the new dfx version;
8080
- Remove the beta releases from the `versions` array;
8181
1. Open a PR from this branch to `master`;
82+
1. Obtain approval, but do not merge this PR yet.
8283
8384
[Sample PR](https://github.com/dfinity/sdk/pull/3491)
8485
@@ -90,42 +91,45 @@ Obtain approval, but do not merge them yet.
9091
1. Change to the sdk submodule: `cd submodules/sdk`
9192
1. Checkout the release branch, e.g. `git checkout release-0.18.0`
9293
1. Go back to project root and commit the submodule change.
94+
- Obtain approval, but do not merge this PR yet.
9395
9496
[Sample PR](https://github.com/dfinity/portal/pull/2330)
9597
98+
### Update the [examples](https://github.com/dfinity/examples) default dfx
99+
100+
- Modify `DFX_VERSION` in these two files:
101+
- [provision-darwin.sh](https://github.com/dfinity/examples/blob/master/.github/workflows/provision-darwin.sh)
102+
- [provision-linux.sh](https://github.com/dfinity/examples/blob/master/.github/workflows/provision-linux.sh)
103+
- Obtain approval, but do not merge this PR yet.
104+
105+
[Sample PR](https://github.com/dfinity/examples/pull/704)
106+
96107
### Update the [motoko-playground][motoko-playground] frontend canister hash whitelist
97108
98109
- Click the "Run workflow" button on the [Broadcast Frontend Hash page](https://github.com/dfinity/sdk/actions/workflows/broadcast-frontend-hash.yml).
99110
- Fill "Release version of dfx" with the version of this release.
100111
- The workflow will create a PR in the [motoko-playground][motoko-playground] repo.
112+
- Merge and deploy this PR before the next stage.
101113
102114
[Sample PR](https://github.com/dfinity/motoko-playground/pull/217)
103115
104116
[motoko-playground]: https://github.com/dfinity/motoko-playground
105117
106-
### Update the [examples](https://github.com/dfinity/examples) default dfx
107-
108-
Modify `DFX_VERSION` in these two files:
109-
110-
- [provision-darwin.sh](https://github.com/dfinity/examples/blob/master/.github/workflows/provision-darwin.sh)
111-
- [provision-linux.sh](https://github.com/dfinity/examples/blob/master/.github/workflows/provision-linux.sh)
112-
113-
[Sample PR](https://github.com/dfinity/examples/pull/704)
114-
115118
## Stage 5: Promote the release - day 4
116119
120+
* Precondition: Make sure `dfx deploy --playground` works with a project created by `dfx new`. This makes sure that the asset canister wasm is properly allowlisted in the playground backend.
121+
117122
### Update the GitHub release
118123
119124
- Unset the "Pre-release" flag
120125
- Set the "Latest" flag
121126
122127
### Merge PRs
123128
124-
Merge all 4 PRs created in the previous stage:
129+
Merge all 3 PRs created in the previous stage that have not been merged yet:
125130
126131
- Promote the release
127132
- Update the portal
128-
- Update the motoko-playground
129133
- Update the examples
130134
131135
### Post to the forum

e2e/tests-dfx/assetscanister.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ CHERRIES" "$stdout"
10561056
assert_command dfx canister call --query e2e_project_frontend get '(record{key="/logo.png";accept_encodings=vec{"identity"}})'
10571057
assert_match 'content_type = "image/png"'
10581058
assert_command dfx canister call --query e2e_project_frontend get '(record{key="/index.js";accept_encodings=vec{"identity"}})'
1059-
assert_match 'content_type = "application/javascript"'
1059+
assert_match 'content_type = "text/javascript"'
10601060
assert_command dfx canister call --query e2e_project_frontend get '(record{key="/sample-asset.txt";accept_encodings=vec{"identity"}})'
10611061
assert_match 'content_type = "text/plain"'
10621062
assert_command dfx canister call --query e2e_project_frontend get '(record{key="/main.css";accept_encodings=vec{"identity"}})'

e2e/tests-icx-asset/icx-asset.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ icx_asset_upload() {
5959
icx_asset_list
6060

6161
assert_match "sample-asset.txt.*text/plain.*identity"
62-
assert_match "notreally.js.*application/javascript.*gzip"
63-
assert_match "notreally.js.*application/javascript.*identity"
62+
assert_match "notreally.js.*text/javascript.*gzip"
63+
assert_match "notreally.js.*text/javascript.*identity"
6464
}
6565

6666
@test "creates new files" {

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "1.76.0"
2+
channel = "1.78.0"
33
components = ["rustfmt", "clippy"]
44
targets = ["wasm32-unknown-unknown"]

src/canisters/frontend/ic-asset/src/asset/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ impl AssetConfig {
315315
}
316316

317317
if other.encodings.is_some() {
318-
self.encodings = other.encodings.clone();
318+
self.encodings.clone_from(&other.encodings);
319319
}
320320

321321
if other.security_policy.is_some() {

src/dfx/src/lib/deps/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ pub fn get_pull_canister_or_principal(
300300
let p = Principal::from_text(canister).with_context(||
301301
format!("{canister} is not a valid Principal nor a `type: pull` canister specified in dfx.json")
302302
)?;
303-
if pulled_json.canisters.get(&p).is_none() {
303+
if !pulled_json.canisters.contains_key(&p) {
304304
bail!("Could not find {} in pulled.json", &p);
305305
}
306306
Ok(p)

0 commit comments

Comments
 (0)