detached e4bd401

chore: finalizer pass — update rollback references in README and docs, simplify validateTagExists

commit
e4bd401290783b75ca4c5e6e02d93dd8747e3440
author
brice · · 2026-04-28 03:09 UTC
parent
9dd6453
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
4 files · +7 -11
M README.md +2 -2
@@ -46,7 +46,7 @@ gordon status
4646 Roll back, restart, or manage secrets — all from the command line:
4747
4848 ```bash
49-gordon rollback app.example.com # Revert to a previous image tag
49+gordon pin app.example.com # Pin to a specific image tag
5050 gordon restart app.example.com # Restart the container
5151 gordon secrets set app.example.com DB_HOST=db.internal API_KEY=secret123
5252 ```
@@ -95,7 +95,7 @@ See the [Deploy Action README](.github/actions/deploy/README.md) for multi-platf
9595 | `gordon routes add <domain> <image>` | Create or update a route |
9696 | `gordon routes remove <domain>` | Remove a route |
9797 | `gordon routes deploy <domain>` | Redeploy a route |
98-| `gordon rollback <domain>` | Roll back to a previous image |
98+| `gordon pin <domain>` | Pin a route to a specific image tag |
9999 | `gordon restart <domain>` | Restart a route container |
100100
101101 ### Images & Registry
@@ -46,7 +46,7 @@ gordon status
46 Roll back, restart, or manage secrets — all from the command line:46 Roll back, restart, or manage secrets — all from the command line:
47 47
48 ```bash48 ```bash
49-gordon rollback app.example.com # Revert to a previous image tag49+gordon pin app.example.com # Pin to a specific image tag
50 gordon restart app.example.com # Restart the container50 gordon restart app.example.com # Restart the container
51 gordon secrets set app.example.com DB_HOST=db.internal API_KEY=secret12351 gordon secrets set app.example.com DB_HOST=db.internal API_KEY=secret123
52 ```52 ```
@@ -95,7 +95,7 @@ See the [Deploy Action README](.github/actions/deploy/README.md) for multi-platf
95 | `gordon routes add <domain> <image>` | Create or update a route |95 | `gordon routes add <domain> <image>` | Create or update a route |
96 | `gordon routes remove <domain>` | Remove a route |96 | `gordon routes remove <domain>` | Remove a route |
97 | `gordon routes deploy <domain>` | Redeploy a route |97 | `gordon routes deploy <domain>` | Redeploy a route |
98-| `gordon rollback <domain>` | Roll back to a previous image |98+| `gordon pin <domain>` | Pin a route to a specific image tag |
99 | `gordon restart <domain>` | Restart a route container |99 | `gordon restart <domain>` | Restart a route container |
100 100
101 ### Images & Registry101 ### Images & Registry
M docs/cli/index.md +2 -2
@@ -38,7 +38,7 @@ Management commands run locally through in-process services by default. Add `--r
3838 | `gordon attachments push` | Build/push attachment images to registry | [attachments](./attachments.md) |
3939 | `gordon reload` | Reload configuration and sync containers | [serve](./serve.md#gordon-reload) |
4040 | `gordon restart` | Restart a running container | [restart](./restart.md) |
41-| `gordon rollback` | Roll back to a previous image version | [rollback](./rollback.md) |
41+| `gordon pin` | Pin a route to a specific image tag | [pin](./pin.md) |
4242 | `gordon routes` | Manage routes | [routes](./routes.md) |
4343 | `gordon secrets` | Manage secrets | [secrets](./secrets.md) |
4444 | `gordon status` | Show Gordon server status | [status](./status.md) |
@@ -81,7 +81,7 @@ gordon push myapp --build
8181 gordon push myapp --no-confirm
8282
8383 # Roll back to a previous tag
84-gordon rollback myapp.example.com
84+gordon pin myapp.example.com
8585
8686 # View logs
8787 gordon logs # Gordon process logs
@@ -38,7 +38,7 @@ Management commands run locally through in-process services by default. Add `--r
38 | `gordon attachments push` | Build/push attachment images to registry | [attachments](./attachments.md) |38 | `gordon attachments push` | Build/push attachment images to registry | [attachments](./attachments.md) |
39 | `gordon reload` | Reload configuration and sync containers | [serve](./serve.md#gordon-reload) |39 | `gordon reload` | Reload configuration and sync containers | [serve](./serve.md#gordon-reload) |
40 | `gordon restart` | Restart a running container | [restart](./restart.md) |40 | `gordon restart` | Restart a running container | [restart](./restart.md) |
41-| `gordon rollback` | Roll back to a previous image version | [rollback](./rollback.md) |41+| `gordon pin` | Pin a route to a specific image tag | [pin](./pin.md) |
42 | `gordon routes` | Manage routes | [routes](./routes.md) |42 | `gordon routes` | Manage routes | [routes](./routes.md) |
43 | `gordon secrets` | Manage secrets | [secrets](./secrets.md) |43 | `gordon secrets` | Manage secrets | [secrets](./secrets.md) |
44 | `gordon status` | Show Gordon server status | [status](./status.md) |44 | `gordon status` | Show Gordon server status | [status](./status.md) |
@@ -81,7 +81,7 @@ gordon push myapp --build
81 gordon push myapp --no-confirm81 gordon push myapp --no-confirm
82 82
83 # Roll back to a previous tag83 # Roll back to a previous tag
84-gordon rollback myapp.example.com84+gordon pin myapp.example.com
85 85
86 # View logs86 # View logs
87 gordon logs # Gordon process logs87 gordon logs # Gordon process logs
M internal/adapters/in/cli/parity_matrix_test.go +1 -1
@@ -40,6 +40,7 @@ func TestLocalParityMatrix(t *testing.T) {
4040 command string
4141 }{
4242 {file: "push.go", legacyText: "push requires remote mode", command: "gordon push"},
43+ // Guards against reintroducing the old rollback-only remote-mode error text during the command rename.
4344 {file: "pin.go", legacyText: "rollback requires remote mode", command: "gordon pin"},
4445 {file: "backup.go", legacyText: "backup commands require a configured remote target", command: "gordon backups"},
4546 {file: "routes.go", legacyText: "status command requires --remote flag or GORDON_REMOTE env var", command: "gordon status"},
@@ -59,7 +60,6 @@ func TestLocalParityMatrix(t *testing.T) {
5960
6061 func TestUIAdoptionMatrixCoverage(t *testing.T) {
6162 for _, expect := range uiAdoptionExpectations {
62- expect := expect
6363 t.Run(expect.family, func(t *testing.T) {
6464 if len(expect.functions) == 0 {
6565 t.Fatalf("ui adoption matrix for %s is empty", expect.family)
@@ -40,6 +40,7 @@ func TestLocalParityMatrix(t *testing.T) {
40 command string40 command string
41 }{41 }{
42 {file: "push.go", legacyText: "push requires remote mode", command: "gordon push"},42 {file: "push.go", legacyText: "push requires remote mode", command: "gordon push"},
43+ // Guards against reintroducing the old rollback-only remote-mode error text during the command rename.
43 {file: "pin.go", legacyText: "rollback requires remote mode", command: "gordon pin"},44 {file: "pin.go", legacyText: "rollback requires remote mode", command: "gordon pin"},
44 {file: "backup.go", legacyText: "backup commands require a configured remote target", command: "gordon backups"},45 {file: "backup.go", legacyText: "backup commands require a configured remote target", command: "gordon backups"},
45 {file: "routes.go", legacyText: "status command requires --remote flag or GORDON_REMOTE env var", command: "gordon status"},46 {file: "routes.go", legacyText: "status command requires --remote flag or GORDON_REMOTE env var", command: "gordon status"},
@@ -59,7 +60,6 @@ func TestLocalParityMatrix(t *testing.T) {
59 60
60 func TestUIAdoptionMatrixCoverage(t *testing.T) {61 func TestUIAdoptionMatrixCoverage(t *testing.T) {
61 for _, expect := range uiAdoptionExpectations {62 for _, expect := range uiAdoptionExpectations {
62- expect := expect
63 t.Run(expect.family, func(t *testing.T) {63 t.Run(expect.family, func(t *testing.T) {
64 if len(expect.functions) == 0 {64 if len(expect.functions) == 0 {
65 t.Fatalf("ui adoption matrix for %s is empty", expect.family)65 t.Fatalf("ui adoption matrix for %s is empty", expect.family)
M internal/adapters/in/cli/pin.go +2 -6
@@ -5,6 +5,7 @@ import (
55 "fmt"
66 "io"
77 "os"
8+ "slices"
89 "sort"
910 "strings"
1011
@@ -215,12 +216,7 @@ func selectTag(targetTag string, tags []string, currentTag, pinDomain string) (s
215216 }
216217
217218 func validateTagExists(targetTag string, tags []string) bool {
218- for _, t := range tags {
219- if t == targetTag {
220- return true
221- }
222- }
223- return false
219+ return slices.Contains(tags, targetTag)
224220 }
225221
226222 func deploySelectedTag(ctx context.Context, cp ControlPlane, route *domain.Route, pinDomain, imageName, selectedTag string) error {
@@ -5,6 +5,7 @@ import (
5 "fmt"5 "fmt"
6 "io"6 "io"
7 "os"7 "os"
8+ "slices"
8 "sort"9 "sort"
9 "strings"10 "strings"
10 11
@@ -215,12 +216,7 @@ func selectTag(targetTag string, tags []string, currentTag, pinDomain string) (s
215 }216 }
216 217
217 func validateTagExists(targetTag string, tags []string) bool {218 func validateTagExists(targetTag string, tags []string) bool {
218- for _, t := range tags {219+ return slices.Contains(tags, targetTag)
219- if t == targetTag {
220- return true
221- }
222- }
223- return false
224 }220 }
225 221
226 func deploySelectedTag(ctx context.Context, cp ControlPlane, route *domain.Route, pinDomain, imageName, selectedTag string) error {222 func deploySelectedTag(ctx context.Context, cp ControlPlane, route *domain.Route, pinDomain, imageName, selectedTag string) error {

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