feat(ci): encode JUnit cases as OTLP and upload to Mergify CI Insights#1466
Conversation
This was referenced May 27, 2026
Member
Author
|
This pull request is part of a Mergify stack:
|
This was referenced May 27, 2026
Contributor
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🔴 ⛓️ Depends-On RequirementsWaiting for
This rule is failing.Requirement based on the presence of
🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
🟢 🤖 Continuous IntegrationWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
3a3d6cc to
ee06c7a
Compare
380699c to
aaf35b0
Compare
Member
Author
Revision history
|
ee06c7a to
0c646f7
Compare
0c646f7 to
fa0eeaf
Compare
fa0eeaf to
dd1bfdf
Compare
Second layer of the `mergify ci junit-process` port — turn the parsed `TestCase` values into an OTLP `ExportTraceServiceRequest` and ship it to `/v1/repos/<owner>/<repo>/ci/traces` as gzipped protobuf. Two new modules under `junit_process`: - `spans` builds one session span per upload, one suite span per `<testsuite>`, and one case span per `<testcase>`, all sharing a resource that carries the CI-env attributes the backend uses for routing (provider, pipeline run id, branch, head SHA, …). The test cases pin parent/child wiring, status-code mapping, attribute propagation, and resource scraping by feeding a deterministic RNG into a hidden seam. - `upload` POSTs the request with the same headers the Python `OTLPSpanExporter` sends (`Bearer` auth, `application/x-protobuf`, `Content-Encoding: gzip`) and matches the error wording so any log scrapers tracking Python output keep working. Wiremock covers the happy path, the empty-request short-circuit, and the 401 error surface. The detector grows the resource-attribute lookups Python emits (pipeline name, job name, run id/attempt/url, head/base ref, head SHA, repository URL, runner name) — sync env reads only, matching the Python sync path. The PR-event-aware async SHA fallback stays on the Python side for now and lands with the CLI dispatch in Phase C. `opentelemetry-proto` is the only otel dep we pull in, gated to `gen-tonic-messages + trace` so it boils down to the prost generated types plus the trace proto module — no tonic, no otel SDK, no exporter runtime. Compression is `flate2` and the HTTP layer reuses the existing workspace `reqwest` to keep the TLS / rustls flavour consistent. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Change-Id: Icbc727166711d76678877aa172ca47c2dcc07ebc
dd1bfdf to
2ecb8c2
Compare
4778d48 to
e338014
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second layer of the
mergify ci junit-processport — turn theparsed
TestCasevalues into an OTLPExportTraceServiceRequestand ship it to
/v1/repos/<owner>/<repo>/ci/tracesasgzipped protobuf.
Two new modules under
junit_process:spansbuilds one session span per upload, one suite span per<testsuite>, and one case span per<testcase>, all sharinga resource that carries the CI-env attributes the backend uses
for routing (provider, pipeline run id, branch, head SHA, …).
The test cases pin parent/child wiring, status-code mapping,
attribute propagation, and resource scraping by feeding a
deterministic RNG into a hidden seam.
uploadPOSTs the request with the same headers the PythonOTLPSpanExportersends (Bearerauth,application/x-protobuf,Content-Encoding: gzip) and matches the error wording so anylog scrapers tracking Python output keep working. Wiremock
covers the happy path, the empty-request short-circuit, and the
401 error surface.
The detector grows the resource-attribute lookups Python emits
(pipeline name, job name, run id/attempt/url, head/base ref,
head SHA, repository URL, runner name) — sync env reads only,
matching the Python sync path. The PR-event-aware async SHA
fallback stays on the Python side for now and lands with the
CLI dispatch in Phase C.
opentelemetry-protois the only otel dep we pull in, gated togen-tonic-messages + traceso it boils down to the prostgenerated types plus the trace proto module — no tonic, no
otel SDK, no exporter runtime. Compression is
flate2and theHTTP layer reuses the existing workspace
reqwestto keep theTLS / rustls flavour consistent.
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com
Depends-On: #1465