Skip to content

AI-6486 Link Dispatcher reports to run logs - #25263

Draft
AAraKKe wants to merge 1 commit into
masterfrom
aarakke/AI-6486-dispatcher-log-link
Draft

AAraKKe wants to merge 1 commit into
masterfrom
aarakke/AI-6486-dispatcher-log-link

Conversation

@AAraKKe

@AAraKKe AAraKKe commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds a Dispatcher Logs link beside the existing GitHub Run link in the footer of every Dispatcher PR report (running, finished, compact, minimal, and shutdown reports, plus the run summary derived from them). The link opens the Datadog Log Explorer in Org2 on https://app.datadoghq.com/logs and selects only the logs of the current Dispatcher workflow run, correlated on the same ci.pipeline.id run id (GITHUB_RUN_ID) that ci_attributes() already puts on every structured Dispatcher log, scoped with service:ddev source:dispatcher @ci.pipeline.id:<GITHUB_RUN_ID>.

The link carries an absolute time window so it stays useful after the viewer's default Log Explorer window moves on: a four-hour lookback (the workflow timeout is 185 minutes) and a five-minute future allowance around the render time, encoded as epoch-millisecond from_ts/to_ts with live=false. All query parameters are URL-encoded. No HTTP request or Datadog credentials are involved in building the link; Datadog still enforces Org2 permissions. The link is omitted outside GitHub Actions or whenever GITHUB_RUN_ID is unavailable. The footer's link separator is now a middle dot instead of the previous em dash.

Because the footer now embeds a render-time timestamp, the reporter renders each report and all of its fallback tiers from a single shared clock instant, so tiers rendered from the same snapshot still compare equal and the too-long ladder keeps skipping duplicate bodies instead of wasting requests.

Jira: https://datadoghq.atlassian.net/browse/AI-6486

Motivation

When a Dispatcher PR report shows a problem, the reader currently has to search Datadog manually to find the run's structured logs. A footer link straight to the exact run's logs makes that one click, and the run-scoped query and absolute window keep it accurate days later.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@AAraKKe AAraKKe added the qa/skip-qa Automatically skip this PR for the next QA label Sep 17, 2026
@AAraKKe
AAraKKe force-pushed the aarakke/AI-6486-dispatcher-log-link branch from dc3eab4 to f373c89 Compare September 17, 2026 14:19
@dd-octo-sts dd-octo-sts Bot added the ddev label Sep 17, 2026
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 17, 2026

Copy link
Copy Markdown

evalya-impact-summary

evalya impact analysis
Impact analysis: 0 selected, 0 skipped (of 0 test tasks)
Publish tasks:   2 (always emitted)
Diff (7 files):
  ddev/changelog.d/25263.added
  ddev/src/ddev/cli/ci/tests/dispatcher_logging.py
  ddev/src/ddev/cli/ci/tests/pr_comment.py
  ddev/src/ddev/cli/ci/tests/task_run_reporter.py
  ddev/tests/cli/ci/tests/test_dispatcher_logging.py
  ddev/tests/cli/ci/tests/test_pr_comment.py
  ddev/tests/cli/ci/tests/test_task_run_reporter.py

Debug a specific task: evalya plan impact --path <path> --task <task>

Learn more about CI impact filtering

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Sep 17, 2026

Copy link
Copy Markdown

Pipelines  Tests  Code Coverage

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 2 Pipeline jobs failed

PR | test / test (windows, windows-2022, ddev, ddev on Windows) / ddev on Windows — 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

PR | test / check

View more details · View in GitHub Actions

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 2 tests - 2 passed on retry View in Datadog

🎯 Code Coverage (details)
Patch Coverage: 98.61%
Overall Coverage: 89.23%

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 3574c74 | Docs | View more details | Give us feedback!

@AAraKKe
AAraKKe force-pushed the aarakke/AI-6486-dispatcher-log-link branch from f373c89 to e39a4b6 Compare September 17, 2026 14:24
@dd-octo-sts

dd-octo-sts Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

❌ Dispatcher tests · failed

Dispatcher beta: informational only

Dispatcher is running alongside existing CI while we validate it. You can ignore this report and its statuses. Existing CI remains the merge signal.

Caution

Dispatcher tests failed. See the failures below.

  853/853 jobs
✅ 851 passed · ❌ 2 failed

Batches

BatchStateJobsWorkflow
batch-01✅ passed240/240run 35233908637
batch-02❌ failed215/215run 35233908560
batch-03✅ passed220/220run 35233908607
batch-04✅ passed178/178run 35233908745

❌ Failures

kafka_consumer / py3.13-3.3-ssl / linux   view job

1 failed test
  • kafka_consumer.tests.test_e2e::test_e2e

kong / py3.13-1.5.0 / linux   view job

1 failed step
  • Run the tests
Dispatcher finished on ed6d4ffGitHub Run.

@AAraKKe
AAraKKe force-pushed the aarakke/AI-6486-dispatcher-log-link branch from e39a4b6 to 3574c74 Compare September 17, 2026 14:27
@dd-octo-sts

dd-octo-sts Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ddev qa/skip-qa Automatically skip this PR for the next QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant