diff --git a/tests/e2e/e2e_config.py b/tests/e2e/e2e_config.py index 56e14196605..798dadd1343 100644 --- a/tests/e2e/e2e_config.py +++ b/tests/e2e/e2e_config.py @@ -46,6 +46,9 @@ DD_APP_KEY = os.environ.get("DD_APP_KEY", "").strip() # make one call's two events searchable tens of seconds apart, and a duplicate # that surfaces late IS the bug (LIT-4447), so one poll interval is not enough. DD_SETTLE_SECONDS = float(os.environ.get("E2E_DD_SETTLE_SECONDS", "30")) +# DataDog Logs Search `from` window (relative to now). Wide enough for a suite +# run plus ingestion lag; override if a long CI queue needs a wider lookback. +DD_SEARCH_FROM = os.environ.get("E2E_DD_SEARCH_FROM", "now-30m").strip() or "now-30m" # Writes on the proxy are eventually consistent (e.g. spend rows flush on # proxy_batch_write_at, ~60s). Read-backs poll to this deadline, never sleep-once. diff --git a/tests/e2e/logging/datadog_reader.py b/tests/e2e/logging/datadog_reader.py index 5fc24211da6..b973557ebfa 100644 --- a/tests/e2e/logging/datadog_reader.py +++ b/tests/e2e/logging/datadog_reader.py @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field from e2e_config import ( DD_API_KEY, DD_APP_KEY, + DD_SEARCH_FROM, DD_SETTLE_SECONDS, DD_SITE, POLL_INTERVAL, @@ -38,7 +39,8 @@ class _SearchFilter(BaseModel): query: str #: Wide enough to cover a full suite run plus DataDog's ingestion lag; #: markers are unique per test, so a wide window cannot match foreign events. - from_: str = Field(default="now-30m", serialization_alias="from") + #: Override via E2E_DD_SEARCH_FROM when CI lookback needs more than the default. + from_: str = Field(default_factory=lambda: DD_SEARCH_FROM, serialization_alias="from") to: str = "now" @@ -120,14 +122,22 @@ class DdLogsReader: self, marker: str, events: list[DdLogEvent] ) -> list[DdLogEvent]: """Re-read at every poll interval until the settle window closes; a - duplicate ends the watch early because more waiting cannot clear it.""" + duplicate ends the watch early because more waiting cannot clear it. + + Keep the last non-empty result: a transient empty search (index lag) + must not erase events already confirmed earlier in the settle window. + """ settle_deadline = time.monotonic() + DD_SETTLE_SECONDS + last_nonempty = events while time.monotonic() < settle_deadline: time.sleep(POLL_INTERVAL) - events = self.events_for_marker(marker) - if len(events) > 1: - return events - return events + latest = self.events_for_marker(marker) + if not latest: + continue + if len(latest) > 1: + return latest + last_nonempty = latest + return last_nonempty def build_dd_logs_reader() -> DdLogsReader: diff --git a/tests/e2e/management/test_key_models_dropdown_e2e.py b/tests/e2e/management/test_key_models_dropdown_e2e.py index bebf63fe18f..36b3d606d51 100644 --- a/tests/e2e/management/test_key_models_dropdown_e2e.py +++ b/tests/e2e/management/test_key_models_dropdown_e2e.py @@ -74,10 +74,12 @@ def _open_key_edit_form(page: Page, key_alias: str) -> None: row = page.locator("tr").filter(has_text=key_alias).first expect(row).to_be_visible(timeout=60_000) # Key Alias is plain text. KeyInfoView opens from the Key ID control in the - # same row (blue truncated hash button on the tremor table / IdCell on the - # newer DataTable). Prefer that button; fall back to the alias text for - # layouts where the Key column itself is the click target. - key_id_button = row.locator("button").first + # same row (mono hash button on the tremor table / IdCell on the newer + # DataTable). Prefer that button; fall back to the alias text for layouts + # where the Key column itself is the click target. + key_id_button = row.locator("button.font-mono").first + if key_id_button.count() == 0: + key_id_button = row.locator("button").first if key_id_button.count() > 0: key_id_button.click() else: diff --git a/uv.lock b/uv.lock index 5a76b6a4531..7292e333284 100644 --- a/uv.lock +++ b/uv.lock @@ -10,7 +10,7 @@ resolution-markers = [ ] [options] -exclude-newer = "2026-07-13T19:39:19.414377Z" +exclude-newer = "2026-07-13T23:28:58.037448Z" exclude-newer-span = "P3D" [manifest] @@ -4431,7 +4431,7 @@ wheels = [ [[package]] name = "mcp" -version = "1.26.0" +version = "1.28.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -4449,9 +4449,9 @@ dependencies = [ { name = "typing-inspection" }, { name = "uvicorn", marker = "sys_platform != 'emscripten'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/fc/6d/62e76bbb8144d6ed86e202b5edd8a4cb631e7c8130f3f4893c3f90262b10/mcp-1.26.0.tar.gz", hash = "sha256:db6e2ef491eecc1a0d93711a76f28dec2e05999f93afd48795da1c1137142c66", size = 608005, upload-time = "2026-01-24T19:40:32.468Z" } +sdist = { url = "https://files.pythonhosted.org/packages/6e/77/9450b8f251a13affb6281997d0523c4615f8a8b35d0b21ff30db3a5aac9d/mcp-1.28.1.tar.gz", hash = "sha256:d51e36a5f5644faea4f85ea649bfffa6bc6c26770d42798ad6a3de3d2ba69683", size = 638501, upload-time = "2026-06-26T12:57:29.093Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fd/d9/eaa1f80170d2b7c5ba23f3b59f766f3a0bb41155fbc32a69adfa1adaaef9/mcp-1.26.0-py3-none-any.whl", hash = "sha256:904a21c33c25aa98ddbeb47273033c435e595bbacfdb177f4bd87f6dceebe1ca", size = 233615, upload-time = "2026-01-24T19:40:30.652Z" }, + { url = "https://files.pythonhosted.org/packages/e2/5e/d118fce19f87a2e7d8101c35c8ae0ec289098a4df0ff244cec23e415aca0/mcp-1.28.1-py3-none-any.whl", hash = "sha256:2726bca5e7193f61c5dde8b12500a6de2d9acf6d1a1c0be9e8c2e706437991df", size = 222620, upload-time = "2026-06-26T12:57:27.218Z" }, ] [[package]]