From 02745e78a7d8ea550f7d21a0403d38209a0be694 Mon Sep 17 00:00:00 2001 From: Marty Kulma <18468315+martykulma@users.noreply.github.com> Date: Tue, 19 May 2026 16:37:52 -0400 Subject: [PATCH] Deletes features flags for shipped features - enable_copy_to_expr, - enable_aws_msk_iam_auth, - enable_copy_from_remote, - enable_iceberg_sink, --- .../checks/all_checks/copy_roundtrip_s3.py | 3 +- misc/python/materialize/mzcompose/__init__.py | 4 --- .../materialize/workload_replay/objects.py | 6 ---- src/environmentd/tests/pgwire.rs | 1 - src/sql/src/plan/statement/ddl.rs | 2 -- src/sql/src/plan/statement/ddl/connection.rs | 19 +++++------- src/sql/src/plan/statement/dml.rs | 14 +-------- src/sql/src/pure.rs | 3 -- src/sql/src/session/vars/definitions.rs | 30 ------------------- test/aws-localstack/copy-to-s3/copy-to-s3.td | 1 - test/aws/mzcompose.py | 2 -- test/bounded-memory/mzcompose.py | 5 ---- test/copy/http/setup.td | 1 - test/copy/mzcompose.py | 7 ----- test/copy/nightly/setup.td | 1 - test/copy/s3-auth-checks.td | 1 - test/iceberg/mzcompose.py | 1 - test/iceberg/range-noncanonical.td | 2 -- test/sql-server-cdc/statistics.td | 1 - test/testdrive/connection-create-external.td | 2 -- .../copy-from-parquet-unsorted-map-keys.td | 2 -- test/testdrive/copy-from-s3-minio-parquet.td | 2 -- test/testdrive/copy-from-s3-minio.td | 3 -- 23 files changed, 10 insertions(+), 103 deletions(-) diff --git a/misc/python/materialize/checks/all_checks/copy_roundtrip_s3.py b/misc/python/materialize/checks/all_checks/copy_roundtrip_s3.py index 3d0957b272551..4507aef1b5925 100644 --- a/misc/python/materialize/checks/all_checks/copy_roundtrip_s3.py +++ b/misc/python/materialize/checks/all_checks/copy_roundtrip_s3.py @@ -18,8 +18,9 @@ class CopyRoundtripS3(Check): def initialize(self) -> Testdrive: return Testdrive(dedent(""" - $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} + $[version<2602600] postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} ALTER SYSTEM SET enable_copy_from_remote = true; + > CREATE SECRET minio AS '${arg.aws-secret-access-key}' > CREATE CONNECTION aws_conn1 TO AWS (ENDPOINT '${arg.aws-endpoint}', REGION 'us-east-1', ACCESS KEY ID '${arg.aws-access-key-id}', SECRET ACCESS KEY SECRET minio) > COPY (SELECT 1, 2, 3) TO 's3://copytos3/key1' WITH (AWS CONNECTION = aws_conn1, FORMAT = 'csv'); diff --git a/misc/python/materialize/mzcompose/__init__.py b/misc/python/materialize/mzcompose/__init__.py index 49b4c731dfe26..031b94915b2aa 100644 --- a/misc/python/materialize/mzcompose/__init__.py +++ b/misc/python/materialize/mzcompose/__init__.py @@ -79,13 +79,10 @@ def get_minimal_system_parameters( "enable_compute_correction_v2": "true", "enable_compute_logical_backpressure": "true", "enable_connection_validation_syntax": "true", - "enable_copy_to_expr": "true", - "enable_copy_from_remote": "true", "enable_create_table_from_source": "true", "enable_eager_delta_joins": "true", "enable_envelope_debezium_in_subscribe": "true", "enable_expressions_in_limit_syntax": "true", - "enable_iceberg_sink": "true", "enable_introspection_subscribes": "true", "enable_kafka_sink_partition_by": "true", "enable_lgalloc": "false", @@ -98,7 +95,6 @@ def get_minimal_system_parameters( "enable_refresh_every_mvs": "true", "enable_replacement_materialized_views": "true", "enable_cluster_schedule_refresh": "true", - "enable_sql_server_source": "true", "enable_s3_tables_region_check": "false", "enable_statement_lifecycle_logging": "true", "enable_storage_introspection_logs": "true", diff --git a/misc/python/materialize/workload_replay/objects.py b/misc/python/materialize/workload_replay/objects.py index c2603c763284f..af9109691ae53 100644 --- a/misc/python/materialize/workload_replay/objects.py +++ b/misc/python/materialize/workload_replay/objects.py @@ -206,12 +206,6 @@ def run_create_objects_part_1( iceberg_credentials: tuple[str, str] | None = None if has_iceberg: print("Setting up Polaris for Iceberg sinks") - c.sql( - "ALTER SYSTEM SET enable_iceberg_sink = true", - user="mz_system", - port=6877, - print_statement=verbose, - ) iceberg_credentials = setup_polaris_for_iceberg(c) # Create any additional namespaces referenced by iceberg sinks namespaces: set[str] = set() diff --git a/src/environmentd/tests/pgwire.rs b/src/environmentd/tests/pgwire.rs index 4524a89dd7534..224efac4ea6e5 100644 --- a/src/environmentd/tests/pgwire.rs +++ b/src/environmentd/tests/pgwire.rs @@ -647,7 +647,6 @@ fn pg_test_inner(path: &Path, mz_flags: bool) { .start_blocking(); if mz_flags { server.enable_feature_flags(&[ - "enable_copy_to_expr", "enable_create_table_from_source", "enable_load_generator_datums", "enable_raise_statement", diff --git a/src/sql/src/plan/statement/ddl.rs b/src/sql/src/plan/statement/ddl.rs index 9fc5b1175fe96..497b4fe613491 100644 --- a/src/sql/src/plan/statement/ddl.rs +++ b/src/sql/src/plan/statement/ddl.rs @@ -3651,8 +3651,6 @@ fn iceberg_sink_builder( commit_interval: Option, desc: &RelationDesc, ) -> Result, PlanError> { - scx.require_feature_flag(&vars::ENABLE_ICEBERG_SINK)?; - // Reject types that arrow-rs's parquet writer cannot handle, before // sink creation. Pass the iceberg overrides so types iceberg remaps // (e.g. interval -> string) don't trip the check. diff --git a/src/sql/src/plan/statement/ddl/connection.rs b/src/sql/src/plan/statement/ddl/connection.rs index 81825849f7247..d27d7e74a3101 100644 --- a/src/sql/src/plan/statement/ddl/connection.rs +++ b/src/sql/src/plan/statement/ddl/connection.rs @@ -43,7 +43,7 @@ use crate::names::Aug; use crate::plan::statement::{Connection, ResolvedItemName}; use crate::plan::with_options::{self}; use crate::plan::{ConnectionDetails, PlanError, SshKey, StatementContext}; -use crate::session::vars::{self, ENABLE_AWS_MSK_IAM_AUTH}; +use crate::session::vars; generate_extracted_config!( ConnectionOption, @@ -562,8 +562,6 @@ impl ConnectionOptionExtracted { }) } CreateConnectionType::SqlServer => { - scx.require_feature_flag(&vars::ENABLE_SQL_SERVER_SOURCE)?; - let aws_connection = get_aws_connection_reference(scx, &self)?; if aws_connection.is_some() && self.password.is_some() { sql_bail!( @@ -891,15 +889,12 @@ fn plan_kafka_security( SecurityProtocol::SaslPlaintext | SecurityProtocol::SaslSsl => { outstanding.remove(&ConnectionOptionName::AwsConnection); match get_aws_connection_reference(scx, v)? { - Some(aws) => { - scx.require_feature_flag(&ENABLE_AWS_MSK_IAM_AUTH)?; - Some(KafkaSaslConfig { - mechanism: "OAUTHBEARER".into(), - username: "".into(), - password: None, - aws: Some(aws), - }) - } + Some(aws) => Some(KafkaSaslConfig { + mechanism: "OAUTHBEARER".into(), + username: "".into(), + password: None, + aws: Some(aws), + }), None => { outstanding.remove(&ConnectionOptionName::SaslMechanisms); outstanding.remove(&ConnectionOptionName::SaslUsername); diff --git a/src/sql/src/plan/statement/dml.rs b/src/sql/src/plan/statement/dml.rs index f7aef568319bc..641d1d1e7712e 100644 --- a/src/sql/src/plan/statement/dml.rs +++ b/src/sql/src/plan/statement/dml.rs @@ -66,9 +66,7 @@ use crate::plan::{ QueryContext, ReadThenWritePlan, SelectPlan, SubscribeFrom, SubscribePlan, query, }; use crate::plan::{CopyFromSource, with_options}; -use crate::session::vars::{ - self, DISALLOW_UNMATERIALIZABLE_FUNCTIONS_AS_OF, ENABLE_COPY_FROM_REMOTE, -}; +use crate::session::vars::{self, DISALLOW_UNMATERIALIZABLE_FUNCTIONS_AS_OF}; // TODO(benesch): currently, describing a `SELECT` or `INSERT` query // plans the whole query to determine its shape and parameter types, @@ -1948,8 +1946,6 @@ fn plan_copy_from( let source = match target { CopyTarget::Stdin => CopyFromSource::Stdin, CopyTarget::Expr(from) => { - scx.require_feature_flag(&ENABLE_COPY_FROM_REMOTE)?; - // Converting the expr to an HirScalarExpr let mut from_expr = from.clone(); transform_ast::transform(scx, &mut from_expr)?; @@ -2136,14 +2132,6 @@ pub fn plan_copy( _ => sql_bail!("COPY FROM {} not supported", target), }, (CopyDirection::To, CopyTarget::Expr(to_expr)) => { - // System users are always allowed to use this feature, even when - // the flag is disabled, so that we can dogfood for analytics in - // production environments. The feature is stable enough that we're - // not worried about it crashing. - if !scx.catalog.active_role_id().is_system() { - scx.require_feature_flag(&vars::ENABLE_COPY_TO_EXPR)?; - } - let format = match format { Some(inner) => inner, _ => sql_bail!("COPY TO requires a FORMAT option"), diff --git a/src/sql/src/pure.rs b/src/sql/src/pure.rs index 1a2e1fe424ae3..b4bd515a9da3e 100644 --- a/src/sql/src/pure.rs +++ b/src/sql/src/pure.rs @@ -85,7 +85,6 @@ use crate::plan::statement::ddl::load_generator_ast_to_generator; use crate::plan::{SourceReferences, StatementContext}; use crate::pure::error::{IcebergSinkPurificationError, SqlServerSourcePurificationError}; use crate::pure::mysql::{ensure_binlog_full_metadata, is_binlog_full_metadata}; -use crate::session::vars::ENABLE_SQL_SERVER_SOURCE; use crate::{kafka_util, normalize}; use self::error::{ @@ -978,8 +977,6 @@ async fn purify_create_source( connection, options, } => { - scx.require_feature_flag(&ENABLE_SQL_SERVER_SOURCE)?; - // Connect to the upstream SQL Server instance so we can validate // we're compatible with CDC. let connection_item = scx.get_item_by_resolved_name(connection)?; diff --git a/src/sql/src/session/vars/definitions.rs b/src/sql/src/session/vars/definitions.rs index 878cde6b9edd1..540b061dc2458 100644 --- a/src/sql/src/session/vars/definitions.rs +++ b/src/sql/src/session/vars/definitions.rs @@ -2092,12 +2092,6 @@ feature_flags!( default: false, enable_for_item_parsing: false, }, - { - name: enable_copy_to_expr, - desc: "COPY ... TO 's3://...'", - default: true, - enable_for_item_parsing: false, - }, { name: enable_session_timelines, desc: "strong session serializable isolation levels", @@ -2152,12 +2146,6 @@ feature_flags!( default: false, enable_for_item_parsing: false, }, - { - name: enable_aws_msk_iam_auth, - desc: "Enable AWS MSK IAM authentication for Kafka connections", - default: true, - enable_for_item_parsing: true, - }, { name: enable_network_policies, desc: "ENABLE NETWORK POLICIES", @@ -2170,24 +2158,12 @@ feature_flags!( default: true, enable_for_item_parsing: true, }, - { - name: enable_copy_from_remote, - desc: "Whether to allow COPY FROM .", - default: true, - enable_for_item_parsing: false, - }, { name: enable_join_prioritize_arranged, desc: "Whether join planning should prioritize already-arranged keys over keys with more fields.", default: false, enable_for_item_parsing: false, }, - { - name: enable_sql_server_source, - desc: "Creating a SQL SERVER source", - default: true, - enable_for_item_parsing: false, - }, { name: enable_projection_pushdown_after_relation_cse, desc: "Run ProjectionPushdown one more time after the last RelationCSE.", @@ -2224,12 +2200,6 @@ feature_flags!( default: false, enable_for_item_parsing: true, }, - { - name: enable_iceberg_sink, - desc: "Whether to enable the Iceberg sink.", - default: true, - enable_for_item_parsing: true, - }, { name: enable_frontend_peek_sequencing, // currently, changes only take effect for new sessions desc: "Enables the new peek sequencing code, which does most of its work in the Adapter Frontend instead of the Coordinator main task.", diff --git a/test/aws-localstack/copy-to-s3/copy-to-s3.td b/test/aws-localstack/copy-to-s3/copy-to-s3.td index 5f7fae63d7201..70de5741283cf 100644 --- a/test/aws-localstack/copy-to-s3/copy-to-s3.td +++ b/test/aws-localstack/copy-to-s3/copy-to-s3.td @@ -10,7 +10,6 @@ # Tests for COPY TO expr. $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} -ALTER SYSTEM SET enable_copy_to_expr = true; # Prepare table data > CREATE TABLE t (a int); diff --git a/test/aws/mzcompose.py b/test/aws/mzcompose.py index c6dfe2a057c7b..41b30d10c840c 100644 --- a/test/aws/mzcompose.py +++ b/test/aws/mzcompose.py @@ -94,7 +94,6 @@ def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None: f"--aws-external-id-prefix={AWS_EXTERNAL_ID_PREFIX}", ], environment_id=AWS_ENVIRONMENT_ID, - system_parameter_defaults={"enable_iceberg_sink": "true"}, ) with c.override(materialized): # (Re)start Materialize and enable AWS connections. @@ -105,7 +104,6 @@ def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None: user="mz_system", sql=""" ALTER SYSTEM SET enable_connection_validation_syntax = true; - ALTER SYSTEM SET enable_iceberg_sink = true; ALTER SYSTEM SET enable_s3_tables_region_check = true; """, ) diff --git a/test/bounded-memory/mzcompose.py b/test/bounded-memory/mzcompose.py index 2bcfd774160b5..9e465586b9825 100644 --- a/test/bounded-memory/mzcompose.py +++ b/test/bounded-memory/mzcompose.py @@ -1495,11 +1495,6 @@ def run_scenario( if scenario.needs_iceberg: username, key = setup_polaris_for_iceberg(c) - c.sql( - "ALTER SYSTEM SET enable_iceberg_sink = true;", - port=6877, - user="mz_system", - ) extra_testdrive_args = [ f"--var=s3-access-key={key}", f"--var=s3-access-user={username}", diff --git a/test/copy/http/setup.td b/test/copy/http/setup.td index 76556ddebcbfe..016a2792d1444 100644 --- a/test/copy/http/setup.td +++ b/test/copy/http/setup.td @@ -10,7 +10,6 @@ $ set-max-tries max-tries=1 $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} -ALTER SYSTEM SET enable_copy_to_expr = true; ALTER SYSTEM SET max_sources = 50; ALTER SYSTEM SET max_result_size = '100 GB'; diff --git a/test/copy/mzcompose.py b/test/copy/mzcompose.py index 914f1ad585a8f..44b9c3c8d7b37 100644 --- a/test/copy/mzcompose.py +++ b/test/copy/mzcompose.py @@ -372,7 +372,6 @@ def workflow_test_column_dedup(c: Composition): c.testdrive(dedent(""" $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} - ALTER SYSTEM SET enable_copy_to_expr = true; > CREATE SECRET aws_secret AS '${arg.aws-secret-access-key}' > CREATE CONNECTION aws_conn @@ -449,12 +448,6 @@ def workflow_test_github_9627(c: Composition): def workflow_copy_from_ssrf_redirect(c: Composition) -> None: """Regression: COPY FROM must not follow redirects to private IPs.""" c.up("materialized", "redirect-server") - - c.sql( - "ALTER SYSTEM SET enable_copy_from_remote = true;", - port=6877, - user="mz_system", - ) c.sql("CREATE TABLE ssrf_target (a text)") copy_succeeded = True diff --git a/test/copy/nightly/setup.td b/test/copy/nightly/setup.td index 76556ddebcbfe..016a2792d1444 100644 --- a/test/copy/nightly/setup.td +++ b/test/copy/nightly/setup.td @@ -10,7 +10,6 @@ $ set-max-tries max-tries=1 $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} -ALTER SYSTEM SET enable_copy_to_expr = true; ALTER SYSTEM SET max_sources = 50; ALTER SYSTEM SET max_result_size = '100 GB'; diff --git a/test/copy/s3-auth-checks.td b/test/copy/s3-auth-checks.td index bb418443ded22..1fa9aa3519c6b 100644 --- a/test/copy/s3-auth-checks.td +++ b/test/copy/s3-auth-checks.td @@ -13,7 +13,6 @@ $ set-max-tries max-tries=1 $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} -ALTER SYSTEM SET enable_copy_to_expr = true; # There are 3 users with different permissions policies to validate: # User 'readwritedelete': PutObject, ListBucket, DeleteObject diff --git a/test/iceberg/mzcompose.py b/test/iceberg/mzcompose.py index b631866a472ad..25af8e57e643b 100644 --- a/test/iceberg/mzcompose.py +++ b/test/iceberg/mzcompose.py @@ -34,7 +34,6 @@ Materialized( depends_on=["minio"], sanity_restart=False, - system_parameter_defaults={"enable_iceberg_sink": "true"}, additional_system_parameter_defaults={ "log_filter": "mz_storage::sink::iceberg=debug", }, diff --git a/test/iceberg/range-noncanonical.td b/test/iceberg/range-noncanonical.td index da47d369f07ea..a4021f3e10dbd 100644 --- a/test/iceberg/range-noncanonical.td +++ b/test/iceberg/range-noncanonical.td @@ -24,8 +24,6 @@ ); $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} -ALTER SYSTEM SET enable_copy_from_remote = true; - # Author the Parquet file directly in minio with DuckDB, so the bytes are not # something MZ's own sink produced. The struct shape mirrors MZ's range # encoding (lower/upper/lower_inclusive/upper_inclusive/empty). diff --git a/test/sql-server-cdc/statistics.td b/test/sql-server-cdc/statistics.td index d7487ffb942ca..820cd53ab7f95 100644 --- a/test/sql-server-cdc/statistics.td +++ b/test/sql-server-cdc/statistics.td @@ -25,7 +25,6 @@ INSERT INTO t1 VALUES ('one'); $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} -ALTER SYSTEM SET enable_sql_server_source = true; ALTER SYSTEM SET storage_statistics_collection_interval = 1000; ALTER SYSTEM SET storage_statistics_interval = 2000; diff --git a/test/testdrive/connection-create-external.td b/test/testdrive/connection-create-external.td index f10f45e115e94..29e3f1d39efac 100644 --- a/test/testdrive/connection-create-external.td +++ b/test/testdrive/connection-create-external.td @@ -71,8 +71,6 @@ $ kafka-ingest format=avro topic=csr_test key-format=avro key-schema=${keyschema contains:Address resolved to a private IP $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} -ALTER SYSTEM SET enable_copy_from_remote = true - > CREATE TABLE copy_ssrf_target (a text, b text) # COPY FROM rejects non-http(s) schemes outright. diff --git a/test/testdrive/copy-from-parquet-unsorted-map-keys.td b/test/testdrive/copy-from-parquet-unsorted-map-keys.td index e3a846cb47217..eaf775be86a51 100644 --- a/test/testdrive/copy-from-parquet-unsorted-map-keys.td +++ b/test/testdrive/copy-from-parquet-unsorted-map-keys.td @@ -22,8 +22,6 @@ $ set-max-tries max-tries=1 $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} -ALTER SYSTEM SET enable_copy_from_remote = true; - > CREATE SECRET aws_secret AS '${arg.aws-secret-access-key}' > CREATE CONNECTION aws_conn diff --git a/test/testdrive/copy-from-s3-minio-parquet.td b/test/testdrive/copy-from-s3-minio-parquet.td index b3e1c127edb68..5c921fab1149d 100644 --- a/test/testdrive/copy-from-s3-minio-parquet.td +++ b/test/testdrive/copy-from-s3-minio-parquet.td @@ -13,8 +13,6 @@ $ set-max-tries max-tries=1 $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} -ALTER SYSTEM SET enable_copy_from_remote = true; - > CREATE SECRET aws_secret AS '${arg.aws-secret-access-key}' > CREATE CONNECTION aws_conn diff --git a/test/testdrive/copy-from-s3-minio.td b/test/testdrive/copy-from-s3-minio.td index 9e59ee5b43fa4..21034d216712c 100644 --- a/test/testdrive/copy-from-s3-minio.td +++ b/test/testdrive/copy-from-s3-minio.td @@ -13,9 +13,6 @@ $ set-max-tries max-tries=1 $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} -ALTER SYSTEM SET enable_copy_from_remote = true; - - # Prepare the table we want to COPY INTO. > CREATE TABLE t1 (a text, b text); > CREATE TABLE t1_num (a text, b numeric);