Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Fix variable initializations used in test case declarations #1775

Merged
merged 2 commits into from
Dec 29, 2023

Conversation

rueian
Copy link
Contributor

@rueian rueian commented Dec 27, 2023

These global variables ray_image, ray_version, and kuberay_operator_image are heavily used in test case declarations. But currently, their value will be changed in the if __name__ == '__main__' block which runs after test case declarations.

Therefore, it causes undesired evaluations in some cases, such as

@unittest.skipIf(
ray_version == '2.8.0' or ray_version == 'nightly',

where it always evaluates the ray_version to the initial default value, instead of the value we inject via the env later.
See more details: #1770 (comment)

This PR fixes their values at the beginning of the test script and does not change them after initialization.

Related issue number

#1773

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@kevin85421 kevin85421 self-requested a review December 27, 2023 19:17
@kevin85421 kevin85421 self-assigned this Dec 27, 2023
@kevin85421
Copy link
Member

I will review this PR after #1770 gets merged.

@kevin85421
Copy link
Member

Would you mind rebasing with the master branch? Thanks!

@@ -150,18 +153,15 @@ def test_ray_serve(self):
show_cluster_info(RayFTTestCase.ray_cluster_ns)
self.fail(f"Fail to execute test_ray_serve_2.py. The exit code is {exit_code}.")

@unittest.skipIf(
ray_version == '2.8.0' or ray_version == 'nightly',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to skip nightly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. That was a mistake. We don’t need to skip nightly anymore.

@@ -150,18 +153,15 @@ def test_ray_serve(self):
show_cluster_info(RayFTTestCase.ray_cluster_ns)
self.fail(f"Fail to execute test_ray_serve_2.py. The exit code is {exit_code}.")

@unittest.skipIf(
ray_version == '2.8.0' or ray_version == 'nightly',
'test_detached_actor is too flaky with Ray 2.8.0 due to'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'test_detached_actor is too flaky with Ray 2.8.0 due to'
'test_detached_actor is too flaky with Ray 2.8.0 due to '

@unittest.skipIf(
ray_version == '2.8.0' or ray_version == 'nightly',
'test_detached_actor is too flaky with Ray 2.8.0 due to'
'https://github.com/ray-project/ray/issues/41343.'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'https://github.com/ray-project/ray/issues/41343.'
'https://github.com/ray-project/ray/issues/41343. '

Signed-off-by: Rueian <rueiancsie@gmail.com>
@kevin85421 kevin85421 merged commit 535a405 into ray-project:master Dec 29, 2023
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants