Skip to content

chore(deps): bump toolchain versions and fix update-deps opencode fetch - #16

Merged
jnpacker merged 2 commits into
stolostron:mainfrom
jnpacker:ACM-38965
Jul 29, 2026
Merged

chore(deps): bump toolchain versions and fix update-deps opencode fetch#16
jnpacker merged 2 commits into
stolostron:mainfrom
jnpacker:ACM-38965

Conversation

@jnpacker

@jnpacker jnpacker commented Jul 29, 2026

Copy link
Copy Markdown
Member

What changed

  • Bumped pinned toolchain versions in Makefile: Go 1.26.5, Python build 20260728, opencode-ai 1.18.9, gh 2.96.0, fzf 0.74.1, ripgrep 15.2.0, jira-mcp-server 0.2.1, gopls 0.23.0
  • Synced the stale fallback defaults in scripts/build.sh to match the Makefile values
  • Fixed update-deps root cause: replaced npm view opencode-ai version (required a local npm binary, silently returned empty and wiped OPENCODE_VERSION when missing) with a curl+jq fetch against the npm registry API, matching the pattern used by every other dependency
  • Added a fail-fast validation after all 11 version fetches: if any comes back empty, update-deps now aborts with a clear error and does not modify the Makefile

Testing

  • Ran make update-deps for real — all 11 versions resolved correctly, including opencode: 1.18.9
  • Simulated a broken fetch (bad URL) and confirmed update-deps aborts with Failed to fetch latest opencode-ai version - aborting without modifying Makefile and leaves the Makefile byte-for-byte unchanged
  • Ran make build IMAGE_TAG=0.3.8 and make push — image built and pushed successfully
  • Updated core agent-swarm to use the new image (make image-build "1.1.12", make image-push, make deploy all successful)

Known gaps / follow-ups

  • YQ_VERSION is still missing a top-level ARG default in containerfiles/Containerfile.agents (only declared inside the base-tools stage) — tracked separately, not fixed in this PR
  • bash tests/test_lsp_version_pinning.sh should be run before merge per repo conventions

Jira: ACM-38965

Summary by CodeRabbit

  • Chores
    • Updated pinned versions for development and build tools.
    • Improved dependency update checks to detect missing version information and stop safely.
    • Updated default component versions used during container builds.

Bump pinned toolchain versions (Go 1.26.5, Python build 20260728,
opencode-ai 1.18.9, gh 2.96.0, fzf 0.74.1, ripgrep 15.2.0,
jira-mcp-server 0.2.1, gopls 0.23.0) and sync the stale fallback
defaults in scripts/build.sh to match.

Fix update-deps: the opencode-ai version was previously fetched via
'npm view', which silently returned an empty string and wiped
OPENCODE_VERSION when npm was not installed. Replace it with a
curl+jq fetch against the npm registry API, consistent with every
other dependency fetch in this target. Also add a fail-fast check
after all fetches: if any of the 11 version lookups comes back
empty, update-deps now aborts with a clear error instead of writing
a blank value into the Makefile.

Jira: ACM-38965
Signed-off-by: Joshua Packer <jpacker@redhat.com>
@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jnpacker

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 29, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Dependency defaults were updated in the Makefile and build script. The update-deps target now queries the npm registry and validates all fetched latest-version values before modifying the Makefile.

Changes

Dependency refresh

Layer / File(s) Summary
Version defaults
Makefile, scripts/build.sh
Pinned toolchain and build-argument fallback versions were updated for Go, Python, Opencode, FZF, ripgrep, Jira MCP, GOPLS, GitHub CLI, and Pyright.
Latest retrieval and validation
Makefile
update-deps now retrieves Opencode from the npm registry, treats missing fields as empty, and aborts before sed updates when any latest value is empty.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning Medium risk: c5dc48e mentions CodeRabbit, but the PR commits only have Signed-off-by and no Red Hat Assisted-by/Generated-by trailer. Add a Red Hat Assisted-by: or Generated-by: trailer to any AI-assisted commit, and avoid Co-Authored-By for AI tools.
✅ 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 summarizes the main dependency bumps and the opencode fetch fix, with low risk and clear impact.
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 PASS: The updated Makefile and scripts/build.sh contain only version pins and public registry/API URLs; no api_key/secret/token/password literals, embedded creds, private keys, or long base64 strings.
No-Weak-Crypto ✅ Passed PASS: PR only updates version pins and fetch/validation logic; no MD5/SHA1/DES/RC4/ECB, custom crypto, or secret/token comparisons were added.
No-Injection-Vectors ✅ Passed PASS — No flagged injection sinks were added; the Makefile and build.sh use quoted static commands and version strings, with no user-tainted eval/exec paths.
Container-Privileges ✅ Passed Diff only updates version pins in Makefile/scripts/build.sh; no privileged or host* settings were added.
No-Sensitive-Data-In-Logs ✅ Passed Low risk: the changed Makefile logs only public version strings and generic errors; no passwords, tokens, PII, or internal hostnames are emitted.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 `@Makefile`:
- Around line 114-132: The Makefile version-fetch guards accept the literal null
returned by jq, allowing invalid values to be written. Update all LATEST_* jq
lookups, especially GitHub release queries, to emit an empty value for missing
or null version/tag fields and use a lookup strategy that can find stable
releases beyond the first page; ensure validation rejects null and other
non-version values before any Makefile rewrite occurs.
🪄 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: Enterprise

Run ID: ad6dabb7-0d3d-4bcc-af5a-ab2493f0e74c

📥 Commits

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

📒 Files selected for processing (2)
  • Makefile
  • scripts/build.sh

Comment thread Makefile Outdated
jq -r returns the literal string "null" for a missing/null .version
or .tag_name field (e.g. when a GitHub release query's first page has
no stable release). The existing $(strip ...) fail-fast guards treated
that literal "null" as a valid, non-empty value, so update-deps could
write "?= null" into the Makefile instead of aborting.

Add "// empty" to every LATEST_* jq filter so a missing/null field
resolves to an empty string, which the existing fail-fast validation
then correctly catches and aborts on.

Addresses CodeRabbit review comment on PR stolostron#16.

Jira: ACM-38965
Signed-off-by: Joshua Packer <jpacker@redhat.com>
@jnpacker

Copy link
Copy Markdown
Member Author

Addressed the CodeRabbit review comment (jq -r returning literal "null" for missing/null .version/.tag_name fields, which the $(strip ...) guard would treat as non-empty).

Fix (c5dc48e): added // empty to every LATEST_* jq filter in update-deps, so a missing/null field resolves to an empty string instead of the literal "null". That empty string is then correctly caught by the existing fail-fast validation, which aborts without modifying the Makefile.

Verified:

  • Ran make update-deps against the live APIs — all 11 versions still resolve correctly (no regression)
  • Confirmed via direct jq tests that null inputs now produce empty output for all affected filters (.[0].version, .tag_name with and without ltrimstr, .info.version)
  • Re-ran the simulated-failure test (broken URL) — update-deps still aborts cleanly and leaves the Makefile untouched

@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: 2

🤖 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 `@Makefile`:
- Line 112: Update the Makefile’s LATEST_BUILD lookup to retrieve the latest
stable non-draft release without restricting the API response to only five
releases; use the releases/latest endpoint if it provides the required tag, or
paginate/filter appropriately before selecting a stable release. Preserve the
existing empty-result handling and tag extraction behavior.
- Line 120: Update the LATEST_GOPLS release selector to exclude GitHub draft and
prerelease releases before choosing the first gopls tag, ensuring update-deps
pins only published stable versions. Preserve the existing tag filtering and
version normalization behavior.
🪄 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: Enterprise

Run ID: 97147703-dfc8-4f80-a008-7be6401d93fb

📥 Commits

Reviewing files that changed from the base of the PR and between 54d327f and c5dc48e.

📒 Files selected for processing (1)
  • Makefile

Comment thread Makefile
Comment thread Makefile
@jnpacker
jnpacker merged commit daf8eb5 into stolostron:main Jul 29, 2026
1 of 2 checks passed
@jnpacker
jnpacker deleted the ACM-38965 branch July 29, 2026 14:59
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