2.1.2 (#1347)#9
Conversation
📝 WalkthroughWalkthroughVersion updates for workspace and npm packages from 2.1.1 to 2.1.2. Service extraction logic refactored to merge in-place with conditional field overwrites. Stack service extraction error logging converted to structured format with stack identifiers. Changes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Bumps the project to release 2.1.2 and adjusts stack service extraction so multi-compose-file stacks don’t produce duplicated services (addressing the reported UI crash when overrides are used).
Changes:
- Version bump to 2.1.2 across Rust workspace + client TS package.
- Update stack service parsing to merge/override service fields across multiple compose files instead of appending duplicates.
- Improve one warning log to include structured stack identifiers.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| client/core/ts/package.json | Bumps TS client package version to 2.1.2. |
| bin/core/src/stack/services.rs | Merges services by name and applies overrides when parsing multiple compose files. |
| bin/core/src/api/write/stack.rs | Updates warning log to include structured stack and stack_name fields. |
| Cargo.toml | Bumps Rust workspace package version to 2.1.2. |
| Cargo.lock | Updates crate versions to 2.1.2 in lockfile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if let Some(container_name) = container_name { | ||
| existing.container_name = container_name; | ||
| } | ||
| if let Some(image) = image { |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@bin/core/src/stack/services.rs`:
- Around line 57-58: When updating the service image in services.rs, ensure the
cached digest is cleared if the image actually changes: before assigning
existing.image = image in the update path, compare the previous existing.image
to the new image value and, if they differ, set existing.image_digest (or the
field holding the cached digest) to None/empty to invalidate it so
latest_services cannot retain a stale digest. Use the existing.image and
existing.image_digest field names to locate the code and perform the conditional
clearing immediately prior to updating the image.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: c29d94db-a0bf-4149-a475-237de6a078de
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
Cargo.tomlbin/core/src/api/write/stack.rsbin/core/src/stack/services.rsclient/core/ts/package.json
| if let Some(image) = image { | ||
| existing.image = image; |
There was a problem hiding this comment.
Clear the cached digest when an override changes the image.
Line 58 can attach the previous image_digest to a different image after a multi-file override. Invalidate it when the image value changes so latest_services does not persist stale digest metadata.
🐛 Proposed fix
if let Some(image) = image {
+ if existing.image != image {
+ existing.image_digest = None;
+ }
existing.image = image;
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if let Some(image) = image { | |
| existing.image = image; | |
| if let Some(image) = image { | |
| if existing.image != image { | |
| existing.image_digest = None; | |
| } | |
| existing.image = image; | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@bin/core/src/stack/services.rs` around lines 57 - 58, When updating the
service image in services.rs, ensure the cached digest is cleared if the image
actually changes: before assigning existing.image = image in the update path,
compare the previous existing.image to the new image value and, if they differ,
set existing.image_digest (or the field holding the cached digest) to None/empty
to invalidate it so latest_services cannot retain a stale digest. Use the
existing.image and existing.image_digest field names to locate the code and
perform the conditional clearing immediately prior to updating the image.
2.1.2 fix multi file service override UI crash
deploy 2.1.2-dev-1
2.1.2
Summary by CodeRabbit