Skip to content

feat(toolchain): support Aqua github_archive package type - #2416

Merged
Andriy Knysh (aknysh) merged 10 commits into
mainfrom
osterman/aqua-github-archive
Aug 6, 2026
Merged

feat(toolchain): support Aqua github_archive package type#2416
Andriy Knysh (aknysh) merged 10 commits into
mainfrom
osterman/aqua-github-archive

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented May 16, 2026

Copy link
Copy Markdown
Member

what

  • Add github_archive package type to the Aqua-compatible toolchain registry parser and installer.
  • Resolve downloads to https://github.com/{owner}/{repo}/archive/refs/tags/{version}.tar.gz, matching upstream aquaproj/aqua semantics.
  • Hardcode tar.gz (mirroring aqua's GetFormat()); asset, url, format, and format_overrides are intentionally ignored for this type.
  • Extend resetByPkgType so version overrides that switch a tool to github_archive clear stale asset/url.
  • Add unit + registry-parsing tests plus a fixture modeled on the adr-tools example; cover validation, version-prefix handling, format-ignored semantics, URL pattern, and {{trimV .Version}}/path template idiom.
  • Add changelog blog post and a shipped milestone under the Extensibility initiative on the roadmap.

why

  • Aqua's upstream registry uses github_archive for tools shipped as repository source archives (e.g., adr-tools, tfenv, tgswitch, and many single-script projects). Without this type, those entries failed with unsupported tool type: github_archive.
  • Adding parity with aqua unblocks all such registry entries with no user-side changes — pull the upstream definition as-is and it just works.

references

Summary by CodeRabbit

  • New Features

    • Added support for Aqua’s github_archive packages, downloading GitHub tag archives.
    • Added support for github_content packages, downloading individual repository files.
    • Added validation for repository details and safe relative paths.
    • Added support for nested paths, version-specific overrides, and archive-root templates.
  • Bug Fixes

    • Improved reliability when acquiring shared file locks.
  • Documentation

    • Updated toolchain documentation, roadmap entries, and blog content with configuration guidance and supported package types.

Adds the github_archive package type to the Aqua-compatible toolchain
registry, matching upstream aquaproj/aqua behavior. Resolves the URL as
https://github.com/{owner}/{repo}/archive/refs/tags/{version}.tar.gz and
mirrors aqua's GetFormat() by hardcoding tar.gz (Asset, URL, Format, and
FormatOverrides are ignored for this type). Files[].src supports the
documented {{trimV .Version}}/path idiom via existing template expansion.

Unblocks Aqua registry entries for tools shipped as repository archives
(adr-tools, tfenv, tgswitch, etc.) without registry-level workarounds.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@atmos-pro

atmos-pro Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@github-actions github-actions Bot added the size/m Medium size PR label May 16, 2026
@osterman Erik Osterman (Cloud Posse) (osterman) added the minor New features that do not break anything label May 16, 2026
atmos-pro[bot]
atmos-pro Bot previously approved these changes May 16, 2026

@atmos-pro atmos-pro Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were no affected stacks, therefore this is approved by Atmos Pro.

@github-actions

github-actions Bot commented May 16, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d190b359-dbe8-41cd-a529-dc2c357ed3f2

📥 Commits

Reviewing files that changed from the base of the PR and between 3117026 and 229710b.

📒 Files selected for processing (1)
  • website/src/data/roadmap.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • website/src/data/roadmap.js

📝 Walkthrough

Walkthrough

Adds Aqua github_archive and github_content support. The installer builds validated GitHub archive and raw-content URLs. Registry parsing, overrides, tests, fixtures, documentation, and roadmap data cover both types. Shared read-lock acquisition now uses a 50ms timeout.

Changes

Toolchain Archive and Content Support

Layer / File(s) Summary
Registry path contracts
pkg/toolchain/registry/registry.go
Adds serialized Path fields for tool and version override data. Documents path usage for github_content and go_install.
GitHub URL construction
pkg/toolchain/installer/asset.go, pkg/toolchain/installer/asset_test.go
Builds validated GitHub archive and raw-content URLs. Tests cover validation, versions, ignored fields, endpoints, nested paths, and templates.
Aqua parsing and override integration
pkg/toolchain/registry/aqua/aqua.go, pkg/toolchain/registry/aqua/aqua_test.go, pkg/toolchain/registry/aqua/testdata/*
Preserves paths during parsing and applies path overrides. Type transitions clear incompatible fields. Fixtures and tests cover both package types.
Support documentation and roadmap
website/blog/2026-08-05-toolchain-aqua-archive-and-content.mdx, website/docs/cli/commands/toolchain/*, website/src/data/roadmap.js
Documents package types, configuration fields, download patterns, examples, and unsupported installation types.

Shared Read-Lock Timeout

Layer / File(s) Summary
Read-lock timeout behavior
pkg/cache/filelock.go, pkg/cache/filelock_unix.go, pkg/provisioner/workdir/metadata_lock_unix_test.go
Sets the best-effort shared read-lock timeout to 50ms. Updates related documentation and test descriptions.

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

Possibly related PRs

Suggested reviewers: aknysh

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary change: adding Aqua github_archive package support.
Docstring Coverage ✅ Passed Docstring coverage is 96.77% which is sufficient. The required threshold is 80.00%.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/aqua-github-archive

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
Contributor

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 `@pkg/toolchain/registry/aqua/aqua_test.go`:
- Around line 2897-2928: The test
TestAquaRegistry_GetTool_GitHubArchive_LocalConfig is relying on
ar.LoadLocalConfig which is currently a no-op so GetTool falls back to remote
lookup; update the test to deterministically validate local config parsing
instead of relying on GetTool’s remote fallback—either (A) directly parse the
YAML string into the registry’s local config structure (call the internal parser
used by LoadLocalConfig or a new helper like parseLocalConfigContent) and then
assert on the tool entry, or (B) change the test to call a concrete local loader
method (implement or invoke LoadLocalConfig implementation) that populates the
registry’s local map before calling ar.GetTool; reference NewAquaRegistry,
LoadLocalConfig, GetTool and TestAquaRegistry_GetTool_GitHubArchive_LocalConfig
when making the change so the test no longer depends on remote lookup.

In `@website/src/data/roadmap.js`:
- Line 317: The roadmap entry object with label "Toolchain support for Aqua
`github_archive` package type`" (the shipped milestone having changelog:
'toolchain-github-archive') is missing the required pr field; add a pr: <number>
property to that object (next to status/changelog/quarter) with the GitHub PR
number that implements this shipped change so it satisfies the roadmap metadata
contract.
🪄 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: CHILL

Plan: Pro

Run ID: b82a71f9-9c70-472a-9104-7ae8d90572a6

📥 Commits

Reviewing files that changed from the base of the PR and between b529e92 and a22cd13.

📒 Files selected for processing (7)
  • pkg/toolchain/installer/asset.go
  • pkg/toolchain/installer/asset_test.go
  • pkg/toolchain/registry/aqua/aqua.go
  • pkg/toolchain/registry/aqua/aqua_test.go
  • pkg/toolchain/registry/aqua/testdata/adr-tools-github-archive.yaml
  • website/blog/2026-05-11-toolchain-github-archive.mdx
  • website/src/data/roadmap.js

Comment thread pkg/toolchain/registry/aqua/aqua_test.go Outdated
Comment thread website/src/data/roadmap.js Outdated
@codecov

codecov Bot commented May 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.77%. Comparing base (d2b8e81) to head (229710b).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2416      +/-   ##
==========================================
+ Coverage   82.76%   82.77%   +0.01%     
==========================================
  Files        1861     1861              
  Lines      180438   180478      +40     
==========================================
+ Hits       149342   149397      +55     
+ Misses      23309    23294      -15     
  Partials     7787     7787              
Flag Coverage Δ
unittests 82.77% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/cache/filelock_unix.go 100.00% <100.00%> (ø)
pkg/toolchain/installer/asset.go 94.35% <100.00%> (+1.06%) ⬆️
pkg/toolchain/registry/aqua/aqua.go 86.95% <100.00%> (+0.34%) ⬆️
pkg/toolchain/registry/registry.go 100.00% <ø> (ø)

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

CI's gofumpt flagged three pre-existing ar.ListAll(ctx, ...) call sites in
aqua_test.go that the local hook had been missing. Apply the suggested
fix so the file passes the CI pre-commit step.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
atmos-pro[bot]
atmos-pro Bot previously approved these changes May 16, 2026

@atmos-pro atmos-pro Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were no affected stacks, therefore this is approved by Atmos Pro.

atmos-pro[bot]
atmos-pro Bot previously approved these changes May 16, 2026

@atmos-pro atmos-pro Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were no affected stacks, therefore this is approved by Atmos Pro.

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 16, 2026
Adds the github_content package type to the Aqua-compatible toolchain
registry, matching upstream aquaproj/aqua behavior. Resolves the URL as
https://raw.githubusercontent.com/{owner}/{repo}/{version}/{path} for
single-file downloads from a GitHub repo at a tag. The Asset, URL,
Format, and FormatOverrides fields are intentionally ignored; the new
Path field on the Tool struct holds the file path inside the repo.

Field plumbing extends through AquaPackage -> Tool conversion, version
override application, and resetByPkgType (which now also clears Path
when switching away from github_content). New pure helpers
(validateGitHubContentFields, formatGitHubContentURL) split validation
from formatting for trivial unit testing without an Installer instance.

Unblocks Aqua registry entries for tools shipped as a single raw file
(kubens, kubectx, and many one-file shell-script projects) without
registry-level workarounds.

The remaining unsupported Aqua types (go_install, go_build_install,
cargo) require invoking a language toolchain at install time rather
than downloading an artifact and are deferred to a follow-up issue.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions github-actions Bot added size/l Large size PR and removed size/m Medium size PR labels May 16, 2026
atmos-pro[bot]
atmos-pro Bot previously approved these changes May 16, 2026

@atmos-pro atmos-pro Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were no affected stacks, therefore this is approved by Atmos Pro.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 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 `@pkg/toolchain/installer/asset.go`:
- Around line 145-149: Validate that github_content Path is a relative
repository path: disallow leading '/' or '\' and any parent-traversal segments
("..") or Windows-drive patterns; use the path package (not filepath) to Clean
the value and then reject if the original or cleaned path starts with "/" or "\"
or contains ".." segments (e.g. strings.Contains(cleaned, "../") or cleaned ==
".." or strings.Contains(path, "\\") or matches `^[A-Za-z]:[\\/].*`). Update the
existing validation block that returns ErrInvalidToolSpec (the check around
tool.RepoOwner, tool.RepoName, tool.Path) to perform these checks and return
ErrInvalidToolSpec with a clear message including tool.Path when invalid.

In `@website/blog/2026-05-16-toolchain-aqua-archive-and-content.mdx`:
- Around line 22-23: Update the documented `github_content` URL pattern to
include the missing Git refs segment so it matches the resolver behavior: change
the example URL from raw.githubusercontent.com/{owner}/{repo}/{version}/{path}
to raw.githubusercontent.com/{owner}/{repo}/refs/tags/{version}/{path} (also
update the repeated occurrence referenced in the comment); ensure the
`github_content` description and any examples reflect the `refs/tags` segment
exactly.

In `@website/docs/cli/commands/toolchain/usage.mdx`:
- Line 127: The table row for `go_build_install` currently recommends
`go_install` which is itself marked unsupported; remove the unsupported
recommendation and update the third column to only suggest supported
alternatives (e.g., "Use pre-built releases" or another supported distribution
method). Change the `go_build_install` row text to remove "`go_install`" and
ensure the wording references only supported options so the table no longer
points to an unsupported package type (`go_install`) as the alternative.

In `@website/src/data/roadmap.js`:
- Line 318: Update the milestone description for the roadmap entry with label
'Toolchain support for Aqua `github_content` package type' to use the correct
URL template that includes refs/tags; replace the current
raw.githubusercontent.com/{owner}/{repo}/{version}/{path} example with
raw.githubusercontent.com/{owner}/{repo}/refs/tags/{version}/{path} so the
description matches the implemented path contract and semantics referenced in
that object's description field.
🪄 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: CHILL

Plan: Pro

Run ID: cd6b6c13-2795-4e88-92b9-80efaf595fae

📥 Commits

Reviewing files that changed from the base of the PR and between 29937a8 and c047035.

📒 Files selected for processing (10)
  • pkg/toolchain/installer/asset.go
  • pkg/toolchain/installer/asset_test.go
  • pkg/toolchain/registry/aqua/aqua.go
  • pkg/toolchain/registry/aqua/aqua_test.go
  • pkg/toolchain/registry/aqua/testdata/kubectx-github-content.yaml
  • pkg/toolchain/registry/registry.go
  • website/blog/2026-05-16-toolchain-aqua-archive-and-content.mdx
  • website/docs/cli/commands/toolchain/toolchain-info.mdx
  • website/docs/cli/commands/toolchain/usage.mdx
  • website/src/data/roadmap.js
✅ Files skipped from review due to trivial changes (1)
  • pkg/toolchain/registry/aqua/testdata/kubectx-github-content.yaml

Comment thread pkg/toolchain/installer/asset.go
Comment thread website/blog/2026-08-05-toolchain-aqua-archive-and-content.mdx
Comment thread website/docs/cli/commands/toolchain/usage.mdx Outdated
Comment thread website/src/data/roadmap.js
@mergify

mergify Bot commented May 23, 2026

Copy link
Copy Markdown

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

@mergify mergify Bot added the conflict This PR has conflicts label May 23, 2026
…archive-v1

# Conflicts:
#	pkg/toolchain/installer/asset.go
#	pkg/toolchain/installer/asset_test.go
#	pkg/toolchain/registry/aqua/aqua.go
#	pkg/toolchain/registry/aqua/aqua_test.go
#	pkg/toolchain/registry/registry.go
#	website/src/data/roadmap.js
…type doc

Reject absolute or ..-traversal Path values for github_content tools, and
stop recommending the also-unsupported go_install as an alternative to
go_build_install in the toolchain docs. Addresses CodeRabbit review on #2416.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
website/blog/2026-08-05-toolchain-aqua-archive-and-content.mdx (1)

22-24: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Update the github_content URL contract in both locations.

The documented URL omits /refs/tags/. It should use:

https://raw.githubusercontent.com/{owner}/{repo}/refs/tags/{version}/{path}

Line 24 also omits version from the fields used to build the URL. Add it to the description. Include format_overrides if the documentation is intended to list every ignored field.

Suggested documentation patch
-- `github_content` — a single file from a GitHub repo at a tag, downloaded from `raw.githubusercontent.com/{owner}/{repo}/{version}/{path}`. The required `path` field points to the file inside the repo.
+- `github_content` — a single file from a GitHub repo at a tag, downloaded from `raw.githubusercontent.com/{owner}/{repo}/refs/tags/{version}/{path}`. The required `path` field points to the file inside the repo.

-- For `github_content`, the same fields are ignored — only `repo_owner`, `repo_name`, and `path` are used.
+- For `github_content`, `asset`, `url`, `format`, and `format_overrides` are ignored. The URL uses `repo_owner`, `repo_name`, `version`, and `path`.

-The download URL becomes `https://raw.githubusercontent.com/ahmetb/kubectx/{version}/kubens`.
+The download URL becomes `https://raw.githubusercontent.com/ahmetb/kubectx/refs/tags/{version}/kubens`.

Also applies to: 58-58

🤖 Prompt for 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.

In `@website/blog/2026-08-05-toolchain-aqua-archive-and-content.mdx` around lines
22 - 24, Update both github_content documentation entries to use the raw GitHub
URL pattern with /refs/tags/{version}/{path}. Ensure the described URL-building
fields include repo_owner, repo_name, version, and path; if listing ignored
fields, include format_overrides as well.
🧹 Nitpick comments (3)
pkg/toolchain/registry/aqua/aqua_test.go (3)

2995-2995: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Build fixture paths with filepath.Join.

Use platform-neutral filesystem paths in both fixture reads. Add the path/filepath import if it is not already present.

  • pkg/toolchain/registry/aqua/aqua_test.go#L2995-L2995: build the archive fixture path with filepath.Join.
  • pkg/toolchain/registry/aqua/aqua_test.go#L3208-L3208: build the content fixture path with filepath.Join.
Proposed change
- data, err := os.ReadFile("testdata/adr-tools-github-archive.yaml")
+ data, err := os.ReadFile(filepath.Join("testdata", "adr-tools-github-archive.yaml"))

- data, err := os.ReadFile("testdata/kubectx-github-content.yaml")
+ data, err := os.ReadFile(filepath.Join("testdata", "kubectx-github-content.yaml"))

As per coding guidelines, “Use filepath.Join for paths, avoid slash concatenation and Unix-specific expected paths.”

🤖 Prompt for 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.

In `@pkg/toolchain/registry/aqua/aqua_test.go` at line 2995, Update both fixture
reads in pkg/toolchain/registry/aqua/aqua_test.go at lines 2995-2995 and
3208-3208 to construct paths with filepath.Join, using the existing fixture
directory and filenames; add the path/filepath import if needed. Apply the
change to both the archive and content fixture paths.

Source: Coding guidelines


2981-2990: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

End the new section comment blocks with periods.

Add a terminal period to the final prose line in each block.

  • pkg/toolchain/registry/aqua/aqua_test.go#L2981-L2990: terminate the final github_archive reference line.
  • pkg/toolchain/registry/aqua/aqua_test.go#L3119-L3128: terminate the final github_content reference line.

Based on learnings, only the last line of each multi-line comment block needs a terminal period. As per coding guidelines, “All comments must end with periods.”

🤖 Prompt for 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.

In `@pkg/toolchain/registry/aqua/aqua_test.go` around lines 2981 - 2990, Update
the final prose line in each new registry test comment block to end with a
period: pkg/toolchain/registry/aqua/aqua_test.go lines 2981-2990 for the
github_archive reference and lines 3119-3128 for the github_content reference.
No other comment lines require changes.

Sources: Coding guidelines, Learnings


2416-2447: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use table-driven package-type transition tests.

The transition cases form one scenario matrix. Put the initial registry.Tool, target type, and expected Asset, URL, and Path values in test tables.

  • pkg/toolchain/registry/aqua/aqua_test.go#L2416-L2447: add the github_archive cases as table rows.
  • pkg/toolchain/registry/aqua/aqua_test.go#L3131-L3203: replace the repeated github_content subtests with table rows.

As per coding guidelines, “Use table-driven tests for testing multiple scenarios in Go.”

🤖 Prompt for 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.

In `@pkg/toolchain/registry/aqua/aqua_test.go` around lines 2416 - 2447, Convert
the package-type transition tests into table-driven scenarios. In
pkg/toolchain/registry/aqua/aqua_test.go:2416-2447, combine the github_archive
cases into a table containing the initial registry.Tool, target type, and
expected Asset, URL, and Path values; in
pkg/toolchain/registry/aqua/aqua_test.go:3131-3203, replace the repeated
github_content subtests with equivalent table rows. Keep each scenario’s
existing expectations unchanged and execute them through the shared
resetByPkgType test flow.

Source: Coding guidelines

🤖 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 `@website/docs/cli/commands/toolchain/usage.mdx`:
- Line 138: Update the go_build_install documentation row in the toolchain usage
table to remove github_archive from the pre-built release alternatives,
retaining github_release and http or explicitly describing github_archive as a
source-only download.

---

Duplicate comments:
In `@website/blog/2026-08-05-toolchain-aqua-archive-and-content.mdx`:
- Around line 22-24: Update both github_content documentation entries to use the
raw GitHub URL pattern with /refs/tags/{version}/{path}. Ensure the described
URL-building fields include repo_owner, repo_name, version, and path; if listing
ignored fields, include format_overrides as well.

---

Nitpick comments:
In `@pkg/toolchain/registry/aqua/aqua_test.go`:
- Line 2995: Update both fixture reads in
pkg/toolchain/registry/aqua/aqua_test.go at lines 2995-2995 and 3208-3208 to
construct paths with filepath.Join, using the existing fixture directory and
filenames; add the path/filepath import if needed. Apply the change to both the
archive and content fixture paths.
- Around line 2981-2990: Update the final prose line in each new registry test
comment block to end with a period: pkg/toolchain/registry/aqua/aqua_test.go
lines 2981-2990 for the github_archive reference and lines 3119-3128 for the
github_content reference. No other comment lines require changes.
- Around line 2416-2447: Convert the package-type transition tests into
table-driven scenarios. In pkg/toolchain/registry/aqua/aqua_test.go:2416-2447,
combine the github_archive cases into a table containing the initial
registry.Tool, target type, and expected Asset, URL, and Path values; in
pkg/toolchain/registry/aqua/aqua_test.go:3131-3203, replace the repeated
github_content subtests with equivalent table rows. Keep each scenario’s
existing expectations unchanged and execute them through the shared
resetByPkgType test flow.
🪄 Autofix

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: CHILL

Plan: Pro Plus

Run ID: 7b60879e-c1dd-42ac-a825-be858c040beb

📥 Commits

Reviewing files that changed from the base of the PR and between c14ce82 and 2706362.

📒 Files selected for processing (11)
  • pkg/toolchain/installer/asset.go
  • pkg/toolchain/installer/asset_test.go
  • pkg/toolchain/registry/aqua/aqua.go
  • pkg/toolchain/registry/aqua/aqua_test.go
  • pkg/toolchain/registry/aqua/testdata/adr-tools-github-archive.yaml
  • pkg/toolchain/registry/aqua/testdata/kubectx-github-content.yaml
  • pkg/toolchain/registry/registry.go
  • website/blog/2026-08-05-toolchain-aqua-archive-and-content.mdx
  • website/docs/cli/commands/toolchain/toolchain-info.mdx
  • website/docs/cli/commands/toolchain/usage.mdx
  • website/src/data/roadmap.js
🚧 Files skipped from review as they are similar to previous changes (7)
  • pkg/toolchain/registry/aqua/testdata/adr-tools-github-archive.yaml
  • pkg/toolchain/registry/registry.go
  • pkg/toolchain/registry/aqua/testdata/kubectx-github-content.yaml
  • website/src/data/roadmap.js
  • pkg/toolchain/installer/asset.go
  • pkg/toolchain/registry/aqua/aqua.go
  • pkg/toolchain/installer/asset_test.go

Comment thread website/docs/cli/commands/toolchain/usage.mdx Outdated
github_archive downloads GitHub's auto-generated source tarball, not a
compiled binary, so it doesn't belong alongside github_release/http as a
pre-built alternative to go_build_install. Addresses CodeRabbit follow-up
review on #2416.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

Blog post said only asset/url/format are ignored for github_archive, but
the code doc comments also ignore format_overrides -- make the two match.
Also adds trailing periods to two floating section-banner comments in
aqua_test.go per the godot comment-style convention. Addresses CodeRabbit
follow-up review on #2416.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 `@website/blog/2026-08-05-toolchain-aqua-archive-and-content.mdx`:
- Line 24: Update the github_archive documentation in the toolchain article to
include format_overrides among the ignored fields, alongside asset, url, and
format, while preserving the explanation that Aqua forces the .tar.gz archive
format.
🪄 Autofix

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: CHILL

Plan: Pro Plus

Run ID: e527b25a-36ae-434c-a593-f01a8920cfdb

📥 Commits

Reviewing files that changed from the base of the PR and between c14ce82 and 6280158.

📒 Files selected for processing (11)
  • pkg/toolchain/installer/asset.go
  • pkg/toolchain/installer/asset_test.go
  • pkg/toolchain/registry/aqua/aqua.go
  • pkg/toolchain/registry/aqua/aqua_test.go
  • pkg/toolchain/registry/aqua/testdata/adr-tools-github-archive.yaml
  • pkg/toolchain/registry/aqua/testdata/kubectx-github-content.yaml
  • pkg/toolchain/registry/registry.go
  • website/blog/2026-08-05-toolchain-aqua-archive-and-content.mdx
  • website/docs/cli/commands/toolchain/toolchain-info.mdx
  • website/docs/cli/commands/toolchain/usage.mdx
  • website/src/data/roadmap.js
🚧 Files skipped from review as they are similar to previous changes (8)
  • website/src/data/roadmap.js
  • pkg/toolchain/registry/aqua/testdata/kubectx-github-content.yaml
  • pkg/toolchain/registry/aqua/testdata/adr-tools-github-archive.yaml
  • pkg/toolchain/installer/asset_test.go
  • pkg/toolchain/installer/asset.go
  • pkg/toolchain/registry/aqua/aqua_test.go
  • pkg/toolchain/registry/aqua/aqua.go
  • pkg/toolchain/registry/registry.go

Comment thread website/blog/2026-08-05-toolchain-aqua-archive-and-content.mdx Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 5, 2026
TryWithRLock (and its WithRLock sibling) gave the shared-lock attempt only
1ms before giving up. That's tight enough that ordinary scheduling/IO
jitter on a loaded CI runner -- not actual lock contention -- could miss
the deadline, and loadMetadataWithReadLockUnix treats a missed deadline
identically to "another process holds the lock": it silently returns
nil, nil. DefaultWorkdirManager.ListWorkdirs then drops that workdir from
the listing entirely, which is what caused
TestDefaultWorkdirManager_ListWorkdirs to intermittently fail in CI
(#2856 introduced the 1ms budget).

Bump the internal timeout to 50ms, comfortably above filelock's 10ms
retry interval, so a fast writer's exclusive lock also has a real chance
to clear within budget while still failing far faster than the 500ms/2s
timeouts used for actual blocking waits elsewhere in these packages.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 `@pkg/provisioner/workdir/metadata_lock_unix_test.go`:
- Line 207: Update the comment describing the internal try-lock timeout near the
affected test so its final sentence ends with a period, preserving the existing
wording.
🪄 Autofix

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: CHILL

Plan: Pro Plus

Run ID: 3d38f6f0-e579-4755-9c55-023fbcb5d9f3

📥 Commits

Reviewing files that changed from the base of the PR and between 6280158 and 3117026.

📒 Files selected for processing (5)
  • pkg/cache/filelock.go
  • pkg/cache/filelock_unix.go
  • pkg/provisioner/workdir/metadata_lock_unix_test.go
  • pkg/toolchain/registry/aqua/aqua_test.go
  • website/blog/2026-08-05-toolchain-aqua-archive-and-content.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/toolchain/registry/aqua/aqua_test.go

Comment thread pkg/provisioner/workdir/metadata_lock_unix_test.go
@aknysh
Andriy Knysh (aknysh) merged commit 3ce4349 into main Aug 6, 2026
84 checks passed
@atmos-pro

atmos-pro Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@aknysh
Andriy Knysh (aknysh) deleted the osterman/aqua-github-archive branch August 6, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New features that do not break anything size/l Large size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants