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

Issue with serialization of error in Test notebook #46

Open
quanuw opened this issue Jun 5, 2020 · 2 comments
Open

Issue with serialization of error in Test notebook #46

quanuw opened this issue Jun 5, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@quanuw
Copy link
Contributor

quanuw commented Jun 5, 2020

The test notebook will return the below error when the notebook under test gets an error.
image

@quanuw quanuw changed the title Return NUT error in Test notebook Issue with serialization of error in Test notebook Jun 5, 2020
@giventocode giventocode added the bug Something isn't working label Jun 5, 2020
@tomconte
Copy link
Member

tomconte commented Oct 13, 2020

Got a similar issue... Here is a debug log from the nutter CLI:

2020-10-13 09:57:40,000:DEBUG:Executing function with HTTP retry policy. Max tries:20  delay:30
2020-10-13 09:57:40,002:DEBUG:Message from queue: <common.statuseventhandler.StatusEvent object at 0x111446c10>
2020-10-13 09:57:40,410:DEBUG:https://adb-6447267702748866.6.azuredatabricks.net:443 "POST /api/2.0/jobs/runs/submit HTTP/1.1" 200 14
2020-10-13 09:57:40,411:DEBUG:Executing function with HTTP retry policy. Max tries:20  delay:30
2020-10-13 09:57:40,544:DEBUG:https://adb-6447267702748866.6.azuredatabricks.net:443 "GET /api/2.0/jobs/runs/get-output?run_id=755 HTTP/1.1" 200 None
2020-10-13 09:57:40,545:DEBUG:{'metadata': {'job_id': 755, 'run_id': 755, 'number_in_job': 1, 'state': {'life_cycle_state': 'PENDING', 'state_message': ''}, 'task': {'notebook_task': {'notebook_path': '/Shared/Temp-CI/testing/test_drop_employee_csv_full_timestamp'}}, 'cluster_spec': {'existing_cluster_id': '0915-120444-foe167'}, 'cluster_instance': {'cluster_id': '0915-120444-foe167'}, 'start_time': 1602575860358, 'setup_duration': 0, 'execution_duration': 0, 'cleanup_duration': 0, 'creator_user_name': 'jdupuy@microsoft.com', 'run_name': 'c41d56fe-0d29-11eb-b2a9-acde48001122', 'run_page_url': 'https://northeurope.azuredatabricks.net/?o=6447267702748866#job/755/run/1', 'run_type': 'SUBMIT_RUN'}, 'error': 'No output is available until the task begins.'}
2020-10-13 09:57:41,550:DEBUG:Executing function with HTTP retry policy. Max tries:20  delay:30
2020-10-13 09:57:41,873:DEBUG:https://adb-6447267702748866.6.azuredatabricks.net:443 "GET /api/2.0/jobs/runs/get-output?run_id=755 HTTP/1.1" 200 None
2020-10-13 09:57:41,874:DEBUG:{'metadata': {'job_id': 755, 'run_id': 755, 'number_in_job': 1, 'state': {'life_cycle_state': 'PENDING', 'state_message': ''}, 'task': {'notebook_task': {'notebook_path': '/Shared/Temp-CI/testing/test_drop_employee_csv_full_timestamp'}}, 'cluster_spec': {'existing_cluster_id': '0915-120444-foe167'}, 'cluster_instance': {'cluster_id': '0915-120444-foe167'}, 'start_time': 1602575860358, 'setup_duration': 0, 'execution_duration': 0, 'cleanup_duration': 0, 'creator_user_name': 'jdupuy@microsoft.com', 'run_name': 'c41d56fe-0d29-11eb-b2a9-acde48001122', 'run_page_url': 'https://northeurope.azuredatabricks.net/?o=6447267702748866#job/755/run/1', 'run_type': 'SUBMIT_RUN'}, 'error': 'No output is available until the task begins.'}
2020-10-13 09:57:42,879:DEBUG:Executing function with HTTP retry policy. Max tries:20  delay:30
2020-10-13 09:57:43,059:DEBUG:https://adb-6447267702748866.6.azuredatabricks.net:443 "GET /api/2.0/jobs/runs/get-output?run_id=755 HTTP/1.1" 400 None
2020-10-13 09:57:43,060:DEBUG:Error: 400 Client Error: Bad Request for url: https://adb-6447267702748866.6.azuredatabricks.net/api/2.0/jobs/runs/get-output?run_id=755
 Response from server:
 { 'error_code': 'INVALID_STATE',
  'message': 'Run result is empty. There may have been issues while saving or '
             'reading results.'}
2020-10-13 09:57:43,060:DEBUG:Function Handler. Exception in function. Error 400 Client Error: Bad Request for url: https://adb-6447267702748866.6.azuredatabricks.net/api/2.0/jobs/runs/get-output?run_id=755
 Response from server:
 { 'error_code': 'INVALID_STATE',
  'message': 'Run result is empty. There may have been issues while saving or '
             'reading results.'} False

Job 755 shows:

image

@tomconte
Copy link
Member

This seems to be linked to an inability to pickle the Java exception? Right now I am using the following workaround:

  for res in result.test_results.results:
    # Workaround: suppress problematic exceptions 
    if isinstance(res.exception, py4j.protocol.Py4JJavaError):
      res.exception = None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants