Strongly type perry/container-compose using Compose Spec#87
Conversation
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>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Strongly typed the
perry-container-composecrate using the official Compose Specification as a reference. Replaced most usages ofserde_yaml::Valuewith 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