Skip to content

Commit b4fa8d5

Browse files
committed
Merge remote-tracking branch 'origin/main' into generic-lookup-timeout-use-lib-retry
2 parents a66895e + 7102021 commit b4fa8d5

File tree

5,165 files changed

+208521
-79760
lines changed

Some content is hidden

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

5,165 files changed

+208521
-79760
lines changed

.github/TESTOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#Column Tables Development Team @zverevgeny TEAM:@ydb-platform/cs
1919
/ydb/core/tx/columnshard @ydb-platform/cs
20+
/ydb/tests/olap @ydb-platform/cs
2021

2122
#Distributed System Infrastructure Team @ijon TEAM:@ydb-platform/system-infra
2223
/ydb/core/mind/hive @ydb-platform/system-infra
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: rightlib sync
2+
description: Automatically sync rightlib branch into main
3+
inputs:
4+
command:
5+
required: true
6+
description: "create-pr or check-pr"
7+
repository:
8+
required: true
9+
description: "token for access GitHub"
10+
gh_personal_access_token:
11+
required: true
12+
description: "token for access GitHub"
13+
runs:
14+
using: "composite"
15+
steps:
16+
- name: install packages
17+
shell: bash
18+
run: |
19+
pip install PyGithub==2.5.0
20+
21+
- name: configure
22+
shell: bash
23+
run: |
24+
git config --global user.email "alex@ydb.tech"
25+
git config --global user.name "Alexander Smirnov"
26+
27+
- name: run-command
28+
shell: bash
29+
env:
30+
REPO: ${{ inputs.repository }}
31+
TOKEN: ${{ inputs.gh_personal_access_token }}
32+
run: |
33+
cd ./ydb/ci/rightlib
34+
./sync-rightlib.py "${{ inputs.command }}"
35+

.github/config/muted_ya.txt

Lines changed: 210 additions & 11 deletions
Large diffs are not rendered by default.

.github/docker/files/initialize_local_ydb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ export GRPC_TLS_PORT=${GRPC_TLS_PORT:-2135}
88
export GRPC_PORT=${GRPC_PORT:-2136}
99
export YDB_GRPC_TLS_DATA_PATH="/ydb_certs"
1010

11-
/local_ydb deploy --ydb-working-dir /ydb_data --ydb-binary-path /ydbd --fixed-ports --dont-use-log-files;
11+
# Start local_ydb tool. Pass additional arguments for local_ydb
12+
/local_ydb deploy --ydb-working-dir /ydb_data --ydb-binary-path /ydbd --fixed-ports --dont-use-log-files "$@";
1213

1314
if [ -f "$INIT_YDB_SCRIPT" ]; then
1415
sh "$INIT_YDB_SCRIPT";

.github/scripts/tests/create_new_muted_ya.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33
import configparser
44
import datetime
55
import os
6-
import posixpath
76
import re
87
import ydb
98
import logging
109

11-
from get_diff_lines_of_file import get_diff_lines_of_file
12-
from mute_utils import pattern_to_re
1310
from transform_ya_junit import YaMuteCheck
1411
from update_mute_issues import (
1512
create_and_add_issue_to_project,
@@ -181,8 +178,9 @@ def apply_and_add_mutes(all_tests, output_path, mute_check):
181178
for test in all_tests
182179
if test.get('days_in_state') >= 1
183180
and test.get('flaky_today')
184-
and (test.get('pass_count') + test.get('fail_count')) > 3
181+
and (test.get('pass_count') + test.get('fail_count')) >= 3
185182
and test.get('fail_count') > 2
183+
and test.get('fail_count')/(test.get('pass_count') + test.get('fail_count')) > 0.2 # <=80% success rate
186184
)
187185
flaky_tests = sorted(flaky_tests)
188186
add_lines_to_file(os.path.join(output_path, 'flaky.txt'), flaky_tests)
@@ -193,8 +191,9 @@ def apply_and_add_mutes(all_tests, output_path, mute_check):
193191
for test in all_tests
194192
if test.get('days_in_state') >= 1
195193
and test.get('flaky_today')
196-
and (test.get('pass_count') + test.get('fail_count')) > 3
194+
and (test.get('pass_count') + test.get('fail_count')) >= 3
197195
and test.get('fail_count') > 2
196+
and test.get('fail_count')/(test.get('pass_count') + test.get('fail_count')) > 0.2 # <=80% success rate
198197
)
199198
## тесты может запускаться 1 раз в день. если за последние 7 дней набирается трешход то мьютим
200199
## падения сегодня более весомы ??
@@ -296,7 +295,7 @@ def read_tests_from_file(file_path):
296295
testsuite, testcase = line.split(" ", maxsplit=1)
297296
result.append({'testsuite': testsuite, 'testcase': testcase, 'full_name': f"{testsuite}/{testcase}"})
298297
except ValueError:
299-
log_print(f"cant parse line: {line!r}")
298+
logging.warning(f"cant parse line: {line!r}")
300299
continue
301300
return result
302301

@@ -338,9 +337,8 @@ def create_mute_issues(all_tests, file_path):
338337
for item in prepared_tests_by_suite:
339338

340339
title, body = generate_github_issue_title_and_body(prepared_tests_by_suite[item])
341-
result = create_and_add_issue_to_project(
342-
title, body, state='Muted', owner=prepared_tests_by_suite[item][0]['owner'].split('/', 1)[1]
343-
)
340+
owner_value = prepared_tests_by_suite[item][0]['owner'].split('/', 1)[1] if '/' in prepared_tests_by_suite[item][0]['owner'] else prepared_tests_by_suite[item][0]['owner']
341+
result = create_and_add_issue_to_project(title, body, state='Muted', owner=owner_value)
344342
if not result:
345343
break
346344
else:
@@ -374,8 +372,6 @@ def mute_worker(args):
374372
credentials=ydb.credentials_from_env_variables(),
375373
) as driver:
376374
driver.wait(timeout=10, fail_fast=True)
377-
session = ydb.retry_operation_sync(lambda: driver.table_client.session().create())
378-
tc_settings = ydb.TableClientSettings().with_native_date_in_result_sets(enabled=True)
379375

380376
all_tests = execute_query(driver)
381377
if args.mode == 'update_muted_ya':

.github/scripts/tests/update_mute_issues.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ def generate_github_issue_title_and_body(test_data):
329329
test_run_history_link = f"{CURRENT_TEST_HISTORY_DASHBOARD}{test_run_history_params}"
330330

331331
# owner
332-
owner_link = f"[{owner}](https://github.com/orgs/ydb-platform/teams/{owner.split('/',1)[1]})"
333332
# Тело сообщения и кодирование
334333
body_template = (
335334
f"Mute:<!--mute_list_start-->\n"
@@ -449,7 +448,7 @@ def get_muted_tests_from_issues():
449448
issues = get_issues_and_tests_from_project(ORG_NAME, PROJECT_ID)
450449
muted_tests = {}
451450
for issue in issues:
452-
if issues[issue]["status"] == "Muted":
451+
if issues[issue]["status"] == "Muted" and issues[issue]["state"] != 'CLOSED':
453452
for test in issues[issue]['tests']:
454453
if test not in muted_tests:
455454
muted_tests[test] = []

.github/workflows/automerge_pr.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Automerge PR
2+
on:
3+
schedule:
4+
- cron: "30 1-23 * * *" # Hourly during 1-23 interval for PR completion
5+
workflow_dispatch:
6+
concurrency:
7+
group: ${{ github.workflow }}
8+
cancel-in-progress: true
9+
jobs:
10+
check-pr:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: checkout
14+
uses: actions/checkout@v4
15+
with:
16+
sparse-checkout: |
17+
.github
18+
ydb/ci/
19+
- uses: ./.github/actions/rightlib_sync
20+
with:
21+
command: check-pr
22+
repository: ${{ github.repository }}
23+
gh_personal_access_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

.github/workflows/label_external_issues.yml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,47 @@ jobs:
77
label-external-issues:
88
name: Label issue from external user
99
runs-on: ubuntu-latest
10-
# https://docs.github.com/en/graphql/reference/enums#commentauthorassociation
11-
if: ${{ !contains(fromJson('["MEMBER", "OWNER", "COLLABORATOR"]'), github.event.issue.author_association) }}
1210
steps:
1311
- name: add external label
1412
uses: actions/github-script@v7
1513
with:
14+
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
1615
script: |
17-
github.rest.issues.addLabels({
18-
issue_number: context.issue.number,
19-
owner: context.repo.owner,
20-
repo: context.repo.repo,
21-
labels: ['external']
22-
})
16+
const issueAuthor = context.payload.issue.user.login
17+
18+
if (context.repo.owner == issueAuthor) {
19+
console.log("Issue author is here");
20+
return
21+
}
22+
23+
const org = context.repo.owner;
24+
25+
const isOrgMember = async function () {
26+
try {
27+
const response = await github.rest.orgs.checkMembershipForUser({
28+
org,
29+
username: issueAuthor,
30+
});
31+
return response.status == 204;
32+
} catch (error) {
33+
if (error.status && error.status == 404) {
34+
return false;
35+
}
36+
throw error;
37+
}
38+
}
39+
40+
console.log(`Checking membership for user: ${issueAuthor} in organization: ${org}`);
41+
42+
if (!await isOrgMember()) {
43+
console.log(`User ${issueAuthor} is not a member of the organization.`)
44+
45+
github.rest.issues.addLabels({
46+
issue_number: context.issue.number,
47+
owner: context.repo.owner,
48+
repo: context.repo.repo,
49+
labels: ['external']
50+
})
51+
} else {
52+
console.log(`User ${issueAuthor} is a member of the organization.`)
53+
}

.github/workflows/pr_check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
branches:
55
- 'main'
66
- 'stable-*'
7+
- 'prestable-*'
78
- 'stream-nb-*'
89
- '*-stable-*'
910
- 'dev-*'

.github/workflows/regression_whitelist_run.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@ jobs:
1919
- build_preset: relwithdebinfo
2020
threads_count: 52
2121
timeout: 300
22-
build_target: "ydb/tests/sql/ ydb/tests/sql/large"
22+
build_target: "ydb/tests/sql/ ydb/tests/stress"
2323
test_size: small,medium,large
2424
test_type: unittest,py3test,py2test,pytest
2525
- build_preset: release-asan
2626
threads_count: 20
2727
timeout: 480
28-
build_target: "ydb/tests/sql/ ydb/tests/sql/large"
28+
build_target: "ydb/tests/sql/ ydb/tests/stress"
2929
test_size: small,medium,large
3030
test_type: unittest,py3test,py2test,pytest
3131
- build_preset: release-msan
3232
threads_count: 20
3333
timeout: 480
34-
build_target: "ydb/tests/sql/ ydb/tests/sql/large"
34+
build_target: "ydb/tests/sql/ ydb/tests/stress"
3535
test_size: small,medium,large
3636
test_type: unittest,py3test,py2test,pytest
3737
- build_preset: release-tsan
3838
threads_count: 10
3939
timeout: 600
40-
build_target: "ydb/tests/sql/ ydb/tests/sql/large"
40+
build_target: "ydb/tests/sql/ ydb/tests/stress"
4141
test_size: small,medium
4242
test_type: unittest,py3test,py2test,pytest
4343

0 commit comments

Comments
 (0)