-
Notifications
You must be signed in to change notification settings - Fork 130
fix(pegboard): include namespace in actor log query #2712
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
Closed
Changes from all commits
Commits
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
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
Empty file.
1 change: 1 addition & 0 deletions
1
.../services/pegboard/db/actor-log/migrations/20250703191728_drop_actor_logs_metadata.up.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 @@ | ||
| DROP VIEW IF EXISTS actor_logs2_with_metadata; |
Empty file.
19 changes: 19 additions & 0 deletions
19
packages/edge/services/pegboard/db/actor-log/migrations/20250703194503_actor_logs3.up.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 @@ | ||
| CREATE TABLE IF NOT EXISTS actor_logs3 ( | ||
| namespace LowCardinality(String), | ||
| actor_id String, | ||
| env_id UUID, | ||
| ts DateTime64 (9), | ||
| stream_type UInt8, -- pegboard::types::LogsStreamType | ||
| message String | ||
| ) ENGINE = ReplicatedMergeTree () | ||
| PARTITION BY | ||
| toStartOfHour (ts) | ||
| ORDER BY ( | ||
| namespace, | ||
| env_id, | ||
| actor_id, | ||
| toUnixTimestamp (ts), | ||
| stream_type | ||
| ) | ||
| TTL toDate (ts + toIntervalDay(14)) | ||
| SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1; |
Empty file.
36 changes: 36 additions & 0 deletions
36
.../services/pegboard/db/actor-log/migrations/20250703195340_fix_actor_logs3_metadata.up.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,36 @@ | ||
| CREATE MATERIALIZED VIEW IF NOT EXISTS actor_logs3_with_metadata | ||
| ( | ||
| namespace LowCardinality(String), | ||
| actor_id String, | ||
| ts DateTime64(9), | ||
| stream_type UInt8, -- pegboard::types::LogsStreamType | ||
| message String, | ||
| project_id UUID, | ||
| env_id UUID, | ||
| datacenter_id UUID, | ||
| tags Map(String, String), | ||
| build_id UUID, | ||
| client_id UUID, | ||
| durable Bool | ||
| ) | ||
| ENGINE = ReplicatedMergeTree() | ||
| PARTITION BY (env_id, toStartOfHour(ts)) | ||
| ORDER BY (env_id, toUnixTimestamp(ts), actor_id, stream_type) | ||
| TTL toDate(ts + toIntervalDay(14)) | ||
| SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1 | ||
| AS SELECT | ||
| l.namespace, | ||
| l.actor_id, | ||
| l.ts, | ||
| l.stream_type, | ||
| l.message, | ||
| a.project_id, | ||
| a.env_id, | ||
| a.datacenter_id, | ||
| a.tags, | ||
| a.build_id, | ||
| a.client_id, | ||
| a.durable | ||
| FROM actor_logs3 l | ||
| LEFT JOIN db_pegboard_analytics.actors a ON l.namespace = a.namespace AND l.env_id = a.env_id AND l.actor_id = a.actor_id; | ||
|
|
109 changes: 0 additions & 109 deletions
109
packages/edge/services/pegboard/src/ops/actor/log/export.rs
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -1,2 +1 @@ | ||
| pub mod export; | ||
| pub mod read; |
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.