Skip to content

Commit 40d9cc8

Browse files
authored
Merge pull request #33375 from def-/pr-nightly34
tests: Nightly fixes (2025-08-20)
2 parents 2442dbe + aac98cb commit 40d9cc8

File tree

10 files changed

+52
-40
lines changed

10 files changed

+52
-40
lines changed

ci/test/pipeline.template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ steps:
384384
depends_on: build-x86_64
385385
timeout_in_minutes: 30
386386
inputs: [test/sql-server-cdc]
387-
parallelism: 3
387+
parallelism: 4
388388
plugins:
389389
- ./ci/plugins/mzcompose:
390390
composition: sql-server-cdc

misc/python/materialize/cli/mzcompose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
from materialize.mzcompose.composition import (
4343
Composition,
4444
UnknownCompositionError,
45-
filter_cmd,
4645
)
4746
from materialize.mzcompose.test_result import TestResult
4847
from materialize.ui import UIError
48+
from materialize.util import filter_cmd
4949

5050
RECOMMENDED_MIN_MEM = 7 * 1024**3 # 7GiB
5151
RECOMMENDED_MIN_CPUS = 2

misc/python/materialize/cloudtest/k8s/testdrive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
from materialize.mzcompose import (
2121
cluster_replica_size_map,
2222
)
23-
from materialize.mzcompose.composition import filter_cmd
2423
from materialize.mzcompose.test_result import (
2524
extract_error_chunks_from_output,
2625
)
2726
from materialize.ui import CommandFailureCausedUIError
27+
from materialize.util import filter_cmd
2828

2929

3030
class TestdriveBase:

misc/python/materialize/cloudtest/util/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from time import sleep
1515
from typing import Any, cast
1616

17-
from materialize.mzcompose.composition import filter_cmd
17+
from materialize.util import filter_cmd
1818

1919
LOGGER = logging.getLogger(__name__)
2020

misc/python/materialize/mzcompose/composition.py

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -63,32 +63,7 @@
6363
CommandFailureCausedUIError,
6464
UIError,
6565
)
66-
67-
FILTERED_ARGS = [
68-
# Secrets
69-
"mzp_",
70-
"-----BEGIN PRIVATE KEY-----",
71-
"-----BEGIN CERTIFICATE-----",
72-
"confluent-api-key=",
73-
"confluent-api-secret=",
74-
"aws-access-key-id=",
75-
"aws-secret-access-key=",
76-
# Not a secret, but too spammy, filter too
77-
"CLUSTER_REPLICA_SIZES",
78-
"cluster-replica-sizes=",
79-
]
80-
81-
82-
def filter_cmd(args: list[str]) -> list[str]:
83-
"""Don't print out secrets in test logs"""
84-
return [
85-
(
86-
"[REDACTED]"
87-
if any(filtered_arg in arg for filtered_arg in FILTERED_ARGS)
88-
else arg
89-
)
90-
for arg in args
91-
]
66+
from materialize.util import filter_cmd
9267

9368

9469
class Service:

misc/python/materialize/mzcompose/test_result.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
from materialize import MZ_ROOT
1616
from materialize.ui import CommandFailureCausedUIError, UIError
17+
from materialize.util import filter_cmd
1718

1819
PEM_CONTENT_RE = r"-----BEGIN ([A-Z ]+)-----[^-]+-----END [A-Z ]+-----"
1920
PEM_CONTENT_REPLACEMENT = r"<\1>"
@@ -155,5 +156,5 @@ def extract_error_chunks_from_output(output: str) -> list[str]:
155156

156157

157158
def to_sanitized_command_str(cmd: list[str]) -> str:
158-
command_str = " ".join([str(x) for x in cmd])
159+
command_str = " ".join([str(x) for x in filter_cmd(cmd)])
159160
return re.sub(PEM_CONTENT_RE, PEM_CONTENT_REPLACEMENT, command_str)

misc/python/materialize/util.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,30 @@ def parse_pg_conn_string(conn_string: str) -> PgConnInfo:
198198
database=url.path.lstrip("/"),
199199
ssl=query_params.get("sslmode", ["disable"])[-1] != "disable",
200200
)
201+
202+
203+
FILTERED_ARGS = [
204+
# Secrets
205+
"mzp_",
206+
"-----BEGIN PRIVATE KEY-----",
207+
"-----BEGIN CERTIFICATE-----",
208+
"confluent-api-key=",
209+
"confluent-api-secret=",
210+
"aws-access-key-id=",
211+
"aws-secret-access-key=",
212+
# Not a secret, but too spammy, filter too
213+
"CLUSTER_REPLICA_SIZES",
214+
"cluster-replica-sizes=",
215+
]
216+
217+
218+
def filter_cmd(args: list[str]) -> list[str]:
219+
"""Don't print out secrets in test logs"""
220+
return [
221+
(
222+
"[REDACTED]"
223+
if any(filtered_arg in arg for filtered_arg in FILTERED_ARGS)
224+
else arg
225+
)
226+
for arg in args
227+
]

src/sql/src/func.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,10 +1671,10 @@ pub struct TableFuncPlan {
16711671
/// 2. or a general HIR expression. This happens when it's implemented as SQL, i.e., by a call to
16721672
/// `sql_impl_table_func_inner`.
16731673
///
1674-
/// TODO(ggevay): when a table function in 2. is used with WITH ORDINALITY or ROWS FROM, we fall
1675-
/// back to the legacy WITH ORDINALITY implementation, which relies on the row_number window
1676-
/// function, and is mostly broken. It can give an incorrect ordering, and also has an extreme
1677-
/// performance problem in some cases, see
1674+
/// TODO(ggevay, database-issues#9598): when a table function in 2. is used with WITH ORDINALITY or
1675+
/// ROWS FROM, we fall back to the legacy WITH ORDINALITY implementation, which relies on the
1676+
/// row_number window function, and is mostly broken. It can give an incorrect ordering, and also
1677+
/// has an extreme performance problem in some cases. Discussed in
16781678
/// <https://github.com/MaterializeInc/database-issues/issues/4764#issuecomment-2854572614>
16791679
///
16801680
/// These table functions are somewhat exotic, and WITH ORDINALITY / ROWS FROM are also somewhat

src/testdrive/src/action/sql.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,12 @@ pub async fn run_sql(mut cmd: SqlCommand, state: &mut State) -> Result<ControlFl
117117
state.error_line_count = 0;
118118
state.error_string = error_string;
119119
state.error_line_count = state.error_string.lines().count() + 1;
120-
// Contains a newline already, so don't print an additional one
121-
print!("{}", state.error_string);
120+
if state.error_string.ends_with('\n') {
121+
print!("{}", state.error_string);
122+
} else {
123+
println!("{}", state.error_string);
124+
state.error_line_count += 1;
125+
}
122126
println!(
123127
"rows didn't match; sleeping to see if dataflow catches up 🕑 {:.0?}",
124128
retry_state.next_backoff.unwrap_or_default()
@@ -454,7 +458,12 @@ pub async fn run_fail_sql(
454458
state.error_line_count = 0;
455459
state.error_string = error_string;
456460
state.error_line_count = state.error_string.lines().count() + 1;
457-
println!("{}", state.error_string);
461+
if state.error_string.ends_with('\n') {
462+
print!("{}", state.error_string);
463+
} else {
464+
println!("{}", state.error_string);
465+
state.error_line_count += 1;
466+
}
458467
println!("query error didn't match; sleeping to see if dataflow produces error shortly 🕑 {:.0?}", retry_state.next_backoff.unwrap_or_default());
459468
}
460469
}

test/sqllogictest/regex.slt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ ORDER BY 1
493493
{hello,world}
494494
{hello,world}
495495

496-
# TODO: Correct ordering when database-issues#4764 is fixed.
496+
# TODO: Correct ordering when database-issues#9598 is fixed.
497497
query T
498498
SELECT foo FROM regexp_split_to_table('the quick brown fox jumps over the lazy dog', '\s+') AS foo ORDER BY 1
499499
----
@@ -507,7 +507,7 @@ quick
507507
the
508508
the
509509

510-
# TODO: Correct ordering when database-issues#4764 is fixed.
510+
# TODO: Correct ordering when database-issues#9598 is fixed.
511511
query T
512512
SELECT foo FROM regexp_split_to_table('the quick brown fox', '\s*') AS foo ORDER BY 1
513513
----

0 commit comments

Comments
 (0)