Skip to content

feat: install yq in agent base-tools image - #15

Draft
rokej wants to merge 1 commit into
stolostron:mainfrom
rokej:feat/add-yq
Draft

feat: install yq in agent base-tools image#15
rokej wants to merge 1 commit into
stolostron:mainfrom
rokej:feat/add-yq

Conversation

@rokej

@rokej rokej commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Install mikefarah yq (v4.53.3) in base-tools so OpenCode/Crush sandboxes can run SFA scripts that parse repos/repos.yaml (fetch-prs.sh, sync-repos.sh)
  • Pin YQ_VERSION in the Makefile, pass it through build.sh, and include it in update-deps

Why

agent-pr-action-needed hard-failed in swarm: yq not installed and not installable in the sandbox. No script workaround — ship the binary in the image.

Test plan

  • make build-opencode NOPROMPT=1 succeeds
  • podman run --rm <image> yq --version prints v4.53.3
  • In a fresh swarm session: bash .claude/skills/sfa-github-fetch-prs/fetch-prs.sh basic lists SF repos without a yq error
  • Bump AGENT_IMAGE_OPENCODE on the swarmer deployment to the new tag

Made with Cursor

Summary by CodeRabbit

  • New Features

    • Added the yq command-line utility to agent images, with architecture-specific installation and version verification.
    • Builds now support a pinned yq version.
  • Documentation

    • Updated the README and architecture documentation to reflect the included yq utility.
    • Clarified that development tool versions are strictly pinned and managed.
  • Chores

    • Extended dependency update tooling to track and refresh the pinned yq version.

@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rokej

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

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@rokej, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 21 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7817f35a-cc36-4911-a524-1e49005884a1

📥 Commits

Reviewing files that changed from the base of the PR and between a4edd19 and a479295.

📒 Files selected for processing (1)
  • scripts/build.sh
📝 Walkthrough

Walkthrough

Changes

The build workflow now pins and propagates YQ_VERSION, installs architecture-specific yq binaries into agent images, verifies the installation, and updates repository documentation.

YQ Integration

Layer / File(s) Summary
Version pinning and build wiring
Makefile, scripts/build.sh, AGENTS.md
Defines the yq version, updates it through update-deps, and passes it into container builds.
YQ image installation
containerfiles/Containerfile.agents
Downloads, installs, and verifies the architecture-specific yq release.
Tooling documentation
README.md, docs/ARCHITECTURE.md
Documents yq as part of the image development utilities and base tools.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: jnpacker

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning AI use is declared, but HEAD only has Co-authored-by: Cursor; no Red Hat Assisted-by/Generated-by trailer is present. Replace the AI trailer with a Red Hat Assisted-by: or Generated-by: trailer, and remove any Co-authored-by used for AI assistance.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding yq to the agent base-tools image.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Hardcoded-Secrets ✅ Passed Low risk: the changed files only add version pins and placeholder examples; no hardcoded secrets, tokens, passwords, private keys, or embedded-credential URLs found.
No-Weak-Crypto ✅ Passed No weak crypto, custom crypto, or secret/token comparisons were added; the PR only pins and installs yq.
No-Injection-Vectors ✅ Passed Low risk: the PR only adds pinned yq build wiring/downloads; no SQL concat, shell=True, eval/exec, yaml.load, pickle.loads, os.system, or dangerouslySetInnerHTML was introduced.
Container-Privileges ✅ Passed No privileged=true, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation found; runtime ends as USER node, and build-stage USER root is justified.
No-Sensitive-Data-In-Logs ✅ Passed PASS: Added logs only print dependency versions/build status; no passwords, tokens, PII, session IDs, hostnames, or customer data are echoed.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@containerfiles/Containerfile.agents`:
- Around line 68-80: Add integrity verification to the yq download step in the
Containerfile’s yq installation block: select a trusted, version-specific
checksum or official signature for each ARCH_SHORT value, verify the downloaded
artifact before chmod or execution, and fail the build on mismatch. Keep the
verification metadata synchronized with YQ_VERSION through the existing
dependency-update flow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cb18d19e-1be5-4e70-be48-5f74bb06f0a5

📥 Commits

Reviewing files that changed from the base of the PR and between 82aa40d and a4edd19.

📒 Files selected for processing (6)
  • AGENTS.md
  • Makefile
  • README.md
  • containerfiles/Containerfile.agents
  • docs/ARCHITECTURE.md
  • scripts/build.sh

Comment thread containerfiles/Containerfile.agents Outdated
Cluster nodes are amd64; Mac arm hosts otherwise build the wrong
architecture or fail UBI TLS under qemu inconsistently.

Co-authored-by: Cursor <cursoragent@cursor.com>
@swarmer-jnpacker
swarmer-jnpacker Bot marked this pull request as draft August 4, 2026 17:46
@swarmer-jnpacker swarmer-jnpacker Bot added the stale Flagged as stale by PR Hygiene Agent label Aug 4, 2026
@swarmer-jnpacker

Copy link
Copy Markdown

PR Hygiene: Converted to draft

This PR has had no new commits for 4 business days and has been converted to draft.

It will be closed automatically in 5 business days if no new commits are pushed.

To prevent automatic closure, push a commit or add the do-not-stale label.

-- PR Hygiene Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress stale Flagged as stale by PR Hygiene Agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant