fix flakiness

This commit is contained in:
numerology 2019-10-15 22:44:34 -07:00
parent 17fd7c415d
commit 81ba4460b8
1 changed files with 6 additions and 3 deletions

View File

@ -225,11 +225,14 @@ def xgb_train_pipeline(
train_output = os.path.join(output_template, 'train_output')
predict_output = os.path.join(output_template, 'predict_output')
with dsl.ExitHandler(exit_op=dataproc_delete_cluster_op(
#TODO(numerology): Quick fix for the race condition by manually setting this field.
_delete_cluster_op = dataproc_delete_cluster_op(
project_id=project,
region=region,
name=cluster_name
)):
name=cluster_name)
_delete_cluster_op.is_exit_handler = True
with dsl.ExitHandler(exit_op=_delete_cluster_op):
_create_cluster_op = dataproc_create_cluster_op(
project_id=project,
region=region,