Skip to content

Commit a2d335b

Browse files
authored
Merge 179cbe3 into 96c9c9b
2 parents 96c9c9b + 179cbe3 commit a2d335b

File tree

2 files changed

+62
-38
lines changed

2 files changed

+62
-38
lines changed

.github/actions/test_ya/action.yml

+61-38
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ runs:
8383
echo "PUBLIC_DIR_URL=$PUBLIC_DIR_URL" >> $GITHUB_ENV
8484
mkdir -p $PUBLIC_DIR
8585
86-
export YA_MAKE_OUT_DIR=$TMP_DIR/out
87-
echo "YA_MAKE_OUT_DIR=$YA_MAKE_OUT_DIR" >> $GITHUB_ENV
88-
mkdir -p $YA_MAKE_OUT_DIR
89-
9086
echo "JUNIT_REPORT_XML=$PUBLIC_DIR/junit.xml" >> $GITHUB_ENV
9187
echo "TESTMO_URL=${{ inputs.testman_url }}" >> $GITHUB_ENV
9288
echo "SUMMARY_LINKS=$PUBLIC_DIR/summary_links.txt" >> $GITHUB_ENV
@@ -244,31 +240,76 @@ runs:
244240
params+=(-A)
245241
fi
246242
243+
params+=(
244+
--stat -DCONSISTENT_DEBUG --no-dir-outputs
245+
--test-failure-code 0 --build-all
246+
--cache-size 2TB --force-build-depends
247+
)
248+
247249
echo "::debug::get version"
248250
./ya --version
249251
252+
YA_MAKE_OUT_DIR=$TMP_DIR/out
253+
250254
YA_MAKE_OUTPUT="$PUBLIC_DIR/ya_make_output.log"
251255
YA_MAKE_OUTPUT_URL="$PUBLIC_DIR_URL/ya_make_output.log"
252256
echo "10 [Ya make output]($YA_MAKE_OUTPUT_URL)" >> $SUMMARY_LINKS
253257
254-
echo "Build+Tests **{platform_name}-${BUILD_PRESET}** is running..." | GITHUB_TOKEN="${{ github.token }}" .github/scripts/tests/comment-pr.py
255-
set +ex
256-
(./ya make ${{ inputs.build_target }} "${params[@]}" \
257-
--stat --log-file "$PUBLIC_DIR/ya_log.log" -DCONSISTENT_DEBUG \
258-
--no-dir-outputs --test-failure-code 0 --build-all \
259-
--cache-size 2TB --force-build-depends --evlog-file "$PUBLIC_DIR/ya_evlog.jsonl" \
260-
--junit "$JUNIT_REPORT_XML" --output "$YA_MAKE_OUT_DIR"; echo $? > exit_code) |& tee $YA_MAKE_OUTPUT
261-
set -e
262-
RC=`cat exit_code`
263-
264-
265-
if [ $RC -ne 0 ]; then
266-
echo "ya make returned $RC, build failed"
267-
echo "status=failed" >> $GITHUB_OUTPUT
268-
else
258+
BUILD_FAILED=0
259+
260+
for RETRY in {1..3}
261+
do
262+
CURRENT_MESSAGE="Build+Tests **{platform_name}-${BUILD_PRESET}** is running..." | GITHUB_TOKEN="${{ github.token }}"
263+
RERUN_FAILED_TESTS=""
264+
if [ $RETRY != 1 ]; then
265+
CURRENT_MESSAGE="$CURRENT_MESSAGE (try #$RETRY)
266+
RERUN_FAILED_OPT="-X"
267+
fi
268+
echo "Build+Tests **{platform_name}-${BUILD_PRESET}** is running..." | GITHUB_TOKEN="${{ github.token }}" .github/scripts/tests/comment-pr.py
269+
CURRENT_JUNIT_XML_PATH=$PUBLIC_DIR/junit_try_$RETRY.xml
270+
set +ex
271+
(./ya make ${{ inputs.build_target }} "${params[@]}" \
272+
$RERUN_FAILED_TESTS --log-file "$PUBLIC_DIR/ya_log.log" \
273+
--evlog-file "$PUBLIC_DIR/ya_evlog.jsonl" \
274+
--junit "$CURRENT_JUNIT_XML_PATH" --output "$YA_MAKE_OUT_DIR"; echo $? > exit_code) |& tee $YA_MAKE_OUTPUT
275+
set -ex
276+
RC=`cat exit_code`
277+
278+
if [ $RC -ne 0 ]; then
279+
echo "ya make returned $RC, build failed"
280+
echo "status=failed" >> $GITHUB_OUTPUT
281+
BUILD_FAILED=1
282+
break
283+
fi
284+
285+
# fix junit files (add links, logs etc)
286+
# archive unitest reports (orig)
287+
gzip -c $CURRENT_JUNIT_XML_PATH > $PUBLIC_DIR/orig_junit_try_$RETRY.xml.gz
288+
289+
# postprocess junit report
290+
.github/scripts/tests/transform-ya-junit.py -i \
291+
-m .github/config/muted_ya.txt \
292+
--ya_out "$YA_MAKE_OUT_DIR" \
293+
--public_dir "$PUBLIC_DIR" \
294+
--public_dir_url "$PUBLIC_DIR_URL" \
295+
--log_out_dir "artifacts/try_$RETRY/logs/" \
296+
--test_stuff_out "test_artifacts/try_$RETRY/" \
297+
"$CURRENT_JUNIT_XML_PATH"
298+
cp $CURRENT_JUNIT_XML_PATH $JUNIT_REPORT_XML
299+
TESTS_RESULT=0
300+
.github/scripts/tests/fail-checker.py "$CURRENT_JUNIT_XML_PATH" || TESTS_RESULT=$?
301+
302+
if [ $TESTS_RESULT = 0 ]; then
303+
break
304+
fi
305+
done;
306+
307+
if [ $BUILD_FAILED = 0 ]; then
269308
echo "status=true" >> $GITHUB_OUTPUT
270309
fi
271-
310+
311+
# TODO: merge tests here
312+
272313

273314
- name: comment-build-status
274315
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
@@ -289,24 +330,6 @@ runs:
289330
-d '{"state":"success","description":"The check has been completed successfully","context":"build_${{inputs.build_preset}}"}'
290331
echo "Build successful." | .github/scripts/tests/comment-pr.py --ok
291332
fi
292-
293-
- name: process reports
294-
if: inputs.run_tests
295-
shell: bash
296-
run: |
297-
set -x
298-
# archive unitest reports (orig)
299-
gzip -c $JUNIT_REPORT_XML > $PUBLIC_DIR/orig_junit.xml.gz
300-
301-
# postprocess junit report
302-
.github/scripts/tests/transform-ya-junit.py -i \
303-
-m .github/config/muted_ya.txt \
304-
--ya_out "$YA_MAKE_OUT_DIR" \
305-
--public_dir "$PUBLIC_DIR" \
306-
--public_dir_url "$PUBLIC_DIR_URL" \
307-
--log_out_dir "artifacts/logs/" \
308-
--test_stuff_out "test_artifacts/" \
309-
"$JUNIT_REPORT_XML"
310333
311334
- name: Test history upload results to YDB
312335
if: inputs.run_tests

ydb/library/actors/core/ut/event_pb_payload_ut.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ Y_UNIT_TEST_SUITE(TEventProtoWithPayload) {
145145
THolder<TEvMessageWithPayloadPreSerialized> parsedEvent(static_cast<TEvMessageWithPayloadPreSerialized*>(TEvMessageWithPayloadPreSerialized::Load(data.Get())));
146146
UNIT_ASSERT_VALUES_EQUAL(parsedEvent->PreSerializedData, ""); // this field is empty after deserialization
147147
auto& record = parsedEvent->GetRecord();
148+
UNIT_ASSERT_VALUES_EQUAL(42, 420);
148149
UNIT_ASSERT_VALUES_EQUAL(record.GetMeta(), msg.GetMeta());
149150
UNIT_ASSERT_VALUES_EQUAL(record.PayloadIdSize(), msg.PayloadIdSize());
150151
UNIT_ASSERT_VALUES_EQUAL(record.PayloadIdSize(), 2);

0 commit comments

Comments
 (0)