diff options
author | Kirill Rysin <35688753+naspirato@users.noreply.github.com> | 2024-08-30 11:52:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-30 12:52:07 +0300 |
commit | c859376d925410b99af317b42d2c2f7dc887ca3b (patch) | |
tree | caa42727b64ce02d871c9bcc1c4527bd255b3fbd /.github/scripts/analytics/flaky_tests_history.py | |
parent | 9445a62996f6ec536fea0927abe084c6092f1933 (diff) | |
download | ydb-c859376d925410b99af317b42d2c2f7dc887ca3b.tar.gz |
Upload testowners analytics in workflow (#8156)
Diffstat (limited to '.github/scripts/analytics/flaky_tests_history.py')
-rwxr-xr-x | .github/scripts/analytics/flaky_tests_history.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/.github/scripts/analytics/flaky_tests_history.py b/.github/scripts/analytics/flaky_tests_history.py index 60ed1afefc..cc5d314c5f 100755 --- a/.github/scripts/analytics/flaky_tests_history.py +++ b/.github/scripts/analytics/flaky_tests_history.py @@ -15,19 +15,17 @@ config = configparser.ConfigParser() config_file_path = f"{dir}/../../config/ydb_qa_db.ini" config.read(config_file_path) -build_preset = os.environ.get("build_preset") -branch = os.environ.get("branch_to_compare") DATABASE_ENDPOINT = config["QA_DB"]["DATABASE_ENDPOINT"] DATABASE_PATH = config["QA_DB"]["DATABASE_PATH"] def create_tables(pool, table_path): - print(f"> create table: {table_path}") + print(f"> create table if not exists:'{table_path}'") def callee(session): session.execute_scheme(f""" - CREATE table `{table_path}` ( + CREATE table IF NOT EXISTS `{table_path}` ( `test_name` Utf8 NOT NULL, `suite_folder` Utf8 NOT NULL, `full_name` Utf8 NOT NULL, @@ -154,9 +152,9 @@ def main(): from `test_results/test_runs_column` where status in ('failure','mute') - and job_name in ('Nightly-run', 'Postcommit_relwithdebinfo') - and build_type = 'relwithdebinfo' and - run_timestamp >= Date('{last_date}') -{history_for_n_day}*Interval("P1D") + and job_name in ('Nightly-run', 'Postcommit_relwithdebinfo','Postcommit_asan') + and branch = 'main' + and run_timestamp >= Date('{last_date}') -{history_for_n_day}*Interval("P1D") ) as tests_with_fails cross join ( select @@ -164,8 +162,8 @@ def main(): from `test_results/test_runs_column` where status in ('failure','mute') - and job_name in ('Nightly-run', 'Postcommit_relwithdebinfo') - and build_type = 'relwithdebinfo' + and job_name in ('Nightly-run', 'Postcommit_relwithdebinfo','Postcommit_asan') + and branch = 'main' and run_timestamp>= Date('{last_date}') ) as date_list ) as test_and_date |