Skip to content

ci: report CI and review status to the datadog-api-spec PR - #885

Merged
MintsInc merged 1 commit into
mainfrom
ulysse.mavrocordatos/report-status-to-spec
Oct 2, 2026
Merged

MintsInc merged 1 commit into
mainfrom
ulysse.mavrocordatos/report-status-to-spec

Conversation

@MintsInc

@MintsInc MintsInc commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Context

Generated pup PRs (datadog-api-spec/generated/<N>) are about to be merged automatically when their spec PR merges. That merge needs the pup PR to be approved and green. Spec authors currently can't see pup's state from the spec PR, so they would enqueue too early and fail the merge queue. This PR posts the same two statuses the language clients post.

Changes

  • report job in ci.yml: runs after all five CI jobs, because merge-all needs the whole PR clean, not just tests. It posts pup/main/unit on the spec PR.
    • A cancelled run reports pending rather than failure. The generator force-pushes the branch, and cancel-in-progress routinely cancels the older run.
    • The status input is main/unit because the action prepends the repo name.
  • approved_status.yml: copied from the rust client's. It posts pup/main/review; the context input is pup/main because this action only appends /review.
  • Guards beyond the client workflows: a fork check, and startsWith rather than contains on the branch name, which is what the actions parse.
  • Actions are pinned by SHA, matching this repo's convention.

Tests

Not testable before merge: it needs the matching trust policies on the spec repo's default branch. After merge, the end-to-end check runs on a throwaway spec PR:

  • Both statuses appear on the spec PR.
  • unit changes once CI finishes.
  • Approving sets review to success, and requesting changes sets it to failure.

Appendix

Merge order: 2 of 3, after the matching trust policies land in the spec repo. Until the generator starts seeding them, these statuses are posted but nothing relies on them. If a token step fails, the octo-sts step log names the claim that didn't match.

@MintsInc
MintsInc marked this pull request as ready for review October 2, 2026 11:44
@MintsInc
MintsInc requested a review from a team as a code owner October 2, 2026 11:44

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The workflows consistently restrict status reporting to same-repository generated branches and use the intended CI and review contexts. The aggregate status covers all five existing CI jobs.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 2bf06f6 · @DataDog review to ask questions

@MintsInc
MintsInc merged commit 232bddd into main Oct 2, 2026
11 checks passed
@MintsInc
MintsInc deleted the ulysse.mavrocordatos/report-status-to-spec branch October 2, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants