Skip to content

Conversation

@PavelEfarinov
Copy link
Collaborator

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

Nightly build is now capable of building and publishing by tags. Added trigger on tag push event

Resolves #19413 #19414

Fixed testmo tag name error. Enabled tag specific test and build workflow

Refs: #19413
Fixed asan build flags. Enabled tag build workflow on tag push event

Refs: #19413
@PavelEfarinov PavelEfarinov self-assigned this Jun 6, 2025
@PavelEfarinov PavelEfarinov changed the title Enable tag event and nightly builds #19413 #19414 Enable tag event and nightly builds Jun 6, 2025
@PavelEfarinov PavelEfarinov linked an issue Jun 6, 2025 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 15:39:07 UTC Pre-commit check linux-x86_64-relwithdebinfo for 71e0383 has started.
2025-06-06 15:39:18 UTC Artifacts will be uploaded here
2025-06-06 15:41:42 UTC ya make is running...
🟢 2025-06-06 15:41:47 UTC Tests successful.

Test history | Ya make output | Test bloat

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

🟢 2025-06-06 15:41:52 UTC Build successful.

@github-actions
Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 15:39:21 UTC Pre-commit check linux-x86_64-release-asan for 71e0383 has started.
2025-06-06 15:39:27 UTC Artifacts will be uploaded here
2025-06-06 15:42:00 UTC ya make is running...
🟢 2025-06-06 15:42:05 UTC Tests successful.

Test history | Ya make output | Test bloat

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

🟢 2025-06-06 15:42:11 UTC Build successful.

@github-actions
Copy link

github-actions bot commented Jun 6, 2025

🟢 2025-06-06 15:40:26 UTC The validation of the Pull Request description is successful.

1 similar comment
@github-actions
Copy link

github-actions bot commented Jun 6, 2025

🟢 2025-06-06 15:40:26 UTC The validation of the Pull Request description is successful.


push:
tags:
- '[0-9][0-9].[0-9].[0-9]**'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Это не совсем правильно, у нас могут быть и другие теги: например для analytics

Предлагаю все что с цифры -- считать тегом для сборки, а что уж там дальше -- неважно

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Сделал

run: |
set -x
s3cmd sync --follow-symlinks --acl-public --no-progress --stats --no-check-md5 "ydb/apps/ydbd/ydbd" "s3://ydb-builds/${{ matrix.branch }}/${{ matrix.build_preset }}/ydbd" -d
s3cmd sync --follow-symlinks --acl-public --no-progress --stats --no-check-md5 "ydb/apps/ydbd/ydbd" "s3://ydb-builds/$(echo -n "${{ matrix.branch }}" | tr -c '[:alnum:]-' '-')/${{ matrix.build_preset }}/ydbd" -d
Copy link
Collaborator

Choose a reason for hiding this comment

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

А зачем тут заменять на дефисы? Мне кажется это неправильно и будет конфьюзить людей. Не лучше ли называть ровно так же, как называется тег?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Казалось, что в s3 не разрешены точки в названиях, правлю

@maximyurchuk maximyurchuk requested a review from Copilot June 6, 2025 15:57
echo "BRANCH_NAME is set to $BRANCH_NAME"
TESTMO_BRANCH_TAG="$BRANCH_NAME"
TESTMO_BRANCH_TAG=${BRANCH_NAME//[^a-zA-Z0-9-]/-}
Copy link
Collaborator

Choose a reason for hiding this comment

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

А можешь, плз, проверить, что после этой правки ПР в ветку не ломаются?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Например, что в тестмо по прежнему все льется корректно

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Должно провериться вот тут #19453

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds tag-based triggers and improves name sanitization for nightly builds, while refining cache and debug configurations

  • Introduce push.tags event and adjust branch-selection logic to skip default branches on tag pushes
  • Update cache steps to use -DDEBUGINFO_LINES_ONLY and remove unused tokens
  • Sanitize branch names in S3 paths and TESTMO variables by stripping invalid characters

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/nightly_build.yml Added tag trigger, tweaked branch logic, updated cache args, and sanitized S3 upload path
.github/actions/test_ya/action.yml Sanitized TESTMO_BRANCH_TAG by replacing non-alphanumeric/- chars
Comments suppressed due to low confidence (1)

.github/workflows/nightly_build.yml:14

  • GitHub push event tag filters use glob patterns rather than regex. The pattern '[0-9][0-9].[0-9].[0-9]**' may not match as intended; consider a glob like '..' or 'v..' to reliably capture version tags.
-      - '[0-9][0-9].[0-9].[0-9]**'

- id: set-branches
run: |
if [[ "${{ github.event_name }}" == "schedule" || "${{ inputs.use_default_branches }}" == "true" ]]; then
if [[ "${{ github.event_name }}" == "schedule" || "${{ inputs.use_default_branches }}" == "true" && "${{ github.ref_type }}" != "tag" ]]; then
Copy link

Copilot AI Jun 6, 2025

Choose a reason for hiding this comment

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

[nitpick] The combination of || and && without grouping can lead to unexpected logic due to operator precedence. Wrap the second part in parentheses, e.g.: if [[ "${{ github.event_name }}" == "schedule" || ("${{ inputs.use_default_branches }}" == "true" && "${{ github.ref_type }}" != "tag") ]]; then.

Suggested change
if [[ "${{ github.event_name }}" == "schedule" || "${{ inputs.use_default_branches }}" == "true" && "${{ github.ref_type }}" != "tag" ]]; then
if [[ "${{ github.event_name }}" == "schedule" || ("${{ inputs.use_default_branches }}" == "true" && "${{ github.ref_type }}" != "tag") ]]; then

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Поправил

put_build_results_to_cache: false
secs: ${{ format('{{"TESTMO_TOKEN2":"{0}","AWS_KEY_ID":"{1}","AWS_KEY_VALUE":"{2}","REMOTE_CACHE_USERNAME":"{3}","REMOTE_CACHE_PASSWORD":"{4}"}}',
secrets.TESTMO_TOKEN2, secrets.AWS_KEY_ID, secrets.AWS_KEY_VALUE, secrets.REMOTE_CACHE_USERNAME, secrets.REMOTE_CACHE_PASSWORD ) }}
additional_ya_make_args: -DDEBUGINFO_LINES_ONLY # we don't need full symbols in CI checks
Copy link

Copilot AI Jun 6, 2025

Choose a reason for hiding this comment

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

An unquoted string beginning with '-' can be interpreted as a YAML list item. Quote -DDEBUGINFO_LINES_ONLY (e.g., "-DDEBUGINFO_LINES_ONLY") to ensure it’s treated as a single string argument.

Suggested change
additional_ya_make_args: -DDEBUGINFO_LINES_ONLY # we don't need full symbols in CI checks
additional_ya_make_args: "-DDEBUGINFO_LINES_ONLY" # we don't need full symbols in CI checks

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Поправил

echo "BRANCH_NAME is set to $BRANCH_NAME"
TESTMO_BRANCH_TAG="$BRANCH_NAME"
TESTMO_BRANCH_TAG=${BRANCH_NAME//[^a-zA-Z0-9-]/-}
Copy link

Copilot AI Jun 6, 2025

Choose a reason for hiding this comment

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

Parameter expansion results should be quoted to handle empty or whitespace-containing names safely. Use TESTMO_BRANCH_TAG="${BRANCH_NAME//[^a-zA-Z0-9-]/-}".

Suggested change
TESTMO_BRANCH_TAG=${BRANCH_NAME//[^a-zA-Z0-9-]/-}
TESTMO_BRANCH_TAG="${BRANCH_NAME//[^a-zA-Z0-9-]/-}"

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Поправил

@github-actions
Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 16:17:02 UTC Pre-commit check linux-x86_64-relwithdebinfo for 0717acf has started.
2025-06-06 16:17:13 UTC Artifacts will be uploaded here
2025-06-06 16:19:36 UTC ya make is running...
🟢 2025-06-06 16:19:41 UTC Tests successful.

Test history | Ya make output | Test bloat

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

🟢 2025-06-06 16:19:47 UTC Build successful.

@github-actions
Copy link

github-actions bot commented Jun 6, 2025

2025-06-06 16:17:35 UTC Pre-commit check linux-x86_64-release-asan for 0717acf has started.
2025-06-06 16:17:46 UTC Artifacts will be uploaded here
2025-06-06 16:20:11 UTC ya make is running...
🟢 2025-06-06 16:20:16 UTC Tests successful.

Test history | Ya make output | Test bloat

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

🟢 2025-06-06 16:20:22 UTC Build successful.

@PavelEfarinov PavelEfarinov merged commit 6831972 into main Jun 9, 2025
18 checks passed
@PavelEfarinov PavelEfarinov deleted the dev-tag-build-19413 branch June 9, 2025 06:18
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.

Add trigger to build new tags in nightly build Add ability to build tags in nightly build

3 participants