Skip to content

Commit eed25b2

Browse files
fix(compute_log_managers): bugs surfaced by live Docker validation (v0.10.18)
The end-to-end Docker demo (Splunk + OTel Collector + Dagster, scripted in dagster-community-components-cli/examples/setup_compute_log_managers_demo.sh) caught two bugs in v0.10.16/17: 1. PollingComputeLogSubscriptionManager imported from wrong module. Was: dagster._core.storage.local_compute_log_manager (doesn't export it) Now: dagster._core.storage.cloud_storage_compute_log_manager Fixed in splunk, otlp, tee. 2. _key_tuple used int(io_type) but ComputeIOType is an Enum, not IntEnum. Was: ("/".join(log_key), int(io_type), bool(partial)) → "int() argument must be a string ... not 'ComputeIOType'" Now: ("/".join(log_key), io_type.value, bool(partial)) Fixed in splunk + otlp. Validated live (validation in the demo script auto-checks via Splunk search API): 22 events landed on each path (direct HEC source=dagster, OTel Collector source=otel-collector) for a 10-line print asset. Structured fields (dagster_run_id, dagster_step_key, dagster_io_type) all present. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4141f6f commit eed25b2

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

compute_log_managers/otlp/compute_log_manager.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@
6060
TruncatingCloudStorageComputeLogManager,
6161
)
6262
from dagster._core.storage.compute_log_manager import ComputeIOType
63+
from dagster._core.storage.cloud_storage_compute_log_manager import (
64+
PollingComputeLogSubscriptionManager,
65+
)
6366
from dagster._core.storage.local_compute_log_manager import (
6467
IO_TYPE_EXTENSION,
6568
LocalComputeLogManager,
66-
PollingComputeLogSubscriptionManager,
6769
)
6870
from dagster._serdes import ConfigurableClass, ConfigurableClassData
6971
from dagster._utils import ensure_dir
@@ -349,7 +351,9 @@ def dispose(self):
349351

350352
@staticmethod
351353
def _key_tuple(log_key: Sequence[str], io_type: ComputeIOType, partial: bool) -> tuple:
352-
return ("/".join(log_key), int(io_type), bool(partial))
354+
# ComputeIOType is an Enum (.value is "stdout"/"stderr") — use the
355+
# value, not int(), since it's not an IntEnum.
356+
return ("/".join(log_key), io_type.value, bool(partial))
353357

354358
def _build_envelope(self, lines, attrs, severity, severity_text):
355359
"""Build one OTLP/HTTP logs envelope for a batch of lines.

compute_log_managers/splunk/compute_log_manager.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def __init__(
171171
self._session = None
172172

173173
# Subscription manager — polls local files for live UI streaming.
174-
from dagster._core.storage.local_compute_log_manager import (
174+
from dagster._core.storage.cloud_storage_compute_log_manager import (
175175
PollingComputeLogSubscriptionManager,
176176
)
177177
self._subscription_manager = PollingComputeLogSubscriptionManager(self)
@@ -368,7 +368,9 @@ def dispose(self):
368368

369369
@staticmethod
370370
def _key_tuple(log_key: Sequence[str], io_type: ComputeIOType, partial: bool) -> tuple:
371-
return ("/".join(log_key), int(io_type), bool(partial))
371+
# ComputeIOType is an Enum (.value is "stdout"/"stderr") — use the
372+
# value, not int(), since it's not an IntEnum.
373+
return ("/".join(log_key), io_type.value, bool(partial))
372374

373375
def _post_hec(self, body: str) -> None:
374376
"""POST a batch of HEC events. Raises on non-200 — caller's caller

compute_log_managers/tee/compute_log_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@
4949
from dagster import Field, StringSource, _check as check
5050
from dagster._core.storage.cloud_storage_compute_log_manager import (
5151
CloudStorageComputeLogManager,
52+
PollingComputeLogSubscriptionManager,
5253
TruncatingCloudStorageComputeLogManager,
5354
)
5455
from dagster._core.storage.compute_log_manager import ComputeIOType
5556
from dagster._core.storage.local_compute_log_manager import (
5657
LocalComputeLogManager,
57-
PollingComputeLogSubscriptionManager,
5858
)
5959
from dagster._serdes import ConfigurableClass, ConfigurableClassData
6060
from dagster_shared import seven

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "dagster-community-components"
7-
version = "0.10.17"
7+
version = "0.10.18"
88
description = "Community-maintained Dagster components — ingestion, transforms, IO managers, sensors, sinks, resources, and more."
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)