dirigent-core 0.18.1__tar.gz → 0.18.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/PKG-INFO +4 -4
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/pyproject.toml +4 -4
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/pyproject.toml.orig +4 -4
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/alerting.py +7 -15
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/messages.py +0 -2
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/LICENSE +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/README.md +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/__init__.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/alembic/env.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/alembic/script.py.mako +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/alembic/versions/0001_baseline_schema.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/artifacts.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/auth.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/blockdocs.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/config.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/configdocs.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/database.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/directory.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/documents.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/documentschema.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/engine/__init__.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/engine/claim.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/engine/context.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/engine/definition.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/engine/executor.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/engine/failure.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/engine/recovery.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/engine/references.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/engine/runs.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/engine/services.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/engine/state.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/errors.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/examples.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/ids.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/logging.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/migrations.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/models.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/pipelines.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/plugins.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/protocol.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/py.typed +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/ratelimit.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/registry.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/reporting.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/retention.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/scheduler.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/schemas.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/secrets.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/storage.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/telemetry.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/trigger_documents.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/triggers/__init__.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/triggers/backfill.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/triggers/materialize.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/triggers/schedules.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/triggers/webhooks.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/types.py +0 -0
- {dirigent_core-0.18.1 → dirigent_core-0.18.2}/src/dirigent_core/worker.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dirigent-core
|
|
3
|
-
Version: 0.18.
|
|
3
|
+
Version: 0.18.2
|
|
4
4
|
Summary: Dirigent engine core: schema, configuration, and plugin host.
|
|
5
5
|
License-Expression: LicenseRef-Proprietary
|
|
6
6
|
License-File: LICENSE
|
|
@@ -12,9 +12,9 @@ Requires-Dist: argon2-cffi>=25.1.0
|
|
|
12
12
|
Requires-Dist: asyncpg>=0.31.0
|
|
13
13
|
Requires-Dist: cronsim>=2.7
|
|
14
14
|
Requires-Dist: cryptography>=46.0.5
|
|
15
|
-
Requires-Dist: dirigent-client==0.18.
|
|
16
|
-
Requires-Dist: dirigent-common==0.18.
|
|
17
|
-
Requires-Dist: dirigent-plugin==0.18.
|
|
15
|
+
Requires-Dist: dirigent-client==0.18.2
|
|
16
|
+
Requires-Dist: dirigent-common==0.18.2
|
|
17
|
+
Requires-Dist: dirigent-plugin==0.18.2
|
|
18
18
|
Requires-Dist: jsonschema>=4.26.0
|
|
19
19
|
Requires-Dist: opentelemetry-api>=1.44.0
|
|
20
20
|
Requires-Dist: pydantic-settings>=2.15.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dirigent-core"
|
|
3
|
-
version = "0.18.
|
|
3
|
+
version = "0.18.2"
|
|
4
4
|
description = "Dirigent engine core: schema, configuration, and plugin host."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13"
|
|
@@ -17,9 +17,9 @@ dependencies = [
|
|
|
17
17
|
"asyncpg>=0.31.0",
|
|
18
18
|
"cronsim>=2.7",
|
|
19
19
|
"cryptography>=46.0.5",
|
|
20
|
-
"dirigent-client==0.18.
|
|
21
|
-
"dirigent-common==0.18.
|
|
22
|
-
"dirigent-plugin==0.18.
|
|
20
|
+
"dirigent-client==0.18.2",
|
|
21
|
+
"dirigent-common==0.18.2",
|
|
22
|
+
"dirigent-plugin==0.18.2",
|
|
23
23
|
"jsonschema>=4.26.0",
|
|
24
24
|
"opentelemetry-api>=1.44.0",
|
|
25
25
|
"pydantic-settings>=2.15.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dirigent-core"
|
|
3
|
-
version = "0.18.
|
|
3
|
+
version = "0.18.2"
|
|
4
4
|
description = "Dirigent engine core: schema, configuration, and plugin host."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13"
|
|
@@ -17,9 +17,9 @@ dependencies = [
|
|
|
17
17
|
"asyncpg>=0.31.0",
|
|
18
18
|
"cronsim>=2.7",
|
|
19
19
|
"cryptography>=46.0.5",
|
|
20
|
-
"dirigent-client==0.18.
|
|
21
|
-
"dirigent-common==0.18.
|
|
22
|
-
"dirigent-plugin==0.18.
|
|
20
|
+
"dirigent-client==0.18.2",
|
|
21
|
+
"dirigent-common==0.18.2",
|
|
22
|
+
"dirigent-plugin==0.18.2",
|
|
23
23
|
"jsonschema>=4.26.0",
|
|
24
24
|
"opentelemetry-api>=1.44.0",
|
|
25
25
|
"pydantic-settings>=2.15.0",
|
|
@@ -52,7 +52,6 @@ from dirigent_core.messages import (
|
|
|
52
52
|
NOTIFIER_NOT_ON_WORKER,
|
|
53
53
|
SCOPE_NEEDS_PIPELINE,
|
|
54
54
|
TARGET_HAS_NO_NOTIFIER,
|
|
55
|
-
UNKNOWN_NOTIFIER,
|
|
56
55
|
)
|
|
57
56
|
from dirigent_core.models import (
|
|
58
57
|
AlertRule,
|
|
@@ -234,11 +233,6 @@ async def _scope_pipeline(session: AsyncSession, request: AlertRuleRequest) -> U
|
|
|
234
233
|
return pipeline.id
|
|
235
234
|
|
|
236
235
|
|
|
237
|
-
async def _connection_id(session: AsyncSession, code: str) -> UUID:
|
|
238
|
-
"""Resolve the connection a notifier delivers through, refusing an unknown code."""
|
|
239
|
-
return (await _connection(session, code)).id
|
|
240
|
-
|
|
241
|
-
|
|
242
236
|
async def _connection(session: AsyncSession, code: str) -> Connection:
|
|
243
237
|
"""Read one connection by code, refusing a code this instance does not hold."""
|
|
244
238
|
found = await session.execute(sa.select(Connection).where(Connection.code == code))
|
|
@@ -249,9 +243,9 @@ async def _connection(session: AsyncSession, code: str) -> Connection:
|
|
|
249
243
|
|
|
250
244
|
|
|
251
245
|
async def _target(session: AsyncSession, services: EngineServices, code: str | None) -> tuple[str, UUID | None]:
|
|
252
|
-
"""Resolve the one target
|
|
246
|
+
"""Resolve the one target named into the sender that delivers it and what it opens.
|
|
253
247
|
|
|
254
|
-
A
|
|
248
|
+
A target is a connection, and the notifier is that connection's kind; naming nothing is
|
|
255
249
|
the process log. A kind no installed notifier answers to is refused here rather than
|
|
256
250
|
stored, because the row would otherwise hold a sender no worker can dispatch on.
|
|
257
251
|
"""
|
|
@@ -691,26 +685,24 @@ async def queue_test_message(
|
|
|
691
685
|
session: AsyncSession,
|
|
692
686
|
services: EngineServices,
|
|
693
687
|
*,
|
|
694
|
-
notifier: str,
|
|
695
688
|
connection: str | None = None,
|
|
696
689
|
subject: str = "dirigent test alert",
|
|
697
690
|
body: str = "This is a test message sent through the notifier surface.",
|
|
698
691
|
) -> Notification:
|
|
699
692
|
"""Queue one unattached message, which is what ``dg alerts test`` sends.
|
|
700
693
|
|
|
701
|
-
The
|
|
702
|
-
|
|
694
|
+
The message names one target the way a rule does, and the sender follows from that
|
|
695
|
+
connection's kind. The subject and the body are rendered as a rule's are, over a stand-in
|
|
696
|
+
context, so a template can be tried out before it is written onto a rule.
|
|
703
697
|
"""
|
|
704
|
-
|
|
705
|
-
installed = ", ".join(sorted(services.host.notifiers)) or "none are installed"
|
|
706
|
-
raise AlertError(UNKNOWN_NOTIFIER, notifier=repr(notifier), installed=installed)
|
|
698
|
+
notifier, connection_id = await _target(session, services, connection)
|
|
707
699
|
context: JsonMap = {"run": {"pipeline": "(test)", "status": "succeeded"}, "report": None}
|
|
708
700
|
notification = Notification(
|
|
709
701
|
alert_rule_id=None,
|
|
710
702
|
run_id=None,
|
|
711
703
|
event=AlertEvent.RUN_SUCCEEDED,
|
|
712
704
|
notifier=notifier,
|
|
713
|
-
connection_id=
|
|
705
|
+
connection_id=connection_id,
|
|
714
706
|
subject=_one_line(_or_literal(subject, context, max_bytes=SUBJECT_RENDER_CAP)),
|
|
715
707
|
body=_or_literal(body, context, max_bytes=int(services.settings.report_max_size)),
|
|
716
708
|
context=context,
|
|
@@ -498,8 +498,6 @@ REQUIRED_UNMAPPED = WEBHOOK.define(
|
|
|
498
498
|
|
|
499
499
|
ALERT = Catalogue("alert")
|
|
500
500
|
|
|
501
|
-
UNKNOWN_NOTIFIER = ALERT.define("unknown_notifier", "no notifier {notifier} is installed ({installed})")
|
|
502
|
-
|
|
503
501
|
DUPLICATE_RULE = ALERT.define("duplicate_rule", "an alert rule coded {code} already exists")
|
|
504
502
|
|
|
505
503
|
BAD_ALERT_TEMPLATE = ALERT.define("bad_template", "{field} is not a Jinja template: {detail}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|