Skip to content

Commit

Permalink
fix: revert skipping overwrite for pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
ejseqera committed Jun 29, 2023
1 parent 8011a83 commit a3689d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions tw_pywrap/overwrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ def handle_overwrite(self, block, args, overwrite=False):
else:
self.block_operations["participants"]["name_key"] = "email"

if block != "pipelines" and self.check_resource_exists(
operation["name_key"], tw_args
):
if self.check_resource_exists(operation["name_key"], tw_args):
# if resource exists, delete
if overwrite:
logging.debug(
Expand Down
4 changes: 2 additions & 2 deletions tw_pywrap/tower.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ def _tw_run(self, cmd, *args, **kwargs):

# Error handling for stdout
if stdout:
if re.search(r"ERROR: (?!A pipeline).* already exists", stdout):
if re.search(r"ERROR: .* already exists", stdout):
raise ResourceExistsError(
" Resource already exists and will not be created."
"Please set 'overwrite: true'\n"
" Please set 'overwrite: true'\n"
)
elif re.search(r"ERROR: .*", stdout):
raise ResourceCreationError(
Expand Down

0 comments on commit a3689d9

Please sign in to comment.