ai: Add skill to download integration artifacts - #345
Conversation
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideAdds 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 skillsequenceDiagram
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
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider consolidating the two
gh pr viewcalls in step 2 into a single invocation that fetches bothnumberandheadRefNameto reduce redundancy and potential confusion. - In step 2, the instruction to extract the Prow URL from
gh pr checksoutput 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.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
af55370 to
89d0218
Compare
|
@Jakob-Naucke: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
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:
Chores: