Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 0 additions & 4 deletions misc/python/materialize/mzcompose/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
6 changes: 0 additions & 6 deletions misc/python/materialize/workload_replay/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion src/environmentd/tests/pgwire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions src/sql/src/plan/statement/ddl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3651,8 +3651,6 @@ fn iceberg_sink_builder(
commit_interval: Option<Duration>,
desc: &RelationDesc,
) -> Result<StorageSinkConnection<ReferencedConnection>, 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.
Expand Down
19 changes: 7 additions & 12 deletions src/sql/src/plan/statement/ddl/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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!(
Expand Down Expand Up @@ -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);
Expand Down
14 changes: 1 addition & 13 deletions src/sql/src/plan/statement/dml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)?;
Expand Down Expand Up @@ -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 <expr> requires a FORMAT option"),
Expand Down
3 changes: 0 additions & 3 deletions src/sql/src/pure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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)?;
Expand Down
30 changes: 0 additions & 30 deletions src/sql/src/session/vars/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -2170,24 +2158,12 @@ feature_flags!(
default: true,
enable_for_item_parsing: true,
},
{
name: enable_copy_from_remote,
desc: "Whether to allow COPY FROM <url>.",
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.",
Expand Down Expand Up @@ -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.",
Expand Down
1 change: 0 additions & 1 deletion test/aws-localstack/copy-to-s3/copy-to-s3.td
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions test/aws/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
""",
)
Expand Down
5 changes: 0 additions & 5 deletions test/bounded-memory/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down
1 change: 0 additions & 1 deletion test/copy/http/setup.td
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
7 changes: 0 additions & 7 deletions test/copy/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion test/copy/nightly/setup.td
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
1 change: 0 additions & 1 deletion test/copy/s3-auth-checks.td
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion test/iceberg/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down
2 changes: 0 additions & 2 deletions test/iceberg/range-noncanonical.td
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
1 change: 0 additions & 1 deletion test/sql-server-cdc/statistics.td
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 0 additions & 2 deletions test/testdrive/connection-create-external.td
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions test/testdrive/copy-from-parquet-unsorted-map-keys.td
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions test/testdrive/copy-from-s3-minio-parquet.td
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions test/testdrive/copy-from-s3-minio.td
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading