summaryrefslogtreecommitdiffstats
path: root/.github/scripts/analytics/github_issue_mapping.py
diff options
context:
space:
mode:
authorKirill Rysin <[email protected]>2026-04-07 13:30:37 +0200
committerGitHub <[email protected]>2026-04-07 14:30:37 +0300
commita01bc32f8d8bc626ddfa4b6dd95b9956785b4539 (patch)
tree028cf5eba207b949a473f24dcaab4fbd70835cc2 /.github/scripts/analytics/github_issue_mapping.py
parent1af9f81399918c6fe5e795c06f20b0f99779e70a (diff)
MUTES: Migration .github/scripts/analytics/github_issue_mapping.py (#37536)
Diffstat (limited to '.github/scripts/analytics/github_issue_mapping.py')
-rwxr-xr-x.github/scripts/analytics/github_issue_mapping.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/.github/scripts/analytics/github_issue_mapping.py b/.github/scripts/analytics/github_issue_mapping.py
index ed000989c23..a97606da449 100755
--- a/.github/scripts/analytics/github_issue_mapping.py
+++ b/.github/scripts/analytics/github_issue_mapping.py
@@ -54,19 +54,18 @@ def create_test_issue_mapping_table(ydb_wrapper, table_path):
create_table_sql = f"""
CREATE TABLE IF NOT EXISTS `{table_path}` (
- `full_name` Utf8 NOT NULL,
- `branch` Utf8 NOT NULL,
- `github_issue_url` Utf8,
- `github_issue_title` Utf8,
- `github_issue_number` Uint64 NOT NULL,
- `github_issue_state` Utf8 NOT NULL,
+ `full_name` Utf8 NOT NULL,
+ `branch` Utf8 NOT NULL,
+ `build_type` Utf8 NOT NULL,
+ `github_issue_url` Utf8,
+ `github_issue_title` Utf8,
+ `github_issue_number` Uint64 NOT NULL,
+ `github_issue_state` Utf8,
`github_issue_created_at` Timestamp,
- PRIMARY KEY (full_name,branch,github_issue_number,github_issue_state)
+ PRIMARY KEY (full_name, branch, build_type, github_issue_number)
)
PARTITION BY HASH(full_name)
- WITH (
- STORE = COLUMN
- )
+ WITH (STORE = COLUMN)
"""
print(f"Creating table with query: {create_table_sql}")
@@ -88,6 +87,7 @@ def convert_mapping_to_table_data(test_to_issue_mapping):
table_data.append({
'full_name': test_name,
'branch': branch,
+ 'build_type': latest_issue.get('build_type', 'relwithdebinfo'),
'github_issue_url': latest_issue['url'],
'github_issue_title': latest_issue['title'],
'github_issue_number': latest_issue['issue_number'],
@@ -105,10 +105,11 @@ def bulk_upsert_mapping_data(ydb_wrapper, table_path, mapping_data):
column_types = ydb.BulkUpsertColumns()
column_types.add_column('full_name', ydb.PrimitiveType.Utf8)
column_types.add_column('branch', ydb.PrimitiveType.Utf8)
+ column_types.add_column('build_type', ydb.PrimitiveType.Utf8)
column_types.add_column('github_issue_url', ydb.OptionalType(ydb.PrimitiveType.Utf8))
column_types.add_column('github_issue_title', ydb.OptionalType(ydb.PrimitiveType.Utf8))
- column_types.add_column('github_issue_number', ydb.OptionalType(ydb.PrimitiveType.Uint64))
- column_types.add_column('github_issue_state', ydb.PrimitiveType.Utf8)
+ column_types.add_column('github_issue_number', ydb.PrimitiveType.Uint64)
+ column_types.add_column('github_issue_state', ydb.OptionalType(ydb.PrimitiveType.Utf8))
column_types.add_column('github_issue_created_at', ydb.OptionalType(ydb.PrimitiveType.Timestamp))
ydb_wrapper.bulk_upsert(table_path, mapping_data, column_types)