File tree Expand file tree Collapse file tree 5 files changed +27
-7
lines changed
docs/tutorial/code/node-app
spread/rockcraft/extension-expressjs Expand file tree Collapse file tree 5 files changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,11 @@ parts:
23
23
npm-include-node : True
24
24
npm-node-version : " 21.1.0"
25
25
source : src/
26
+ build-environment :
27
+ # NOTE: There's currently a bad interaction between the nodejs version in the
28
+ # archives and the kernel, causing an infinite hang during 'npm install':
29
+ # - https://github.com/npm/cli/issues/4028
30
+ # - https://github.com/amazonlinux/amazon-linux-2023/issues/856
31
+ # For now we need to disable libuv's use of io_uring; this should be able to
32
+ # be reverted in a few months (as of April 2025).
33
+ - UV_USE_IO_URING : " 0"
Original file line number Diff line number Diff line change @@ -152,6 +152,14 @@ def _gen_install_app_part(self) -> dict[str, Any]:
152
152
install_app_part ["npm-node-version" ] = self ._user_install_app_part .get (
153
153
"npm-node-version"
154
154
)
155
+
156
+ # NOTE: There's currently a bad interaction between the nodejs version in the
157
+ # archives and the kernel, causing an infinite hang during 'npm install':
158
+ # - https://github.com/npm/cli/issues/4028
159
+ # - https://github.com/amazonlinux/amazon-linux-2023/issues/856
160
+ # For now we need to disable libuv's use of io_uring; this should be able to
161
+ # be reverted in a few months (as of April 2025).
162
+ install_app_part ["build-environment" ] = [{"UV_USE_IO_URING" : "0" }]
155
163
return install_app_part
156
164
157
165
def _gen_app_build_packages (self ) -> list [str ]:
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ backends:
28
28
- ubuntu-20.04-64 :
29
29
workers : 1
30
30
storage : 40G
31
- - ubuntu-22 .04-64 :
31
+ - ubuntu-24 .04-64 :
32
32
workers : 4
33
33
storage : 40G
34
34
- fedora-39-64 :
@@ -142,7 +142,7 @@ suites:
142
142
tests/spread/rockcraft/ :
143
143
summary : tests for rockcraft core functionality, independent of host system
144
144
systems :
145
- - ubuntu-22 .04-64
145
+ - ubuntu-24 .04-64
146
146
147
147
tests/spread/foreign/ :
148
148
summary : tests that rockcraft and rocks work on different host systems
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ execute: |
14
14
express app
15
15
cd app && npm install && cd ..
16
16
17
- run_rockcraft init --name "${NAME}" --profile expressjs-framework
18
- sed -i "s/^base: .*/base: ${SCENARIO//-/@}/g" rockcraft.yaml
19
- if [ "${SCENARIO}" != "bare" ]; then
20
- sed -i "s/^build-base: .*/build-base: ${SCENARIO//-/@}/g" rockcraft.yaml
21
- fi
17
+ # run_rockcraft init --name "${NAME}" --profile expressjs-framework
18
+ # sed -i "s/^base: .*/base: ${SCENARIO//-/@}/g" rockcraft.yaml
19
+ # if [ "${SCENARIO}" != "bare" ]; then
20
+ # sed -i "s/^build-base: .*/build-base: ${SCENARIO//-/@}/g" rockcraft.yaml
21
+ # fi
22
22
23
23
function run_test() {
24
24
# rockcraft clean is required here because the cached layer writes to npmrc
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ def package_json_file(app_path):
88
88
),
89
89
"build-packages" : ["nodejs" , "npm" ],
90
90
"stage-packages" : ["ca-certificates_data" , "nodejs_bins" ],
91
+ "build-environment" : [{"UV_USE_IO_URING" : "0" }],
91
92
},
92
93
"expressjs-framework/runtime" : {
93
94
"plugin" : "nil" ,
@@ -129,6 +130,7 @@ def package_json_file(app_path):
129
130
"plugin" : "npm" ,
130
131
"source" : "app/" ,
131
132
"stage-packages" : ["ca-certificates_data" ],
133
+ "build-environment" : [{"UV_USE_IO_URING" : "0" }],
132
134
}
133
135
},
134
136
"platforms" : {
@@ -180,6 +182,7 @@ def package_json_file(app_path):
180
182
"ca-certificates_data" ,
181
183
"coreutils_bins" ,
182
184
],
185
+ "build-environment" : [{"UV_USE_IO_URING" : "0" }],
183
186
},
184
187
"expressjs-framework/runtime" : {
185
188
"plugin" : "nil" ,
@@ -235,6 +238,7 @@ def package_json_file(app_path):
235
238
"ca-certificates_data" ,
236
239
"coreutils_bins" ,
237
240
],
241
+ "build-environment" : [{"UV_USE_IO_URING" : "0" }],
238
242
},
239
243
"expressjs-framework/runtime" : {
240
244
"plugin" : "nil" ,
You can’t perform that action at this time.
0 commit comments