openshift-eng/ai-helpers/fetch-prowjob-json
Claude Code and agent skill by openshift-eng/ai-helpers
- community
Checking that the SKILL.md file is still in the repository.
Fetch and return key data from a Prow job's prowjob.json artifact given a Prow job URL
Install
npx vskill@latest install openshift-eng/ai-helpers/fetch-prowjob-jsonSKILL.md
The same SKILL.md was published earlier as openshift-eng/ai-helpers/fetch-prowjob-json.
Fetch ProwJob JSON
This skill fetches the prowjob.json artifact for a given Prow job and returns key fields including job metadata, spec details, status, and release annotations.
When to Use This Skill
Use this skill when you need to:
- Get metadata about a specific Prow job run (status, timing, cluster, pod name)
- Determine what payload a job was tested against (
release.openshift.io/tag) - Determine the upgrade source version for upgrade jobs (
release.openshift.io/from-tag) - Get the release images (
RELEASE_IMAGE_LATEST,RELEASE_IMAGE_INITIAL) used in a job - Check the ci-operator target and variant for a job
- Get the GCS bucket path for a job's artifacts
Prerequisites
- Network Access: Must be able to reach the GCS web proxy
- Check:
curl -s -o /dev/null -w '%{http_code}' https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/ - No authentication required
Implementation Steps
Step 1: Parse the Prow Job URL
Extract the GCS path from the Prow job URL. Prow URLs follow this pattern:
Extract everything after /view/ to get the GCS reference:
Step 2: Construct the GCS Web URL
Convert the Prow URL to a gcsweb URL that serves the raw prowjob.json:
Example:
- Input Prow URL:
https://prow.ci.openshift.org/view/gs/test-platform-results-public/logs/periodic-ci-openshift-release-master-ci-4.22-e2e-gcp-ovn-upgrade/2019864414127132672 - GCS Web URL:
https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results-public/logs/periodic-ci-openshift-release-master-ci-4.22-e2e-gcp-ovn-upgrade/2019864414127132672/prowjob.json
The conversion is: replace https://prow.ci.openshift.org/view/ with https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/ and append /prowjob.json.
Step 3: Fetch the prowjob.json
Use curl or WebFetch to retrieve the JSON content from the constructed URL.
Step 4: Extract and Return Key Fields
From the full prowjob.json, extract and return the following fields:
Required Fields
| Field | JSON Path | Description | |
|---|---|---|---|
| Job Name | spec.job | Full periodic/presubmit/postsubmit job name | |
| Job Type | spec.type | periodic, presubmit, or postsubmit | |
| Build ID | status.build_id | Unique build identifier | |
| State | status.state | success, failure, aborted, pending, triggered | |
| Description | status.description | Human-readable status description | |
| Start Time | status.startTime | ISO 8601 timestamp | |
| Completion Time | status.completionTime | ISO 8601 timestamp (null if still running) | |
| Cluster | spec.cluster | Build cluster (e.g., build02, build05) | |
| Pod Name | status.pod_name | Kubernetes pod name | |
| Prow URL | status.url | Link back to the Prow job view | |
| Payload Tag | metadata.annotations["release.openshift.io/tag"] | The payload version tested or upgraded to (e.g., 4.22.0-0.ci-2026-02-06-195709). This is the payload the cluster was tested against or upgraded to. | |
| Upgrade From Tag | metadata.annotations["release.openshift.io/from-tag"] | The original payload version before upgrade (e.g., 4.22.0-0.ci-2026-02-05-195709). Only present for upgrade jobs. This is the version the cluster starts at before upgrading to the payload tag. | |
| Release Source | metadata.annotations["release.openshift.io/source"] | Release stream source (e.g., ocp/4.22) | |
| Architecture | metadata.annotations["release.openshift.io/architecture"] | CPU architecture (e.g., amd64, arm64, multi) | |
| Refs | spec.extra_refs | Array of repo references (org, repo, base_ref) | |
| Target | From spec.pod_spec.containers[0].args | The --target= value from ci-operator args | |
| Variant | From spec.pod_spec.containers[0].args | The --variant= value from ci-operator args | |
| RELEASE_IMAGE_LATEST | From spec.pod_spec.containers[0].env | The release image the job upgrades to or installs | |
| RELEASE_IMAGE_INITIAL | From spec.pod_spec.containers[0].env | The initial release image (for upgrade jobs) |
Notes on Release Annotations
- `release.openshift.io/tag`: Present on release-controller-triggered jobs. Identifies the payload being validated. For upgrade jobs, this is the version the cluster upgrades to.
- `release.openshift.io/from-tag`: Only present on upgrade jobs. Identifies the version the cluster starts at before the upgrade. If absent, the job is not an upgrade job.
- These annotations may not be present on manually triggered or presubmit jobs.
- The
RELEASE_IMAGE_LATESTandRELEASE_IMAGE_INITIALenvironment variables correspond to these tags and contain the full registry pull spec.
Error Handling
Case 1: Invalid Prow URL Format
If the URL doesn't match the expected pattern https://prow.ci.openshift.org/view/gs/...:
- Report the error to the user
- Show the expected URL format
Case 2: prowjob.json Not Found (404)
If the GCS web proxy returns a 404:
- The job may have been garbage collected or the URL may be incorrect
- Suggest verifying the Prow job URL is correct and the job exists
Case 3: Network Error
If the GCS web proxy is unreachable:
- Check connectivity to
gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com - The proxy does not require VPN or authentication
Examples
Example 1: Fetch a Periodic Upgrade Job
Input:
Key output fields:
Example 2: Non-Upgrade Job (No from-tag)
For a non-upgrade job, the Upgrade From Tag field will be absent:
Notes
- The
prowjob.jsonis uploaded to GCS by Prow's sidecar after the job completes (or is aborted). It may not be available for jobs still in progress. - The
managedFieldssection of the metadata can be omitted from output as it contains only field ownership bookkeeping. - The
metadata.labelssection is truncated for some fields (e.g., job name) due to Kubernetes label length limits. Always usemetadata.annotationsorspec.jobfor the full job name. - The GCS web proxy at
gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.comserves raw file content without authentication. - Duration can be calculated from
completionTime - startTime. - The
spec.decoration_config.timeoutfield shows the maximum allowed runtime for the job.
See Also
- Related Skill:
ci:prow-job-analysis(comprehensive Prow CI job failure analysis — test, install, disruption, and more)
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/ci/skills/fetch-prowjob-json/SKILL.md
Popularity
- Repository stars
- 112
- Repository forks
- 305
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/openshift-eng/ai-helpers/fetch-prowjob-json)