Skip to content

Commit 6771f68

Browse files
author
Vadim Averin
authored
Merge branch 'main' into dyntables-timestamp-fix
2 parents a63cc00 + 05549e1 commit 6771f68

File tree

11,236 files changed

+744880
-1279244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

11,236 files changed

+744880
-1279244
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
/ydb/library/yql/providers/s3 @ydb-platform/fq
1313
/ydb/library/yql/providers/solomon @ydb-platform/fq
1414

15-
/ydb/services/fq/ @ydb-platform/fq
15+
/ydb/library/yql/yt @Krock21 @Krisha11 @zlobober @gritukan
1616

17+
/ydb/services/fq/ @ydb-platform/fq

.github/actions/build_and_test_ya/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ inputs:
3030
default: "small,medium,large"
3131
test_type:
3232
type: string
33-
default: "unittest,py3test,py2test,pytest"
33+
default: ""
34+
description: "run only specific test types (or all by default)"
3435
increment:
3536
type: boolean
3637
required: true
@@ -111,6 +112,7 @@ runs:
111112
build_target: ${{ steps.test_run_choice.outputs.target }}
112113
build_preset: ${{ inputs.build_preset }}
113114
test_size: ${{ inputs.test_size }}
115+
test_type: ${{ inputs.test_type }}
114116
testman_token: ${{ fromJSON( inputs.secs ).TESTMO_TOKEN }}
115117
testman_url: ${{ fromJSON( inputs.vars ).TESTMO_URL }}
116118
testman_project_id: ${{ fromJSON( inputs.vars ).TESTMO_PROJECT_ID }}

.github/actions/build_ya/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ runs:
3737
env:
3838
build_preset: ${{ inputs.build_preset }}
3939
run: |
40-
echo "SHELLOPTS=xtrace" >> $GITHUB_ENV
4140
export TMP_DIR=$(pwd)/tmp_build
4241
echo "TMP_DIR=$TMP_DIR" >> $GITHUB_ENV
4342
@@ -54,6 +53,7 @@ runs:
5453
id: build
5554
shell: bash
5655
run: |
56+
set -x
5757
extra_params=()
5858
5959
if [ ! -z "${{ inputs.build_target }}" ]; then
@@ -115,7 +115,7 @@ runs:
115115
# to be sure
116116
set -o pipefail
117117
118-
./ya make -k --build "${build_type}" --force-build-depends -D'BUILD_LANGUAGES=CPP PY3 PY2 GO' -T --stat -DCONSISTENT_DEBUG \
118+
./ya make -k --build "${build_type}" --force-build-depends -T --stat -DCONSISTENT_DEBUG \
119119
--log-file "$TMP_DIR/ya_log.txt" --evlog-file "$TMP_DIR/ya_evlog.jsonl" \
120120
--cache-size 512G --link-threads "${{ inputs.link_threads }}" \
121121
"${extra_params[@]}" |& tee $TMP_DIR/ya_make.log && echo "status=true" >> $GITHUB_OUTPUT || (
@@ -128,6 +128,7 @@ runs:
128128
if: always()
129129
shell: bash
130130
run: |
131+
set -x
131132
echo "::group::s3-sync"
132133
s3cmd sync --acl-private --exclude="ya_make.log" --no-progress --stats --no-check-md5 "$TMP_DIR/" "$S3_BUCKET_PATH/build_logs/"
133134
s3cmd sync --acl-public --no-progress --stats --no-check-md5 "$TMP_DIR/ya_make.log" "$S3_BUCKET_PATH/build_logs/"
@@ -137,6 +138,7 @@ runs:
137138
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
138139
shell: bash
139140
run: |
141+
set -x
140142
if [ "${{ steps.build.outputs.status }}" == "failed" ]; then
141143
echo "Build failed. see the [build logs]($LOG_URL)." | .github/scripts/tests/comment-pr.py --fail
142144
else

.github/actions/test_ya/action.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ inputs:
77
required: true
88
default: "relwithdebinfo"
99
description: "relwithdebinfo, release-asan, release-tsan"
10+
test_type:
11+
required: false
12+
type: string
13+
default: ""
14+
description: "run only specific test types (or all by default)"
1015
test_size:
1116
required: false
1217
default: "small,medium,large"
@@ -35,7 +40,6 @@ runs:
3540
id: init
3641
shell: bash
3742
run: |
38-
echo "SHELLOPTS=xtrace" >> $GITHUB_ENV
3943
export TMP_DIR=$(pwd)/tmp
4044
echo "TMP_DIR=$TMP_DIR" >> $GITHUB_ENV
4145
echo "LOG_DIR=$TMP_DIR/logs" >> $GITHUB_ENV
@@ -54,6 +58,7 @@ runs:
5458
- name: prepare
5559
shell: bash
5660
run: |
61+
set -x
5762
rm -rf $TMP_DIR $JUNIT_REPORT_XML $JUNIT_REPORT_PARTS $REPORTS_ARTIFACTS_DIR
5863
mkdir -p $TMP_DIR $OUT_DIR $ARTIFACTS_DIR $TEST_ARTIFACTS_DIR $LOG_DIR $JUNIT_REPORT_PARTS $REPORTS_ARTIFACTS_DIR
5964
@@ -73,6 +78,7 @@ runs:
7378
env:
7479
PR_NUMBER: ${{ github.event.number }}
7580
run: |
81+
set -x
7682
RUN_URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
7783
BRANCH_TAG="$GITHUB_REF_NAME"
7884
ARCH="${{ runner.arch == 'X64' && 'x86-64' || runner.arch == 'ARM64' && 'arm64' || 'unknown' }}"
@@ -141,11 +147,13 @@ runs:
141147
- name: ya test
142148
shell: bash
143149
run: |
150+
set -x
144151
readarray -d ',' -t test_size < <(printf "%s" "${{ inputs.test_size }}")
152+
readarray -d ',' -t test_type < <(printf "%s" "${{ inputs.test_type }}")
145153
146154
params=(
147155
-T -k
148-
${test_size[@]/#/--test-size=}
156+
${test_size[@]/#/--test-size=} ${test_type[@]/#/--test-type=}
149157
--cache-size 512G --do-not-output-stderrs
150158
--stat
151159
--test-threads "${{ inputs.test_threads }}" --link-threads "${{ inputs.link_threads }}"
@@ -214,6 +222,7 @@ runs:
214222
- name: postprocess junit report
215223
shell: bash
216224
run: |
225+
set -x
217226
.github/scripts/tests/transform-ya-junit.py -i \
218227
-m .github/config/muted_ya.txt \
219228
--ya-out "$OUT_DIR" \
@@ -234,6 +243,7 @@ runs:
234243
if: inputs.testman_token
235244
shell: bash
236245
run: |
246+
set -x
237247
PROXY_ADDR=127.0.0.1:8888
238248
239249
openssl req -x509 -newkey rsa:2048 \
@@ -265,6 +275,7 @@ runs:
265275
shell: bash
266276
if: always()
267277
run: |
278+
set -x
268279
mkdir $ARTIFACTS_DIR/summary/
269280
270281
cat $SUMMARY_LINKS | python3 -c 'import sys; print(" | ".join([v for _, v in sorted([l.strip().split(" ", 1) for l in sys.stdin], key=lambda a: (int(a[0]), a))]))' >> $GITHUB_STEP_SUMMARY
@@ -280,6 +291,7 @@ runs:
280291
if: always()
281292
shell: bash
282293
run: |
294+
set -x
283295
echo "::group::s3-sync"
284296
s3cmd sync -r --follow-symlinks --acl-public --no-progress --stats --no-check-md5 "$ARTIFACTS_DIR/" "$S3_BUCKET_PATH/"
285297
s3cmd sync -r --follow-symlinks --acl-public --no-progress --stats --no-check-md5 "$TEST_ARTIFACTS_DIR/" "$S3_TEST_ARTIFACTS_BUCKET_PATH/"
@@ -289,6 +301,7 @@ runs:
289301
if: always()
290302
shell: bash
291303
run: |
304+
set -x
292305
echo "::group::s3-sync"
293306
s3cmd sync --follow-symlinks --acl-private --no-progress --stats --no-check-md5 "$LOG_DIR/" "$S3_BUCKET_PATH/test_logs/"
294307
echo "::endgroup::"

.github/config/muted_ya.txt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,21 @@ ydb/core/client/ut TFlatTest.AutoSplitMergeQueue
66
ydb/core/cms/ut_sentinel TSentinelTests.BSControllerCantChangeStatus
77
ydb/core/quoter/ut QuoterWithKesusTest.PrefetchCoefficient
88
ydb/core/kqp/provider/ut KikimrIcGateway.TestLoadBasicSecretValueFromExternalDataSourceMetadata
9-
ydb/core/kqp/ut/federated_query/generic *
10-
ydb/core/kqp/ut/olap KqpOlap.IndexesActualization
11-
ydb/core/kqp/ut/olap KqpOlap.BlobsSharing*
9+
ydb/core/kqp/ut/olap KqpOlapIndexes.IndexesActualization
10+
ydb/core/kqp/ut/olap KqpOlapBlobsSharing.*
1211
ydb/core/kqp/ut/olap KqpOlap.ScanQueryOltpAndOlap
13-
ydb/core/kqp/ut/olap KqpOlap.StatsUsageWithTTL
12+
ydb/core/kqp/ut/olap KqpOlapStatistics.StatsUsageWithTTL
1413
ydb/core/kqp/ut/olap KqpOlap.YqlScriptOltpAndOlap
14+
ydb/core/kqp/ut/service KqpQueryService.TableSink_ReplaceFromSelectLargeOlap
1515
ydb/core/kqp/ut/pg KqpPg.CreateIndex
1616
ydb/core/kqp/ut/query KqpLimits.QueryReplySize
1717
ydb/core/kqp/ut/query KqpQuery.QueryTimeout
1818
ydb/core/kqp/ut/scan KqpRequestContext.TraceIdInErrorMessage
1919
ydb/core/kqp/ut/scheme KqpOlapScheme.TenThousandColumns
20+
ydb/core/kqp/ut/scheme KqpOlap.OlapRead_GenericQuerys
21+
ydb/core/kqp/ut/scheme KqpOlap.OlapRead_StreamGenericQuery
22+
ydb/core/kqp/ut/scheme KqpOlap.OlapRead_UsesGenericQueryOnJoinWithDataShardTable
23+
ydb/core/kqp/ut/scheme KqpQueryService.TableSink_ReplaceFromSelectLargeOlap
2024
ydb/core/kqp/ut/scheme KqpScheme.QueryWithAlter
2125
ydb/core/kqp/ut/scheme [44/50]*
2226
ydb/core/kqp/ut/service KqpQueryService.ExecuteQueryPgTableSelect
@@ -35,7 +39,7 @@ ydb/core/viewer/ut Viewer.TabletMerging
3539
ydb/core/viewer/ut Viewer.TabletMergingPacked
3640
ydb/library/actors/http/ut HttpProxy.TooLongHeader
3741
ydb/library/actors/http/ut sole*
38-
ydb/library/yql/providers/generic/connector/tests *
42+
ydb/library/yql/providers/generic/connector/tests/datasource/ydb* *
3943
ydb/public/lib/ydb_cli/topic/ut TTopicReaderTests.TestRun_ReadOneMessage
4044
ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/with_offset_ranges_mode_ut RetryPolicy.RetryWithBatching
4145
ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/with_offset_ranges_mode_ut RetryPolicy.TWriteSession_TestBrokenPolicy
@@ -54,7 +58,6 @@ ydb/services/keyvalue/ut KeyValueGRPCService.SimpleCopyUnexistedKey
5458
ydb/services/keyvalue/ut sole*
5559
ydb/services/persqueue_v1/ut TPersQueueTest.CheckACLForGrpcWrite
5660
ydb/services/persqueue_v1/ut TPersQueueTest.SetupLockSession
57-
ydb/services/persqueue_v1/ut TPersQueueTest.TopicServiceCommitOffsetBadOffsets
5861
ydb/services/persqueue_v1/ut TPQCompatTest.BadTopics
5962
ydb/services/persqueue_v1/ut TPersQueueTest.DirectRead*Cache*
6063
ydb/services/persqueue_v1/ut [3/10]*
@@ -67,23 +70,18 @@ ydb/services/ydb/ut YdbOlapStore.LogPagingAfter-NotNull
6770
ydb/services/ydb/ut YdbQueryService.TestCreateAndAttachSession
6871
ydb/services/ydb/ut YdbScripting.BasicV0
6972
ydb/services/ydb/ut YdbYqlClient.TestYqlSessionClosed
70-
ydb/tests/fq/generic *
7173
ydb/tests/fq/mem_alloc *
7274
ydb/tests/fq/multi_plane *
7375
ydb/tests/fq/plans test_stats_mode.py.TestStatsMode.test_mode[v1-STATS_MODE_FULL-client0]
7476
ydb/tests/fq/yds *
7577
ydb/tests/functional/audit *
7678
ydb/tests/functional/blobstorage test_replication.py.TestReplicationAfterNodesRestart.test_replication*
77-
ydb/tests/functional/clickbench test.py.test_plans*
78-
ydb/tests/functional/clickbench test.py.test_run*
7979
ydb/tests/functional/kqp/kqp_indexes ConsistentIndexRead.InteractiveTx
8080
ydb/tests/functional/kqp/kqp_query_session KqpQuerySession.NoLocalAttach
8181
ydb/tests/functional/restarts test_restarts.py.*
8282
ydb/tests/functional/serverless test_serverless.py.test_database_with_disk_quotas[enable_alter_database_create_hive_first--*]
8383
ydb/tests/functional/tenants test_dynamic_tenants.py.*
8484
ydb/tests/functional/tenants test_storage_config.py.TestStorageConfig.*
8585
ydb/tests/functional/tenants test_tenants.py.*
86-
ydb/tests/functional/ydb_cli test_ydb_scripting.py.TestScriptingServiceHelp.test_help
87-
ydb/tests/functional/ydb_cli test_ydb_scripting.py.TestScriptingServiceHelp.test_help_ex
8886
ydb/tests/tools/pq_read/test test_timeout.py.TestTimeout.test_timeout
8987
ydb/tests/functional/rename [test_rename.py */10] chunk chunk

.github/scripts/tests/generate-summary.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ class TestStatus(Enum):
2323
SKIP = 3
2424
MUTE = 4
2525

26+
@property
27+
def is_error(self):
28+
return self in (TestStatus.FAIL, TestStatus.ERROR, TestStatus.MUTE)
29+
2630
def __lt__(self, other):
2731
return self.value < other.value
2832

@@ -79,6 +83,7 @@ def from_junit(cls, testcase):
7983
log_urls = {
8084
'Log': get_property_value(testcase, "url:Log"),
8185
'log': get_property_value(testcase, "url:log"),
86+
'logsdir': get_property_value(testcase, "url:logsdir"),
8287
'stdout': get_property_value(testcase, "url:stdout"),
8388
'stderr': get_property_value(testcase, "url:stderr"),
8489
}

.github/scripts/tests/templates/summary.html

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
th {
55
text-transform: uppercase;
66
}
7-
7+
88
th, td {
99
padding: 5px;
1010
}
@@ -28,12 +28,56 @@
2828
span.test_mute {
2929
color: blue;
3030
}
31+
button.copy {
32+
float: right;
33+
}
3134
table > tbody > tr > td:nth-child(2),
3235
table > tbody > tr > td:nth-child(3),
3336
table > tbody > tr > td:nth-child(4) {
3437
text-align: center;
3538
}
3639
</style>
40+
<script>
41+
function copyTestNameToClipboard(text) {
42+
const full_name = text.trim();
43+
const pieces = /(.+)\/([^$]+)$/.exec(full_name);
44+
45+
if (!pieces) {
46+
console.error("Unable to split path/test for %o", full_name);
47+
return;
48+
}
49+
let [path, testName] = [pieces[1], pieces[2]];
50+
51+
const namePieces = testName.split('.');
52+
53+
if (namePieces.length === 2) {
54+
testName = namePieces[0] + '::' + namePieces[1];
55+
} else {
56+
testName = namePieces[0] + '.' + namePieces[1] + '::' + namePieces.slice(2).join('::');
57+
}
58+
59+
const cmdArg = `${path} -F '${testName}'`;
60+
61+
console.log(cmdArg);
62+
63+
navigator.clipboard.writeText(cmdArg).catch(
64+
() => {
65+
console.error("Unable to copy %o to clipboard", cmdArg);
66+
}
67+
);
68+
}
69+
function copyOnPress(event) {
70+
event.preventDefault();
71+
copyTestNameToClipboard(event.target.previousElementSibling.textContent)
72+
}
73+
74+
document.addEventListener("DOMContentLoaded", function() {
75+
const els = document.getElementsByClassName("copy");
76+
for (let i = 0; i < els.length; i++) {
77+
els[i].addEventListener('click', copyOnPress);
78+
}
79+
});
80+
</script>
3781
</head>
3882
<body>
3983
{% for status in status_order %}
@@ -52,7 +96,10 @@ <h1 id="{{ status.name}}">{{ status.name }} ({{ tests[status] | length }})</h1>
5296
<tbody>
5397
{% for t in tests[status] %}
5498
<tr>
55-
<td>{{ t.full_name }}</td>
99+
<td>
100+
<span>{{ t.full_name }}</span>
101+
{% if status.is_error %}<button class="copy" title="Copy test filter to clipboard">Copy test filter</button>{% endif %}
102+
</td>
56103
<td><span title="{{ t.elapsed }}s">{{ t.elapsed_display }}</span></td>
57104
<td>
58105
<span class="test_status test_{{ t.status_display }}">{{ t.status_display }}</span>

.github/scripts/tests/transform-ya-junit.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import sys
77
import urllib.parse
88
import zipfile
9+
from typing import Set
910
from xml.etree import ElementTree as ET
1011
from mute_utils import mute_target, pattern_to_re
1112
from junit_utils import add_junit_link_property, is_faulty_testcase
@@ -54,7 +55,7 @@ class YTestReportTrace:
5455
def __init__(self, out_root):
5556
self.out_root = out_root
5657
self.traces = {}
57-
self.logs_dir = None
58+
self.logs_dir = set()
5859

5960
def abs_path(self, path):
6061
return path.replace("$(BUILD_ROOT)", self.out_root)
@@ -83,8 +84,7 @@ def load(self, subdir):
8384
cls = cls.replace("::", ".")
8485
self.traces[(cls, subtest)] = event
8586
logs_dir = self.abs_path(event['logs']['logsdir'])
86-
self.logs_dir = logs_dir
87-
break
87+
self.logs_dir.add(logs_dir)
8888

8989
def has(self, cls, name):
9090
return (cls, name) in self.traces
@@ -144,18 +144,21 @@ def save_log(build_root, fn, out_dir, log_url_prefix, trunc_size):
144144
return f"{log_url_prefix}{quoted_fpath}"
145145

146146

147-
def save_zip(suite_name, out_dir, url_prefix, logs_dir):
147+
def save_zip(suite_name, out_dir, url_prefix, logs_dir: Set[str]):
148148
arc_name = f"{suite_name.replace('/', '-')}.zip"
149149

150150
arc_fn = os.path.join(out_dir, arc_name)
151151

152152
zf = zipfile.ZipFile(arc_fn, mode="w", compression=zipfile.ZIP_DEFLATED, compresslevel=9)
153153

154-
log_print(f"put {logs_dir} into {arc_name}")
155-
for root, dirs, files in os.walk(logs_dir):
156-
for f in files:
157-
filename = os.path.join(root, f)
158-
zf.write(filename, os.path.relpath(filename, logs_dir))
154+
for path in logs_dir:
155+
# path is .../test-results/black/testing_out_stuff
156+
log_print(f"put {path} into {arc_name}")
157+
test_type = os.path.basename(os.path.dirname(path))
158+
for root, dirs, files in os.walk(path):
159+
for f in files:
160+
filename = os.path.join(root, f)
161+
zf.write(filename, os.path.join(test_type, os.path.relpath(filename, path)))
159162
zf.close()
160163

161164
quoted_fpath = urllib.parse.quote(arc_name)

0 commit comments

Comments
 (0)