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
805 changes: 452 additions & 353 deletions crates/outer/migrations/0001_init.sql

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions crates/outer/migrations/0002_invite_code.sql

This file was deleted.

18 changes: 0 additions & 18 deletions crates/outer/migrations/0003_slug_rename_redirect.sql

This file was deleted.

8 changes: 0 additions & 8 deletions crates/outer/migrations/0004_error_triage.sql

This file was deleted.

17 changes: 0 additions & 17 deletions crates/outer/migrations/0005_account_action.sql

This file was deleted.

10 changes: 0 additions & 10 deletions crates/outer/migrations/0006_look_quota.sql

This file was deleted.

12 changes: 0 additions & 12 deletions crates/outer/migrations/0007_app_export.sql

This file was deleted.

20 changes: 0 additions & 20 deletions crates/outer/migrations/0008_alerts.sql

This file was deleted.

11 changes: 0 additions & 11 deletions crates/outer/migrations/0009_always_on.sql

This file was deleted.

15 changes: 0 additions & 15 deletions crates/outer/migrations/0010_d1_backups.sql

This file was deleted.

16 changes: 0 additions & 16 deletions crates/outer/migrations/0011_preview_deploys.sql

This file was deleted.

7 changes: 0 additions & 7 deletions crates/outer/migrations/0012_downgrade_retention.sql

This file was deleted.

17 changes: 0 additions & 17 deletions crates/outer/migrations/0013_drop_slug_quarantine.sql

This file was deleted.

22 changes: 0 additions & 22 deletions crates/outer/migrations/0015_tool_telemetry.sql

This file was deleted.

12 changes: 0 additions & 12 deletions crates/outer/migrations/0016_plan_limits.sql

This file was deleted.

5 changes: 0 additions & 5 deletions crates/outer/migrations/0017_inactive_apps.sql

This file was deleted.

6 changes: 0 additions & 6 deletions crates/outer/migrations/0019_after_live_crawl.sql

This file was deleted.

15 changes: 0 additions & 15 deletions crates/outer/migrations/0020_mcp_drafts.sql

This file was deleted.

7 changes: 0 additions & 7 deletions crates/outer/migrations/0021_app_access_gate.sql

This file was deleted.

67 changes: 13 additions & 54 deletions crates/outer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,33 +427,8 @@ impl Config {
pub fn from_vars(vars: &BTreeMap<String, String>) -> Result<Config, Vec<String>> {
let get = |name: &str| vars.get(name).map(|v| v.trim()).filter(|v| !v.is_empty());
let mut problems = Vec::new();
// Cello 0.1.0 renamed every `CELLD_*` variable to `CELLO_*` (and
// `OUTER_CELLD_BIN` to `OUTER_CELLO_BIN`), with no aliases: cello
// refuses to start with any `CELLD_*` set, and Outer no longer
// emits any. A carried-over setting is dead config at best, so fail
// here, in both `serve` and `check-config` (the release preflight
// runs the latter against prod's env file): the release aborts
// before prod is touched, naming the exact rename.
{
let mut renamed: Vec<(&String, String)> = vars
.keys()
.filter_map(|name| {
if let Some(suffix) = name.strip_prefix("CELLD_") {
Some((name, format!("CELLO_{suffix}")))
} else if name == "OUTER_CELLD_BIN" {
Some((name, "OUTER_CELLO_BIN".to_string()))
} else {
None
}
})
.collect();
renamed.sort();
for (old, new) in renamed {
problems.push(format!(
"{old} was renamed to {new}: set {new} instead of {old} (stale pre-Cello names fail closed)"
));
}
}
// No rename shims: production restarts from a wiped database and a
// fresh `outer.env`, so there are no carried-over names to catch.

let domain = get("OUTER_DOMAIN")
.unwrap_or(DEFAULT_DOMAIN)
Expand Down Expand Up @@ -1647,37 +1622,21 @@ mod tests {
}

#[test]
fn stale_celld_env_refuses_with_the_cello_spelling() {
let err = Config::from_vars(&vars(&[
fn stale_celld_names_are_ignored_after_the_wipe() {
// No rename shims: a carried-over `CELLD_*` or `OUTER_CELLD_BIN`
// is dead config, not a refusal. (The runtime still refuses to
// start a fleet with `CELLD_*` set; that reservation lives in
// `fleet::sandbox`, not here.)
// Compare against the same config without the stale names: an
// installed /usr/local/bin/cello resolves either way.
let base = Config::from_vars(&vars(&[("OUTER_STORE", "memory")])).unwrap();
let cfg = Config::from_vars(&vars(&[
("OUTER_STORE", "memory"),
("CELLD_OPERATOR_TOKEN", "stale"),
("CELLD_DURABILITY", "bucket"),
]))
.unwrap_err();
assert!(
err.iter()
.any(|p| p.contains("CELLD_OPERATOR_TOKEN was renamed to CELLO_OPERATOR_TOKEN")),
"missing operator-token rename: {err:?}"
);
assert!(
err.iter()
.any(|p| p.contains("CELLD_DURABILITY was renamed to CELLO_DURABILITY")),
"missing durability rename: {err:?}"
);
}

#[test]
fn stale_outer_celld_bin_refuses_with_the_cello_spelling() {
let err = Config::from_vars(&vars(&[
("OUTER_STORE", "memory"),
("OUTER_CELLD_BIN", "celld"),
]))
.unwrap_err();
assert!(
err.iter()
.any(|p| p.contains("OUTER_CELLD_BIN was renamed to OUTER_CELLO_BIN")),
"missing bin rename: {err:?}"
);
.unwrap();
assert_eq!(cfg.runtime.cello_bin, base.runtime.cello_bin);
}

#[test]
Expand Down
3 changes: 1 addition & 2 deletions crates/outer/src/deploy/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
//! are contained under their base, so a hostile config cannot make Outer
//! read or write outside the deploy root.
//!
//! Cross-app reachability (verified against `d1 --help` under celld 0.6.2;
//! the flags are unchanged in Cello 0.1.0, see
//! Cross-app reachability (verified against `d1 --help` under Cello 0.1.0, see
//! https://celld.dev/docs/services/d1): `cello d1 migrations apply` finds a
//! node through the *bucket's* node leases and signs each request with the
//! fleet's shared secret read from the bucket. Outer passes
Expand Down
Loading
Loading