Skip to content

Commit

Permalink
[wasm] Codespaces need more disc to succeed building on container cre…
Browse files Browse the repository at this point in the history
…ation (dotnet#99803)

* Debug

* Building steps logging.

* Chop up restore and clean cache in between

* Restore does not take as much space as codespaces setup files in "/workspaces/.codespaces".

* Try removing the biggest offender.

* Cannot see the impact of cleanup on the size check logs.

* Move setup code into post-create

* Pass arg to the script, otherwise nothing is triggered

* Move all commands up to restore to onCreate. Restore should be done after codespaces setup when occupied disc space drops.

* Fix: wasm does not have artifacts dir on writing to this file.

* This would work but is not 100% reliable - user can interact with the VM before the command finishes.

* Build subset by subset.

* Easy fix - requre bigger disc.
  • Loading branch information
ilonatommy authored Mar 16, 2024
1 parent 55273a1 commit ca48a0d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/scripts/onCreateCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ case "$opt" in
esac

# save the commit hash of the currently built assemblies, so developers know which version was built
git rev-parse HEAD > ./artifacts/prebuild.sha
git rev-parse HEAD > ./artifacts/prebuild.sha
2 changes: 1 addition & 1 deletion .devcontainer/scripts/postCreateCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ case "$opt" in
esac

# reset the repo to the commit hash that was used to build the prebuilt Codespace
git reset --hard $(cat ./artifacts/prebuild.sha)
git reset --hard $(cat ./artifacts/prebuild.sha)
5 changes: 3 additions & 2 deletions .devcontainer/wasm-multiThreaded/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
},
"hostRequirements": {
"cpus": 4,
"memory": "8gb"
"memory": "8gb",
"storage": "40gb"
},

"features": {
Expand Down Expand Up @@ -40,7 +41,7 @@
"onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/onCreateCommand.sh wasm-multithreaded",

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/postCreateCommand.sh",
"postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/postCreateCommand.sh wasm-multithreaded",

// Add the locally installed dotnet to the path to ensure that it is activated
// This allows developers to just use 'dotnet build' on the command-line, and the local dotnet version will be used.
Expand Down
5 changes: 3 additions & 2 deletions .devcontainer/wasm/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
},
"hostRequirements": {
"cpus": 4,
"memory": "8gb"
"memory": "8gb",
"storage": "40gb"
},

"features": {
Expand Down Expand Up @@ -40,7 +41,7 @@
"onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/onCreateCommand.sh wasm",

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/postCreateCommand.sh",
"postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/postCreateCommand.sh wasm",

// Add the locally installed dotnet to the path to ensure that it is activated
// This allows developers to just use 'dotnet build' on the command-line, and the local dotnet version will be used.
Expand Down

0 comments on commit ca48a0d

Please sign in to comment.