yamine 0.14.3 → 0.15.0
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 +4 -4
- data/CHANGELOG.md +13 -13
- data/README.md +5 -4
- data/lib/ask/skills/yamine/SKILL.md +1 -1
- data/lib/yamine/cli/boot.rb +3 -3
- data/lib/yamine/cli/routes.rb +5 -4
- data/lib/yamine/cli.rb +1 -1
- data/lib/yamine/proxy.rb +2 -8
- data/lib/yamine/readiness.rb +4 -3
- data/lib/yamine/runner.rb +19 -6
- data/lib/yamine/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8ed2f817c57a50bb8b6d1d06b801c11e321314f4106592797a5554398dab57c5
|
|
4
|
+
data.tar.gz: a8d5de965cd99d455bea51bc0403b968d05a5eb3af988f94eb7cbe631c8d4fac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c6b57abccf1ba59aa2ac525f1f44cb9ed36bf3e6183ed409affdb42af5dec4bd6674a7df6fc6b259d77aa48ece1279aea552a44ffe50479ace3974614b29fc1c
|
|
7
|
+
data.tar.gz: e075319032988c9efcaf70ca3835a46bcb3a0f55986a35bfe42b765483b24c89611c4893fc26d5b1437a9a49d263cd1f9aabed27e27f56705069e43e2832544c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.
|
|
3
|
+
## [0.15.0] — 2026-09-15
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Changed
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
`
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
- **App logs now live in `log/development.log` — `log/yamine-*.log` is gone.**
|
|
8
|
+
Every process used to append to a per-process `log/yamine-#{name}.log`,
|
|
9
|
+
hijacking the Rails request log away from `log/development.log` and
|
|
10
|
+
making `tail -f log/development.log` go silent under yamine. Now
|
|
11
|
+
every process appends to the same shared file — the one Rails people
|
|
12
|
+
already expect — with `tail -F` surviving rotation. `yamine log` and
|
|
13
|
+
`yamine log -F` tail that file; the `--wait` failure payload's log tail
|
|
14
|
+
and `died_detail` now point at `log/development.log` too. Old
|
|
15
|
+
`log/yamine-*.log` files are cleaned up automatically on the next
|
|
16
|
+
boot. Interleaving matches the foreman/without-yamine experience; a
|
|
17
|
+
per-process opt-in can be added later if needed.
|
|
18
18
|
|
|
19
19
|
## [0.14.2] — 2026-09-15
|
|
20
20
|
|
data/README.md
CHANGED
|
@@ -229,7 +229,7 @@ yamine db list|create|drop # per-worktree databases
|
|
|
229
229
|
yamine worktree list|add|remove|clean # worktree lifecycle
|
|
230
230
|
yamine stop # stop this app's backend + routes
|
|
231
231
|
yamine restart # touch tmp/restart.txt (managed apps reboot)
|
|
232
|
-
yamine log [-
|
|
232
|
+
yamine log [-F] [n] # tail (or follow) log/development.log
|
|
233
233
|
yamine proxy start|stop # control the proxy
|
|
234
234
|
yamine service install|status|uninstall # root-owned OS startup service
|
|
235
235
|
yamine hosts sync|clean # manage /etc/hosts entries
|
|
@@ -276,9 +276,10 @@ old fire-and-forget path.
|
|
|
276
276
|
|
|
277
277
|
## Log rotation
|
|
278
278
|
|
|
279
|
-
`proxy.log`
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
`proxy.log` rotates at 5MB (`YAMINE_LOG_MAX_BYTES`), keeping one
|
|
280
|
+
generation. `log/development.log` is rotated too — use
|
|
281
|
+
`tail -F log/development.log` (or `yamine log -F`) so rotation doesn't
|
|
282
|
+
lose the tail. `doctor` warns when the state dir passes 100MB.
|
|
282
283
|
|
|
283
284
|
## Supervision
|
|
284
285
|
|
|
@@ -39,7 +39,7 @@ yamine start --json # machine-readable wait result (--wait default)
|
|
|
39
39
|
yamine # same as start
|
|
40
40
|
yamine stop # stop this app's backend + routes
|
|
41
41
|
yamine status # show service, processes, and URLs
|
|
42
|
-
yamine log [-
|
|
42
|
+
yamine log [-F] # tail log/development.log (every process)
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
`$PORT` and `YAMINE_URL` are injected per process; HTTP processes get
|
data/lib/yamine/cli/boot.rb
CHANGED
|
@@ -268,7 +268,7 @@ module Yamine
|
|
|
268
268
|
children << { name: item[:name], pid: app.pid }
|
|
269
269
|
apps[item[:name]] = {
|
|
270
270
|
item: item,
|
|
271
|
-
log_path: File.join(Dir.pwd, "log", "
|
|
271
|
+
log_path: File.join(Dir.pwd, "log", "development.log"),
|
|
272
272
|
app: app
|
|
273
273
|
}
|
|
274
274
|
end
|
|
@@ -330,7 +330,7 @@ module Yamine
|
|
|
330
330
|
def tail_for(failure, apps)
|
|
331
331
|
name = failure[:name]
|
|
332
332
|
slot = apps[name]
|
|
333
|
-
path = slot ? File.expand_path(File.join(Dir.pwd, "log", "
|
|
333
|
+
path = slot ? File.expand_path(File.join(Dir.pwd, "log", "development.log")) : nil
|
|
334
334
|
lines = path && File.file?(path) ? File.readlines(path).last(20).join : "(no log file)"
|
|
335
335
|
{ path: path, tail: lines }
|
|
336
336
|
rescue SystemCallError
|
|
@@ -580,7 +580,7 @@ module Yamine
|
|
|
580
580
|
if dead
|
|
581
581
|
pid, name = dead
|
|
582
582
|
$stderr.puts "\n[#{name}] exited (pid #{pid}) — stopping the whole tree."
|
|
583
|
-
log = File.join(Dir.pwd, "log", "
|
|
583
|
+
log = File.join(Dir.pwd, "log", "development.log")
|
|
584
584
|
$stderr.puts " log: #{log}" if File.file?(log)
|
|
585
585
|
reporter&.note("#{name} exited; cleaning up routes")
|
|
586
586
|
cleanup_routes(ctx, hostnames)
|
data/lib/yamine/cli/routes.rb
CHANGED
|
@@ -249,12 +249,13 @@ module Yamine
|
|
|
249
249
|
puts "Touched #{path} — managed app restarts on next request."
|
|
250
250
|
end
|
|
251
251
|
|
|
252
|
-
# Tail the app log (default 50 lines); --follow streams.
|
|
253
|
-
|
|
252
|
+
# Tail the shared app log (default 50 lines); --follow streams.
|
|
253
|
+
# Every process writes log/development.log, so `yamine log` and
|
|
254
|
+
# `yamine log -F` tail the one file `tail -F` survives rotation.
|
|
255
|
+
def log(_ctx, args)
|
|
254
256
|
follow = args.delete("--follow") || args.delete("-f")
|
|
255
257
|
lines = (args.first || 50).to_i
|
|
256
|
-
|
|
257
|
-
path = File.expand_path(File.join(Dir.pwd, "log", "yamine-#{resolved.app}.log"))
|
|
258
|
+
path = File.expand_path(File.join(Dir.pwd, "log", "development.log"))
|
|
258
259
|
unless File.file?(path)
|
|
259
260
|
puts "No log at #{path} yet."
|
|
260
261
|
return
|
data/lib/yamine/cli.rb
CHANGED
|
@@ -104,7 +104,7 @@ module Yamine
|
|
|
104
104
|
yamine kamal <variant> Preview-deploy snippet for Kamal
|
|
105
105
|
yamine stop Stop this app's backend + routes
|
|
106
106
|
yamine restart Touch tmp/restart.txt
|
|
107
|
-
yamine log [-
|
|
107
|
+
yamine log [-F] [n] Tail (or follow) log/development.log
|
|
108
108
|
|
|
109
109
|
Flags: --variant, --tld, --force, --app-port, --wait (default), --no-wait, --json, --branch
|
|
110
110
|
Env: YAMINE_VARIANT/TLD/PORT/STATE_DIR/AGENT, YAMINE_BRANCH=1
|
data/lib/yamine/proxy.rb
CHANGED
|
@@ -320,18 +320,12 @@ module Yamine
|
|
|
320
320
|
|
|
321
321
|
def handle_upgrade(sock, head, buf)
|
|
322
322
|
routes = cached_routes
|
|
323
|
-
|
|
323
|
+
_method, _target, headers = parse_head(head)
|
|
324
324
|
entry = route(headers["host"].to_s, routes)
|
|
325
325
|
return unless entry
|
|
326
326
|
|
|
327
|
-
# Upgrades carry the same forwarded headers as every other request:
|
|
328
|
-
# an app behind the proxy (ActionCable's origin check) reads the
|
|
329
|
-
# scheme from X-Forwarded-Proto, and a verbatim head would tell a
|
|
330
|
-
# wss:// connection it arrived as http.
|
|
331
|
-
set_forwarded(headers, sock, tls: @tls)
|
|
332
|
-
|
|
333
327
|
backend = dial(entry)
|
|
334
|
-
backend.write(
|
|
328
|
+
backend.write(head)
|
|
335
329
|
backend.write(buf) unless buf.empty?
|
|
336
330
|
pipe_both(sock, backend)
|
|
337
331
|
rescue SystemCallError, OpenSSL::SSL::SSLError, IOError => e
|
data/lib/yamine/readiness.rb
CHANGED
|
@@ -189,13 +189,14 @@ module Yamine
|
|
|
189
189
|
end
|
|
190
190
|
|
|
191
191
|
# Why a process that died before answering died: the recognized
|
|
192
|
-
# fatal line when there is one, else point at
|
|
192
|
+
# fatal line when there is one, else point at the shared log
|
|
193
|
+
# (every process appends to log/development.log).
|
|
193
194
|
def died_detail(name, slot)
|
|
194
195
|
reason = fatal_line(slot[:log_path])
|
|
195
196
|
if reason
|
|
196
|
-
"process exited: #{reason} (log/
|
|
197
|
+
"process exited: #{reason} (log/development.log)"
|
|
197
198
|
else
|
|
198
|
-
"process exited before becoming healthy — see log/
|
|
199
|
+
"process exited before becoming healthy — see log/development.log"
|
|
199
200
|
end
|
|
200
201
|
end
|
|
201
202
|
|
data/lib/yamine/runner.rb
CHANGED
|
@@ -91,8 +91,10 @@ module Yamine
|
|
|
91
91
|
|
|
92
92
|
# Run an arbitrary command with PORT + YAMINE_URL. Returns App.
|
|
93
93
|
# register: false spawns without a route (background processes).
|
|
94
|
-
# Child output goes to log/
|
|
95
|
-
#
|
|
94
|
+
# Child output goes to log/development.log (every process appends
|
|
95
|
+
# to the same file) so `tail -f log/development.log` is the same
|
|
96
|
+
# view yamine's failure payloads use. Interleaving matches the
|
|
97
|
+
# foreman/without-yamine experience.
|
|
96
98
|
#
|
|
97
99
|
# extra_env is the config's env.clear/env.secret for this process —
|
|
98
100
|
# yamine's own keys (PORT, YAMINE_URL, DATABASE_URL, the TLS vars)
|
|
@@ -221,6 +223,14 @@ module Yamine
|
|
|
221
223
|
|
|
222
224
|
private
|
|
223
225
|
|
|
226
|
+
def cleanup_legacy_logs(dir)
|
|
227
|
+
Dir.glob(File.expand_path(File.join(dir, "log", "yamine-*.log*"))).each do |path|
|
|
228
|
+
FileUtils.rm_f(path)
|
|
229
|
+
rescue SystemCallError
|
|
230
|
+
nil
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
224
234
|
def socket_command(dir, socket_path)
|
|
225
235
|
socket = "unix://#{socket_path}"
|
|
226
236
|
config_ru = File.join(dir, "config.ru")
|
|
@@ -288,12 +298,15 @@ module Yamine
|
|
|
288
298
|
end
|
|
289
299
|
end
|
|
290
300
|
|
|
291
|
-
# Log path for
|
|
292
|
-
#
|
|
293
|
-
|
|
294
|
-
|
|
301
|
+
# Log path for any process — every process appends to
|
|
302
|
+
# log/development.log so `tail -F` is the one view for humans
|
|
303
|
+
# and for --wait failure tails. Keep the two-arg signature so
|
|
304
|
+
# existing call sites don't need to change.
|
|
305
|
+
def log_path(dir, _name = nil)
|
|
306
|
+
path = File.expand_path(File.join(dir, "log", "development.log"))
|
|
295
307
|
FileUtils.mkdir_p(File.dirname(path))
|
|
296
308
|
Log.rotate(path)
|
|
309
|
+
cleanup_legacy_logs(dir)
|
|
297
310
|
path
|
|
298
311
|
end
|
|
299
312
|
|
data/lib/yamine/version.rb
CHANGED