Skip to content

Commit

Permalink
[BEAM-11045] Avoid broken deps
Browse files Browse the repository at this point in the history
1. A new release: jupyter-client 6.1.13 breaks notebooks when getting
   messages.
2. This is caught by screen diff integration tests of interactive beam.
3. The issue is documented at jupyter/jupyter_client#637
   ETA of the fix might be 6.2.x of jupyter-client.
4. Added a timeout=-1 to allow indefinite wait for execution of each
   notebook cell in integration tests. The default value was 1 second.
   Instead of timeout each cell, moved the timeout to each test using pytest mark.
  • Loading branch information
KevinGG committed Apr 7, 2021
1 parent 0805b9b commit 31efffe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def execute(self):
for path in self._paths:
with open(path, 'r') as nb_f:
nb = nbformat.read(nb_f, as_version=4)
ep = ExecutePreprocessor(allow_errors=True, kernel_name='test')
ep = ExecutePreprocessor(
timeout=-1, allow_errors=True, kernel_name='test')
ep.preprocess(nb, {'metadata': {'path': os.path.dirname(path)}})

execution_id = obfuscate(path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@

import unittest

import pytest

from apache_beam.runners.interactive.testing.integration.screen_diff import BaseTestCase


@pytest.mark.timeout(300)
class InitSquareCubeTest(BaseTestCase):
def __init__(self, *args, **kwargs):
kwargs['golden_size'] = (1024, 10000)
Expand Down
4 changes: 3 additions & 1 deletion sdks/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ def get_version():
'facets-overview>=1.0.0,<2',
'ipython>=5.8.0,<8',
'ipykernel>=5.2.0,<6',
'jupyter-client>=6.1.11,<7',
# Skip version 6.1.13 due to
# https://github.com/jupyter/jupyter_client/issues/637
'jupyter-client>=6.1.11,<6.1.13',
'timeloop>=1.0.2,<2',
]

Expand Down

0 comments on commit 31efffe

Please sign in to comment.