Skip to content

Commit 9b50ef8

Browse files
authored
Temporarily move back to fnapi runner as default (#35610)
* Temporarily move back to fnapi runner as default * yapf * Make some tests portable between direct runners * More pportable tests * 2 more tests to portable
1 parent 84d423f commit 9b50ef8

File tree

12 files changed

+138
-229
lines changed

12 files changed

+138
-229
lines changed

sdks/python/apache_beam/coders/proto2_coder_test_messages_pb2.py

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# NO CHECKED-IN PROTOBUF GENCODE
2121
# source: apache_beam/coders/proto2_coder_test_messages.proto
2222
# Protobuf Python Version: 5.28.0
23+
2324
"""Generated protocol buffer code."""
2425
from google.protobuf import descriptor as _descriptor
2526
from google.protobuf import descriptor_pool as _descriptor_pool
@@ -29,35 +30,36 @@
2930

3031
_sym_db = _symbol_database.Default()
3132

32-
33-
34-
35-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n3apache_beam/coders/proto2_coder_test_messages.proto\x12\x1aproto2_coder_test_messages\"P\n\x08MessageA\x12\x0e\n\x06\x66ield1\x18\x01 \x01(\t\x12\x34\n\x06\x66ield2\x18\x02 \x03(\x0b\x32$.proto2_coder_test_messages.MessageB\"\x1a\n\x08MessageB\x12\x0e\n\x06\x66ield1\x18\x01 \x01(\x08\"\x10\n\x08MessageC*\x04\x08\x64\x10j\"\xad\x01\n\x0eMessageWithMap\x12\x46\n\x06\x66ield1\x18\x01 \x03(\x0b\x32\x36.proto2_coder_test_messages.MessageWithMap.Field1Entry\x1aS\n\x0b\x46ield1Entry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.proto2_coder_test_messages.MessageA:\x02\x38\x01\"V\n\x18ReferencesMessageWithMap\x12:\n\x06\x66ield1\x18\x01 \x03(\x0b\x32*.proto2_coder_test_messages.MessageWithMap\";\n\x08MessageD\"/\n\nNestedEnum\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x07\n\x03ONE\x10\x01\x12\x07\n\x03TWO\x10\x02*1\n\x0cTopLevelEnum\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x07\n\x03ONE\x10\x01\x12\x07\n\x03TWO\x10\x02:Z\n\x06\x66ield1\x12$.proto2_coder_test_messages.MessageC\x18\x65 \x01(\x0b\x32$.proto2_coder_test_messages.MessageA:Z\n\x06\x66ield2\x12$.proto2_coder_test_messages.MessageC\x18\x66 \x01(\x0b\x32$.proto2_coder_test_messages.MessageBB)\n\'org.apache.beam.sdk.extensions.protobuf')
33+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
34+
b'\n3apache_beam/coders/proto2_coder_test_messages.proto\x12\x1aproto2_coder_test_messages\"P\n\x08MessageA\x12\x0e\n\x06\x66ield1\x18\x01 \x01(\t\x12\x34\n\x06\x66ield2\x18\x02 \x03(\x0b\x32$.proto2_coder_test_messages.MessageB\"\x1a\n\x08MessageB\x12\x0e\n\x06\x66ield1\x18\x01 \x01(\x08\"\x10\n\x08MessageC*\x04\x08\x64\x10j\"\xad\x01\n\x0eMessageWithMap\x12\x46\n\x06\x66ield1\x18\x01 \x03(\x0b\x32\x36.proto2_coder_test_messages.MessageWithMap.Field1Entry\x1aS\n\x0b\x46ield1Entry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.proto2_coder_test_messages.MessageA:\x02\x38\x01\"V\n\x18ReferencesMessageWithMap\x12:\n\x06\x66ield1\x18\x01 \x03(\x0b\x32*.proto2_coder_test_messages.MessageWithMap\";\n\x08MessageD\"/\n\nNestedEnum\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x07\n\x03ONE\x10\x01\x12\x07\n\x03TWO\x10\x02*1\n\x0cTopLevelEnum\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x07\n\x03ONE\x10\x01\x12\x07\n\x03TWO\x10\x02:Z\n\x06\x66ield1\x12$.proto2_coder_test_messages.MessageC\x18\x65 \x01(\x0b\x32$.proto2_coder_test_messages.MessageA:Z\n\x06\x66ield2\x12$.proto2_coder_test_messages.MessageC\x18\x66 \x01(\x0b\x32$.proto2_coder_test_messages.MessageBB)\n\'org.apache.beam.sdk.extensions.protobuf'
35+
)
3636

3737
_globals = globals()
3838
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
39-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'apache_beam.coders.proto2_coder_test_messages_pb2', _globals)
39+
_builder.BuildTopDescriptorsAndMessages(
40+
DESCRIPTOR, 'apache_beam.coders.proto2_coder_test_messages_pb2', _globals)
4041
if not _descriptor._USE_C_DESCRIPTORS:
4142
_globals['DESCRIPTOR']._loaded_options = None
42-
_globals['DESCRIPTOR']._serialized_options = b'\n\'org.apache.beam.sdk.extensions.protobuf'
43+
_globals[
44+
'DESCRIPTOR']._serialized_options = b'\n\'org.apache.beam.sdk.extensions.protobuf'
4345
_globals['_MESSAGEWITHMAP_FIELD1ENTRY']._loaded_options = None
4446
_globals['_MESSAGEWITHMAP_FIELD1ENTRY']._serialized_options = b'8\001'
45-
_globals['_TOPLEVELENUM']._serialized_start=536
46-
_globals['_TOPLEVELENUM']._serialized_end=585
47-
_globals['_MESSAGEA']._serialized_start=83
48-
_globals['_MESSAGEA']._serialized_end=163
49-
_globals['_MESSAGEB']._serialized_start=165
50-
_globals['_MESSAGEB']._serialized_end=191
51-
_globals['_MESSAGEC']._serialized_start=193
52-
_globals['_MESSAGEC']._serialized_end=209
53-
_globals['_MESSAGEWITHMAP']._serialized_start=212
54-
_globals['_MESSAGEWITHMAP']._serialized_end=385
55-
_globals['_MESSAGEWITHMAP_FIELD1ENTRY']._serialized_start=302
56-
_globals['_MESSAGEWITHMAP_FIELD1ENTRY']._serialized_end=385
57-
_globals['_REFERENCESMESSAGEWITHMAP']._serialized_start=387
58-
_globals['_REFERENCESMESSAGEWITHMAP']._serialized_end=473
59-
_globals['_MESSAGED']._serialized_start=475
60-
_globals['_MESSAGED']._serialized_end=534
61-
_globals['_MESSAGED_NESTEDENUM']._serialized_start=487
62-
_globals['_MESSAGED_NESTEDENUM']._serialized_end=534
47+
_globals['_TOPLEVELENUM']._serialized_start = 536
48+
_globals['_TOPLEVELENUM']._serialized_end = 585
49+
_globals['_MESSAGEA']._serialized_start = 83
50+
_globals['_MESSAGEA']._serialized_end = 163
51+
_globals['_MESSAGEB']._serialized_start = 165
52+
_globals['_MESSAGEB']._serialized_end = 191
53+
_globals['_MESSAGEC']._serialized_start = 193
54+
_globals['_MESSAGEC']._serialized_end = 209
55+
_globals['_MESSAGEWITHMAP']._serialized_start = 212
56+
_globals['_MESSAGEWITHMAP']._serialized_end = 385
57+
_globals['_MESSAGEWITHMAP_FIELD1ENTRY']._serialized_start = 302
58+
_globals['_MESSAGEWITHMAP_FIELD1ENTRY']._serialized_end = 385
59+
_globals['_REFERENCESMESSAGEWITHMAP']._serialized_start = 387
60+
_globals['_REFERENCESMESSAGEWITHMAP']._serialized_end = 473
61+
_globals['_MESSAGED']._serialized_start = 475
62+
_globals['_MESSAGED']._serialized_end = 534
63+
_globals['_MESSAGED_NESTEDENUM']._serialized_start = 487
64+
_globals['_MESSAGED_NESTEDENUM']._serialized_end = 534
6365
# @@protoc_insertion_point(module_scope)

sdks/python/apache_beam/examples/snippets/transforms/aggregation/groupby_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ def check_groupby_attr_result(grouped):
152152
fruit='banana',
153153
quantity=3,
154154
unit_price=1.00),
155-
]),
156-
#[END groupby_attr_result]
155+
]), #[END groupby_attr_result]
157156
]))
158157

159158

@@ -205,8 +204,7 @@ def check_groupby_attr_expr_result(grouped):
205204
fruit='banana',
206205
quantity=3,
207206
unit_price=1.00),
208-
]),
209-
#[END groupby_attr_expr_result]
207+
]), #[END groupby_attr_expr_result]
210208
]))
211209

212210

sdks/python/apache_beam/io/gcp/experimental/spannerio_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ def test_read_with_transaction(
387387
def test_invalid_transaction(
388388
self, mock_batch_snapshot_class, mock_client_class):
389389
# test exception raises at pipeline execution time
390-
with self.assertRaisesRegex(Exception, "ValueError"), TestPipeline() as p:
390+
error_string = "Invalid transaction object"
391+
with self.assertRaisesRegex(Exception, error_string), TestPipeline() as p:
391392
transaction = (
392393
p | beam.Create([{
393394
"invalid": "transaction"

0 commit comments

Comments
 (0)