4b6817381b
Benchmark image — build + push to ECR (any adapter) / build + push (push) Waiting to run
CI / quality (ubuntu-latest) (push) Waiting to run
CI / test (tools-runtime) (push) Waiting to run
CI / test (e2e-general) (push) Waiting to run
CI / test (cli-runtime) (push) Waiting to run
CI / test (e2e-provider-and-openclaw) (push) Waiting to run
CI / test (integrations-and-misc) (push) Waiting to run
CI / coverage-report (push) Blocked by required conditions
CI / test-kubernetes (push) Waiting to run
CI / should-run-thorough (push) Waiting to run
CI / test-thorough (cloudwatch-demo) (push) Blocked by required conditions
CI / test-thorough (flink-ecs) (push) Blocked by required conditions
CI / test-thorough (upstream-lambda) (push) Blocked by required conditions
CI / test-thorough (prefect-ecs-fargate) (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Release / build-binaries (zip, opensre.exe, onefile, windows-latest, windows-x64) (push) Blocked by required conditions
Release / publish-release (push) Blocked by required conditions
Release / publish-main-release (push) Blocked by required conditions
Release / prepare (push) Waiting to run
Release / verify (push) Blocked by required conditions
Release / build-python-dist (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, macos-15-intel, darwin-x64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, macos-latest, darwin-arm64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04, linux-x64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04-arm, linux-arm64) (push) Blocked by required conditions
Synthetic Deterministic Tests / Synthetic offline (deterministic) (push) Waiting to run
Interactive Shell Live (PR + post-merge) / turn-checks (no-LLM) (push) Waiting to run
Interactive Shell Live (PR + post-merge) / turn-live shard ${{ matrix.shard_index }} (push) Waiting to run
CI (OpenClaw E2E) / openclaw test (push) Has been cancelled
66 lines
2.3 KiB
Python
66 lines
2.3 KiB
Python
"""Shared constants for the OpenSRE CLI."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
if TYPE_CHECKING:
|
|
MANAGED_INTEGRATION_SERVICES: tuple[str, ...]
|
|
SETUP_SERVICES: tuple[str, ...]
|
|
VERIFY_SERVICES: tuple[str, ...]
|
|
|
|
# MANAGED_INTEGRATION_SERVICES, SETUP_SERVICES and VERIFY_SERVICES are PEP 562
|
|
# lazy module attributes resolved by `__getattr__` below; ruff's F822 check
|
|
# can't see them.
|
|
__all__ = (
|
|
"ALERT_TEMPLATE_CHOICES",
|
|
"MANAGED_INTEGRATION_SERVICES",
|
|
"SAMPLE_ALERT_OPTIONS",
|
|
"SETUP_SERVICES",
|
|
"VERIFY_SERVICES",
|
|
)
|
|
|
|
ALERT_TEMPLATE_CHOICES: tuple[str, ...] = (
|
|
"generic",
|
|
"datadog",
|
|
"grafana",
|
|
"honeycomb",
|
|
"coralogix",
|
|
"splunk",
|
|
)
|
|
|
|
SAMPLE_ALERT_OPTIONS: tuple[tuple[str, str], ...] = (
|
|
("generic", "Generic - High error rate in payments ETL"),
|
|
("datadog", "Datadog - payments-etl error rate high"),
|
|
("grafana", "Grafana - Pipeline failure rate high"),
|
|
("honeycomb", "Honeycomb - checkout-api latency regression"),
|
|
("coralogix", "Coralogix - payments worker errors"),
|
|
("splunk", "Splunk - payments service error spike"),
|
|
)
|
|
|
|
|
|
def __getattr__(name: str) -> tuple[str, ...]:
|
|
# SETUP_SERVICES, VERIFY_SERVICES and MANAGED_INTEGRATION_SERVICES are
|
|
# sourced from the runtime integration registry so the CLI's positional-arg
|
|
# `click.Choice` validators stay in sync with what cmd_setup / cmd_verify
|
|
# can actually dispatch. Eagerly importing `integrations.registry` here
|
|
# creates a circular import (registry -> verifiers -> integrations.github.mcp ->
|
|
# cli.*). Deferring to first access lets `cli` finish
|
|
# bootstrapping. See #1973 (verify) and #2537 (setup).
|
|
if name == "SETUP_SERVICES":
|
|
from integrations.registry import SUPPORTED_SETUP_SERVICES
|
|
|
|
return SUPPORTED_SETUP_SERVICES
|
|
if name == "VERIFY_SERVICES":
|
|
from integrations.registry import SUPPORTED_VERIFY_SERVICES
|
|
|
|
return SUPPORTED_VERIFY_SERVICES
|
|
if name == "MANAGED_INTEGRATION_SERVICES":
|
|
from integrations.registry import (
|
|
SUPPORTED_SETUP_SERVICES,
|
|
SUPPORTED_VERIFY_SERVICES,
|
|
)
|
|
|
|
return tuple(sorted(set(SUPPORTED_SETUP_SERVICES) | set(SUPPORTED_VERIFY_SERVICES)))
|
|
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|