Skip to content

Conversation

@khluu
Copy link
Contributor

@khluu khluu commented Jul 8, 2025

  • Modify Kuberay release test trigger code to catch exception and store it in Result
  • Modify glue unit test to include Kuberay variant of the release test trigger path

khluu added 2 commits July 8, 2025 10:25
p
Signed-off-by: kevin <[email protected]>
p
Signed-off-by: kevin <[email protected]>
Copilot AI review requested due to automatic review settings July 8, 2025 10:28
@khluu khluu requested a review from a team as a code owner July 8, 2025 10:28
@khluu khluu requested a review from aslonnie July 8, 2025 10:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR extends the release test framework to support a KubeRay variant and updates unit tests accordingly.

  • Test changes to initialize a KubeRay compute config and exercise the new kuberay flag in error scenarios.
  • Glue code adds exception capture in the KubeRay path, records runtime, and maps exceptions to Result.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
release/ray_release/tests/test_glue.py Set up self.kuberay_test, extend _run to take a kuberay flag, and duplicate error-path tests for KubeRay.
release/ray_release/glue.py Wrap KubeRay execution in try/except, record start_time/runtime, call handle_exception, and rethrow.
Comments suppressed due to low confidence (3)

release/ray_release/tests/test_glue.py:320

  • [nitpick] All error paths for KubeRay are covered, but there is no test for a successful KubeRay run. Consider adding a positive test to verify that self._run(result, True) sets return_code == 0 and populates expected fields.
        self.assertEqual(result.return_code, ExitCode.CONFIG_ERROR.value)

release/ray_release/tests/test_glue.py:259

  • [nitpick] The parameter name kuberay is a bit ambiguous as a flag. Consider renaming to something like use_kuberay or is_kuberay for clarity.
    def _run(self, result: Result, kuberay: bool = False, **kwargs):

release/ray_release/tests/test_glue.py:317

  • This assertion is indented inside the with self.assertRaisesRegex(...) block, so it never runs after the exception is raised. Move it outside the with at the same indentation level to ensure it's executed.
        self.assertEqual(result.return_code, ExitCode.CONFIG_ERROR.value)

working_dir_upload_path = upload_working_dir(get_working_dir(test))
start_time = time.monotonic()
pipeline_exception = None
try:
Copy link
Collaborator

Choose a reason for hiding this comment

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

this wrapping does not really feel right.. to start, catching all Exception is not the right thing to do in most cases. could you explain what exactly you are trying to do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm using try/catch here mostly to retain the Exception that can be thrown any time commands run inside try. run_release_test_anyscale also implements the same thing. The purpose (I think) is to throw the right error code that matches with whatever errored out during the process (thus why it needs to retain the right exception msg)

@khluu khluu requested a review from aslonnie July 16, 2025 20:44
@aslonnie aslonnie added the go add ONLY when ready to merge, run all tests label Jul 19, 2025
@aslonnie aslonnie self-requested a review July 19, 2025 15:31
khluu and others added 4 commits July 21, 2025 09:00
Signed-off-by: kevin <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Kevin H. Luu <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Kevin H. Luu <[email protected]>
p
Signed-off-by: kevin <[email protected]>
@aslonnie aslonnie merged commit 81b0b1d into master Jul 21, 2025
5 checks passed
@aslonnie aslonnie deleted the khluu/gke_test branch July 21, 2025 16:30
dshepelev15 pushed a commit to dshepelev15/ray that referenced this pull request Jul 21, 2025
…roject#54415)

- Modify Kuberay release test trigger code to catch exception and store
it in `Result`
- Modify glue unit test to include Kuberay variant of the release test
trigger path

---------

Signed-off-by: kevin <[email protected]>
Signed-off-by: Kevin H. Luu <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: dshepelev15 <[email protected]>
alimaazamat pushed a commit to alimaazamat/ray that referenced this pull request Jul 24, 2025
…roject#54415)

- Modify Kuberay release test trigger code to catch exception and store
it in `Result`
- Modify glue unit test to include Kuberay variant of the release test
trigger path

---------

Signed-off-by: kevin <[email protected]>
Signed-off-by: Kevin H. Luu <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: alimaazamat <[email protected]>
krishnakalyan3 pushed a commit to krishnakalyan3/ray that referenced this pull request Jul 30, 2025
…roject#54415)

- Modify Kuberay release test trigger code to catch exception and store
it in `Result`
- Modify glue unit test to include Kuberay variant of the release test
trigger path

---------

Signed-off-by: kevin <[email protected]>
Signed-off-by: Kevin H. Luu <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Krishna Kalyan <[email protected]>
jugalshah291 pushed a commit to jugalshah291/ray_fork that referenced this pull request Sep 11, 2025
…roject#54415)

- Modify Kuberay release test trigger code to catch exception and store
it in `Result`
- Modify glue unit test to include Kuberay variant of the release test
trigger path

---------

Signed-off-by: kevin <[email protected]>
Signed-off-by: Kevin H. Luu <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: jugalshah291 <[email protected]>
dstrodtman pushed a commit to dstrodtman/ray that referenced this pull request Oct 6, 2025
…roject#54415)

- Modify Kuberay release test trigger code to catch exception and store
it in `Result`
- Modify glue unit test to include Kuberay variant of the release test
trigger path

---------

Signed-off-by: kevin <[email protected]>
Signed-off-by: Kevin H. Luu <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants