Skip to content

Commit 560537b

Browse files
committed
Revert "Enable prism on faild pipelines and rebench."
This reverts commit bc648d5.
1 parent 6093a72 commit 560537b

3 files changed

Lines changed: 9 additions & 23 deletions

File tree

sdks/python/apache_beam/examples/complete/game/leader_board_test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,7 @@ def test_leader_board_users(self):
6565
result = (
6666
self.create_data(p)
6767
| leader_board.CalculateUserScores(allowed_lateness=120))
68-
assert_that(
69-
result,
70-
equal_to([('user2_team2', 2), ('user3_team3', 8), ('user4_team3', 5),
71-
('user1_team1', 50)]))
68+
assert_that(result, equal_to([]))
7269

7370

7471
if __name__ == '__main__':

sdks/python/apache_beam/runners/direct/direct_runner.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ def accept(self, pipeline, is_interactive):
124124
# double fires on AfterCount trigger, once appropriately, and once
125125
# incorrectly at the end of the window. This if condition could be
126126
# more targeted, but for now we'll just ignore all unsafe triggers.
127-
#if pipeline.allow_unsafe_triggers:
128-
# self.supported_by_prism_runner = False
127+
if pipeline.allow_unsafe_triggers:
128+
self.supported_by_prism_runner = False
129129
# TODO(https://github.com/apache/beam/issues/33623): Prism currently
130130
# does not support interactive mode
131-
if is_in_ipython() or is_interactive:
131+
elif is_in_ipython() or is_interactive:
132132
self.supported_by_prism_runner = False
133133
# TODO(https://github.com/apache/beam/issues/33623): Prism currently
134134
# does not support the update compat flag
@@ -144,10 +144,6 @@ def accept(self, pipeline, is_interactive):
144144
# It does sometimes, but at volume suites start to fail. We will try
145145
# to enable this in a future release.
146146
self.supported_by_prism_runner = False
147-
148-
_LOGGER.error(
149-
'PrismRunnerSupportVisotr returns' +
150-
str(self.supported_by_prism_runner))
151147
return self.supported_by_prism_runner
152148

153149
def visit_transform(self, applied_ptransform):
@@ -204,18 +200,13 @@ def visit_transform(self, applied_ptransform):
204200
transform.get_windowing('').windowfn, beam.window.Sessions):
205201
self.supported_by_prism_runner = False
206202

207-
if not self.supported_by_prism_runner:
208-
_LOGGER.error(
209-
'Visit ' + str(applied_ptransform) + ' returns ' +
210-
str(self.supported_by_prism_runner))
211-
212203
# Use BundleBasedDirectRunner if other runners are missing needed features.
213204
runner = BundleBasedDirectRunner()
214205

215206
# Check whether all transforms used in the pipeline are supported by the
216207
# PrismRunner
217208
if _PrismRunnerSupportVisitor().accept(pipeline, self._is_interactive):
218-
_LOGGER.error('Running pipeline with PrismRunner.')
209+
_LOGGER.info('Running pipeline with PrismRunner.')
219210
from apache_beam.runners.portability import prism_runner
220211
runner = prism_runner.PrismRunner()
221212

@@ -225,7 +216,7 @@ def visit_transform(self, applied_ptransform):
225216
# probably failed on job submission.
226217
if (PipelineState.is_terminal(pr.state) and
227218
pr.state != PipelineState.DONE):
228-
_LOGGER.error(
219+
_LOGGER.info(
229220
'Pipeline failed on PrismRunner, falling back to DirectRunner.')
230221
runner = BundleBasedDirectRunner()
231222
else:
@@ -234,14 +225,13 @@ def visit_transform(self, applied_ptransform):
234225
# If prism fails in Preparing the portable job, then the PortableRunner
235226
# code raises an exception. Catch it, log it, and use the Direct runner
236227
# instead.
237-
_LOGGER.error('Exception with PrismRunner:\n %s\n' % (e))
238-
_LOGGER.error('Falling back to DirectRunner')
228+
_LOGGER.info('Exception with PrismRunner:\n %s\n' % (e))
229+
_LOGGER.info('Falling back to DirectRunner')
239230
runner = BundleBasedDirectRunner()
240231

241232
# Check whether all transforms used in the pipeline are supported by the
242233
# FnApiRunner, and the pipeline was not meant to be run as streaming.
243234
if _FnApiRunnerSupportVisitor().accept(pipeline):
244-
_LOGGER.error('Running pipeline with FnApiRunner.')
245235
from apache_beam.portability.api import beam_provision_api_pb2
246236
from apache_beam.runners.portability.fn_api_runner import fn_runner
247237
from apache_beam.runners.portability.portable_runner import JobServiceHandle

sdks/python/apache_beam/transforms/trigger_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,7 @@ def format_result(k, vs):
663663
equal_to(
664664
list({
665665
'A-5': {1, 2, 3, 4, 5},
666-
# A-10, A-11 emit on the closing of window [10, 19]
667-
'A-2': {10, 11},
666+
# A-10, A-11 never emitted due to AfterCount(3) never firing.
668667
'B-4': {6, 7, 8, 9},
669668
'B-3': {10, 15, 16},
670669
}.items())))

0 commit comments

Comments
 (0)