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

fix: integration with Apache Beam 2.32, 2.33 reported in #1231 #1233

Merged
merged 1 commit into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion sentry_sdk/integrations/beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def sentry_init_pardo(self, fn, *args, **kwargs):

def _wrap_inspect_call(cls, func_name):
# type: (Any, Any) -> Any
from apache_beam.typehints.decorators import getfullargspec # type: ignore

if not hasattr(cls, func_name):
return None
Expand All @@ -105,6 +104,8 @@ def _inspect(self):

return get_function_args_defaults(process_func)
except ImportError:
from apache_beam.typehints.decorators import getfullargspec # type: ignore

return getfullargspec(process_func)

setattr(_inspect, USED_FUNC, True)
Expand Down
4 changes: 3 additions & 1 deletion tests/integrations/beam/test_beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ def test_monkey_patch_signature(f, args, kwargs):


class _OutputProcessor(OutputProcessor):
def process_outputs(self, windowed_input_element, results):
def process_outputs(
self, windowed_input_element, results, watermark_estimator=None
):
print(windowed_input_element)
try:
for result in results:
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ envlist =
{pypy,py2.7,py3.5,py3.6,py3.7,py3.8}-celery-{4.3,4.4}
{py3.6,py3.7,py3.8}-celery-5.0

py3.7-beam-{2.12,2.13}
py3.7-beam-{2.12,2.13,2.32,2.33}

# The aws_lambda tests deploy to the real AWS and have their own matrix of Python versions.
py3.7-aws_lambda
Expand Down Expand Up @@ -140,6 +140,8 @@ deps =

beam-2.12: apache-beam>=2.12.0, <2.13.0
beam-2.13: apache-beam>=2.13.0, <2.14.0
beam-2.32: apache-beam>=2.32.0, <2.33.0
beam-2.33: apache-beam>=2.33.0, <2.34.0
beam-master: git+https://github.com/apache/beam#egg=apache-beam&subdirectory=sdks/python

celery: redis
Expand Down