mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Revert "Bugfix check requires either functional _or_ stateless test"
This reverts commit b8b64b1d15
.
This commit is contained in:
parent
494d5264dd
commit
cf70b79f74
1
.github/workflows/pull_request.yml
vendored
1
.github/workflows/pull_request.yml
vendored
@ -2728,7 +2728,6 @@ jobs:
|
||||
sudo rm -fr "$TEMP_PATH"
|
||||
IntegrationTestsBugfixCheck:
|
||||
runs-on: [self-hosted, stress-tester]
|
||||
needs: [FunctionalStatelessTestBugfixCheck]
|
||||
steps:
|
||||
- name: Set envs
|
||||
run: |
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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")
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user