openshift-eng/ai-helpers/fetch-prowjob-json

Claude Code and agent skill by openshift-eng/ai-helpers

Trust tier 2
  • community
Source check pending

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

SKILL.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

  1. 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:

https://prow.ci.openshift.org/view/gs/<bucket>/<path>/<job-name>/<build-id>

Extract everything after /view/ to get the GCS reference:

gs/<bucket>/<path>/<job-name>/<build-id>
Step 2: Construct the GCS Web URL

Convert the Prow URL to a gcsweb URL that serves the raw prowjob.json:

https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/<bucket>/<path>/<job-name>/<build-id>/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.

bash
curl -s "https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results-public/logs/<job-name>/<build-id>/prowjob.json"
Step 4: Extract and Return Key Fields

From the full prowjob.json, extract and return the following fields:

Required Fields
FieldJSON PathDescription
Job Namespec.jobFull periodic/presubmit/postsubmit job name
Job Typespec.typeperiodic, presubmit, or postsubmit
Build IDstatus.build_idUnique build identifier
Statestatus.statesuccess, failure, aborted, pending, triggered
Descriptionstatus.descriptionHuman-readable status description
Start Timestatus.startTimeISO 8601 timestamp
Completion Timestatus.completionTimeISO 8601 timestamp (null if still running)
Clusterspec.clusterBuild cluster (e.g., build02, build05)
Pod Namestatus.pod_nameKubernetes pod name
Prow URLstatus.urlLink back to the Prow job view
Payload Tagmetadata.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 Tagmetadata.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 Sourcemetadata.annotations["release.openshift.io/source"]Release stream source (e.g., ocp/4.22)
Architecturemetadata.annotations["release.openshift.io/architecture"]CPU architecture (e.g., amd64, arm64, multi)
Refsspec.extra_refsArray of repo references (org, repo, base_ref)
TargetFrom spec.pod_spec.containers[0].argsThe --target= value from ci-operator args
VariantFrom spec.pod_spec.containers[0].argsThe --variant= value from ci-operator args
RELEASE_IMAGE_LATESTFrom spec.pod_spec.containers[0].envThe release image the job upgrades to or installs
RELEASE_IMAGE_INITIALFrom spec.pod_spec.containers[0].envThe 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_LATEST and RELEASE_IMAGE_INITIAL environment 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:

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

Key output fields:

Job Name: periodic-ci-openshift-release-master-ci-4.22-e2e-gcp-ovn-upgrade
Job Type: periodic
Build ID: 2019864414127132672
State: failure
Start Time: 2026-02-06T20:02:58Z
Completion Time: 2026-02-07T00:36:09Z
Cluster: build02
Payload Tag: 4.22.0-0.ci-2026-02-06-195709
Upgrade From Tag: 4.22.0-0.ci-2026-02-05-195709
Architecture: amd64
Target: e2e-gcp-ovn-upgrade
Variant: ci-4.22
RELEASE_IMAGE_LATEST: registry.ci.openshift.org/ocp/release:4.22.0-0.ci-2026-02-06-195709
RELEASE_IMAGE_INITIAL:registry.ci.openshift.org/ocp/release:4.22.0-0.ci-2026-02-05-195709
Example 2: Non-Upgrade Job (No from-tag)

For a non-upgrade job, the Upgrade From Tag field will be absent:

Job Name: periodic-ci-openshift-release-master-ci-4.22-e2e-gcp-ovn
Job Type: periodic
Build ID: 2019864414127132999
State: success
Payload Tag: 4.22.0-0.ci-2026-02-06-195709
Upgrade From Tag: (not present - not an upgrade job)
Architecture: amd64
Target: e2e-gcp-ovn
Variant: ci-4.22

Notes

  • The prowjob.json is 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 managedFields section of the metadata can be omitted from output as it contains only field ownership bookkeeping.
  • The metadata.labels section is truncated for some fields (e.g., job name) due to Kubernetes label length limits. Always use metadata.annotations or spec.job for the full job name.
  • The GCS web proxy at gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com serves raw file content without authentication.
  • Duration can be calculated from completionTime - startTime.
  • The spec.decoration_config.timeout field 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/openshift-eng/ai-helpers/fetch-prowjob-json/badge)](https://verified-skill.com/skills/openshift-eng/ai-helpers/fetch-prowjob-json)

Something wrong with this skill or its page? Tell us.