Skip to content

Commit c430546

Browse files
authored
Create dispatcher messages (#23362)
* Async Client * lint * lint * remove rate limit handeling and fix tests * cleanup * fix lint * fix lint * optimization * extract only needed data * fix lint * fix lint * Critical security and functionality fixes * Code Quality : add type annotations and document ressource management * new implmentation * fix lint * remove respx * fix tests * fix lint * fix test * Create dispatcher messages * remove defaults * branch off master and discard async client changes * remove defaults and add enum * remove async manually * add changelog
1 parent cfc320c commit c430546

3 files changed

Lines changed: 72 additions & 0 deletions

File tree

ddev/changelog.d/23362.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Create dispatcher messages
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# (C) Datadog, Inc. 2026-present
2+
# All rights reserved
3+
# Licensed under a 3-clause BSD style license (see LICENSE)
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# (C) Datadog, Inc. 2026-present
2+
# All rights reserved
3+
# Licensed under a 3-clause BSD style license (see LICENSE)
4+
from __future__ import annotations
5+
6+
from dataclasses import dataclass
7+
from typing import Literal
8+
9+
from ddev.event_bus.orchestrator import BaseMessage
10+
11+
12+
@dataclass
13+
class BatchJob:
14+
"""A single job entry in a TestBatch."""
15+
16+
name: str
17+
target: str
18+
runner: str
19+
environment: str
20+
platform: Literal["linux", "windows", "macos"]
21+
unit_tests: bool
22+
e2e_tests: bool
23+
24+
25+
@dataclass
26+
class FailedCheck:
27+
"""A single failed test check within a workflow."""
28+
29+
name: str
30+
url: str
31+
32+
33+
@dataclass
34+
class WorkflowStatus:
35+
"""Status of a single GitHub Actions workflow run."""
36+
37+
url: str
38+
id: int
39+
success_count: int | None
40+
failed_count: int | None
41+
failed_checks: list[FailedCheck]
42+
43+
44+
@dataclass
45+
class TestBatch(BaseMessage):
46+
"""Dispatched to trigger a matrix of test jobs."""
47+
48+
job_list: list[BatchJob]
49+
jobs_count: int
50+
integrations: list[str]
51+
52+
53+
@dataclass
54+
class BatchFinished(BaseMessage):
55+
"""Emitted when a GitHub Actions test workflow has completed."""
56+
57+
status: Literal["success", "failure", "skipped"]
58+
run_id: int
59+
workflow_url: str
60+
artifacts_path: str
61+
62+
63+
@dataclass
64+
class UpdatePRComment(BaseMessage):
65+
"""Emitted to request a PR comment update."""
66+
67+
done: bool
68+
workflows: list[WorkflowStatus]

0 commit comments

Comments
 (0)