Skip to content

perf(supervisor): inspect Docker resources concurrently - #4471

Closed
RealBhupesh wants to merge 1 commit into
triggerdotdev:mainfrom
RealBhupesh:codex/trigger-3727-resource-monitor
Closed

perf(supervisor): inspect Docker resources concurrently#4471
RealBhupesh wants to merge 1 commit into
triggerdotdev:mainfrom
RealBhupesh:codex/trigger-3727-resource-monitor

Conversation

@RealBhupesh

Copy link
Copy Markdown

Summary

  • Inspect all running task containers concurrently when calculating node resources.
  • Preserve the existing CPU and memory aggregation behavior.
  • Add the required supervisor server-change release note.

Root cause

The supervisor awaited each Docker container inspection inside a sequential loop, delaying resource availability updates as the number of running containers increased.

Validation

  • Formatting and lint checks passed.
  • Supervisor typecheck was attempted but is blocked by pre-existing missing generated database artifacts and workspace package outputs in this checkout.
  • A deterministic concurrency test was not added because this repository's local guidance prohibits mocks.

Please keep this PR in draft until vouching and CI review are complete.

fixes#3727

@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f05fe25

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Hi @RealBhupesh, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@coderabbitai

coderabbitaiBot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 83846a66-384e-4df1-8e31-e586838cedf9

📥 Commits

Reviewing files that changed from the base of the PR and between 14824b0 and f05fe25.

📒 Files selected for processing (2)
  • .server-changes/docker-resource-monitor-parallel-inspect.md
  • apps/supervisor/src/resourceMonitor.ts

Walkthrough

Supervisor resource monitoring now filters for running containers before inspection. It inspects the containers concurrently with Promise.all, parses CPU and memory limits through resourceParser, and aggregates the parsed values into usage totals. A changelog entry documents the faster availability checks.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(supervisor): sequential inspect loop in DockerResourceMonitor blocks task scheduling thread

1 participant

@RealBhupesh