Skip to content

Commit d5e2a97

Browse files
committed
uploader: simplify Python implementation for review
Reduce orchestration and transport duplication, clarify module boundaries and lifecycle reporting, and centralize uploader test runfile setup. Keep the existing uploader behavior while making the implementation and migration tracker easier to review and maintain. Validated with the 449-test Python tooling suite, all 199 //tools tests, shellcheck, PowerShell parsing, buildifier, compileall, and git diff checks.
1 parent 275b6d4 commit d5e2a97

52 files changed

Lines changed: 1715 additions & 3334 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# This product includes software developed at Datadog
55
# (https://www.datadoghq.com/) Copyright 2025-Present Datadog, Inc.
66

7+
# Validate supported hosts and generated consumer artifacts before merge.
8+
# The uploader smoke catches launcher/runfiles failures that imports cannot expose.
9+
710
name: CI
811

912
on:

docs/python_parallel_uploader_migration_plan.md

Lines changed: 487 additions & 1835 deletions
Large diffs are not rendered by default.

tools/core/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# This product includes software developed at Datadog
55
# (https://www.datadoghq.com/) Copyright 2025-Present Datadog, Inc.
66

7+
# Export host-side Test Optimization tools and their dependency-free runtimes.
8+
# The uploader sources are runfiles because consumers execute them after Bazel tests.
9+
710
exports_files(
811
[
912
"bep_artifact_stage_helper.py",

tools/core/topt_runtime/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@
44
# This product includes software developed at Datadog
55
# (https://www.datadoghq.com/) Copyright 2025-Present Datadog, Inc.
66

7-
"""Shared, dependency-free runtime helpers for Test Optimization tools."""
7+
"""Dependency-free helpers shared by executable Test Optimization tools.
8+
9+
This package keeps host-side infrastructure independent from uploader internals.
10+
"""

tools/core/topt_runtime/runfiles.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
# This product includes software developed at Datadog
55
# (https://www.datadoghq.com/) Copyright 2025-Present Datadog, Inc.
66

7-
"""Immutable runfiles lookup prepared once before uploader workers start."""
7+
"""Resolve Bazel runfiles into one immutable lookup snapshot.
8+
9+
Centralizing lookup keeps launchers portable and workers isolated from env changes.
10+
"""
811

912
from __future__ import annotations
1013

tools/core/uploader_main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
# This product includes software developed at Datadog
66
# (https://www.datadoghq.com/) Copyright 2025-Present Datadog, Inc.
77

8-
"""Minimal bootstrap for the cross-platform Test Optimization uploader."""
8+
"""Bootstrap the shared uploader package from a stable Bazel entrypoint.
9+
10+
Keeping this file behavior-free lets both platform launchers invoke one runtime.
11+
"""
912

1013
from uploader_py.main import main
1114

tools/core/uploader_py/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
# This product includes software developed at Datadog
55
# (https://www.datadoghq.com/) Copyright 2025-Present Datadog, Inc.
66

7-
"""Cross-platform Datadog Test Optimization uploader runtime."""
7+
"""Expose the stable public surface of the cross-platform uploader package.
8+
9+
The narrow package boundary prevents callers from depending on internal stages.
10+
"""
811

912
from .models import MAX_TEST_PAYLOAD_BYTES
1013

0 commit comments

Comments
 (0)