brunch 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 954abfa5f0f95a57eb872a2f140b0eed41d06ccbc7ff5ed5961e12ff73b371fd
4
- data.tar.gz: 650c7a5a55c2557191e35cd94da369e6d89708623963e9c2721f04664c9ecbe7
3
+ metadata.gz: e566d43380555cbea682f52dbbedc64bf1e4a95b681a7c60b266c98aedd5f28e
4
+ data.tar.gz: 212f72d4aa56f57d4ca878a9da515fbdb8730317f2e61ac8b55b33128f679b0c
5
5
  SHA512:
6
- metadata.gz: 422d99f190dc07133f0517690a21ec2fda19f17a909b58437374bd49b982625cee2738f5fbe5ab6095898cadd758abdb83df4e21ea856f91270abe4cd16d42be
7
- data.tar.gz: c328e3b0a2ba453afd8dd5beb073a221ca5d5b1ba33caafcf59ee1a5396591d5c5b374ef85999511c9b0b8dd558fe963289c2098f76aca42ed650e3ac8e43c61
6
+ metadata.gz: 5c3a334e07d02110511e678b252880bbf3c7ac8028377611c72d275d7018d89adeba270377f4a6f325c53783c34a674f23af5e374ccefc8b54e09ac07602ccb7
7
+ data.tar.gz: a5f2857d35bb150e3adc613eb731636b43a286ba74ec4e2afd29a3e75ca9c9433dda5e174fa092db8b179ec9840fcf7ecf3bfd198a6e9104eb0272e017e9eaa3
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.8.3 - 2026-09-29
6
+
7
+ - Detect containers that exit immediately after a Compose resume and report the
8
+ failure instead of claiming the branch environment is running.
9
+ - Retry activation when a recorded running environment has actually stopped.
10
+
5
11
  ## 0.8.2 - 2026-09-29
6
12
 
7
13
  - Resume stopped branch containers without rebuilding or replacing them when
@@ -68,7 +68,17 @@ module Brunch
68
68
  end
69
69
 
70
70
  def start(entry) = compose(entry, "up", "--detach", "--build", "--remove-orphans")
71
- def resume(entry) = compose(entry, "start")
71
+
72
+ def resume(entry)
73
+ return false unless compose(entry, "start")
74
+
75
+ # Compose can report success even when the application exits immediately.
76
+ 3.times do
77
+ sleep 0.2
78
+ return false unless healthy?(entry)
79
+ end
80
+ true
81
+ end
72
82
 
73
83
  def status(entry)
74
84
  return "unavailable" unless available?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Brunch
4
- VERSION = "0.8.2"
4
+ VERSION = "0.8.3"
5
5
  end
@@ -106,7 +106,10 @@ module Brunch
106
106
  existing = record&.fetch("environments", {})&.[](ref)
107
107
  current_ref = record&.[]("current")
108
108
  end
109
- return if existing && !force && existing["snapshot"] == path && existing["status"] == "running" && current_ref == ref
109
+ if existing && !force && existing["snapshot"] == path && existing["status"] == "running" &&
110
+ current_ref == ref && worktree_manager(existing).status(existing) != "stopped"
111
+ return
112
+ end
110
113
 
111
114
  previous = nil
112
115
  port = nil
@@ -124,7 +127,10 @@ module Brunch
124
127
  end
125
128
  if existing && !force && existing["snapshot"] == path && existing["status"] != "starting"
126
129
  with_state_lock { |data| data.fetch("worktrees").fetch(id)["current"] = ref }
127
- abort "Could not resume environment for #{path}. Run brunch restart to rebuild it." unless worktree_manager(existing).resume(existing)
130
+ unless worktree_manager(existing).resume(existing)
131
+ abort "Could not resume environment for #{path}; the container may have exited. Check brunch logs. " \
132
+ "If dependencies changed, rebuild with brunch restart (this replaces the container)."
133
+ end
128
134
 
129
135
  with_state_lock do |data|
130
136
  data.fetch("worktrees").fetch(id).fetch("environments").fetch(ref)["status"] = "running"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brunch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Ciemborowicz