Skip to content

Commit 4aaee8c

Browse files
committed
Merge branch 'main' into KIKIMR-19522-btree-precharge-groups
2 parents 00d301f + e7a75ea commit 4aaee8c

File tree

347 files changed

+8399
-2961
lines changed

Some content is hidden

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

347 files changed

+8399
-2961
lines changed

.github/config/muted_functest.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ ydb/tests/functional/tenants/test_storage_config.py::TestStorageConfig::*
44
ydb/tests/functional/tenants/test_tenants.py::*
55
ydb/tests/functional/audit/*
66
ydb/tests/functional/clickbench::test.py.test_plans*
7-
ydb/tests/fq/s3*
87
ydb/tests/fq/yds/test_metrics_cleanup.py::TestCleanup*test_cleanup[v1]

.github/config/muted_test.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ ydb-tests-functional-kqp-kqp_query_session/KqpQuerySession::NoLocalAttach
55
ydb-core-blobstorage-ut_blobstorage/VDiskAssimilation::Test
66
ydb-core-tx-columnshard-ut_schema/TColumnShardTestSchema::ForgetAfterFail
77
ydb-core-tx-columnshard-ut_schema/TColumnShardTestSchema::RebootForgetAfterFail
8-
ydb-core-kqp-ut-federated_query-generic/*
98
ydb-library-yql-sql-pg-ut/PgSqlParsingAutoparam::AutoParamValues_DifferentTypes
109
ydb-core-blobstorage-ut_blobstorage/[6/10]*
1110
ydb/core/blobstorage/ut_blobstorage/Defragmentation::DoesItWork

.github/config/muted_ya.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@ ydb/core/quoter/ut QuoterWithKesusTest.PrefetchCoefficient
1414
ydb/core/kqp/provider/ut KikimrIcGateway.TestLoadBasicSecretValueFromExternalDataSourceMetadata
1515
ydb/core/kqp/ut/federated_query/generic *
1616
ydb/core/kqp/ut/olap *
17+
ydb/core/kqp/ut/pg KqpPg.CreateIndex
1718
ydb/core/kqp/ut/scan KqpRequestContext.TraceIdInErrorMessage
1819
ydb/core/kqp/ut/scheme KqpOlapScheme.TenThousandColumns
1920
ydb/core/kqp/ut/service KqpQueryService.ExecuteQueryPgTableSelect
2021
ydb/core/tx/columnshard/ut_schema TColumnShardTestSchema.ForgetAfterFail
2122
ydb/core/tx/columnshard/ut_schema TColumnShardTestSchema.RebootForgetAfterFail
2223
ydb/core/tx/columnshard/engines/ut *
2324
ydb/core/tx/coordinator/ut Coordinator.RestoreTenantConfiguration
25+
ydb/core/tx/schemeshard/ut_restore TImportTests.ShouldSucceedOnManyTables
2426
ydb/core/tx/schemeshard/ut_split_merge TSchemeShardSplitBySizeTest.Merge1KShards
2527
ydb/library/actors/http/ut HttpProxy.TooLongHeader
2628
ydb/library/actors/http/ut sole*
29+
ydb/library/yql/providers/generic/connector/tests sole*
2730
ydb/library/yql/sql/pg/ut PgSqlParsingAutoparam.AutoParamValues_DifferentTypes
31+
ydb/library/yql/tests/sql/dq_file/part6 test.py.test[bigdate-input_date32-default.txt-Results]
2832
ydb/library/yql/tests/sql/dq_file/part16 *
2933
ydb/library/yql/tests/sql/dq_file/part18 test.py.test[expr-cast_type_bind-default.txt-Analyze]
3034
ydb/public/sdk/cpp/client/ydb_topic/ut BasicUsage.WriteRead
@@ -37,18 +41,15 @@ ydb/tests/fq/generic *
3741
ydb/tests/fq/restarts test_insert_restarts.py.TestS3.test_atomic_upload_commit*
3842
ydb/tests/fq/s3 *
3943
ydb/tests/fq/yds test_metrics_cleanup.py.TestCleanup.test_cleanup[v1]
44+
ydb/tests/fq/yds test_read_rules_deletion.py.TestReadRulesDeletion.test_delete_read_rules[v1-with_recovery]
45+
ydb/tests/fq/yds test_select_1.py.TestSelect1.test_unwrap_null[v1]
4046
ydb/tests/functional/audit *
41-
ydb/tests/functional/blobstorage test_replication.py.TestReplicationAfterNodesRestart.test_replication[mirror-3-dc]
47+
ydb/tests/functional/blobstorage test_replication.py.TestReplicationAfterNodesRestart.test_replication*
4248
ydb/tests/functional/clickbench test.py.test_plans*
4349
ydb/tests/functional/clickbench test.py.test_run_*column]
4450
ydb/tests/functional/kqp/kqp_query_session KqpQuerySession.NoLocalAttach
4551
ydb/tests/functional/postgresql test_postgres.py.TestPostgresSuite.test_postgres_suite*
4652
ydb/tests/functional/restarts test_restarts.py.*
47-
ydb/tests/functional/sqs/cloud test_yandex_cloud_mode.py.TestSqsYandexCloudMode.test_dlq_mechanics_in_cloud*
48-
ydb/tests/functional/sqs/cloud test_yandex_cloud_queue_counters.py.TestYmqQueueCounters.test_purge_queue_counters
49-
ydb/tests/functional/sqs/common test_queue_counters.py.TestSqsGettingCounters.test_purge_queue_counters
50-
ydb/tests/functional/sqs/large test_leader_start_inflight.py.TestSqsMultinodeCluster.test_limit_leader_start_inflight[tables_format*]
51-
ydb/tests/functional/sqs/large [*/10]*
5253
ydb/tests/functional/sqs/merge_split_common_table/fifo *
5354
ydb/tests/functional/sqs/merge_split_common_table/std *
5455
ydb/tests/functional/tenants test_dynamic_tenants.py.*

.github/workflows/build_and_test_ya.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ on:
4949
put_build_results_to_cache:
5050
type: boolean
5151
default: true
52+
commit_sha:
53+
type: string
54+
default: ""
5255
defaults:
5356
run:
5457
shell: bash
@@ -57,15 +60,11 @@ jobs:
5760
name: Build and test ${{ inputs.build_preset }}
5861
runs-on: [ self-hosted, "${{ inputs.runner_label }}", "${{ inputs.runner_additional_label || inputs.runner_label }}"]
5962
steps:
60-
- name: Checkout PR
61-
uses: actions/checkout@v3
62-
if: github.event.pull_request.head.sha != ''
63-
with:
64-
ref: ${{ github.event.pull_request.head.sha }}
6563
- name: Checkout
6664
uses: actions/checkout@v3
67-
if: github.event.pull_request.head.sha == ''
68-
65+
with:
66+
ref: ${{ inputs.commit_sha }}
67+
6968
- name: comment-build-start
7069
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
7170
shell: bash
@@ -77,7 +76,7 @@ jobs:
7776
# tricky: we are searching job with name that contains build_preset
7877
check_url=$(curl -s $jobs_url | jq --arg n "$BUILD_PRESET" -r '.jobs[] | select(.name | contains($n)) | .html_url')
7978
80-
echo "Pre-commit [check]($check_url) for ${{ github.event.pull_request.head.sha }} has started." | .github/scripts/tests/comment-pr.py --rewrite
79+
echo "Pre-commit [check]($check_url) for ${{ inputs.commit_sha }} has started." | .github/scripts/tests/comment-pr.py --rewrite
8180
8281
- name: Prepare s3cmd
8382
uses: ./.github/actions/s3cmd

.github/workflows/build_and_test_ya_provisioned.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ on:
9090
put_build_results_to_cache:
9191
type: boolean
9292
default: true
93+
commit_sha:
94+
type: string
95+
default: ""
9396
jobs:
9497
main:
9598
uses: ./.github/workflows/build_and_test_ya.yml
@@ -107,4 +110,5 @@ jobs:
107110
link_threads: ${{ inputs.link_threads }}
108111
test_threads: ${{ inputs.test_threads }}
109112
put_build_results_to_cache: ${{ inputs.put_build_results_to_cache }}
113+
commit_sha: ${{ inputs.commit_sha }}
110114
secrets: inherit

.github/workflows/pr_check.yml

Lines changed: 99 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: PR-check
2-
on:
2+
on:
33
pull_request_target:
44
branches:
55
- 'main'
@@ -20,7 +20,8 @@ jobs:
2020
if: ${{vars.CHECKS_SWITCH != '' && fromJSON(vars.CHECKS_SWITCH).pr_check == true}}
2121
runs-on: ubuntu-latest
2222
outputs:
23-
result: ${{ steps.check-ownership-membership.outputs.result }}
23+
result: ${{ steps.check-ownership-membership.outputs.result == 'true' && steps.check-is-mergeable.outputs.result == 'true' }}
24+
commit_sha: ${{ steps.check-is-mergeable.outputs.commit_sha }}
2425
steps:
2526
- name: Check if running tests is allowed
2627
id: check-ownership-membership
@@ -32,17 +33,17 @@ jobs:
3233
const okToTestLabel = labels.find(
3334
label => label.name == 'ok-to-test'
3435
);
35-
36+
3637
console.log("okToTestLabel=%o", okToTestLabel !== undefined);
37-
38+
3839
if (okToTestLabel !== undefined) {
3940
return true;
4041
}
41-
42+
4243
// This is used primarily in forks. Repository owner
4344
// should be allowed to run anything.
4445
const userLogin = context.payload.pull_request.user.login;
45-
46+
4647
// How to interpret membership status code:
4748
// https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator
4849
const isRepoCollaborator = async function () {
@@ -60,12 +61,12 @@ jobs:
6061
throw error;
6162
}
6263
}
63-
64+
6465
if (context.payload.repository.owner.login == userLogin) {
6566
console.log("You are the repository owner!");
6667
return true;
6768
}
68-
69+
6970
if (await isRepoCollaborator()) {
7071
console.log("You are a collaborator!");
7172
return true;
@@ -88,26 +89,100 @@ jobs:
8889
uses: actions/github-script@v6
8990
with:
9091
script: |
91-
const { owner, repo } = context.repo;
92+
let labelsToRemove = ['ok-to-test', 'rebase-and-check'];
9293
const prNumber = context.payload.pull_request.number;
93-
const labelToRemove = 'ok-to-test';
94-
try {
95-
const result = await github.rest.issues.removeLabel({
96-
owner,
97-
repo,
98-
issue_number: prNumber,
99-
name: labelToRemove
100-
});
101-
} catch(e) {
102-
// ignore the 404 error that arises
103-
// when the label did not exist for the
104-
// organization member
105-
console.log(e);
94+
const prLabels = new Set(context.payload.pull_request.labels.map(l => l.name));
95+
for await (const label of labelsToRemove.filter(l => prLabels.has(l))) {
96+
core.info(`remove label=${label} for pr=${prNumber}`);
97+
try {
98+
const result = await github.rest.issues.removeLabel({
99+
...context.repo,
100+
issue_number: prNumber,
101+
name: label
102+
});
103+
} catch(error) {
104+
// ignore the 404 error that arises
105+
// when the label did not exist for the
106+
// organization member
107+
if (error.status && error.status != 404) {
108+
throw error;
109+
}
110+
}
111+
}
112+
- name: check is mergeable
113+
id: check-is-mergeable
114+
if: steps.check-ownership-membership.outputs.result == 'true'
115+
uses: actions/github-script@v6
116+
with:
117+
result-encoding: string
118+
script: |
119+
let pr = context.payload.pull_request;
120+
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
121+
const header = `<!-- merge pr=${pr.number} -->\n`;
122+
123+
const fail_msg = header + ':red_circle: Unable to merge your PR into the `main` branch. '
124+
+ 'Please rebase or merge it with the `main` branch.'
125+
126+
let i = 0;
127+
128+
while (pr.mergeable == null || i >= 60) {
129+
console.log("get pull-request status");
130+
131+
let result = await github.rest.pulls.get({
132+
...context.repo,
133+
pull_number: pr.number
134+
})
135+
136+
pr = result.data;
137+
138+
if (pr.mergeable == null) {
139+
await delay(5000);
140+
}
141+
142+
i += 1;
143+
}
144+
145+
console.log("pr.mergeable=%o", pr.mergeable);
146+
147+
const { data: comments } = await github.rest.issues.listComments({
148+
issue_number: context.issue.number,
149+
owner: context.repo.owner,
150+
repo: context.repo.repo
151+
});
152+
153+
const commentToUpdate = comments.find(comment => comment.body.startsWith(header));
154+
155+
if (pr.mergeable === false) {
156+
let commentParams = {
157+
...context.repo,
158+
issue_number: context.issue.number,
159+
body: fail_msg
160+
};
161+
162+
if (commentToUpdate) {
163+
await github.rest.issues.updateComment({
164+
...commentParams,
165+
comment_id: commentToUpdate.id,
166+
});
167+
} else {
168+
await github.rest.issues.createComment({...commentParams});
169+
}
170+
core.setFailed("Merge conflict detected");
171+
return false;
172+
} else if (commentToUpdate) {
173+
await github.rest.issues.deleteComment({
174+
...context.repo,
175+
issue_number: context.issue.number,
176+
comment_id: commentToUpdate.id,
177+
});
106178
}
179+
core.info(`commit_sha=${pr.commit_sha}`);
180+
core.setOutput('commit_sha', pr.merge_commit_sha);
181+
return true;
107182
build_and_test:
108183
needs:
109184
- check-running-allowed
110-
if: needs.check-running-allowed.outputs.result == 'true'
185+
if: needs.check-running-allowed.outputs.result == 'true' && needs.check-running-allowed.outputs.commit_sha != ''
111186
strategy:
112187
fail-fast: false
113188
matrix:
@@ -122,4 +197,5 @@ jobs:
122197
test_threads: 52
123198
runner_label: auto-provisioned
124199
put_build_results_to_cache: true
200+
commit_sha: ${{ needs.check-running-allowed.outputs.commit_sha }}
125201
secrets: inherit

ydb/apps/dstool/lib/dstool_cmd_cluster_set.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ def add_options(p):
2424
g.add_argument('--pdisk-space-color-border', choices=choices, help='PDisk space color border')
2525
choices = kikimr_bsconfig.TSerialManagementStage.E.keys()
2626
g.add_argument('--disk-management-mode', type=str, choices=choices, help='Disk management mode')
27+
g.add_argument('--enable-self-heal-local-policy', action='store_const', const=True, dest='self_heal_local_policy', help='Enable SelfHeal local policy for cluster')
28+
g.add_argument('--disable-self-heal-local-policy', action='store_const', const=False, dest='self_heal_local_policy', help='Disable SelfHeal local policy for cluster')
29+
2730
common.add_basic_format_options(p)
2831

2932

@@ -63,6 +66,8 @@ def create_request(args):
6366
cmd.MaxScrubbedDisksAtOnce.append(args.max_scrubbed_disks_at_once)
6467
if args.pdisk_space_color_border is not None:
6568
cmd.PDiskSpaceColorBorder.append(disk_color.TPDiskSpaceColor.E.Value(args.pdisk_space_color_border))
69+
if args.self_heal_local_policy is not None:
70+
cmd.UseSelfHealLocalPolicy.append(args.self_heal_local_policy)
6671

6772
return request
6873

ydb/ci/rightlib/increment.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Usage: cherrypick.sh <ydb_repo_root>
2-
# Expects previous github SHA in <ydb_repo_root>/library_import.txt
3-
# Reads new commits from the 'rightlib' branch, cheery-picks them to a new branch, and creates PR
2+
# Expects previous github SHA in <ydb_repo_root>/library/rightlib_sha.txt
3+
# Reads new commits from the 'rightlib' branch, cheery-picks them to the current branch, updates library/rightlib_sha.txt in the working tree
44

55
set -e
66
set -o pipefail
@@ -36,3 +36,5 @@ rsync -r $LIB_ROOT/ya $LIB_ROOT/build $LIB_ROOT/certs $LIB_ROOT/cmake $LIB_ROOT/
3636
--filter '- **/a.yaml' --filter '- **/.arcignore' --filter '- **/.yandex_meta/' --filter '- contrib/ydb/' --filter '- build/internal/' --filter '- build/ext_mapping.conf.json' \
3737
--filter '- **/CMakeLists*.txt' --delete
3838

39+
echo ${newsha} > ${shapath}
40+

ydb/core/actorlib_impl/ut/ya.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ PEERDIR(
1919
library/cpp/svnversion
2020
ydb/core/testlib/actors
2121
ydb/core/testlib/basics/default
22-
ydb/library/yql/minikql/comp_nodes/llvm
22+
ydb/library/yql/minikql/comp_nodes/llvm14
2323
)
2424

2525
SRCS(

ydb/core/base/statestorage.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ ui32 TStateStorageInfo::ContentHash() const {
136136
void TStateStorageInfo::TSelection::MergeReply(EStatus status, EStatus *owner, ui64 targetCookie, bool resetOld) {
137137
ui32 unknown = 0;
138138
ui32 ok = 0;
139-
ui32 noinfo = 0;
140139
ui32 outdated = 0;
141140

142141
const ui32 majority = Sz / 2 + 1;
@@ -160,7 +159,6 @@ void TStateStorageInfo::TSelection::MergeReply(EStatus status, EStatus *owner, u
160159
++ok;
161160
break;
162161
case StatusNoInfo:
163-
++noinfo;
164162
break;
165163
case StatusOutdated:
166164
++outdated;

ydb/core/base/ut_board_subscriber/ya.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ PEERDIR(
1313
ydb/core/testlib/basics
1414
ydb/core/base
1515
ydb/core/testlib/basics/default
16-
ydb/library/yql/minikql/comp_nodes/llvm
16+
ydb/library/yql/minikql/comp_nodes/llvm14
1717
)
1818

1919
YQL_LAST_ABI_VERSION()

ydb/core/blobstorage/dsproxy/dsproxy_blackboard.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ struct TBlobState {
108108
};
109109

110110
struct TDiskGetRequest {
111-
const TLogoBlobID Id;
112-
const ui32 Shift;
113-
const ui32 Size;
111+
TLogoBlobID Id;
112+
ui32 Shift;
113+
ui32 Size;
114114
ssize_t PartMapIndex = -1;
115115

116116
TDiskGetRequest(const TLogoBlobID &id, const ui32 shift, const ui32 size)
@@ -127,7 +127,7 @@ struct TDiskPutRequest {
127127
ReasonInitial,
128128
ReasonAccelerate
129129
};
130-
const TLogoBlobID Id;
130+
TLogoBlobID Id;
131131
TRope Buffer;
132132
EPutReason Reason;
133133
bool IsHandoff;

ydb/core/blobstorage/dsproxy/dsproxy_discover.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,6 @@ class TBlobStorageGroupDiscoverRequest : public TBlobStorageGroupRequestActor<TB
499499
// Feed more data when possible
500500
bool isAllRead = true;
501501
bool isAllDisksAbleToStep = true;
502-
ui32 unableToStepDiskCount = 0;
503502
bool isFirst = true;
504503
TLogoBlobID stepToId;
505504

@@ -515,7 +514,6 @@ class TBlobStorageGroupDiscoverRequest : public TBlobStorageGroupRequestActor<TB
515514
} else {
516515
if (!curVDisk.IsError && curVDisk.IsMoreRequested) {
517516
isAllDisksAbleToStep = false;
518-
++unableToStepDiskCount;
519517
}
520518
}
521519
if (!curVDisk.IsError && !curVDisk.IsAllRead) {

0 commit comments

Comments
 (0)