detached 8d650c2

fix(cli) surface local fallback errors in deploy restart and reload

commit
8d650c2868592a2ecf3030613999508ead0e8db0
author
bnema · · 2026-02-06 20:43 UTC
parent
2b58860
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +5 -1
M internal/adapters/in/cli/deploy.go +1 -0
@@ -42,6 +42,7 @@ Examples:
4242 fmt.Println(styles.RenderSuccess(fmt.Sprintf("Deploy signal sent for domain: %s", domain)))
4343 return nil
4444 }
45+ return fmt.Errorf("failed to deploy: remote error: %w; local fallback also failed: %v", err, localErr)
4546 }
4647 return fmt.Errorf("failed to deploy: %w", err)
4748 }
@@ -42,6 +42,7 @@ Examples:
42 fmt.Println(styles.RenderSuccess(fmt.Sprintf("Deploy signal sent for domain: %s", domain)))42 fmt.Println(styles.RenderSuccess(fmt.Sprintf("Deploy signal sent for domain: %s", domain)))
43 return nil43 return nil
44 }44 }
45+ return fmt.Errorf("failed to deploy: remote error: %w; local fallback also failed: %v", err, localErr)
45 }46 }
46 return fmt.Errorf("failed to deploy: %w", err)47 return fmt.Errorf("failed to deploy: %w", err)
47 }48 }
M internal/adapters/in/cli/restart.go +1 -0
@@ -50,6 +50,7 @@ Examples:
5050 fmt.Println(styles.RenderSuccess(fmt.Sprintf("Restart signal sent for %s (local deploy path)", domain)))
5151 return nil
5252 }
53+ return fmt.Errorf("remote restart failed: %w; local fallback failed: %v", err, localErr)
5354 }
5455 return fmt.Errorf("failed to restart: %w", err)
5556 }
@@ -50,6 +50,7 @@ Examples:
50 fmt.Println(styles.RenderSuccess(fmt.Sprintf("Restart signal sent for %s (local deploy path)", domain)))50 fmt.Println(styles.RenderSuccess(fmt.Sprintf("Restart signal sent for %s (local deploy path)", domain)))
51 return nil51 return nil
52 }52 }
53+ return fmt.Errorf("remote restart failed: %w; local fallback failed: %v", err, localErr)
53 }54 }
54 return fmt.Errorf("failed to restart: %w", err)55 return fmt.Errorf("failed to restart: %w", err)
55 }56 }
M internal/adapters/in/cli/root.go +3 -1
@@ -204,11 +204,13 @@ func runReload() error {
204204 func runReloadRemote(ctx context.Context, client *remote.Client) error {
205205 if err := client.Reload(ctx); err != nil {
206206 if shouldFallbackToLocal(err) {
207- if localErr := runReload(); localErr == nil {
207+ localErr := runReload()
208+ if localErr == nil {
208209 fmt.Printf("Remote reload failed (%v), used local signal fallback\n", err)
209210 fmt.Println("Configuration reloaded successfully")
210211 return nil
211212 }
213+ return fmt.Errorf("remote reload failed: %w; local fallback failed: %v", err, localErr)
212214 }
213215 return fmt.Errorf("failed to reload: %w", err)
214216 }
@@ -204,11 +204,13 @@ func runReload() error {
204 func runReloadRemote(ctx context.Context, client *remote.Client) error {204 func runReloadRemote(ctx context.Context, client *remote.Client) error {
205 if err := client.Reload(ctx); err != nil {205 if err := client.Reload(ctx); err != nil {
206 if shouldFallbackToLocal(err) {206 if shouldFallbackToLocal(err) {
207- if localErr := runReload(); localErr == nil {207+ localErr := runReload()
208+ if localErr == nil {
208 fmt.Printf("Remote reload failed (%v), used local signal fallback\n", err)209 fmt.Printf("Remote reload failed (%v), used local signal fallback\n", err)
209 fmt.Println("Configuration reloaded successfully")210 fmt.Println("Configuration reloaded successfully")
210 return nil211 return nil
211 }212 }
213+ return fmt.Errorf("remote reload failed: %w; local fallback failed: %v", err, localErr)
212 }214 }
213 return fmt.Errorf("failed to reload: %w", err)215 return fmt.Errorf("failed to reload: %w", err)
214 }216 }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close