feat(system): add complete Alpine Linux support - #2041
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAlpine Linux is detected as supported through ChangesAlpine Linux support
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant OSRelease
participant detectLinuxDistro
participant resolvePlatformProfile
participant InstallCommandResolver
participant apk
OSRelease->>detectLinuxDistro: Read Alpine ID or ID_LIKE
detectLinuxDistro->>resolvePlatformProfile: Return LinuxDistroAlpine
resolvePlatformProfile->>InstallCommandResolver: Provide supported apk profile
InstallCommandResolver->>apk: Run apk add --no-cache commands
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 `@internal/installcmd/resolver.go`:
- Around line 182-183: Update uvInstallHint’s "apk" path to ensure Alpine’s
community repository is enabled before installing uv, or provide a supported
non-apk remediation when it cannot be enabled. Preserve the existing apk
installation behavior once community is available, and align with the repository
configuration used by the system dependency helpers.
🪄 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: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 4cbdf3b5-cf8f-4748-b37c-c02d5016c7bb
📒 Files selected for processing (8)
internal/installcmd/resolver.gointernal/installcmd/resolver_test.gointernal/system/detect.gointernal/system/detect_test.gointernal/system/guard.gointernal/system/guard_test.gointernal/system/install_deps.gointernal/system/install_deps_test.go
There was a problem hiding this comment.
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 `@internal/installcmd/resolver.go`:
- Around line 182-183: Update the "apk" branch in the installer resolver to
enable Alpine’s community repository through an executable setup step before
running apk add for uv, rather than returning prose only. Ensure the resulting
Alpine installation path works without manual repository configuration.
🪄 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: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 203624ba-8078-4d28-b48e-a7ae22de5a44
📒 Files selected for processing (2)
internal/installcmd/resolver.gointernal/installcmd/resolver_test.go
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
internal/installcmd/resolver.go (1)
247-247: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winHonor
NpmWritablefor Alpine OpenCode installs.
apkand Windows branches emit barenpm install -g, while Ubuntu/Arch/Fedorasudonpm whenNpmWritableis false. Honor this flag for Alpine too, or document/provide a writable npm prefix; otherwise non-root Alpine installs can fail withEACCES.🤖 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 `@internal/installcmd/resolver.go` at line 247, Update the Alpine OpenCode install branch in the resolver to honor NpmWritable: use the existing sudo/npm behavior when the npm prefix is not writable, while retaining the current non-sudo command when it is writable. Keep the command arguments and version handling unchanged.
🤖 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 `@internal/installcmd/resolver.go`:
- Line 183: Update the Alpine fallback returned by the resolver around the uv
installation command to bootstrap or install curl before invoking the uv install
script. Ensure the fallback remains self-contained and works when apk add uv
cannot use the community repository.
---
Outside diff comments:
In `@internal/installcmd/resolver.go`:
- Line 247: Update the Alpine OpenCode install branch in the resolver to honor
NpmWritable: use the existing sudo/npm behavior when the npm prefix is not
writable, while retaining the current non-sudo command when it is writable. Keep
the command arguments and version handling unchanged.
🪄 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: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f8da33d9-f42c-49cb-908a-72d6fd9c7347
📒 Files selected for processing (2)
internal/installcmd/resolver.gointernal/installcmd/resolver_test.go
There was a problem hiding this comment.
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 `@internal/installcmd/resolver.go`:
- Around line 182-183: The Alpine fallback in the “apk” install hint must keep
uv discoverable in the current shell after the standalone installer runs. Update
the fallback command or hint to include the installer’s directory in PATH, and
revise TestUVInstallHint to assert the new install-directory guidance while
preserving the existing apk-first 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: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 776c1cec-b933-4398-b311-fb30e317030c
📒 Files selected for processing (2)
internal/installcmd/resolver.gointernal/installcmd/resolver_test.go
Closes #334
Supersedes #1491.
Summary
ID_LIKE, resolving it as a supportedapkplatform.apkcommands.gitandbashbefore the GGA clone/install sequence and add focused regression coverage.Changes
internal/systeminternal/installcmdTest Plan
git diff --checkgo test ./internal/system ./internal/installcmd -count=1sudo apkpaths and correct GGA command orderingRollback
Revert commit
311f260fto remove Alpine detection andapkcommand resolution without affecting existing distro behavior.Summary by CodeRabbit
apkas the platform package manager.apk-based install hints and commands for tooling and agent/dependency install flows (includinguv, OpenCode, and GGA).apk) cases.