Skip to content

Commit

Permalink
Revert "[ci][microcheck] include step id from all step job flavors (#…
Browse files Browse the repository at this point in the history
…45403)"

This reverts commit e0ac723.

Signed-off-by: can <[email protected]>
  • Loading branch information
can-anyscale committed May 23, 2024
1 parent bb982e4 commit 70668ca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .buildkite/serve.rayci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ steps:
depends_on: servepydantic1build

- label: ":ray-serve: serve: python {{matrix.python}} tests ({{matrix.worker_id}})"
if: build.pull_request.labels includes "continuous-build" || pipeline.id == "0189e759-8c96-4302-b6b5-b4274406bf89"
if: build.pull_request.labels includes "continuous-build" || pipeline.id == "0189e759-8c96-4302-b6b5-b4274406bf89" || pipeline.id == "018f4f1e-1b73-4906-9802-92422e3badaa"
tags:
- serve
- python
Expand Down
15 changes: 3 additions & 12 deletions release/ray_release/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,19 +204,10 @@ def gen_high_impact_tests(cls, prefix: str) -> Dict[str, List]:
]
step_id_to_tests = {}
for test in high_impact_tests:
recent_results = test.get_test_results()
if not recent_results:
step_id = test.get_test_results(limit=1)[0].rayci_step_id
if not step_id:
continue
recent_commit = recent_results[0].commit
for result in recent_results:
# consider all results with the same recent commit; this is to make sure
# we will include different job flavors of the same test
if result.commit != recent_commit:
continue
step_id = result.rayci_step_id
if not step_id:
continue
step_id_to_tests[step_id] = step_id_to_tests.get(step_id, []) + [test]
step_id_to_tests[step_id] = step_id_to_tests.get(step_id, []) + [test]

return step_id_to_tests

Expand Down
15 changes: 6 additions & 9 deletions release/ray_release/tests/test_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ def _stub_test(val: dict) -> Test:


def _stub_test_result(
status: ResultStatus = ResultStatus.SUCCESS, rayci_step_id="123", commit="456"
status: ResultStatus = ResultStatus.SUCCESS, rayci_step_id="123"
) -> TestResult:
return TestResult(
status=status.value,
commit=commit,
commit="1234567890",
branch="master",
url="url",
timestamp=0,
Expand Down Expand Up @@ -340,7 +340,7 @@ def gen_high_impact_tests(mock_gen_from_s3) -> None:
"name": "core_test",
Test.KEY_IS_HIGH_IMPACT: "false",
"test_results": [
_stub_test_result(rayci_step_id="corebuild", commit="123"),
_stub_test_result(rayci_step_id="corebuild"),
],
}
)
Expand All @@ -349,9 +349,7 @@ def gen_high_impact_tests(mock_gen_from_s3) -> None:
"name": "data_test_01",
Test.KEY_IS_HIGH_IMPACT: "true",
"test_results": [
_stub_test_result(rayci_step_id="databuild", commit="123"),
_stub_test_result(rayci_step_id="data15build", commit="123"),
_stub_test_result(rayci_step_id="data12build", commit="456"),
_stub_test_result(rayci_step_id="databuild"),
],
}
)
Expand All @@ -360,16 +358,15 @@ def gen_high_impact_tests(mock_gen_from_s3) -> None:
"name": "data_test_02",
Test.KEY_IS_HIGH_IMPACT: "true",
"test_results": [
_stub_test_result(rayci_step_id="databuild", commit="789"),
_stub_test_result(rayci_step_id="databuild"),
],
}
)

mock_gen_from_s3.return_value = [core_test, data_test_01, data_test_02]

assert Test.gen_high_impact_tests("linux") == {
"databuild": [data_test_01, data_test_02],
"data15build": [data_test_01],
"databuild": [data_test_01, data_test_02]
}


Expand Down

0 comments on commit 70668ca

Please sign in to comment.