Skip to content

feat: Container image polling#169

Merged
timokoessler merged 8 commits into
mainfrom
feature/image-polling
May 30, 2026
Merged

feat: Container image polling#169
timokoessler merged 8 commits into
mainfrom
feature/image-polling

Conversation

@timokoessler
Copy link
Copy Markdown
Member

Type of change

  • 🐛 Bug fix
  • 🚀 New feature
  • ❓ Other (please specify)

Description

Webhook trigger to be added in another PR.
I would also vote for creating a settings page instead of a modal for applications in the future, as the modal is already too complex.

@timokoessler timokoessler self-assigned this May 27, 2026
@timokoessler timokoessler changed the title feat: Prepare image polling in agent feat: Container image polling May 27, 2026
@timokoessler timokoessler marked this pull request as ready for review May 30, 2026 17:27
Copilot AI review requested due to automatic review settings May 30, 2026 17:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds container image polling so agents can periodically compare deployed compose service images with registry digests, pull updated images, and redeploy affected applications. It extends the hub, agent, protobuf protocol, persistence model, and UI settings needed to configure polling per application.

Changes:

  • Adds image polling settings to applications, migrations, API DTOs, and frontend forms/translations.
  • Adds hub/agent WebSocket messages for polling settings and pull-image results.
  • Implements agent-side image polling, digest comparison, image pulling, redeploy logic, and related tests.

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
frontend/src/lib/applications.ts Adds image polling fields to application request/response types.
frontend/src/components/dialogs/upsert-application.tsx Adds UI controls and validation for polling settings.
frontend/messages/en.json Adds English polling UI strings.
frontend/messages/de.json Adds German polling UI strings.
backend/internal/proto/messages.proto Adds polling settings/request/result protocol messages.
backend/internal/hub/websocket/image_poll.go Handles image polling results from agents.
backend/internal/hub/websocket/image_poll_test.go Tests image polling result handling.
backend/internal/hub/websocket/hub.go Adds DefaultHub and agent settings sending.
backend/internal/hub/websocket/hub_test.go Tests sending agent settings.
backend/internal/hub/websocket/handler.go Sends settings on connect and routes polling results.
backend/internal/hub/websocket/handler_test.go Tests settings delivery on WebSocket connect.
backend/internal/hub/routes/applications.go Persists polling settings and pushes updates to agents.
backend/internal/hub/routes/applications_test.go Updates route tests for polling settings behavior.
backend/internal/hub/models/applications.go Adds polling fields to the application model.
backend/internal/hub/handlers.go Registers the default WebSocket hub.
backend/internal/hub/db/migrations/000017_add_application_image_poll.up.sql Adds polling columns to applications.
backend/internal/hub/db/migrations/000017_add_application_image_poll.down.sql Drops polling columns on rollback.
backend/internal/agent/websocket.go Applies polling settings and handles pull-image requests.
backend/internal/agent/websocket_test.go Tests new agent WebSocket polling message handling.
backend/internal/agent/docker/images.go Implements digest checks, image pulling, redeploy, and cleanup.
backend/internal/agent/docker/images_test.go Tests image polling Docker logic.
backend/internal/agent/docker/image_poller.go Adds per-application polling scheduler.
backend/internal/agent/docker/image_poller_test.go Tests poller lifecycle and result reporting.
backend/internal/agent/docker/deploy.go Normalizes compose project paths and adds OrcaCD labels.
backend/internal/agent/docker/deploy_test.go Tests project name normalization and deploy errors.
backend/internal/agent/agent.go Wires the poller into agent runtime and reconnect handling.
backend/internal/agent/agent_config_test.go Tests sender reference behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/internal/agent/websocket.go
Comment thread backend/internal/hub/websocket/image_poll.go
Comment thread backend/internal/agent/docker/images.go
Comment thread backend/internal/agent/docker/images.go
@timokoessler timokoessler enabled auto-merge (squash) May 30, 2026 17:55
@timokoessler timokoessler requested a review from alex289 May 30, 2026 18:00
@timokoessler timokoessler merged commit 071a9dd into main May 30, 2026
11 checks passed
@timokoessler timokoessler deleted the feature/image-polling branch May 30, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants