Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Throttle `node-test-commit` jobs on test CI

Đang mở
#4,435 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
git
Lĩnh vực
ci-cd, devops, tooling

Hướng nghiên cứu

Bắt đầu bằng cách xác định các định nghĩa của node-test-pull-request và node-test-commit, sau đó đọc cách các cài đặt executor hoặc giới hạn của chúng ảnh hưởng đến các job nền tảng được phân nhánh. Xác minh giới hạn đã chọn dựa trên việc xếp hàng, mức sử dụng ổ đĩa của workspace, khả năng sẵn sàng của executor và job post-build-status-update; hoàn thành có nghĩa là việc kiểm thử pull request được giới hạn mà không gây deadlock cho việc báo cáo trạng thái.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

build-agenda

Executor count on both machines has been dropped back to 25.

I'm tempted to leave the parallelism restrictions on node-test-commit but I'll raise a separate issue to discuss at the next build WG meeting...

Originally posted by @sxa in #4432

I think it makes sense to keep the PR testing throttled. Some background and reasoning:

  • We currently have 75 jenkins-workspace executors across three machines. The node-test-pull-request job spawns one node-test-commit on each run, and most of those will spawn off fanned jobs for windows and arm (*) and all of those use up one executor for each pull request testing job. The post-build-status-update job, when required, also requires a jenkins-workspace executor for a short period to do its work of posting back to the appropriate PR.
  • Throttling node-test-pull-request to 10 would allow at most 50 of those 75 executors to be used for pull request testing, leaving 25 for other jobs that need it a jenkins-workspace node in the CI.
  • I'll also note that while the platform subjobs such as node-test-commit-osx also do some work on the jenkins-workspace nodes they run via a lightweight executor that does not count towards the 25 on each node.
  • Having it as more than 10 is probably counter-productive. While it would allow a higher throughput of some of the faster platforms, the ultimate reporting back of status to the PRs is only done when the jobs is complete, which is gated by the slowest platform. 10 is probably still quite generous given that we don't have more than two machines for any given label.
  • The disk usage on the workspace servers increases if you allow more jobs to execute in parallel. If 10 pull requests are running in parallel the jenkins-workspace node (assuming the worst case that they all end up on the same node) will require ten separate working directories of up to 4GB each (+) - each will go into a directory suffixed by @n.
  • As mentioned earlier the platform specific jobs use a lightweight executor on the jenkins-workspace nodes. They still require space and as an example the OSX job got up to node-test-commit-osx@33 today because so many were in the queue (it had previously reached 35 in September 2024). This demonstrates that without throttling at the top level you can chew up disk space on the workspace servers (each of those takes up 2.5-3GB)
  • I will also note that as a side effect of throttling node-test-commit to 10 for the OSX problem we now have a backlog of over 10 in the queue. This is causing jobs not to be triggered purely due to the delay caused by the backlog of osx jobs. This number will increase over the day. We should consider this when deciding to throttle and perhaps make the metric of queued jobs which are throttled something to actively monitor.
  • Reducing to 10 would likely decrease the probability of hitting the 20 minute timeout occurring on node-test-commit jobs (@)

As part of resolving the problem described in 4432 I throttled node-test-commit, but it makes more sense to throttle at the highest level - node-test-pull-request which implicitly limits those below it. This will resolve the possibility of deadlocks with the executors due to the need to spawn post-build-status-update at the end of the job and also

Side note: Moving to pipelines might help with this as they typically only use lightweight executors too, but that's a separate topic

(*) - I also note that arm32 fanned builds are triggered on node-daily-master even though we don't ship arm32 on that version - it looks like they're still passing though!)u
(+) - here is an example of the space usage from node-test-pull-request - as mentioned the osx one is worse at the moment as it goes up to @35 on the mnx-2 node:

iojs@test-mnx-ubuntu2204-x64-2:~/build/workspace$ du -sk node-test-pull-request* | grep -vw tmp
2333368 node-test-pull-request
2323504 node-test-pull-request@2
2426475 node-test-pull-request@3
2425107 node-test-pull-request@4
3959716 node-test-pull-request@5
3943765 node-test-pull-request@6
1538253 node-test-pull-request@7
1569737 node-test-pull-request@8

(@) - An example happened today in https://ci.nodejs.org/job/node-test-commit/90858/console:

11:45:46  > git fetch --no-tags --force --progress -- git@github.com:nodejs/node.git +refs/heads/*:refs/remotes/origin/* +refs/pull/65426/head:refs/remotes/origin/_jenkins_local_branch # timeout=20
12:05:46 ERROR: Timeout after 20 minutes
12:06:30 ERROR: Error cloning remote repo 'origin'
12:06:30 hudson.plugins.git.GitException: Command "git fetch --no-tags --force --progress -- git@github.com:nodejs/node.git +refs/heads/*:refs/remotes/origin/* +refs/pull/65426/head:refs/remotes/origin/_jenkins_local_branch" returned status code 128:

It had got close before it was killed - 90% through the final Resolving deltas phase:

Resolving deltas:  90% (774742/859022)
fatal: fetch-pack: invalid index-pack output
Ngôn ngữ chính
Jinja
Star
541
Fork
185
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
6

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nodejs/build

Tất cả issue của nodejs/build

Issue tương tự

Thêm issue về DevOps

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.