Merge pull request #63540 from ClickHouse/run_azure_on_master

Fix azure tests run on master
This commit is contained in:
alesapin 2024-05-08 16:28:09 +00:00 committed by GitHub
commit dc7f515945
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 6 deletions

View File

@ -854,6 +854,7 @@ class CiOptions:
jobs_to_do: List[str],
jobs_to_skip: List[str],
jobs_params: Dict[str, Dict[str, Any]],
pr_info: PRInfo,
) -> Tuple[List[str], List[str], Dict[str, Dict[str, Any]]]:
"""
Applies specified options on CI Run Config
@ -953,7 +954,8 @@ class CiOptions:
jobs_params[job] = {
"batches": list(range(num_batches)),
"num_batches": num_batches,
"run_if_ci_option_include_set": job_config.run_by_ci_option,
"run_if_ci_option_include_set": job_config.run_by_ci_option
and pr_info.is_pr,
}
# 4. Handle "batch_" tags
@ -1444,7 +1446,8 @@ def _configure_jobs(
jobs_params[job] = {
"batches": batches_to_do,
"num_batches": num_batches,
"run_if_ci_option_include_set": job_config.run_by_ci_option,
"run_if_ci_option_include_set": job_config.run_by_ci_option
and pr_info.is_pr,
}
elif add_to_skip:
# treat job as being skipped only if it's controlled by digest
@ -1469,7 +1472,7 @@ def _configure_jobs(
]
jobs_to_do, jobs_to_skip, jobs_params = ci_options.apply(
jobs_to_do, jobs_to_skip, jobs_params
jobs_to_do, jobs_to_skip, jobs_params, pr_info
)
return {

View File

@ -4,6 +4,7 @@
import unittest
from ci import CiOptions
from pr_info import PRInfo
_TEST_BODY_1 = """
#### Run only:
@ -164,7 +165,7 @@ class TestCIOptions(unittest.TestCase):
}
}
jobs_to_do, jobs_to_skip, job_params = ci_options.apply(
jobs_to_do, jobs_to_skip, job_params
jobs_to_do, jobs_to_skip, job_params, PRInfo()
)
self.assertCountEqual(
jobs_to_do,
@ -196,7 +197,7 @@ class TestCIOptions(unittest.TestCase):
jobs_to_skip = []
job_params = {}
jobs_to_do, jobs_to_skip, job_params = ci_options.apply(
jobs_to_do, jobs_to_skip, job_params
jobs_to_do, jobs_to_skip, job_params, PRInfo()
)
self.assertCountEqual(
jobs_to_do,
@ -231,7 +232,7 @@ class TestCIOptions(unittest.TestCase):
job_params[job] = {"run_if_ci_option_include_set": False}
jobs_to_do, jobs_to_skip, job_params = ci_options.apply(
jobs_to_do, jobs_to_skip, job_params
jobs_to_do, jobs_to_skip, job_params, PRInfo()
)
self.assertNotIn(
"Stateless tests (azure, asan)",