Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mute tools for pr #9468

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Mute tools for pr #9468

wants to merge 24 commits into from

Conversation

naspirato
Copy link
Collaborator

@naspirato naspirato commented Sep 18, 2024

Changelog entry

In the PR comment for the relwithdebinfo, there will now be information about muted and unmuted tests in this PR. It starts only if the muted_ya.txt file was modified in the PR in step Check for changes in muted_ya

The step name: show diff mute_ya.txt makes the following actions:

  1. Get all tests list.
  2. Apply mute rules for all, added and deleted lines in the mute_ya file.
  3. Save all tests, all muted tests, newly muted tests, and unmuted tests locally as files.
  4. Upload all these files to S3.
  5. Add a comment to the PR in case there are any changes to the muted tests.

.github/scripts/tests/get_muted_tests.py will be also used in analytics ( with --mode=upload_muted_tests)

  1. it will be upload all tests with attribute is_muted in database
  2. not in use now

.github/scripts/analytics/get_mute_issues.py will be used for geting issues for muted tests

  1. not in use now

Changelog category

  • Not for changelog (changelog entry is not required)

Additional information

fixes after review

  • git fetch deleted
  • used HEAD and HEAD~1 commits
  • file vars renamed
  • sorting of all tests moved in mute_applier func
  • copy-paste of YaMuteCheck replaced with import
  • transform-ya-junit.py renamed to transform_ya_junit.py, all calls updated
  • git_file_diff refactored - now we manualy compare file in two versions

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 20:18:48 UTC Pre-commit check linux-x86_64-release-clang14 for 55f5afa has started.
2024-09-18 20:18:58 UTC Artifacts will be uploaded here
2024-09-18 20:21:21 UTC ya make is running...
🟢 2024-09-18 20:21:29 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 20:21:17 UTC Pre-commit check linux-x86_64-relwithdebinfo for 55f5afa has started.
2024-09-18 20:21:28 UTC Artifacts will be uploaded here
2024-09-18 20:23:53 UTC ya make is running...
🟢 2024-09-18 20:23:58 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-18 20:24:04 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 20:21:20 UTC Pre-commit check linux-x86_64-release-asan for 55f5afa has started.
2024-09-18 20:21:30 UTC Artifacts will be uploaded here
2024-09-18 20:23:56 UTC ya make is running...
🟢 2024-09-18 20:24:01 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-18 20:24:07 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 20:42:09 UTC Pre-commit check linux-x86_64-release-asan for 6d60fef has started.
2024-09-18 20:42:53 UTC Artifacts will be uploaded here
2024-09-18 20:45:51 UTC ya make is running...
🟢 2024-09-18 20:45:56 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-18 20:46:01 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 20:42:34 UTC Pre-commit check linux-x86_64-release-clang14 for 6d60fef has started.
2024-09-18 20:42:44 UTC Artifacts will be uploaded here
2024-09-18 20:45:05 UTC ya make is running...
🟢 2024-09-18 20:45:13 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 20:45:32 UTC Pre-commit check linux-x86_64-relwithdebinfo for 6d60fef has started.
2024-09-18 20:45:42 UTC Artifacts will be uploaded here
2024-09-18 20:48:05 UTC ya make is running...
🟢 2024-09-18 20:48:10 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-18 20:48:16 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 20:53:55 UTC Pre-commit check linux-x86_64-release-asan for a29517e has started.
2024-09-18 20:54:04 UTC Artifacts will be uploaded here
2024-09-18 20:56:30 UTC ya make is running...
🟢 2024-09-18 20:56:35 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-18 20:56:41 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 21:05:09 UTC Pre-commit check linux-x86_64-relwithdebinfo for a29517e has started.
2024-09-18 21:05:19 UTC Artifacts will be uploaded here
2024-09-18 21:07:38 UTC ya make is running...
🟢 2024-09-18 21:07:43 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-18 21:07:48 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 20:54:10 UTC Pre-commit check linux-x86_64-release-clang14 for a29517e has started.
2024-09-18 20:54:18 UTC Artifacts will be uploaded here
2024-09-18 20:56:37 UTC ya make is running...
🟢 2024-09-18 20:56:44 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 21:28:15 UTC Pre-commit check linux-x86_64-release-asan for 28a0a86 has started.
2024-09-18 21:28:25 UTC Artifacts will be uploaded here
2024-09-18 21:30:46 UTC ya make is running...
🟢 2024-09-18 21:30:51 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-18 21:30:56 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 21:30:43 UTC Pre-commit check linux-x86_64-release-clang14 for 28a0a86 has started.
2024-09-18 21:30:53 UTC Artifacts will be uploaded here
2024-09-18 21:33:17 UTC ya make is running...
🟢 2024-09-18 21:33:24 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 21:30:50 UTC Pre-commit check linux-x86_64-relwithdebinfo for 28a0a86 has started.
2024-09-18 21:31:00 UTC Artifacts will be uploaded here
2024-09-18 21:33:21 UTC ya make is running...
🟢 2024-09-18 21:33:26 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-18 21:33:32 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 21:42:17 UTC Pre-commit check linux-x86_64-release-clang14 for 98849ae has started.
2024-09-18 21:42:28 UTC Artifacts will be uploaded here
2024-09-18 21:44:53 UTC ya make is running...
🟢 2024-09-18 21:45:00 UTC Build successful.

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 21:42:25 UTC Pre-commit check linux-x86_64-relwithdebinfo for 98849ae has started.
2024-09-18 21:42:34 UTC Artifacts will be uploaded here
2024-09-18 21:44:53 UTC ya make is running...
🟢 2024-09-18 21:44:58 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-18 21:45:04 UTC Build successful.
🟠 2024-09-18 21:46:02 UTC Muted new 6 tests

Copy link

github-actions bot commented Sep 18, 2024

2024-09-18 21:42:38 UTC Pre-commit check linux-x86_64-release-asan for 98849ae has started.
2024-09-18 21:42:48 UTC Artifacts will be uploaded here
2024-09-18 21:45:16 UTC ya make is running...
🟢 2024-09-18 21:45:22 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-18 21:45:28 UTC Build successful.

@naspirato naspirato changed the title Mute tools 4 Mute tools for pr Sep 19, 2024
Copy link

github-actions bot commented Sep 20, 2024

2024-09-20 12:02:27 UTC Pre-commit check linux-x86_64-release-clang14 for 4561376 has started.
2024-09-20 12:03:10 UTC Artifacts will be uploaded here
2024-09-20 12:06:08 UTC ya make is running...
🟢 2024-09-20 12:06:15 UTC Build successful.

Copy link

github-actions bot commented Sep 20, 2024

2024-09-23 11:12:31 UTC Pre-commit check linux-x86_64-relwithdebinfo for 4561376 has started.
2024-09-23 11:12:35 UTC Artifacts will be uploaded here
2024-09-23 11:14:59 UTC ya make is running...
🟢 2024-09-23 11:15:04 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-23 11:15:10 UTC Build successful.

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:08:28 UTC Pre-commit check linux-x86_64-release-clang14 for cf02d4d has started.
2024-09-24 13:08:40 UTC Artifacts will be uploaded here
2024-09-24 13:11:04 UTC ya make is running...
🟢 2024-09-24 13:11:13 UTC Build successful.

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:11:13 UTC Pre-commit check linux-x86_64-relwithdebinfo for cf02d4d has started.
2024-09-24 13:11:17 UTC Artifacts will be uploaded here
2024-09-24 13:13:40 UTC ya make is running...
🟢 2024-09-24 13:13:46 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-24 13:13:53 UTC Build successful.

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:18:26 UTC Pre-commit check linux-x86_64-release-asan for 044e2a7 has started.
2024-09-24 13:18:31 UTC Artifacts will be uploaded here
2024-09-24 13:20:52 UTC ya make is running...
🟢 2024-09-24 13:20:58 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-24 13:21:04 UTC Build successful.

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:21:34 UTC Pre-commit check linux-x86_64-release-clang14 for 044e2a7 has started.
2024-09-24 13:21:50 UTC Artifacts will be uploaded here
2024-09-24 13:24:11 UTC ya make is running...
🟢 2024-09-24 13:24:19 UTC Build successful.

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:21:43 UTC Pre-commit check linux-x86_64-relwithdebinfo for 044e2a7 has started.
2024-09-24 13:21:54 UTC Artifacts will be uploaded here
2024-09-24 13:24:16 UTC ya make is running...
🟢 2024-09-24 13:24:22 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-24 13:24:28 UTC Build successful.

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:31:12 UTC Pre-commit check linux-x86_64-release-clang14 for bc928b2 has started.
2024-09-24 13:31:16 UTC Artifacts will be uploaded here
2024-09-24 13:33:36 UTC ya make is running...
🟢 2024-09-24 13:33:44 UTC Build successful.

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:31:13 UTC Pre-commit check linux-x86_64-relwithdebinfo for bc928b2 has started.
2024-09-24 13:31:17 UTC Artifacts will be uploaded here
2024-09-24 13:33:38 UTC ya make is running...
🟢 2024-09-24 13:33:44 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-24 13:33:50 UTC Build successful.
🟠 2024-09-24 13:34:09 UTC Unmuted 239 tests

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:34:24 UTC Pre-commit check linux-x86_64-release-asan for bc928b2 has started.
2024-09-24 13:35:08 UTC Artifacts will be uploaded here
2024-09-24 13:36:29 UTC Check cancelled

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:38:20 UTC Pre-commit check linux-x86_64-release-clang14 for 7696d84 has started.
2024-09-24 13:38:25 UTC Artifacts will be uploaded here
2024-09-24 13:40:45 UTC ya make is running...
🟢 2024-09-24 13:40:53 UTC Build successful.

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:43:16 UTC Pre-commit check linux-x86_64-relwithdebinfo for 7696d84 has started.
2024-09-24 13:43:28 UTC Artifacts will be uploaded here
2024-09-24 13:45:48 UTC ya make is running...
🟢 2024-09-24 13:45:55 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-24 13:46:01 UTC Build successful.

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:46:56 UTC Pre-commit check linux-x86_64-release-asan for 7696d84 has started.
2024-09-24 13:47:02 UTC Artifacts will be uploaded here
2024-09-24 13:49:03 UTC Check cancelled

@naspirato naspirato added the rebase-and-check Rebase PR with the current main and check label Sep 24, 2024
@github-actions github-actions bot removed the rebase-and-check Rebase PR with the current main and check label Sep 24, 2024
Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:50:25 UTC Pre-commit check linux-x86_64-relwithdebinfo for 7696d84 has started.
2024-09-24 13:50:31 UTC Artifacts will be uploaded here
2024-09-24 13:52:54 UTC ya make is running...
🟢 2024-09-24 13:53:01 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-24 13:53:08 UTC Build successful.

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:50:36 UTC Pre-commit check linux-x86_64-release-clang14 for 7696d84 has started.
2024-09-24 13:50:41 UTC Artifacts will be uploaded here
2024-09-24 13:53:12 UTC ya make is running...
🟢 2024-09-24 13:53:21 UTC Build successful.

Copy link

github-actions bot commented Sep 24, 2024

2024-09-24 13:54:41 UTC Pre-commit check linux-x86_64-release-asan for 7696d84 has started.
2024-09-24 13:54:53 UTC Artifacts will be uploaded here
2024-09-24 13:57:14 UTC ya make is running...
🟢 2024-09-24 13:57:21 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2024-09-24 13:57:27 UTC Build successful.

.github/scripts/tests/get_muted_tests.py --output_folder "$PUBLIC_DIR/mute_info/" get_mute_diff --base_sha $ORIGINAL_HEAD~1 --head_sha $ORIGINAL_HEAD --job-id "${{ github.run_id }}" --branch "${GITHUB_REF_NAME}"
FILE_PATH=$PUBLIC_DIR/mute_info/2_new_muted_tests.txt
SEPARATOR=""
if [ -f "$FILE_PATH" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мне кажется лишняя проверка: файл наверное всегда должен быть?

LINE_COUNT=$(wc -l < "$FILE_PATH")
if [ "$LINE_COUNT" -gt 0 ]; then
SEPARATOR=', '
MESSAGE="Muted new $LINE_COUNT [tests](${PUBLIC_DIR_URL}/mute_info/2_new_muted_tests.txt)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Как вариант, возможно лучше бы формировать мессагу на уровне питона, а не программировать на баше

fi
fi
FILE_PATH=$PUBLIC_DIR/mute_info/3_unmuted_tests.txt
if [ -f "$FILE_PATH" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тоже кажется лишняя проверка

fi
FILE_PATH=$PUBLIC_DIR/mute_info/3_unmuted_tests.txt
if [ -f "$FILE_PATH" ]; then
LINE_COUNT_unmute=$(wc -l < "$FILE_PATH")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LINE_COUNT_unmute -- какой-то странный стайл именования, предлагаю всю перменную в uppercase

if [ -f "$FILE_PATH" ]; then
LINE_COUNT_unmute=$(wc -l < "$FILE_PATH")
if [ "$LINE_COUNT_unmute" -gt 0 ]; then
MESSAGE="${MESSAGE}${SEPARATOR}Unmuted $LINE_COUNT_unmute [tests](${PUBLIC_DIR_URL}/mute_info/3_unmuted_tests.txt)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Теперь я еще больше уверен, что надо на стороне питона формировать сообщение) Давай переделаем после залития

import sys


def get_diff_lines_of_file(base_sha, head_sha, file_path):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я что-то не уверен, что есть потребность в отдельном файле для этой функции, предлагаю подумать чтобы пока переместить в место использования

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants