fix(tauri): cegah services_start menghancurkan container running (1.0.0-beta.4)#8
Merged
Merged
Conversation
services_start memakai `up --remove-orphans` dengan compose file yang hanya berisi list dari frontend. Saat frontend mengirim subset (race state setelah boot: reconcile sekali di mount kalah cepat dari kesiapan Docker Engine), service running yang tak terkirim ikut ter-remove. - backend: union list dengan container servel_ yang sedang running sebelum generate compose (helper union_with_running + 2 test). - frontend: applyStatusChange jadikan container running → selected=true (reconcile kontinu), jaga selectedIds ⊇ running + heal config.json. devhardiyanto
devhardiyanto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Hotfix: mencegah
services_startmenghancurkan container Docker yang sedang running saat menyalakan satu service dari dashboard. Sekaligus bump versi ke1.0.0-beta.4.Why
Setelah boot laptop, container auto-restart (
restart: unless-stopped) tampil running di dashboard, tapi flagselecteddi frontend belum ter-reconcile (reconcile hanya sekali dionMounted, kalah cepat dari kesiapan Docker Engine). Saat user toggle satu service (mis. SQL Server), frontend mengirim subset["sqlserver"]ke backend. Backend regenerate compose file hanya berisi subset itu laluup --remove-orphans→ mysql/postgres/minio/redis dianggap orphan dan dihancurkan.How
Dua perbaikan komplementer, tanpa mengubah signature command:
services.rs): sebelum generate compose, union list yang diminta dengan containerservel_yang sedang running (helper murniunion_with_running, di-cover 2 unit test).up --remove-orphanstak bisa lagi menghancurkan service running yang tidak ikut dikirim. Jika Docker belum ready → fallback pakai list apa adanya.useServices.ts):applyStatusChangemenandaiselected=truesaat container terobservasi running, menjagaselectedIds ⊇ runningdan menyembuhkanconfig.jsonyang sempat ter-overwrite.Changes
src-tauri/src/commands/services.rs— union guard +union_with_running+ 2 testsrc/composables/useServices.ts— reconcile kontinu diapplyStatusChange1.0.0-beta.3→1.0.0-beta.4(package.json, Cargo.toml, tauri.conf.json, lockfiles)Verifikasi:
cargo check✓ ·vue-tsc --noEmit✓ · 56 Rust tests pass (2 baru).devhardiyanto