Skip to content

Commit 7f2f82b

Browse files
author
Vadim Averin
committed
Merge remote-tracking branch 'origin/ip-udf-refactoring' into ip-udf-refactoring
# Conflicts: # ydb/library/yql/udfs/common/ip_base/lib/ip_base_udf.h # ydb/library/yql/udfs/common/ip_base/lib/ya.make
2 parents 24ca2e6 + 7b72ddc commit 7f2f82b

File tree

968 files changed

+25233
-11093
lines changed

Some content is hidden

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

968 files changed

+25233
-11093
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/ydb/docs/ @ydb-platform/docs

.github/PULL_REQUEST_TEMPLATE.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
### Changelog entry <!-- a user-readable short description of changes introduced in this PR -->
2+
3+
...
4+
5+
### Changelog category <!-- remove all except one -->
6+
7+
* New feature
8+
* Experimental feature
9+
* Improvement
10+
* Performance improvement
11+
* Bugfix
12+
* Backward incompatible change
13+
* Documentation (changelog entry is not required)
14+
* Not for changelog (changelog entry is not required)
15+
16+
### Additional information
17+
18+
...

.github/actions/build_ya/action.yml

+28-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,19 @@ runs:
2828
- name: Init
2929
id: init
3030
shell: bash
31+
env:
32+
build_preset: ${{ inputs.build_preset }}
3133
run: |
3234
echo "SHELLOPTS=xtrace" >> $GITHUB_ENV
3335
export TMP_DIR=$(pwd)/tmp_build
3436
echo "TMP_DIR=$TMP_DIR" >> $GITHUB_ENV
3537
rm -rf $TMP_DIR && mkdir $TMP_DIR
36-
38+
39+
echo "BUILD_PRESET=$build_preset" >> $GITHUB_ENV
40+
echo "GITHUB_TOKEN=${{ github.token }}" >> $GITHUB_ENV
41+
3742
- name: build
43+
id: build
3844
shell: bash
3945
run: |
4046
extra_params=()
@@ -85,22 +91,41 @@ runs:
8591
echo "::debug::get version"
8692
./ya --version
8793
94+
echo "Build **{platform_name}-${BUILD_PRESET}** is running..." | .github/scripts/tests/comment-pr.py
95+
96+
# to be sure
97+
set -o pipefail
98+
8899
./ya make -k --build "${build_type}" --force-build-depends -D'BUILD_LANGUAGES=CPP PY3 PY2 GO' -T --stat -DCONSISTENT_DEBUG \
89100
--log-file "$TMP_DIR/ya_log.txt" --evlog-file "$TMP_DIR/ya_evlog.jsonl" \
90101
--cache-size 512G --link-threads "${{ inputs.link_threads }}" \
91-
"${extra_params[@]}" || (
102+
"${extra_params[@]}" |& tee $TMP_DIR/ya_make.log || (
92103
RC=$?
93104
echo "::debug::ya make RC=$RC"
105+
echo "status=failed" >> $GITHUB_OUTPUT
94106
)
95107
96108
- name: sync logs to s3
97109
if: always()
98110
shell: bash
99111
run: |
100112
echo "::group::s3-sync"
101-
s3cmd sync --acl-private --no-progress --stats --no-check-md5 "$TMP_DIR/" "$S3_BUCKET_PATH/build_logs/"
113+
s3cmd sync --acl-private --exclude="ya_make.log" --no-progress --stats --no-check-md5 "$TMP_DIR/" "$S3_BUCKET_PATH/build_logs/"
114+
s3cmd sync --acl-public --no-progress --stats --no-check-md5 "$TMP_DIR/ya_make.log" "$S3_BUCKET_PATH/build_logs/"
102115
echo "::endgroup::"
103116
117+
- name: comment-build-status
118+
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
119+
shell: bash
120+
run: |
121+
log_url="$S3_URL_PREFIX/build_logs/ya_make.log"
122+
123+
if [ "${{ steps.build.outputs.status }}" == "failed" ]; then
124+
echo "Build failed. see the [build logs]($log_url)." | .github/scripts/tests/comment-pr.py --fail
125+
else
126+
echo "Build successful." | .github/scripts/tests/comment-pr.py --ok
127+
fi
128+
104129
- name: show free space
105130
if: always()
106131
shell: bash

.github/actions/test_ya/action.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ runs:
6666
echo "TESTMO_TOKEN=${{ inputs.testman_token }}" >> $GITHUB_ENV
6767
echo "TESTMO_URL=${{ inputs.testman_url }}" >> $GITHUB_ENV
6868
echo "SUMMARY_LINKS=$(mktemp)" >> $GITHUB_ENV
69+
echo "GITHUB_TOKEN=${{ github.token }}" >> $GITHUB_ENV
70+
echo "BUILD_PRESET=${{ inputs.build_preset }}" >> $GITHUB_ENV
6971
7072
- name: prepare
7173
shell: bash
@@ -93,7 +95,6 @@ runs:
9395
BRANCH_TAG="$GITHUB_REF_NAME"
9496
ARCH="${{ runner.arch == 'X64' && 'x86-64' || runner.arch == 'ARM64' && 'arm64' || 'unknown' }}"
9597
96-
BUILD_PRESET="${{ inputs.build_preset }}"
9798
case "$BUILD_PRESET" in
9899
relwithdebinfo)
99100
TESTMO_SOURCE="ya-${ARCH}"
@@ -105,7 +106,7 @@ runs:
105106
TESTMO_SOURCE="ya-${ARCH}-${BUILD_PRESET/release-/}"
106107
;;
107108
*)
108-
echo "Invalid preset: ${{ inputs.build_preset }}"
109+
echo "Invalid preset: $BUILD_PRESET"
109110
exit 1
110111
;;
111112
esac
@@ -170,7 +171,7 @@ runs:
170171
)
171172
172173
# FIXME: copy-paste from build_ya
173-
case "${{ inputs.build_preset }}" in
174+
case "$BUILD_PRESET" in
174175
debug)
175176
params+=(--build "debug")
176177
;;
@@ -196,7 +197,7 @@ runs:
196197
)
197198
;;
198199
*)
199-
echo "Invalid preset: ${{ inputs.build_preset }}"
200+
echo "Invalid preset: $BUILD_PRESET"
200201
exit 1
201202
;;
202203
esac
@@ -213,6 +214,8 @@ runs:
213214
echo "::debug::get version"
214215
./ya --version
215216
217+
echo "Tests are running..." | .github/scripts/tests/comment-pr.py
218+
216219
if [ ! -z "${{ inputs.bazel_remote_username }}" ]; then
217220
echo "::debug::start tests"
218221
@@ -300,20 +303,16 @@ runs:
300303
- name: write tests summary
301304
shell: bash
302305
if: always()
303-
env:
304-
GITHUB_TOKEN: ${{ github.token }}
305306
run: |
306307
mkdir $ARTIFACTS_DIR/summary/
307308
308309
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
309310
310-
platform_name=$(uname | tr '[:upper:]' '[:lower:]')-$(arch)
311-
312311
.github/scripts/tests/generate-summary.py \
313312
--summary-out-path $ARTIFACTS_DIR/summary/ \
314313
--summary-url-prefix $S3_URL_PREFIX/summary/ \
315314
--test-history-url $TEST_HISTORY_URL \
316-
--build-preset "${platform_name}-${{ inputs.build_preset }}" \
315+
--build-preset "$BUILD_PRESET" \
317316
"Tests" ya-test.html "$JUNIT_REPORT_XML"
318317
319318
- name: sync test results to s3

.github/config/muted_ya.txt

+34-2
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,51 @@
1+
ydb/core/blobstorage/dsproxy/ut TBlobStorageProxySequenceTest.TestBlock42PutWithChangingSlowDisk
12
ydb/core/blobstorage/pdisk/ut TSectorMap.*
3+
ydb/core/blobstorage/ut_blobstorage CostMetricsGetBlock4Plus2.TestGet4Plus2BlockRequests10000Inflight1BlobSize1000
24
ydb/core/blobstorage/ut_blobstorage Defragmentation.DoesItWork
35
ydb/core/blobstorage/ut_blobstorage SpaceCheckForDiskReassign.*
46
ydb/core/blobstorage/ut_blobstorage VDiskAssimilation.Test
57
ydb/core/blobstorage/ut_blobstorage [6/10]*
8+
ydb/core/blobstorage/ut_blobstorage/ut_read_only_vdisk ReadOnlyVDisk.TestStorageLoad
9+
ydb/core/cms/ut_sentinel TSentinelTests.BSControllerCantChangeStatus
10+
ydb/core/persqueue/ut [31/40]*
11+
ydb/core/persqueue/ut TPersQueueMirrorer.TestBasicRemote
12+
ydb/core/quoter/ut QuoterWithKesusTest.PrefetchCoefficient
613
ydb/core/kqp/ut/federated_query/generic *
14+
ydb/core/kqp/ut/olap *
15+
ydb/core/kqp/ut/scan KqpRequestContext.TraceIdInErrorMessage
16+
ydb/core/kqp/ut/scheme KqpOlapScheme.TenThousandColumns
17+
ydb/core/kqp/ut/service KqpQueryService.ExecuteQueryPgTableSelect
718
ydb/core/tx/columnshard/ut_schema TColumnShardTestSchema.ForgetAfterFail
819
ydb/core/tx/columnshard/ut_schema TColumnShardTestSchema.RebootForgetAfterFail
20+
ydb/core/tx/columnshard/engines/ut *
21+
ydb/core/tx/coordinator/ut Coordinator.RestoreTenantConfiguration
22+
ydb/core/tx/schemeshard/ut_split_merge TSchemeShardSplitBySizeTest.Merge1KShards
23+
ydb/library/actors/http/ut HttpProxy.TooLongHeader
24+
ydb/library/actors/http/ut sole*
925
ydb/library/yql/sql/pg/ut PgSqlParsingAutoparam.AutoParamValues_DifferentTypes
10-
ydb/services/ydb/sdk_sessions_pool_ut YdbSdkSessionsPool.StressTestSync10
26+
ydb/library/yql/tests/sql/dq_file/part16 *
27+
ydb/library/yql/tests/sql/dq_file/part18 test.py.test[expr-cast_type_bind-default.txt-Analyze]
28+
ydb/public/sdk/cpp/client/ydb_topic/ut BasicUsage.WriteRead
29+
ydb/services/persqueue_v1/ut TPersQueueTest.DirectRead*
30+
ydb/services/persqueue_v1/ut [3/10]*
31+
ydb/services/ydb/sdk_sessions_pool_ut YdbSdkSessionsPool.StressTestSync*
32+
ydb/services/ydb/table_split_ut YdbTableSplit.SplitByLoadWithReadsMultipleSplitsWithData
33+
ydb/services/ydb/ut YdbOlapStore.LogPagingAfter-NotNull
1134
ydb/tests/fq/s3 *
1235
ydb/tests/fq/yds test_metrics_cleanup.py.TestCleanup.test_cleanup[v1]
1336
ydb/tests/functional/audit *
37+
ydb/tests/functional/blobstorage test_replication.py.TestReplicationAfterNodesRestart.test_replication[mirror-3-dc]
1438
ydb/tests/functional/clickbench test.py.test_plans*
39+
ydb/tests/functional/clickbench test.py.test_run_determentistic[column]
1540
ydb/tests/functional/kqp/kqp_query_session KqpQuerySession.NoLocalAttach
1641
ydb/tests/functional/postgresql test_postgres.py.TestPostgresSuite.test_postgres_suite*
42+
ydb/tests/functional/restarts test_restarts.py.*
43+
ydb/tests/functional/sqs/cloud test_yandex_cloud_mode.py.TestSqsYandexCloudMode.test_dlq_mechanics_in_cloud*
44+
ydb/tests/functional/sqs/cloud test_yandex_cloud_queue_counters.py.TestYmqQueueCounters.test_purge_queue_counters
45+
ydb/tests/functional/sqs/common test_queue_counters.py.TestSqsGettingCounters.test_purge_queue_counters
1746
ydb/tests/functional/tenants test_dynamic_tenants.py.*
1847
ydb/tests/functional/tenants test_storage_config.py.TestStorageConfig.*
19-
ydb/tests/functional/tenants test_tenants.py.*
48+
ydb/tests/functional/tenants test_tenants.py.*
49+
ydb/tests/functional/ydb_cli test_ydb_scripting.py.TestScriptingServiceHelp.test_help
50+
ydb/tests/functional/ydb_cli test_ydb_scripting.py.TestScriptingServiceHelp.test_help_ex
51+
ydb/tests/tools/pq_read/test test_timeout.py.TestTimeout.test_timeout

.github/docker/Dockerfile

+17-44
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,23 @@ FROM ubuntu:22.04 AS builder
44
ARG DEBIAN_FRONTEND=noninteractive
55
ENV TZ=Etc/UTC
66

7-
87
RUN apt-get update \
9-
&& apt-get install -y --no-install-recommends git wget gnupg lsb-release curl xz-utils tzdata \
10-
cmake python3-dev python3-pip ninja-build antlr3 m4 libidn11-dev libaio1 libaio-dev make \
11-
clang-12 lld-12 llvm-12 clang-14 lld-14 llvm-14 file \
12-
&& pip3 install conan==1.59 grpcio-tools pyinstaller==5.13.2 six pyyaml packaging PyHamcrest cryptography \
13-
&& (V=4.8.1; curl -L https://github.com/ccache/ccache/releases/download/v${V}/ccache-${V}-linux-x86_64.tar.xz | \
14-
tar -xJ -C /usr/local/bin/ --strip-components=1 --no-same-owner ccache-${V}-linux-x86_64/ccache)
15-
8+
&& apt-get install -y --no-install-recommends \
9+
python3 curl lsb-release python3-dev libc6-dev libidn11-dev libaio1 libaio-dev libgcc-11-dev binutils tree git
1610

1711
COPY ydb/ /ydbwork/ydb/
1812

19-
WORKDIR /ydbwork/
20-
21-
RUN --mount=type=secret,id=ccache_remote_storage \
22-
mkdir build && cd build \
23-
&& export CONAN_USER_HOME=/ydbwork/build \
24-
&& export CCACHE_BASEDIR=/ydbwork/ \
25-
&& export CCACHE_SLOPPINESS=locale \
26-
&& export CCACHE_REMOTE_STORAGE="$(cat /run/secrets/ccache_remote_storage)" \
27-
&& export CC=/usr/bin/clang-14 \
28-
&& export CC_FOR_BUILD=$CC \
29-
&& cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
30-
-DCCACHE_PATH=/usr/local/bin/ccache \
31-
-DCMAKE_TOOLCHAIN_FILE=../ydb/clang.toolchain \
32-
../ydb \
33-
&& ninja ydb/apps/ydbd/ydbd ydb/apps/ydb/all \
34-
&& ccache -s \
35-
&& strip ydb/apps/ydbd/ydbd \
36-
&& strip ydb/apps/ydb/ydb \
37-
&& mv ./ydb/apps/ydbd/ydbd / \
38-
&& mv ./ydb/apps/ydb/ydb / \
39-
&& /ydbd -V \
40-
&& /ydb version \
41-
&& cd .. && rm -rf build # for reduce cache size
42-
13+
WORKDIR /ydbwork/ydb/
4314

44-
45-
# always use local_ydb.spec from main revision
46-
COPY main/ydb/public/tools/local_ydb/local_ydb.spec ydb/ydb/public/tools/local_ydb/
47-
48-
RUN cd ydb && \
49-
./ydb/tests/oss/launch/compile_protos.sh . ydb library/cpp/actors && \
50-
cd ydb/public/tools/local_ydb/ && \
51-
pyinstaller local_ydb.spec && \
52-
./dist/local_ydb --help
15+
RUN ./ya make -r -T \
16+
-C ydb/apps/ydbd/ydbd \
17+
-C ydb/apps/ydb/ydb \
18+
-C ydb/public/tools/local_ydb/local_ydb \
19+
-o /ydbwork/out/ \
20+
&& /ydbwork/out/ydb/apps/ydbd/ydbd -V \
21+
&& tree /ydbwork/out/ \
22+
&& strip /ydbwork/out/ydb/apps/ydbd/ydbd /ydbwork/out/ydb/apps/ydb/ydb /ydbwork/out/ydb/public/tools/local_ydb/local_ydb \
23+
&& rm -rf ~/.ya || echo 'unable to delete ~/.ya' # for reduce cache size
5324

5425

5526
FROM ubuntu:22.04
@@ -63,9 +34,11 @@ RUN mkdir -p /root/ydb/bin/ \
6334
&& echo '{"check_version":false}' > root/ydb/bin/config.json
6435

6536
COPY main/.github/docker/files/ /
66-
COPY --from=builder /ydbwork/ydb/ydb/public/tools/local_ydb/dist/local_ydb /
67-
COPY --from=builder /ydbd /ydb /
68-
37+
COPY --from=builder \
38+
/ydbwork/out/ydb/apps/ydbd/ydbd \
39+
/ydbwork/out/ydb/apps/ydb/ydb \
40+
/ydbwork/out/ydb/public/tools/local_ydb/local_ydb \
41+
/
6942

7043
# YDB grpc
7144
EXPOSE ${GRPC_TLS_PORT:-2135}

.github/docker/files/initialize_local_ydb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -x
23

34
INIT_YDB_SCRIPT=/init_ydb
45

.github/scripts/tests/comment-pr.py

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env python
2+
import os
3+
import json
4+
import argparse
5+
from github import Github, Auth as GithubAuth
6+
from github.PullRequest import PullRequest
7+
from gh_status import update_pr_comment_text
8+
9+
10+
def main():
11+
parser = argparse.ArgumentParser()
12+
parser.add_argument("--rewrite", dest="rewrite", action="store_true")
13+
parser.add_argument("--color", dest="color", default="white")
14+
parser.add_argument("--fail", dest="fail", action="store_true")
15+
parser.add_argument("--ok", dest="ok", action="store_true")
16+
parser.add_argument("text", type=argparse.FileType("r"), nargs="?", default="-")
17+
18+
args = parser.parse_args()
19+
color = args.color
20+
21+
if args.ok:
22+
color = 'green'
23+
elif args.fail:
24+
color = 'red'
25+
26+
build_preset = os.environ["BUILD_PRESET"]
27+
28+
gh = Github(auth=GithubAuth.Token(os.environ["GITHUB_TOKEN"]))
29+
30+
with open(os.environ["GITHUB_EVENT_PATH"]) as fp:
31+
event = json.load(fp)
32+
33+
pr = gh.create_from_raw_data(PullRequest, event["pull_request"])
34+
35+
update_pr_comment_text(pr, build_preset, color, args.text.read().rstrip(), args.rewrite)
36+
37+
38+
if __name__ == "__main__":
39+
main()

0 commit comments

Comments
 (0)