Skip to content

Commit 55276be

Browse files
Merge branch 'main' into inference_params
2 parents 27f9782 + 2848978 commit 55276be

File tree

872 files changed

+26383
-6816
lines changed

Some content is hidden

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

872 files changed

+26383
-6816
lines changed

.github/actions/build_and_test_ya/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ inputs:
4242
additional_ya_make_args:
4343
type: string
4444
default: ""
45+
test_retry_count:
46+
default: ""
47+
description: "how many times to retry failed tests"
4548
secs:
4649
type: string
4750
default: ""
@@ -124,6 +127,7 @@ runs:
124127
bazel_remote_username: ${{ fromJSON( inputs.secs ).REMOTE_CACHE_USERNAME || '' }}
125128
bazel_remote_password: ${{ fromJSON( inputs.secs ).REMOTE_CACHE_PASSWORD || '' }}
126129
put_build_results_to_cache: ${{ inputs.put_build_results_to_cache }}
130+
test_retry_count: ${{ inputs.test_retry_count }}
127131

128132
- name: build_stats
129133
shell: bash

.github/actions/test_ya/action.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,6 @@ runs:
334334
IS_LAST_RETRY=1
335335
fi
336336

337-
s3cmd sync --follow-symlinks --acl-public --no-progress --stats --no-check-md5 "$PUBLIC_DIR/" "$S3_BUCKET_PATH/"
338-
339337
if [ $FAILED_TESTS_COUNT -gt 500 ]; then
340338
IS_LAST_RETRY=1
341339
TOO_MANY_FAILED="Too many tests failed, NOT going to retry"
@@ -351,9 +349,17 @@ runs:
351349
--status_report_file statusrep.txt \
352350
--is_retry $IS_RETRY \
353351
--is_last_retry $IS_LAST_RETRY \
352+
--comment_color_file summary_color.txt \
353+
--comment_text_file summary_text.txt \
354354
"Tests" $CURRENT_PUBLIC_DIR/ya-test.html "$CURRENT_JUNIT_XML_PATH"
355355
fi
356-
356+
357+
s3cmd sync --follow-symlinks --acl-public --no-progress --stats --no-check-md5 "$PUBLIC_DIR/" "$S3_BUCKET_PATH/"
358+
359+
if [ "${{ inputs.run_tests }}" = "true" ]; then
360+
cat summary_text.txt | GITHUB_TOKEN="${{ github.token }}" .github/scripts/tests/comment-pr.py --color `cat summary_color.txt`
361+
fi
362+
357363
# upload tests results to YDB
358364
ydb_upload_run_name="${TESTMO_RUN_NAME// /"_"}"
359365
result=`.github/scripts/upload_tests_results.py --test-results-file ${CURRENT_JUNIT_XML_PATH} --run-timestamp $(date +%s) --commit $(git rev-parse HEAD) --build-type ${BUILD_PRESET} --pull $ydb_upload_run_name --job-name "${{ github.workflow }}" --job-id "${{ github.run_id }}" --branch ${GITHUB_REF_NAME}`

.github/config/muted_ya.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,4 @@ ydb/tests/functional/tenants test_storage_config.py.TestStorageConfig.*
101101
ydb/tests/functional/tenants test_tenants.py.*
102102
ydb/tests/functional/ydb_cli test_ydb_impex.py.TestImpex.test_big_dataset*
103103
ydb/tests/tools/pq_read/test test_timeout.py.TestTimeout.test_timeout
104+
ydb/core/kqp/ut/query KqpStats.SysViewClientLost

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ def main():
3232
event = json.load(fp)
3333

3434
pr = gh.create_from_raw_data(PullRequest, event["pull_request"])
35-
update_pr_comment_text(pr, build_preset, run_number, color, args.text.read().rstrip(), args.rewrite)
35+
text = args.text.read()
36+
if text.endswith("\n"):
37+
# dirty hack because echo adds a new line
38+
# and 'echo | comment-pr.py' leads to an extra newline
39+
text = text[:-1]
40+
41+
update_pr_comment_text(pr, build_preset, run_number, color, text, args.rewrite)
3642

3743

3844
if __name__ == "__main__":

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

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
#!/usr/bin/env python3
22
import argparse
33
import dataclasses
4-
import datetime
5-
import json
64
import os
7-
import re
85
import sys
96
import traceback
10-
from github import Github, Auth as GithubAuth
11-
from github.PullRequest import PullRequest
127
from enum import Enum
138
from operator import attrgetter
14-
from typing import List, Optional, Dict
9+
from typing import List, Dict
1510
from jinja2 import Environment, FileSystemLoader, StrictUndefined
1611
from junit_utils import get_property_value, iter_xml_files
17-
from gh_status import update_pr_comment_text
1812
from get_test_history import get_test_history
1913

2014

@@ -328,7 +322,7 @@ def gen_summary(public_dir, public_dir_url, paths, is_retry: bool, build_preset)
328322
return summary
329323

330324

331-
def get_comment_text(pr: PullRequest, summary: TestSummary, summary_links: str, is_last_retry: bool)->tuple[str, list[str]]:
325+
def get_comment_text(summary: TestSummary, summary_links: str, is_last_retry: bool)->tuple[str, list[str]]:
332326
color = "red"
333327
if summary.is_failed:
334328
color = "red" if is_last_retry else "yellow"
@@ -379,6 +373,8 @@ def main():
379373
parser.add_argument('--status_report_file', required=False)
380374
parser.add_argument('--is_retry', required=True, type=int)
381375
parser.add_argument('--is_last_retry', required=True, type=int)
376+
parser.add_argument('--comment_color_file', required=True)
377+
parser.add_argument('--comment_text_file', required=True)
382378
parser.add_argument("args", nargs="+", metavar="TITLE html_out path")
383379
args = parser.parse_args()
384380

@@ -397,21 +393,17 @@ def main():
397393
else:
398394
overall_status = "success"
399395

400-
if os.environ.get("GITHUB_EVENT_NAME") in ("pull_request", "pull_request_target"):
401-
gh = Github(auth=GithubAuth.Token(os.environ["GITHUB_TOKEN"]))
402-
run_number = int(os.environ.get("GITHUB_RUN_NUMBER"))
396+
color, text = get_comment_text(summary, args.summary_links, is_last_retry=bool(args.is_last_retry))
403397

404-
with open(os.environ["GITHUB_EVENT_PATH"]) as fp:
405-
event = json.load(fp)
398+
with open(args.comment_color_file, "w") as f:
399+
f.write(color)
406400

407-
pr = gh.create_from_raw_data(PullRequest, event["pull_request"])
408-
color, text = get_comment_text(pr, summary, args.summary_links, is_last_retry=bool(args.is_last_retry))
401+
with open(args.comment_text_file, "w") as f:
402+
f.write('\n'.join(text))
403+
f.write('\n')
409404

410-
update_pr_comment_text(pr, args.build_preset, run_number, color, text='\n'.join(text), rewrite=False)
411-
412-
if args.status_report_file:
413-
with open(args.status_report_file, 'w') as fo:
414-
fo.write(overall_status)
405+
with open(args.status_report_file, "w") as f:
406+
f.write(overall_status)
415407

416408

417409
if __name__ == "__main__":

.github/workflows/acceptance_run.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: [ self-hosted, "${{ inputs.runner_label || 'auto-provisioned' }}", "${{ format('build-preset-{0}', inputs.build_preset || 'relwithdebinfo') }}" ]
3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3333
with:
3434
ref: ${{ inputs.commit_sha }}
3535

.github/workflows/allowed_dirs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
cancel-in-progress: true
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515

1616
- name: Check dirs
1717
run: ${{github.workspace}}/.github/check_dirs.sh ${{github.workspace}}

.github/workflows/build_analytics.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
runs-on: [ self-hosted, "${{ inputs.runner_label || 'auto-provisioned' }}", "${{ format('build-preset-{0}', inputs.build_preset || 'relwithdebinfo') }}" ]
3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v3
36+
uses: actions/checkout@v4
3737
with:
3838
ref: ${{ inputs.commit_sha }}
3939

@@ -49,7 +49,6 @@ jobs:
4949
build_target: ${{ inputs.build_target || 'ydb/apps/ydbd'}}
5050
increment: false
5151
run_tests: false
52-
test_retry_count: 1
5352
put_build_results_to_cache: false
5453
additional_ya_make_args: "-DDUMP_LINKER_MAP -DCOMPILER_TIME_TRACE --add-result .json"
5554
secs: ${{ format('{{"TESTMO_TOKEN2":"{0}","AWS_KEY_ID":"{1}","AWS_KEY_VALUE":"{2}","REMOTE_CACHE_USERNAME":"{3}","REMOTE_CACHE_PASSWORD":"{4}"}}',

.github/workflows/build_and_test_provisioned.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
runs-on: [ self-hosted, "${{ inputs.runner_label }}" ]
4949
steps:
5050
- name: Checkout
51-
uses: actions/checkout@v3
51+
uses: actions/checkout@v4
5252
with:
5353
ref: ${{ inputs.checkout_ref }}
5454
- name: Build

.github/workflows/build_and_test_ya.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
runs-on: [ self-hosted, "${{ inputs.runner_label }}", "${{ inputs.runner_additional_label || inputs.runner_label }}"]
6666
steps:
6767
- name: Checkout
68-
uses: actions/checkout@v3
68+
uses: actions/checkout@v4
6969
with:
7070
ref: ${{ inputs.commit_sha }}
7171

0 commit comments

Comments
 (0)