Skip to content

Expand Compose capabilities and image management - #12

Merged
djpfs merged 5 commits into
mainfrom
copilot/explain-repository-structure
Aug 14, 2026
Merged

Expand Compose capabilities and image management#12
djpfs merged 5 commits into
mainfrom
copilot/explain-repository-structure

Conversation

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

This PR advances the first two improvement areas: broader Docker Compose support and stronger image/registry workflows. It adds profile-aware parsing, service attachments, secure registry authentication, and configurable image builds.

  • Compose engine

    • Adds profile filtering during parsing.
    • Supports service-level secrets and configs.
    • Validates references to undefined attachments.
    • Extends parser coverage for profiles and attachments.
  • Image management

    • Adds secure OCI registry login using password stdin.
    • Supports Dockerfile/Containerfile builds with tags and build arguments.
    • Adds build-cache control.
    • Improves stdin handling in ProcessRunner.
    • Preserves existing push and tag operations.

Example:

try await imageService.login(
    registry: "registry.example.com",
    username: "developer",
    password: password
)

try await imageService.build(
    context: projectDirectory,
    dockerfile: "Dockerfile",
    tags: ["registry.example.com/app:latest"],
    buildArgs: ["BUILD_ENV": "production"],
    useCache: true
)

Copilot AI and others added 2 commits August 14, 2026 02:44
Add secure registry login and Dockerfile builds with cache control.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: djpfs <43576725+djpfs@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: djpfs <43576725+djpfs@users.noreply.github.com>

Copilot AI 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.

Pull request overview

This PR expands the ComposeEngine parser to support profile-aware service filtering and service-level secrets/configs attachments (including validation), and extends the ContainerBackend to support secure registry login via stdin and image builds via the container CLI.

Changes:

  • Add profiles filtering to ComposeParser.parse(...) and validate referenced secrets/configs.
  • Extend Compose models to decode secrets/configs on services and add tests covering profiles + attachments.
  • Add registry login using --password-stdin, image build support, and stdin support in ProcessRunner.

Reviewed changes

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

Show a summary per file
File Description
Tests/ComposeEngineTests/ComposeEngineTests.swift Adds coverage for profiles + service attachments in parsing/validation.
Sources/ContainerBackend/ProcessRunner.swift Adds optional stdin support for CLI invocations.
Sources/ContainerBackend/ImageService.swift Adds registry login via stdin and introduces an image build API.
Sources/ComposeEngine/Models/ComposeModels.swift Adds secrets/configs fields to ServiceConfig decoding/model.
Sources/ComposeEngine/ComposeParser.swift Adds profile filtering and validates secret/config references.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Sources/ComposeEngine/Models/ComposeModels.swift
Comment thread Sources/ContainerBackend/ImageService.swift Outdated
Comment thread Sources/ContainerBackend/ImageService.swift
Comment thread Tests/ComposeEngineTests/ComposeEngineTests.swift
Comment thread Sources/ContainerBackend/ProcessRunner.swift

@djpfs djpfs left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

resolve the comments

…omments and validation tests

Co-authored-by: djpfs <43576725+djpfs@users.noreply.github.com>

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

resolve the comments

All review comments have been addressed in the latest commit:

  • login formatting — fixed indentation and consistent error message formatting to match the rest of ImageService.
  • build API — updated to use tags: [String] and useCache: Bool = true, matching the PR description example.
  • ProcessRunner stdin — moved the standardInput write to a Task.detached block, consistent with how stdout/stderr are read, preserving the non-blocking guarantee.
  • Doc comments — added /// Named secrets... and /// Named configs... doc comments to the new ComposeModels fields.
  • Validation tests — added testUndefinedSecretThrowsError and testUndefinedConfigThrowsError covering the new unknownSecret/unknownConfig error cases.

Co-authored-by: djpfs <43576725+djpfs@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@djpfs
djpfs marked this pull request as ready for review August 14, 2026 03:12
@djpfs
djpfs self-requested a review August 14, 2026 03:34
@djpfs
djpfs merged commit c921e84 into main Aug 14, 2026
5 checks passed
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.

3 participants