Skip to content

Commit 0768c11

Browse files
Jean-Gabriel DoyonGitLab
authored andcommitted
Merge branch 'jgdoyon/disable-job-metadata-etl' into 'main'
fix(ontology): remove JobMetadata entity (source table not replicated) See merge request gitlab-org/orbit/knowledge-graph!1750
2 parents cc01f24 + ca9e188 commit 0768c11

9 files changed

Lines changed: 2 additions & 327 deletions

File tree

config/graph.sql

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -428,35 +428,6 @@ CREATE TABLE IF NOT EXISTS gl_job (
428428
ORDER BY (traversal_path, id) PRIMARY KEY (traversal_path, id)
429429
SETTINGS index_granularity = 1024, deduplicate_merge_projection_mode = 'rebuild', allow_experimental_replacing_merge_with_cleanup = 1, add_minmax_index_for_temporal_columns = 1, allow_part_offset_column_in_projections = 1, auto_statistics_types = 'minmax, uniq, countmin';
430430

431-
CREATE TABLE IF NOT EXISTS gl_job_metadata (
432-
id Int64 CODEC(Delta(8), LZ4),
433-
build_id Int64 CODEC(Delta(8), LZ4),
434-
interruptible Nullable(Bool),
435-
timeout Nullable(Int64) CODEC(Delta(8), LZ4),
436-
timeout_source LowCardinality(String) DEFAULT '' CODEC(LZ4),
437-
exit_code Nullable(Int64) CODEC(Delta(8), LZ4),
438-
has_exposed_artifacts Nullable(Bool),
439-
expanded_environment_name String DEFAULT '' CODEC(ZSTD(1)),
440-
environment_auto_stop_in String DEFAULT '' CODEC(ZSTD(1)),
441-
debug_trace_enabled Bool DEFAULT false,
442-
project_id Int64 CODEC(Delta(8), LZ4),
443-
traversal_path String DEFAULT '0/' CODEC(ZSTD(1)),
444-
_version DateTime64(6, 'UTC') DEFAULT now64(6) CODEC(ZSTD(1)),
445-
_deleted Bool DEFAULT false,
446-
INDEX idx_id id TYPE bloom_filter(0.001) GRANULARITY 1,
447-
INDEX idx_build_id build_id TYPE bloom_filter(0.001) GRANULARITY 1,
448-
INDEX idx_project_id project_id TYPE bloom_filter(0.001) GRANULARITY 1,
449-
PROJECTION by_id (SELECT _part_offset ORDER BY (id, traversal_path, build_id, _version)),
450-
PROJECTION by_build_id (SELECT _part_offset ORDER BY (build_id, traversal_path, _version)),
451-
PROJECTION by_project_id (SELECT _part_offset ORDER BY (project_id, traversal_path, build_id, _version)),
452-
PROJECTION tp_count (
453-
SELECT traversal_path, uniq(id)
454-
GROUP BY traversal_path
455-
)
456-
) ENGINE = ReplacingMergeTree(_version, _deleted)
457-
ORDER BY (traversal_path, build_id) PRIMARY KEY (traversal_path, build_id)
458-
SETTINGS index_granularity = 1024, deduplicate_merge_projection_mode = 'rebuild', allow_experimental_replacing_merge_with_cleanup = 1, allow_part_offset_column_in_projections = 1, auto_statistics_types = 'minmax, uniq, countmin';
459-
460431
CREATE TABLE IF NOT EXISTS gl_label (
461432
id Int64 CODEC(Delta(8), LZ4),
462433
title String DEFAULT '' CODEC(ZSTD(1)),

config/ontology/edges/has_metadata.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

config/ontology/nodes/ci/job_metadata.yaml

Lines changed: 0 additions & 140 deletions
This file was deleted.

config/ontology/schema.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,6 @@ settings:
161161
- {node: Job, property: type}
162162
- {node: Job, property: timeout_source}
163163
- {node: Job, property: scheduling_type}
164-
# --- JobMetadata ---
165-
- {node: JobMetadata, property: interruptible}
166-
- {node: JobMetadata, property: timeout_source}
167-
- {node: JobMetadata, property: has_exposed_artifacts}
168-
- {node: JobMetadata, property: debug_trace_enabled}
169164
# --- MergeRequest ---
170165
- {node: MergeRequest, property: state}
171166
- {node: MergeRequest, property: merge_status}
@@ -349,7 +344,6 @@ domains:
349344
Pipeline: nodes/ci/pipeline.yaml
350345
Stage: nodes/ci/stage.yaml
351346
Job: nodes/ci/job.yaml
352-
JobMetadata: nodes/ci/job_metadata.yaml
353347
Deployment: nodes/ci/deployment.yaml
354348
Environment: nodes/ci/environment.yaml
355349
Runner: nodes/ci/runner.yaml
@@ -442,5 +436,4 @@ edges:
442436
RUNS_FOR_PROJECT: edges/runs_for_project.yaml
443437
CHILD_OF: edges/child_of.yaml
444438
TRIGGERS_PIPELINE: edges/triggers_pipeline.yaml
445-
HAS_METADATA: edges/has_metadata.yaml
446439
BUILT_BY: edges/built_by.yaml

crates/integration-tests/tests/indexer/scenarios/sdlc/ci/processes_job_metadata.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/design-documents/data_model.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ The Namespace Graph represents the software development lifecycle (SDLC) entitie
5151
| `MergeRequestDiffFile`| Represents a file inside a merge request diff. | `id`, `merge_request_id`, `merge_request_diff_id`, `new_path`, `old_path`, `generated`, `a_mode`, `b_mode` |
5252
| `Stage` | Represents a CI stage. | `id`, `name`, `status`, `position` |
5353
| `Job` | Represents a CI job (`Ci::Build` or `Ci::Bridge`). | `id`, `name`, `status`, `ref`, `allow_failure`, `type`, `runner_id`, `timeout`, `timeout_source`, `exit_code`, `scheduling_type`, `auto_canceled_by_id` |
54-
| `JobMetadata` | Per-job runtime metadata sourced from `siphon_p_ci_builds_metadata`. | `id`, `build_id`, `interruptible`, `timeout`, `timeout_source`, `exit_code`, `expanded_environment_name` |
5554
| `Runner` | Represents a CI/CD runner (`Ci::Runner`). Global node, no `traversal_path` on the node table. | `id`, `runner_type`, `name`, `active`, `locked`, `access_level` |
5655
| `Finding` | Represents a `security_findings` scan finding. | `id`, `uuid`, `name`, `severity` |
5756
| `SecurityScan` | Represents a security scan run. | `id`, `scan_type`, `status`, `latest` |
@@ -119,7 +118,6 @@ graph TD
119118
| `DISMISSED_BY` | `User` | `Vulnerability`| A user dismissed a vulnerability. |
120119
| `RESOLVED_BY` | `User` | `Vulnerability`| A user resolved a vulnerability. |
121120
| `HAS_JOB` | `Stage`, `Pipeline` | `Job` | A stage contains jobs (canonical Pipeline → Stage → Job traversal); also exposed directly as Pipeline → Job for the natural CI mental model. |
122-
| `HAS_METADATA` | `Job` | `JobMetadata` | Job has runtime metadata (interruptible, effective timeout, expanded environment) sourced from `siphon_p_ci_builds_metadata`. |
123121
| `IN_PIPELINE` | `Job`, `SecurityScan` | `Pipeline` | A job or security scan belongs to a pipeline (one-hop replacement for `Pipeline → Stage → Job`). |
124122
| `HAS_STAGE` | `Pipeline` | `Stage` | A pipeline contains stages. |
125123
| `AUTO_CANCELED_BY` | `Pipeline`, `Job` | `Pipeline`, `Job` | Entity was auto-canceled when a newer entity of the same kind superseded it. |

docs/design-documents/decisions/014_entity_level_indexing.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ Examples from the current ontology:
127127
|---|---|---|
128128
| MergeRequest | `[traversal_path, id]` | `id` |
129129
| User (global) | `[id]` | `id` |
130-
| JobMetadata | `[traversal_path, build_id]` | `build_id` |
131130

132131
Entities where the first non-scope column has low cardinality (e.g., Note's
133132
`noteable_type` with ~10 enum values) are poor partitioning candidates and

docs/source/remote/schema.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
stage: Analytics
33
group: Knowledge Graph
44
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
5-
description: Full reference for all 28 Orbit node types across 6 domains, including properties and their types.
5+
description: Full reference for all 27 Orbit node types across 6 domains, including properties and their types.
66
title: Schema reference
77
---
88

@@ -26,7 +26,7 @@ title: Schema reference
2626
> For more information, see the history.
2727
> This feature is available for testing, but not ready for production use.
2828
29-
Orbit indexes 28 node types across 6 domains. Use these as entity names in your queries.
29+
Orbit indexes 27 node types across 6 domains. Use these as entity names in your queries.
3030

3131
To fetch the live schema at any time:
3232

@@ -70,7 +70,6 @@ glab orbit remote schema
7070
| `Job` | CI/CD job | `id`, `name`, `status`, `ref`, `allow_failure`, `environment`, `failure_reason` |
7171
| `Deployment` | CI/CD deployment of a commit | `id`, `iid`, `status`, `ref`, `sha`, `environment_id` |
7272
| `Environment` | CI/CD deployment target | `id`, `name`, `state`, `tier`, `external_url` |
73-
| `JobMetadata` | Per-job runtime metadata | `id`, `build_id`, `interruptible`, `timeout`, `exit_code` |
7473
| `Runner` | CI/CD runner | `id`, `runner_type`, `name`, `active`, `locked` |
7574

7675
## Planning

0 commit comments

Comments
 (0)