Skip to content

Show exact run URL and add lifecycle comment to wheel promotion#23828

Merged
AAraKKe merged 6 commits into
masterfrom
aarakke/promotion-workflow-ux
May 27, 2026
Merged

Show exact run URL and add lifecycle comment to wheel promotion#23828
AAraKKe merged 6 commits into
masterfrom
aarakke/promotion-workflow-ux

Conversation

@AAraKKe
Copy link
Copy Markdown
Collaborator

@AAraKKe AAraKKe commented May 25, 2026

What does this PR do?

Adds a return_run_details mode to dispatch_workflow and uses it in ddev dep promote so the CLI prints the exact run URL instead of a generic recent-runs link. Replaces the one-shot success comment in dependency-wheel-promotion.yaml with a lifecycle comment that updates on start, success, and failure, scoped per (PR, head SHA). Suppresses noisy httpx request logs while running the promote command.

Motivation

Followup to the dependency wheel promotion work. The CLI was pointing users at a recent-runs query instead of the run they just dispatched, and the workflow only commented on success, so a failed run left no PR-visible signal.

The workflow lifecycle comment passes user inputs through action inputs (not shell) and reads inputs.head_sha via process.env.HEAD_SHA inside actions/github-script so a malicious workflow_dispatch input cannot break out of a JS string literal. Permissions are unchanged, PR checkout stays sparse-pinned to .deps/resolved, and all actions are pinned by SHA.

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

This PR has been created and validated using the paired-review skill from agent-integrations.

AAraKKe added 2 commits May 25, 2026 11:28
- Extend dispatch_workflow with return_run_details so callers can get back the
  new run's html_url instead of a generic recent-runs link.
- ddev dep promote now prints the exact workflow run URL and suppresses noisy
  httpx request logs around the API calls.
- Replace the single success comment in dependency-wheel-promotion.yaml with a
  lifecycle comment that updates on start, success, and failure, scoped per
  (PR, head SHA) via a hidden marker so re-dispatches edit the same comment.
- Started-comment step now references find_comment.outputs.comment-id (the
  previous version pointed at its own step output, so re-dispatches for the
  same SHA would not have updated the existing comment).
- Pass inputs.head_sha into actions/github-script via env: HEAD_SHA and read
  process.env.HEAD_SHA in the script body, so a hostile workflow_dispatch
  input cannot break out of the JS string literal and execute arbitrary code.
@AAraKKe AAraKKe added the qa/skip-qa Automatically skip this PR for the next QA label May 25, 2026
@datadog-official
Copy link
Copy Markdown
Contributor

datadog-official Bot commented May 25, 2026

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

PR All | test / j89811be / Appgate SDP   View in Datadog   GitHub Actions

🔄 Retry job. This looks flaky and may succeed on retry. Error: unable to start CMD API server: unable to listen to address localhost:38513: bind: address already in use.

🧪 1 Test failed in 1 job

PR All | run   GitHub Actions

test_check_appgate_sdp_e2e from test_e2e.py   View in Datadog (Fix with Cursor)
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership &amp; permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-check-apikey.sh: executing... 
[cont-init.d] 01-check-apikey.sh: exited 0.
[cont-init.d] 50-ci.sh: executing... 
[cont-init.d] 50-ci.sh: exited 0.
[cont-init.d] 50-ecs-managed.sh: executing... 
...

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 98.17%
Overall Coverage: 87.48% (+0.13%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a291a76 | Docs | Datadog PR Page | Give us feedback!

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 98.16514% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.92%. Comparing base (7e7ccb5) to head (a291a76).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

AAraKKe added 3 commits May 25, 2026 11:57
…ails

- Add Literal[True]/Literal[False] overloads to GitHubManager.dispatch_workflow
  so callers asking for run details get a non-nullable dict back at the type
  level.
- Replace the bare assert in ddev dep promote with an explicit app.abort, run
  the validity check before printing the success message, and keep the success
  output inside the httpx-suppression scope.
- Add ddev/changelog.d/23828.added so the PR-changelog check passes for the
  ddev source changes.
- Lift the github credentials setup into ddev/tests/cli/dep/conftest.py as an
  autouse fixture, hoist the test-side logging import, and add coverage for the
  no-run-details abort path and the failure-path httpx level restoration.
- Match the cleaner api_post.call_args.kwargs form already used in the
  companion test in tests/utils/test_github.py.
- Move Any and Literal under TYPE_CHECKING in github.py; they are only used
  inside annotations that PEP 563 keeps as strings, so they have no runtime
  cost. The overload decorator stays at module scope because it runs at class
  definition time.
- Add an httpx_at_debug fixture in tests/cli/dep/conftest.py and use it from
  both httpx-suppression tests so the get-logger/set-DEBUG/restore boilerplate
  lives in one place.
@AAraKKe AAraKKe marked this pull request as ready for review May 25, 2026 11:01
@AAraKKe AAraKKe requested a review from a team as a code owner May 25, 2026 11:01
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 26, 2026

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 Codecov 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

@AAraKKe AAraKKe added this pull request to the merge queue May 27, 2026
Merged via the queue into master with commit 12c11b5 May 27, 2026
363 of 364 checks passed
@AAraKKe AAraKKe deleted the aarakke/promotion-workflow-ux branch May 27, 2026 08:35
@dd-octo-sts dd-octo-sts Bot added this to the 7.81.0 milestone May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants