Skip to content

feat: support for docker swarm#1493

Open
kmendell wants to merge 1 commit intomainfrom
feat/docker-swarm
Open

feat: support for docker swarm#1493
kmendell wants to merge 1 commit intomainfrom
feat/docker-swarm

Conversation

@kmendell
Copy link
Member

@kmendell kmendell commented Jan 15, 2026

Closes: #591

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

Greptile Summary

Adds comprehensive Docker Swarm support including services, stacks, nodes, tasks, configs, and secrets management.

Key Changes:

  • Added complete swarm service backend with CRUD operations, pagination, and log streaming
  • Implemented stack deployment engine using Docker Compose specifications
  • Created WebSocket endpoint for real-time service log streaming
  • Built full frontend UI with service editor, stack deployment, and cluster management
  • Added proper error types and validation across the stack

Code Quality Concerns:

  • Widespread naming convention violations: numerous unexported Go functions missing required "Internal" suffix per project coding standards (affects swarm_service.go, stack_deploy_engine.go, log_stream_util.go)
  • The naming violations should be addressed to maintain consistency with project conventions

Positive Aspects:

  • Comprehensive feature implementation with proper error handling
  • Well-structured type definitions with good documentation
  • Frontend code follows Svelte 5 best practices
  • Basic test coverage for UI components

Confidence Score: 3/5

  • This PR is safe to merge with code style improvements needed
  • Score reflects widespread naming convention violations in Go code (unexported functions missing "Internal" suffix), but no critical bugs or security issues found. The implementation is solid with proper error handling, type safety, and test coverage.
  • Pay attention to backend/internal/services/swarm_service.go, backend/pkg/libarcane/swarm/stack_deploy_engine.go, and backend/internal/services/log_stream_util.go for naming convention fixes

Important Files Changed

Filename Overview
backend/internal/services/swarm_service.go Comprehensive swarm service implementation with pagination, filtering, and resource management; multiple naming convention violations for unexported functions
backend/pkg/libarcane/swarm/stack_deploy_engine.go Stack deployment engine with compose project parsing and swarm resource management; numerous unexported functions missing required "Internal" suffix
backend/internal/huma/handlers/swarm.go HTTP handlers for swarm endpoints with proper error handling and pagination support
backend/internal/services/log_stream_util.go Log streaming utilities for multiplexed Docker logs; unexported functions missing required naming suffix
frontend/src/lib/services/swarm-service.ts Comprehensive TypeScript service for swarm API interactions with proper async/await patterns and error handling
types/swarm/service.go Type definitions for swarm services with proper JSON marshaling and documentation

Last reviewed commit: b0401c8

Context used:

  • Rule from dashboard - What: All unexported functions must have the "Internal" suffix.

Why: Clearly distinguishes private ... (source)

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@getarcaneappbot
Copy link
Contributor

getarcaneappbot commented Jan 15, 2026

Container images for this PR have been built successfully!

  • Manager: ghcr.io/getarcaneapp/arcane:pr-1493
  • Agent: ghcr.io/getarcaneapp/arcane-headless:pr-1493

Built from commit 48ecdc2

@kmendell kmendell force-pushed the feat/docker-swarm branch 22 times, most recently from 7c57734 to b8d1616 Compare January 20, 2026 20:37
@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

@kmendell kmendell force-pushed the feat/docker-swarm branch 5 times, most recently from a8568ea to f4a24b6 Compare February 5, 2026 19:31
@getarcaneapp getarcaneapp deleted a comment from codecov bot Feb 6, 2026
@getarcaneapp getarcaneapp deleted a comment from codecov bot Feb 6, 2026
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

@kmendell kmendell force-pushed the feat/docker-swarm branch 5 times, most recently from 9a23197 to 6bf2322 Compare February 10, 2026 16:59
@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

6 similar comments
@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

89 files reviewed, 11 comments

Edit Code Review Agent Settings | Greptile


// streamMultiplexedLogs demultiplexes a Docker log stream (stdout/stderr)
// and sends lines to logsChan. Used by both container and swarm service logs.
func streamMultiplexedLogs(ctx context.Context, logs io.ReadCloser, logsChan chan<- string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

All unexported functions in this file (streamMultiplexedLogs, readLogsFromReader, readAllLogs) are missing the required "Internal" suffix per project coding standards.

Context Used: Rule from dashboard - What: All unexported functions must have the "Internal" suffix.

Why: Clearly distinguishes private ... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: backend/internal/services/log_stream_util.go
Line: 16

Comment:
All unexported functions in this file (`streamMultiplexedLogs`, `readLogsFromReader`, `readAllLogs`) are missing the required "Internal" suffix per project coding standards.

**Context Used:** Rule from `dashboard` - What: All unexported functions must have the "Internal" suffix.

Why: Clearly distinguishes private ... ([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.

@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

3 similar comments
@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

@github-actions
Copy link

github-actions bot commented Mar 6, 2026

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

@github-actions
Copy link

github-actions bot commented Mar 9, 2026

🔍 Deadcode Analysis

Found 3 unreachable functions in the backend.

View details
pkg/libarcane/edge/transport.go:59:6: unreachable func: GetActiveTunnelTransport
pkg/utils/stdcopy/stdcopy.go:56:21: unreachable func: stdWriter.Write
pkg/utils/stdcopy/stdcopy.go:91:6: unreachable func: NewStdWriter

Only remove deadcode that you know is 100% no longer used.

Analysis from commit a966fe9

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.

⚡️ Feature: Swarm Support

2 participants