Collection of ideas that could improve CI reliability, performance and cost.
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
The issue lists seven broad CI improvement ideas and links prior work in nodejs/node#65927 and nodejs/build#3056; start by reading those discussions and the existing CI build and test configurations. Choose one idea for investigation and measure its effects on CI time, reliability, or cost. Done means reporting evidence and a focused follow-up proposal or linked issue; no specific files or acceptance criteria are named here.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The collaborator summits repeatedly bring up "CI flakiness" as a general topic as a pain point for collaborators. While this could mean different things to different people (Time to complete CI runs, unreliability of parts of the infrastructure, flaky tests needing re-runs) there are a few things that we could potentially look at. This issue includes a selection of things I've consindered that could potentially improve CI efficiency and they range from simple to wacky. These are high level ideas and are not yet fleshed out but I'm sharing them as a discussion starter for anyone who wants to pick them up and run with them or to provide any other thoughts.
- Find a way to stop the build process rebuilding so much when nothing has changed (For example why should it need to relink the
nodebinary when you want to runmake test?). There was some experimentation in this area by James in https://github.com/nodejs/node/pull/65927 who was looking to reduce redundancy but perhaps we could benefit from taking a closer look at this approach and whether it can be enhanced/expanded. - The standard problem with
tq-csafiles typically being the limit of how much parallelism you can run in the builds due to memory constraints as those files use a lot of RAM when being compiled (Although this week on a -j4 system with 8GB I hit a limit earlier in the build so it may not just be those files that cause particularly high memory usage). If we could limit those parts with large memory use then we could potentially increase the-jvalues that we use on some systems. - Could we run some of the
sequentialtest suite along side other things e.g. wpt so that things in the sequential stuff wouldn't interfere with each other? (I don't know the answer and I suspect it hasn't been looked at). Risky, but perhaps worthy of consideration and evaluation now that we have over 7500 tests onmain - How much could we gain in using more "fanned" builds (Build once, test in multiple OSs as we do on Windows) instead of building on each system? While fanned builds can be a bit troublesome it could reduce overall machine time (and cost). Do we care about verifying the build process on every Linux distribution for example? We'd want to understand the difference in build/test times but I think we're typically running at about 50/50 now unless a lot needs to be recompiled. If we took such an approach we could potentially give a subset of machines doing the builds higher specifications to allow the builds to progress faster although it's not clear that such segregation would be a good idea from a resource utilisation perspective. It would aoso make it easier to track the amount of time spent on build vs test to determine where efforts can/should be focussed on for any further optimisations.
- Automatic re-runs of failing tests. for each failing test at the end of the run, re-run it ten times and declare a pass if any of them worked. There's a reasonable chance that could avoid a lot of reruns. There has been some trialling of this on windows by Antoine which has been in place for the last three years via the
--measure-flakinessoption on the test runner, although at present that does not give a "success" result for the job overall if it was shown to pass in the re-runs. - Do we need to revisit the configurations we build on? There are two aspects to this: Platform/distribution coverage and "alternative" builds such as the ones we mostly do in containers (plus builds with pointer compression enabled) Reducing the matrix would reduce the chances of failures, but also run the risk of functionality not working. We could still run some of them in the "daily" builds if desired with the corresponding risk of having to figure out where any failures that occurred were introduced.
- Another possible option (which I know Richard isn't in favour of but it's still worth putting out there for consideration int eh current climate) would be that instead of running all variants on every PR we could pick a subset e.g. select one "other" Linux distributions (via a
genericlinux-x64or similar label) for each PR as well as the release one. That would reduce the load on the CI and reduce the number of machines we need. As per the last point it would have a corresponding risk of not being able to uniquely identify when any build fault on those platforms was introduced. This could be combined with point 4 regarding fanned builds.
On point 1 I've just looked at a typical Linux/x64 build and here are some lines from the CI job. While it's about 1-2 minutes and so not huge in the 40 minute process it is still potentially wasted machine time:
13:19:46 LINK(target) /home/iojs/build/workspace/node/out/Release/node
13:19:55 make test-ci -j1
13:20:59 LINK(target) /home/iojs/build/workspace/node/out/Release/node
For point 5 I had a look at one windows job which had an example of a failed test which was auto-re-run 10 times:
08:45:26 failed 4 out of 10
08:45:26 not ok 909 parallel/test-process-finalization
[...]
08:49:13 Failed tests:
08:49:13 d:\workspace\node-test-binary-windows-js-suites\node\Release\node.exe --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout d:\workspace\node-test-binary-windows-js-suites\node\test\parallel\test-process-finalization.mjs
In this case it failed 4/10 so appears to be a flaky test. it we were to allow this to be treated as a pass for the purposes of allowing the CI to be landed then it could save a significant amount of rebuild time from having to resume CI jobs. We'd need to decide whether to have a specific threshold for this. This has not yet been tested on non-Windows platforms though as far as I'm aware..
If anyone wants to take a look at any of these feel free to report back in this issue and/or create another linked issue for your investigations.
- Ngôn ngữ chính
- Jinja
- Star
- 542
- Fork
- 184
- Merge trung bình
- 4 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nodejs/build
-
build-agenda
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
nodejs/build#4514 · 14 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nodejs/build#4324 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Release build retention policyĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Maintainer thường phản hồi trong vòng 3 ngày
-
`binary_tmp` directory on test-mnx-ubuntu2204-x64-1 causing space issues and PR test failuresĐang mởincident
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
nodejs/build#4528 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Issue tương tự
-
Update Go Version to >=1.27.3Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
lorisleiva/laravel-docker#166 ·
-
coderabbit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
guymaim/robo-trader#398 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug pulumi/pulumi-policy-opa R2 S0
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
pulumi/pulumi-policy-opa#46 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
kanboard/kanboard#5929 · 1 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 5 ngày