fix: system upgrade doesnt support non unix socket docker hosts#2651
Conversation
|
Container images for this PR have been built successfully!
Built from commit e04589b |
| func (s *SystemUpgradeService) getCurrentContainerID() (string, error) { | ||
| id, err := dockerutils.GetCurrentContainerID() | ||
| if err != nil { | ||
| return "", ErrNotRunningInDocker | ||
| return "", &common.NotRunningInDockerError{} | ||
| } | ||
| return id, nil | ||
| } |
There was a problem hiding this comment.
Naming convention not followed for modified unexported methods
The unexported methods getCurrentContainerID (line 279) and findArcaneContainer (line 288) are both modified in this PR but don't carry the required Internal suffix that the codebase convention mandates for all unexported functions. Every other unexported function added or modified in this changeset — resolveSystemUpgraderRuntimeOptionsInternal, determineUpgradeBinaryPathInternal, etc. — already follows the convention.
Rule Used: What: All unexported functions must have the "Inte... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: backend/internal/services/system_upgrade_service.go
Line: 279-285
Comment:
**Naming convention not followed for modified unexported methods**
The unexported methods `getCurrentContainerID` (line 279) and `findArcaneContainer` (line 288) are both modified in this PR but don't carry the required `Internal` suffix that the codebase convention mandates for all unexported functions. Every other unexported function added or modified in this changeset — `resolveSystemUpgraderRuntimeOptionsInternal`, `determineUpgradeBinaryPathInternal`, etc. — already follows the convention.
**Rule Used:** What: All unexported functions must have the "Inte... ([source](https://app.greptile.com/review/custom-context?memory=306fc233-4d2f-4ac4-bdf7-8059588e8a43))
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
## Arcane Docker Manager Update This automated PR updates Arcane from `1.19.4` to `1.19.5`. ### Changelog ### Bug fixes * improve environment proxy error handling ([#2649](getarcaneapp/arcane#2649) by `kmendell`) * align local BuildKit load/push exporter ([#2650](getarcaneapp/arcane#2650) by `kmendell`) * PUID and PGID being set on project subfolder on every startup ([#2656](getarcaneapp/arcane#2656) by `kmendell`) * system upgrade doesnt support non unix socket docker hosts ([#2651](getarcaneapp/arcane#2651) by `kmendell`) * resizing window discards edits in compose editors ([#2719](getarcaneapp/arcane#2719) by `kmendell`) * only validate project name if it has changed ([#2720](getarcaneapp/arcane#2720) by `kmendell`) * make Arcane reverse-proxy aware to resolve connection issues ([#2717](getarcaneapp/arcane#2717) by `kmendell`) * tolerate undefined typed env vars in GitOps sync ([#2721](https://github.com/getarcaneapp/arcane/pu ### Changes - Updated `config.yaml` version - Updated `build.yaml` ARCANE_VERSION - Updated `Dockerfile` ARCANE_VERSION - Updated documentation files - Updated CHANGELOG.md ### Release Notes Full release notes: https://github.com/getarcaneapp/arcane/releases/tag/v1.19.5 --- This PR was automatically generated by the Update Arcane workflow Auto-merged by GitHub Actions

Checklist
mainbranchWhat This PR Implements
Fixes: #2644
Changes Made
Testing Done
./scripts/development/dev.sh startjust lint all)just test backendAI Tool Used (if applicable)
AI Tool:
Assistance Level:
What AI helped with:
I reviewed and edited all AI-generated output:
I ran all required tests and manually verified changes:
Additional Context
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Greptile Summary
This PR fixes system upgrades when Docker is accessed via a non-unix socket (e.g. a TCP socket proxy). The old code unconditionally bind-mounted
/var/run/docker.sock, which is meaningless for TCP/HTTP Docker hosts.servicespackage are moved to typed error structs incommon, with anIsUpgradeInProgressErrorhelper usingerrors.Asfor unwrap-safe detection.resolveSystemUpgraderRuntimeOptionsInternalfunction (reusing the existing Trivy socket helpers fromvulnerability_service.go) determines at runtime whether the upgrader container needs a socket bind-mount (unix) or a matching network mode +DOCKER_HOSTenv var (TCP/HTTP).Confidence Score: 4/5
The change is safe to merge; the core upgrade path for non-unix Docker hosts is now handled correctly, and the unix path is functionally unchanged.
The functional logic is well-structured and reuses battle-tested helpers already used by the vulnerability scanner. The only finding is a pre-existing naming convention that two modified methods don't follow — a style gap, not a correctness problem.
system_upgrade_service.go — the two modified unexported methods could use a naming pass for consistency with the rest of the file.
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix: system upgrade doesnt support non u..." | Re-trigger Greptile
Context used: