Skip to content

Commit 06c9874

Browse files
Update protobuf api
1 parent b5e1607 commit 06c9874

11 files changed

Lines changed: 225 additions & 162 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.59.0] - 2026-08-18
11+
1012
### Added
1113

1214
- `tilebox-workflows`: Added support for asynchronous task `execute()` methods, allowing tasks to await async APIs
@@ -25,6 +27,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2527
- Tilebox Datasets `TimeInterval`, `IDInterval`, and `SpatialFilter`.
2628
- Raster windows from Rasterio and async-geotiff when the corresponding optional library is installed.
2729

30+
### Changed
31+
32+
- `tilebox-workflows`: job responses no longer include task summaries.
33+
- `tilebox-workflows`: Use `GetJob` for live notebook progress updates
34+
2835
### Fixed
2936

3037
- `tilebox-workflows`: Propagate the task ID to all OpenTelemetry sub-spans created during task execution.
@@ -464,7 +471,8 @@ the first client that does not cache data (since it's already on the local file
464471
- Released under the [MIT](https://opensource.org/license/mit) license.
465472
- Released packages: `tilebox-datasets`, `tilebox-workflows`, `tilebox-storage`, `tilebox-grpc`
466473

467-
[Unreleased]: https://github.com/tilebox/tilebox-python/compare/v0.58.0...HEAD
474+
[Unreleased]: https://github.com/tilebox/tilebox-python/compare/v0.59.0...HEAD
475+
[0.59.0]: https://github.com/tilebox/tilebox-python/compare/v0.58.0...v0.59.0
468476
[0.58.0]: https://github.com/tilebox/tilebox-python/compare/v0.57.0...v0.58.0
469477
[0.57.0]: https://github.com/tilebox/tilebox-python/compare/v0.56.0...v0.57.0
470478
[0.56.0]: https://github.com/tilebox/tilebox-python/compare/v0.55.1...v0.56.0

‎tilebox-workflows/tilebox/workflows/jobs/service.py‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from tilebox.workflows.workflows.v1.diagram_pb2 import Diagram, RenderOptions
1818
from tilebox.workflows.workflows.v1.job_pb2 import (
1919
CancelJobRequest,
20-
GetJobProgressRequest,
2120
GetJobRequest,
2221
QueryJobsRequest,
2322
RetryJobRequest,
@@ -46,16 +45,12 @@ def submit(self, job_name: str, trace_parent: str, tasks: TaskSubmissions) -> Jo
4645
job_name=job_name,
4746
trace_parent=trace_parent,
4847
)
49-
return RichDisplayJob.from_message(self.service.SubmitJob(request), _widget=JobWidget(self.get_progress))
48+
return RichDisplayJob.from_message(self.service.SubmitJob(request), _widget=JobWidget(self.get_by_id))
5049

5150
def get_by_id(self, job_id: UUID) -> Job:
5251
request = GetJobRequest(job_id=uuid_to_uuid_message(job_id))
5352
response: JobMessage = self.service.GetJob(request)
54-
return RichDisplayJob.from_message(response, _widget=JobWidget(self.get_progress))
55-
56-
def get_progress(self, job_id: UUID) -> Job:
57-
request = GetJobProgressRequest(job_id=uuid_to_uuid_message(job_id))
58-
return Job.from_message(self.service.GetJobProgress(request))
53+
return RichDisplayJob.from_message(response, _widget=JobWidget(self.get_by_id))
5954

6055
def retry(self, job_id: UUID) -> int:
6156
request = RetryJobRequest(job_id=uuid_to_uuid_message(job_id))
@@ -82,5 +77,5 @@ def query(self, filters: QueryFilters, page: Pagination | None = None) -> QueryJ
8277
response: QueryJobsResponseMessage = self.service.QueryJobs(request)
8378

8479
return QueryJobsResponse.from_message(
85-
response, job_factory=lambda job: RichDisplayJob.from_message(job, _widget=JobWidget(self.get_progress))
80+
response, job_factory=lambda job: RichDisplayJob.from_message(job, _widget=JobWidget(self.get_by_id))
8681
)

‎tilebox-workflows/tilebox/workflows/runner/executor.py‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import inspect
55
import json
66
import logging
7-
from base64 import b64encode
87
from collections.abc import Awaitable, Callable, Iterator, MutableMapping, Sequence
98
from concurrent.futures import ThreadPoolExecutor
109
from contextlib import AbstractContextManager, contextmanager
@@ -87,7 +86,6 @@ def execute_task(
8786

8887
try:
8988
task_instance = task_class._deserialize(task.input, self.runner_context) # noqa: SLF001
90-
_set_task_input_span_attribute(span, task.input)
9189
with wrap_execute_context_manager(task, context):
9290
_execute(task_instance, context)
9391

@@ -280,16 +278,6 @@ def _finalize_mutable_progress_trackers(
280278
return [ProgressIndicator(label, bar._total, bar._done) for label, bar in progress_bars.items()] # noqa: SLF001
281279

282280

283-
def _set_task_input_span_attribute(span: object, task_input: bytes | None) -> None:
284-
task_input_span_attr = ""
285-
if task_input is not None:
286-
try:
287-
task_input_span_attr = task_input.decode("utf-8")
288-
except UnicodeDecodeError:
289-
task_input_span_attr = b64encode(task_input).decode("ascii")
290-
span.set_attribute("input", task_input_span_attr) # ty: ignore[unresolved-attribute]
291-
292-
293281
def _execute(task: TaskInstance, context: ExecutionContext) -> None:
294282
result = task.execute(context)
295283
if inspect.isawaitable(result):

0 commit comments

Comments
 (0)