Skip to content

Strongly type perry/container-compose using Compose Spec#87

Open
yumin-chen wants to merge 1 commit into
feat/container-composefrom
strong-types-compose-spec-4162385238568371820
Open

Strongly type perry/container-compose using Compose Spec#87
yumin-chen wants to merge 1 commit into
feat/container-composefrom
strong-types-compose-spec-4162385238568371820

Conversation

@yumin-chen

Copy link
Copy Markdown

Strongly typed the perry-container-compose crate using the official Compose Specification as a reference. Replaced most usages of serde_yaml::Value with structured Rust enums and structs that represent the different forms allowed by the spec (e.g., short vs. long forms, string vs. list). Updated the orchestration engine and capability normalization to work with these new types. Verified the changes with the existing test suite (78 unit tests plus functional and conformance tests).


PR created automatically by Jules for task 4162385238568371820 started by @yumin-chen

Updated `ComposeService`, `ComposeSpec`, and related types in `crates/perry-container-compose/src/types.rs` to use robust Rust structures and enums instead of generic `serde_yaml::Value`. This ensures alignment with the official Compose Specification and improves type safety across the orchestration layer.

Key changes:
- Defined structured types for `BlkioConfig`, `Ulimit`, `LifecycleHook`, `CredentialSpec`, `DevelopConfig`, `IncludeEntry`, and `ComposeModel`.
- Updated `ComposeDeployment` with typed fields for `resources`, `placement`, `restart_policy`, and `update_config`.
- Refactored `ComposeService` to use these new types for fields like `command`, `entrypoint`, `volumes`, `env_file`, `secrets`, `configs`, `expose`, `dns`, `tmpfs`, etc.
- Added missing Compose Spec fields to `ComposeService`.
- Refactored `ComposeEngine` and `BackendCapabilities` to handle the transition from generic YAML values to structured types.
- Fixed several integration tests that were relying on the old generic YAML structure.
- Registered `perry-container-compose` in the root `Cargo.toml` workspace.

Co-authored-by: yumin-chen <10954839+yumin-chen@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant