-
Notifications
You must be signed in to change notification settings - Fork 262
feat(orchestrator): enable per-build CPU/memory tracking for build sandboxes #1968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
896f364
feat(orchestrator): enable per-build CPU/memory tracking for build sa…
dobrac c012f24
fix(orchestrator): remove redundant cgroup FD release calls
arkamar a1cc954
feat(orchestrator): use unique cgroup name per sandbox resume to avoi…
arkamar 64a5037
fix(orchestrator): set missing TeamID, BuildID, and SandboxType in ba…
arkamar 16dc813
chore: auto-commit generated changes
github-actions[bot] f55721a
fix(orchestrator): set SandboxType for regular sandboxes in Create an…
arkamar 16ddbd4
fix(orchestrator): set BuildID for regular sandboxes in Create and Ch…
arkamar f9aef2b
refactor(orchestrator): remove debug warning logs for empty SandboxTy…
arkamar 9a75a1f
refactor(orchestrator): introduce SandboxType enum with default fallback
arkamar a20957f
refactor(orchestrator): remove separate buildID parameter from initia…
arkamar 1a6c1b4
refactor(orchestrator): consolidate cgroup naming by moving sbx- pref…
arkamar c1c2f76
Merge branch 'main' into feat/per-build-cpu-tracking
dobrac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
packages/clickhouse/migrations/20260223120000_add_sandbox_type_to_host_stats.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| -- +goose Up | ||
| -- +goose StatementBegin | ||
| ALTER TABLE sandbox_host_stats_local | ||
| ADD COLUMN IF NOT EXISTS sandbox_type LowCardinality(String) DEFAULT 'sandbox' CODEC (ZSTD(1)); | ||
| -- +goose StatementEnd | ||
|
|
||
| -- +goose StatementBegin | ||
| ALTER TABLE sandbox_host_stats | ||
| ADD COLUMN IF NOT EXISTS sandbox_type LowCardinality(String) DEFAULT 'sandbox' CODEC (ZSTD(1)); | ||
| -- +goose StatementEnd | ||
|
|
||
| -- +goose Down | ||
| -- +goose StatementBegin | ||
| ALTER TABLE sandbox_host_stats_local DROP COLUMN IF EXISTS sandbox_type; | ||
| -- +goose StatementEnd | ||
|
|
||
| -- +goose StatementBegin | ||
| ALTER TABLE sandbox_host_stats DROP COLUMN IF EXISTS sandbox_type; | ||
| -- +goose StatementEnd |
51 changes: 51 additions & 0 deletions
51
packages/clickhouse/migrations/20260223120001_add_build_columns_to_metrics_gauge.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| -- +goose Up | ||
| -- +goose StatementBegin | ||
| ALTER TABLE sandbox_metrics_gauge_local | ||
| ADD COLUMN IF NOT EXISTS build_id String DEFAULT '' CODEC (ZSTD(1)), | ||
| ADD COLUMN IF NOT EXISTS sandbox_type LowCardinality(String) DEFAULT 'sandbox' CODEC (ZSTD(1)); | ||
| -- +goose StatementEnd | ||
|
|
||
| -- +goose StatementBegin | ||
| ALTER TABLE sandbox_metrics_gauge | ||
| ADD COLUMN IF NOT EXISTS build_id String DEFAULT '' CODEC (ZSTD(1)), | ||
| ADD COLUMN IF NOT EXISTS sandbox_type LowCardinality(String) DEFAULT 'sandbox' CODEC (ZSTD(1)); | ||
| -- +goose StatementEnd | ||
|
|
||
| -- +goose StatementBegin | ||
| ALTER TABLE sandbox_metrics_gauge_mv MODIFY QUERY | ||
| SELECT | ||
| toDateTime64(TimeUnix, 9) AS timestamp, | ||
| Attributes['sandbox_id'] AS sandbox_id, | ||
| Attributes['team_id'] AS team_id, | ||
| Attributes['build_id'] AS build_id, | ||
| Attributes['sandbox_type'] AS sandbox_type, | ||
| MetricName AS metric_name, | ||
| Value AS value | ||
| FROM metrics_gauge | ||
| WHERE MetricName LIKE 'e2b.sandbox.%'; | ||
| -- +goose StatementEnd | ||
|
|
||
| -- +goose Down | ||
| -- +goose StatementBegin | ||
| ALTER TABLE sandbox_metrics_gauge_mv MODIFY QUERY | ||
| SELECT | ||
| toDateTime64(TimeUnix, 9) AS timestamp, | ||
| Attributes['sandbox_id'] AS sandbox_id, | ||
| Attributes['team_id'] AS team_id, | ||
| MetricName AS metric_name, | ||
| Value AS value | ||
| FROM metrics_gauge | ||
| WHERE MetricName LIKE 'e2b.sandbox.%'; | ||
| -- +goose StatementEnd | ||
|
|
||
| -- +goose StatementBegin | ||
| ALTER TABLE sandbox_metrics_gauge_local | ||
| DROP COLUMN IF EXISTS build_id, | ||
| DROP COLUMN IF EXISTS sandbox_type; | ||
| -- +goose StatementEnd | ||
|
|
||
| -- +goose StatementBegin | ||
| ALTER TABLE sandbox_metrics_gauge | ||
| DROP COLUMN IF EXISTS build_id, | ||
| DROP COLUMN IF EXISTS sandbox_type; | ||
| -- +goose StatementEnd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.