Skip to content

Commit

Permalink
Account for different UUIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
stxue1 committed Sep 6, 2023
1 parent 211f514 commit 98bcce7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/admin/cleanup_aws_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def contains_uuid(string):
Determines if a string contains a pattern like: '28064c76-a491-43e7-9b50-da424f920354',
which toil uses in its test generated bucket names.
"""
return bool(re.compile('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}').findall(string))
return bool(re.compile('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{8,12}').findall(string))


def contains_uuid_with_underscores(string):
Expand All @@ -61,7 +61,7 @@ def contains_num_only_uuid(string):
Determines if a string contains a pattern like: '13614-31311-31347',
which toil uses in its test generated sdb domain names.
"""
return bool(re.compile('[0-9]{5}-[0-9]{5}-[0-9]{5}').findall(string))
return bool(re.compile('[0-9]{4,5}-[0-9]{4,5}-[0-9]{4,5}').findall(string))


def contains_toil_test_patterns(string):
Expand Down

0 comments on commit 98bcce7

Please sign in to comment.