diff --git a/src/common/meta/src/key/flow.rs b/src/common/meta/src/key/flow.rs index e19e2bec886..a3d91b89cc6 100644 --- a/src/common/meta/src/key/flow.rs +++ b/src/common/meta/src/key/flow.rs @@ -898,9 +898,10 @@ mod tests { assert_eq!(names.len(), 1); assert_eq!(names[0].0, "legacy_flow"); - // Dropping a legacy flow only needs the metadata; no runtime is involved. + // Deleting this metadata needs no runtime, so it works for a legacy flow. Passing the + // value read back above also checks that it is enough to delete the flow's metadata. flow_metadata_manager - .destroy_flow_metadata(flow_id, &flow_value) + .destroy_flow_metadata(flow_id, &listed) .await .unwrap(); assert!(mem_kv.is_empty()); diff --git a/src/flow/AGENTS.md b/src/flow/AGENTS.md index 07e576f03b0..c984919a859 100644 --- a/src/flow/AGENTS.md +++ b/src/flow/AGENTS.md @@ -86,5 +86,8 @@ plan-to-schema helper shared with batching. change; it is a reserved internal key and must stay out of `SHOW CREATE FLOW` rendering. Writing it is a deliberate keep, not an oversight: dropping it would change the persisted metadata and the `options` column users can query, for no - runtime benefit. Reading it must keep accepting `streaming` so legacy metadata - stays listable and droppable (`get_flow_type_from_options`). + runtime benefit. Options that already say `streaming` must stay readable: that + is what keeps such legacy metadata listable and droppable, and a test in + `common-meta`'s `key/flow.rs` covers it. Independently, + `get_flow_type_from_options` must keep recognizing `streaming` so the persisted + options and in-flight data of an old create procedure still deserialize. diff --git a/src/flow/src/adapter/tests.rs b/src/flow/src/adapter/tests.rs index e3b0a4fc3c0..2bc6ba7ee2e 100644 --- a/src/flow/src/adapter/tests.rs +++ b/src/flow/src/adapter/tests.rs @@ -130,8 +130,9 @@ fn output_column_schemas_normalizes_dictionary_output_type() { fn flow_config_ignores_the_removed_num_workers_option() { // `flow.num_workers` belonged to the removed flow workers. Deployments still // carry it in their TOML, so parsing must keep ignoring it instead of failing - // the whole config. `FlowConfig` is `#[serde(default)]`, so the unknown key is - // skipped and the remaining fields come from the defaults. + // the whole config. The unknown key is ignored because `FlowConfig` does not + // set `deny_unknown_fields`; `#[serde(default)]` separately makes the fields + // absent from this TOML (such as `batching_mode`) come from the defaults. let config: super::FlowConfig = toml::from_str("num_workers = 4").unwrap(); assert_eq!(config, super::FlowConfig::default()); } diff --git a/src/flow/src/batching_mode/task.rs b/src/flow/src/batching_mode/task.rs index fecb20b5eb4..a12696c3e7e 100644 --- a/src/flow/src/batching_mode/task.rs +++ b/src/flow/src/batching_mode/task.rs @@ -2016,8 +2016,9 @@ impl BatchingTask { /// Generate the create table SQL /// - /// the auto created table will automatically added a `update_at` Milliseconds DEFAULT now() column in the end, - /// matching the layout sink tables created by earlier versions already have + /// the auto created table gets an extra `update_at` millisecond timestamp column appended at the + /// end. It is nullable and has no default value, matching the layout of sink tables created by + /// earlier versions /// /// and it will use first timestamp column as time index, all other columns will be added as normal columns and nullable async fn gen_create_table_expr(