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
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

Newest first. Each release also has fuller notes in `docs/vX.Y.Z.md`.

## 0.13.1

Device agent relay fixes ([notes](docs/v0.13.1.md)). No migrations; a binary swap either way.

- A pending request is sent again (same id, the time it has left) on every stream the phone
opens, so a stream that dies mid-call no longer leaves the agent waiting out the 200 s
deadline; the call fails after 15 s offline as before
([re-delivery](docs/api.md#get-v1melinksidframes--sse-mailbox)).
- At most 8 calls in flight per link; one more answers at once, `isError: true`, "Copper on
<device> is busy with other calls; try again shortly." (status `busy`).
- Each relayed call waits in its own task: it ends at its deadline whether or not the agent reads
its SSE answer; a slow reader loses progress notifications beyond 32 (never the response) and
never holds up a frames POST or other calls.
- Disabling or deleting a user closes their phones' streams with `revoked`, fails their calls in
flight (status `user_revoked`) and drops their rate limits: at once from the admin API, within
10 s from `copper-cloud admin disable-user` / `delete-user`.

## 0.13.0

Agents can use a person's Copper for iOS through the cloud ([notes](docs/v0.13.0.md)). One new
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
]

[workspace.package]
version = "0.13.0"
version = "0.13.1"
edition = "2021"
license = "MIT"
repository = "https://github.com/copper-browser/copper-cloud"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ curl -fsSL https://raw.githubusercontent.com/copper-browser/copper-cloud/main/in
or from a release tarball:

```sh
tar xzf copper-cloud-0.13.0-linux-x86_64.tar.gz && sudo ./install.sh
tar xzf copper-cloud-0.13.1-linux-x86_64.tar.gz && sudo ./install.sh
```

The installer sets up Postgres (unless you pass `DATABASE_URL`), a `copper-cloud` system user,
Expand Down Expand Up @@ -150,7 +150,7 @@ All commands take `--config PATH` (default `/etc/copper-cloud/copper-cloud.toml`
- [Operations](docs/operations.md) — doctor, logs, metrics, backups, upgrades
- [Onboarding a team](docs/onboarding.md) — single sign-on first, link codes, people, keeping links valid
- [Single sign-on + agent integrations](docs/sso.md) — Google / OIDC setup, `/start`, agent pairing
- [v0.13.0 release notes](docs/v0.13.0.md) · [v0.12.0](docs/v0.12.0.md) · [v0.11.1](docs/v0.11.1.md) · [v0.11.0](docs/v0.11.0.md) · [v0.10.0](docs/v0.10.0.md) · [v0.9.0](docs/v0.9.0.md) · [v0.8.1](docs/v0.8.1.md) · [v0.8.0](docs/v0.8.0.md) · [v0.7.0](docs/v0.7.0.md) · [v0.6.0](docs/v0.6.0.md) · [v0.5.0](docs/v0.5.0.md) · [v0.4.0](docs/v0.4.0.md) · [v0.3.0](docs/v0.3.0.md)
- [v0.13.1 release notes](docs/v0.13.1.md) · [v0.13.0](docs/v0.13.0.md) · [v0.12.0](docs/v0.12.0.md) · [v0.11.1](docs/v0.11.1.md) · [v0.11.0](docs/v0.11.0.md) · [v0.10.0](docs/v0.10.0.md) · [v0.9.0](docs/v0.9.0.md) · [v0.8.1](docs/v0.8.1.md) · [v0.8.0](docs/v0.8.0.md) · [v0.7.0](docs/v0.7.0.md) · [v0.6.0](docs/v0.6.0.md) · [v0.5.0](docs/v0.5.0.md) · [v0.4.0](docs/v0.4.0.md) · [v0.3.0](docs/v0.3.0.md)

## Development

Expand Down
3 changes: 3 additions & 0 deletions crates/copper-cloud/src/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ async fn dispatch(cfg: &Config, pool: &sqlx::PgPool, cmd: AdminCommand) -> anyho
if !yes && !confirm(&format!("Delete {email} and ALL their synced data? [y/N] "))? {
bail!("aborted");
}
// Their agent tokens stop working at once; a running server closes their phones'
// agent streams within its device-agent user sweep (10 s).
sqlx::query("DELETE FROM users WHERE id = $1")
.bind(id)
.execute(pool)
Expand All @@ -125,6 +127,7 @@ async fn dispatch(cfg: &Config, pool: &sqlx::PgPool, cmd: AdminCommand) -> anyho
}
AdminCommand::DisableUser { email } => {
let id = find_user(pool, &email).await?;
// As for delete-user: tokens refused at once, streams closed by the user sweep.
let mut tx = pool.begin().await?;
sqlx::query("UPDATE users SET disabled = true, updated_at = now() WHERE id = $1")
.bind(id)
Expand Down
6 changes: 6 additions & 0 deletions crates/copper-cloud/src/admin_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,10 @@ async fn update_user(
// sockets there); queued in this transaction so it survives Canvas Cloud being down.
provision::enqueue_user_changed(&mut tx, id, req.disabled == Some(true)).await?;
tx.commit().await?;
if req.disabled == Some(true) {
// Their phones' agent streams close and calls in flight fail now.
copper_cloud_core::device_agent::revoke_user(&state, id);
}
link.kick_outbox();
let mut row = user_by_id(&state.db, id).await?;
with_canvas_counts(&link, std::slice::from_mut(&mut row)).await;
Expand Down Expand Up @@ -1051,6 +1055,8 @@ async fn delete_user(
.await?;
provision::enqueue_user_deleted(&mut tx, id).await?;
tx.commit().await?;
// Their links and agent tokens went with the user row; close the streams and calls too.
copper_cloud_core::device_agent::revoke_user(&state, id);
link.kick_outbox();
Ok(ok())
}
Expand Down
Loading
Loading