Skip to content

ai: Add skill to download integration artifacts - #345

Open
Jakob-Naucke wants to merge 1 commit into
trusted-execution-clusters:mainfrom
Jakob-Naucke:integration-arti-skill
Open

ai: Add skill to download integration artifacts#345
Jakob-Naucke wants to merge 1 commit into
trusted-execution-clusters:mainfrom
Jakob-Naucke:integration-arti-skill

Conversation

@Jakob-Naucke

@Jakob-Naucke Jakob-Naucke commented Aug 20, 2026

Copy link
Copy Markdown
Member

Add a skill for agents like Claude to download Azure integration test artifacts.

Summary by Sourcery

Add a reusable agent skill for retrieving Prow Azure integration test artifacts for pull requests.

New Features:

  • Add an agent skill for downloading Azure integration test artifacts associated with a pull request into a branch-specific logs directory.

Chores:

  • Register agent skill documentation files with the project’s REUSE licensing configuration and add related repository metadata.

@openshift-ci

openshift-ci Bot commented Aug 20, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Jakob-Naucke

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai

sourcery-ai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a new agent skill that automates downloading Azure integration test artifacts for a given PR, and wires it into the agents configuration while updating .gitignore for the generated logs directory.

Sequence diagram for the new Azure integration artifacts download skill

sequenceDiagram
    actor User
    participant Agent
    participant GitHubCLI
    participant Prow
    participant GCS

    User ->> Agent: Invoke download-azure-integration-artifacts

    alt PR number provided
        Agent ->> GitHubCLI: gh pr view <PR> --json headRefName
    else PR number not provided
        Agent ->> GitHubCLI: gh pr view --json number
        GitHubCLI -->> Agent: PR number
        Agent ->> GitHubCLI: gh pr view <PR> --json headRefName
    end
    GitHubCLI -->> Agent: headRefName

    Agent ->> GitHubCLI: gh pr checks <PR>
    GitHubCLI -->> Agent: ci/prow/azure-integration-test line
    Agent ->> Agent: Derive GCS_PATH from prow.ci.openshift.org/view/gs/

    Agent ->> GCS: gsutil -m cp -r gs://<GCS_PATH>/artifacts/ logs/azure-integration-test-<headRefName>/

    alt gsutil not available
        Agent ->> GCS: gcloud storage cp -r gs://<GCS_PATH>/artifacts/ logs/azure-integration-test-<headRefName>/
    end

    alt URL pattern changed
        Agent ->> Prow: WebFetch (Prow job page)
        Prow -->> Agent: HTML with Artifacts link
        Agent ->> Prow: WebFetch (gcsweb artifacts page)
        Prow -->> Agent: gsutil/gcloud storage command
        Agent ->> GCS: Run gsutil or gcloud storage command
    end

    GCS -->> Agent: Artifacts copied to logs/azure-integration-test-<headRefName>/
    Agent -->> User: Artifacts available locally
Loading

File-Level Changes

Change Details Files
Introduce a new agent skill that documents how to download Azure integration test artifacts for a PR using GitHub CLI and GCS tooling.
  • Define a user-invocable skill for downloading Prow azure-integration-test artifacts into a logs/azure-integration-test- directory.
  • Describe the sequence of gh commands to obtain the PR number, head branch name, and associated Prow job URL.
  • Specify how to derive the GCS path directly from the Prow URL without additional web requests and construct the gsutil source path.
  • Provide fallback instructions using gcloud storage cp if gsutil is unavailable.
  • Document a WebFetch-based fallback flow to scrape the artifacts link and storage copy command if the Prow URL pattern changes.
.agents/skills/download-azure-integration-artifacts/SKILL.md
Wire the new skill into the Claude/agent configuration and ensure generated artifact logs are ignored by Git.
  • Register or reference the new download-azure-integration-artifacts skill in the agent configuration file.
  • Add the azure integration test logs directory to .gitignore so downloaded artifacts are not committed.
.claude
.gitignore

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai 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.

Hey - I've left some high level feedback:

  • Consider consolidating the two gh pr view calls in step 2 into a single invocation that fetches both number and headRefName to reduce redundancy and potential confusion.
  • In step 2, the instruction to extract the Prow URL from gh pr checks output would benefit from an explicit example of the output format to make the “fourth column (tab-separated)” reference unambiguous.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider consolidating the two `gh pr view` calls in step 2 into a single invocation that fetches both `number` and `headRefName` to reduce redundancy and potential confusion.
- In step 2, the instruction to extract the Prow URL from `gh pr checks` output would benefit from an explicit example of the output format to make the “fourth column (tab-separated)” reference unambiguous.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Add a skill for agents like Claude to download Azure integration test
artifacts.

Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Assisted-by: AI
@Jakob-Naucke
Jakob-Naucke force-pushed the integration-arti-skill branch from af55370 to 89d0218 Compare August 20, 2026 16:28
@openshift-ci

openshift-ci Bot commented Aug 20, 2026

Copy link
Copy Markdown

@Jakob-Naucke: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/azure-integration-test 89d0218 link false /test azure-integration-test
ci/prow/azure-images 89d0218 link true /test azure-images

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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.

1 participant