zeppelin icon indicating copy to clipboard operation
zeppelin copied to clipboard

[ZEPPELIN-6238] Prevent infinite loop in NotebookRestApiTest due to interpreter startup failure

Open gurioh opened this issue 4 months ago • 3 comments

What is this PR for?

The testRunNoteNonBlocking integration test in NotebookRestApiTest can enter an infinite loop when the Python interpreter fails to start. This happens because the interpreter cannot find the python executable, resulting in an IOException: error=2, No such file or directory.

The test uses httpPost with blocking=true, followed by p1.waitUntilFinished() to wait for the paragraph to complete. When the interpreter fails to start, the paragraph's status remains in a READY state instead of transitioning to ERROR. This causes waitUntilFinished() to wait indefinitely, as isTerminated() never returns true.

The fix is to modify the test logic to immediately check the paragraph's status after p1.waitUntilFinished(). By moving the assertEquals(Job.Status.FINISHED, p1.getStatus()) assertion to immediately after the wait call, the test will fail instantly if the paragraph's status is not FINISHED (e.g., ERROR). This prevents the test from proceeding to p2.waitUntilFinished() and avoids the infinite loop.

image image

What type of PR is it?

Bug Fix

Todos

What is the Jira issue?

*[ZEPPELIN-6238]

How should this be tested?

  • Strongly recommended: add automated unit tests for any new or changed behavior
  • Outline any manual steps to test the PR here.

Screenshots (if appropriate)

image

Questions:

  • Does the license files need to update? N
  • Is there breaking changes for older versions? N
  • Does this needs documentation? N

gurioh avatar Aug 06 '25 15:08 gurioh

Hello, thank you for your contribution! Could you update the PR title to: [ZEPPELIN-6238] Prevent infinite loop in NotebookRestApiTest due to interpreter startup failure instead of the current one, Prevent infinite loop in NotebookRestApiTest due to interpreter startup failure?

ParkGyeongTae avatar Aug 08 '25 07:08 ParkGyeongTae

I’ve updated it. Thank you for the review.

gurioh avatar Aug 08 '25 08:08 gurioh

The test is being tested by CI. I don't see any problems in the current master version.

Reamer avatar Aug 08 '25 09:08 Reamer