4.1 KiB
4.1 KiB
pdftract-3i1o: CI Observability Implementation
Bead: pdftract-3i1o
Phase: 0.10 CI observability — green-run smoke test and status reporting Date: 2026-05-23
Summary
Implemented CI observability features for pdftract-ci workflow:
- exitHandler (
on-exittemplate): Posts workflow status to GitHub PR via argo-workflows-pr-status operator - Setup step (
setuptemplate): Captures and uploads workflow-metadata.json artifact
Implementation Details
1. Exit Handler (on-exit template)
Location: .ci/argo-workflows/pdftract-ci.yaml lines 213-316
Features:
- Posts to cluster-local service:
https://argo-pr-status.argo-workflows.svc.cluster.local/v1/report - Uses
curlimages/curl:latestimage for HTTP POST - Payload includes:
commit_sha: Full Git commit SHAref: Git ref (branch/tag)workflow_phase: Overall workflow status (Succeeded/Failed/Error)started_at: Workflow creation timestampduration_seconds: Workflow duration in secondsstep_outcomes: Map of step name to phase (Succeeded/Failed)artifacts: List of artifact names produceddashboard_url: Link to Argo UI workflow view
Matrix step expansion: Each matrix item is reported as a separate GitHub Check:
build-linux-x86_64-muslbuild-linux-aarch64-muslbuild-darwin-x86_64build-darwin-aarch64build-windows-x86_64-gnutest-glibctest-muslclippy-fmtmsrv-checkcargo-auditcargo-denycargo-bloatbench-matrixregression-corpus
Graceful degradation: If the pr-status operator is not yet deployed, the exitHandler logs a warning but does not fail the workflow.
2. Setup Step (setup template)
Location: .ci/argo-workflows/pdftract-ci.yaml lines 318-435
Features:
- Clones repository to
/workspace - Checks out specific commit SHA
- Captures git metadata (remote URL, describe, author, commit message)
- Records container image versions for reproducibility
- Creates
workflow-metadata.jsonartifact
Workflow metadata structure:
{
"commit_sha": "abc123...",
"ref": "refs/heads/main",
"git_remote_url": "https://github.com/jedarden/pdftract.git",
"git_describe": "v0.1.0-0-g1a2b3c4",
"git_author": "Author Name <email@example.com>",
"git_commit_message": "Commit message",
"pdftract_ci_template_sha": "def456...",
"workflow_parameters": {
"commit-sha": "abc123...",
"ref": "refs/heads/main",
"repo-url": "https://github.com/jedarden/pdftract.git",
"is-tag": "false",
"regression-mode": "gate",
"pr-number": "",
"proptest-seed": "",
"proptest-cases": "10000"
},
"container_images": {
"build:x86_64-unknown-linux-musl": "ghcr.io/cross-rs/x86_64-unknown-linux-musl:main",
...
},
"workflow_name": "pdftract-ci-xxxxx",
"argo_ui_url": "https://argo-ci.ardenone.com/workflows/argo-workflows/pdftract-ci-xxxxx",
"timestamp": "2026-05-23T12:34:56Z"
}
Acceptance Criteria Status
PASS
- exitHandler posts to pr-status operator on every workflow completion
- workflow-metadata.json artifact is uploaded by every workflow
- exitHandler and setup templates handle missing pr-status operator gracefully (WARN, not FAIL)
- Matrix step outcomes are expanded per-item for granular GitHub Checks
WARN
- Smoke test PR not created: The pr-status operator is not yet deployed in iad-ci cluster
- The exitHandler logs "WARN: Failed to post status (operator may not be deployed yet)"
- This is expected during initial CI setup
- Once the operator is deployed, the smoke test PR should demonstrate the green run
FAIL
- None
References
- Commit:
f3095d1- ci(pdftract-3i1o): implement CI observability with exitHandler and workflow metadata - Workflow template:
.ci/argo-workflows/pdftract-ci.yaml - Argo UI: https://argo-ci.ardenone.com
- Plan: Phase 0, line 1013
Next Steps
- Deploy argo-workflows-pr-status operator to iad-ci cluster
- Create smoke test PR on
pdftract-ci-smoke-<date>branch - Verify green run with all GitHub Checks appearing in PR
- Mark PR with
do-not-mergelabel after demonstration