diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index de72cb5daa9..e6bc2bff212 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -2728,7 +2728,6 @@ jobs: sudo rm -fr "$TEMP_PATH" IntegrationTestsBugfixCheck: runs-on: [self-hosted, stress-tester] - needs: [FunctionalStatelessTestBugfixCheck] steps: - name: Set envs run: | diff --git a/tests/ci/commit_status_helper.py b/tests/ci/commit_status_helper.py index 2ec7aba7801..385567962d5 100644 --- a/tests/ci/commit_status_helper.py +++ b/tests/ci/commit_status_helper.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import time -import fnmatch from env_helper import GITHUB_REPOSITORY from ci_config import CI_CONFIG @@ -50,23 +49,3 @@ def post_commit_status(gh, sha, check_name, description, state, report_url): if i == RETRY - 1: raise ex time.sleep(i) - - -def get_post_commit_status(gh, sha, check_name): - MAX_PAGES_NUM = 100 - for i in range(RETRY): - try: - statuses = get_commit(gh, sha, 1).get_statuses() - for num in range(MAX_PAGES_NUM): - page = statuses.get_page(num) - if not page: - break - for status in page: - if fnmatch.fnmatch(status.context, check_name): - return status - num += 1 - return None - except Exception as ex: - if i == RETRY - 1: - raise ex - time.sleep(i) diff --git a/tests/ci/functional_test_check.py b/tests/ci/functional_test_check.py index 82e2e4dbb74..60f5d4ff4a5 100644 --- a/tests/ci/functional_test_check.py +++ b/tests/ci/functional_test_check.py @@ -22,9 +22,6 @@ from stopwatch import Stopwatch from rerun_helper import RerunHelper from tee_popen import TeePopen -NO_CHANGES_MSG = 'Nothing to run' - - def get_additional_envs(check_name, run_by_hash_num, run_by_hash_total): result = [] if 'DatabaseReplicated' in check_name: @@ -178,8 +175,8 @@ if __name__ == "__main__": tests_to_run = get_tests_to_run(pr_info) if not tests_to_run: commit = get_commit(gh, pr_info.sha) - state = 'success' # mark as success, but integration tests check would fail if it also doesn't have any tests - commit.create_status(context=check_name_with_group, description=NO_CHANGES_MSG, state=state) + state = override_status('success', check_name, validate_bugix_check) + commit.create_status(context=check_name_with_group, description='Not found changed stateless tests', state=state) sys.exit(0) image_name = get_image_name(check_name) @@ -225,13 +222,7 @@ if __name__ == "__main__": s3_helper = S3Helper('https://s3.amazonaws.com') state, description, test_results, additional_logs = process_results(result_path, server_log_path) - if validate_bugix_check: - if state != 'success': - description = f'Failed tests found: {description}' - # force success, because even if we don't have failed tests here, we need to check if there're intergration tests - state = 'success' - else: - state = override_status(state, check_name) + state = override_status(state, check_name, validate_bugix_check) ch_helper = ClickHouseHelper() mark_flaky_tests(ch_helper, check_name, test_results) diff --git a/tests/ci/integration_test_check.py b/tests/ci/integration_test_check.py index 6f09f92bd41..02007d42101 100644 --- a/tests/ci/integration_test_check.py +++ b/tests/ci/integration_test_check.py @@ -17,7 +17,7 @@ from build_download_helper import download_all_deb_packages from download_previous_release import download_previous_release from upload_result_helper import upload_results from docker_pull_helper import get_images_with_versions -from commit_status_helper import post_commit_status, override_status, get_post_commit_status +from commit_status_helper import post_commit_status, override_status from clickhouse_helper import ClickHouseHelper, mark_flaky_tests, prepare_tests_results_for_clickhouse from stopwatch import Stopwatch from rerun_helper import RerunHelper @@ -104,13 +104,6 @@ def process_results(result_folder): return state, description, test_results, additional_files -def is_stateless_bugfix_check_already_passed(gh, git_sha): - status = get_post_commit_status(gh, git_sha, 'Stateless tests bugfix validate check*') - if status is None: - return False - return status.description.startswith('Failed tests found') - - if __name__ == "__main__": logging.basicConfig(level=logging.INFO) @@ -149,10 +142,6 @@ if __name__ == "__main__": logging.info("Check is already finished according to github status, exiting") sys.exit(0) - if validate_bugix_check and is_stateless_bugfix_check_already_passed(gh, pr_info.sha): - logging.info("There already are stateless tests for this bugfix") - sys.exit(0) - images = get_images_with_versions(reports_path, IMAGES) images_with_versions = {i.name: i.version for i in images} result_path = os.path.join(temp_path, "output_dir") diff --git a/tests/integration/ci-runner.py b/tests/integration/ci-runner.py index f67cd902e41..d45352fa909 100755 --- a/tests/integration/ci-runner.py +++ b/tests/integration/ci-runner.py @@ -12,7 +12,6 @@ import subprocess import time import zlib # for crc32 -NO_CHANGES_MSG = 'Nothing to run' MAX_RETRY = 3 NUM_WORKERS = 5 @@ -711,7 +710,7 @@ class ClickhouseIntegrationTestsRunner: tests_to_run = get_changed_tests_to_run(pr_info, repo_path) if not tests_to_run: logging.info("No tests to run found") - return "success", NO_CHANGES_MSG, [(NO_CHANGES_MSG, "OK")], "" + return "success", "Nothing to run", [("Nothing to run", "OK")], "" self._install_clickhouse(build_path) logging.info("Found '%s' tests to run", " ".join(tests_to_run))