-
Notifications
You must be signed in to change notification settings - Fork 566
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
base: main
Are you sure you want to change the base?
Mute tools for pr #9468
Conversation
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
⚪
🟢 |
.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 |
There was a problem hiding this comment.
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)" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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)" |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я что-то не уверен, что есть потребность в отдельном файле для этой функции, предлагаю подумать чтобы пока переместить в место использования
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:
.github/scripts/tests/get_muted_tests.py will be also used in analytics ( with
--mode=upload_muted_tests
).github/scripts/analytics/get_mute_issues.py will be used for geting issues for muted tests
Changelog category
Additional information
fixes after review