Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ yoq status [--verbose] show service status and resources
yoq status --app [name] show local app release status
yoq status --app [name] --server host:port
show remote app release status
yoq apps [--json] list local app release summaries
yoq apps --server host:port [--json] list remote app release summaries
yoq metrics [service] show service metrics
yoq metrics --pairs show service-to-service metrics
yoq policy deny <src> <tgt> block traffic between services
Expand Down
4 changes: 3 additions & 1 deletion docs/cluster-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,13 @@ the `--server` flag tells yoq to submit the manifest to the cluster API instead
after deploy, use the app-first day-2 commands:

```
yoq apps --server 10.0.0.1:7700
yoq status --app [name] --server 10.0.0.1:7700
yoq history --app [name] --server 10.0.0.1:7700
yoq rollback --app [name] --server 10.0.0.1:7700 --release <release-id>
```

`status --app` shows the latest release metadata, `history --app` lists prior releases, and remote `rollback --app ... --release` re-applies a stored app snapshot.
`yoq apps` shows the latest release summary for every app, `status --app` shows the latest release metadata for one app, `history --app` lists prior releases, and remote `rollback --app ... --release` re-applies a stored app snapshot.

---

Expand Down Expand Up @@ -344,6 +345,7 @@ for app operations, the important write paths are:

the important read paths are:

- `GET /apps`
- `GET /apps/<name>/status`
- `GET /apps/<name>/history`

Expand Down
2 changes: 2 additions & 0 deletions docs/users-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ this gives the operator one app-first day-2 model:
- `yoq history --app [name]` — app release history
- `yoq rollback --app [name]` — print the last successful local app snapshot
- `yoq rollback --app [name] --server host:port --release <id>` — re-apply a prior remote app release
- `yoq apps` — list app release summaries across all known apps

### dev mode

Expand Down Expand Up @@ -220,6 +221,7 @@ cluster manifest deploys now use `POST /apps/apply` as the canonical write path.

the cluster API also exposes app-scoped day-2 reads and rollback:

- `GET /apps` — latest release summary per app
- `GET /apps/<name>/status` — latest app release metadata
- `GET /apps/<name>/history` — app release history
- `POST /apps/<name>/rollback` with `{"release_id":"..."}` — re-apply a stored app release snapshot
Expand Down
12 changes: 12 additions & 0 deletions src/api/routes/cluster_agents.zig
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,18 @@ test "route rejects app status without cluster" {
}
}

test "route rejects app list without cluster" {
const ctx: RouteContext = .{ .cluster = null, .join_token = null };
const req = testRequest(.GET, "/apps");

const response = route(req, testing.allocator, ctx);
try testing.expect(response != null);
if (response) |resp| {
try testing.expectEqual(http.StatusCode.bad_request, resp.status);
if (resp.allocated) testing.allocator.free(resp.body);
}
}

test "route validates agent ID format" {
const ctx: RouteContext = .{ .cluster = null, .join_token = null };

Expand Down
Loading
Loading