Skip to content

Commit

Permalink
Add uuid to bucket name
Browse files Browse the repository at this point in the history
  • Loading branch information
euclidgame committed Nov 14, 2024
1 parent 183971d commit 2872d0f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sky/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import copy
import enum
import json
import re
import typing
from typing import Any, Dict, Iterable, List, Optional, Set, Tuple
import uuid

import colorama
import numpy as np
Expand Down Expand Up @@ -172,8 +174,11 @@ def _convert_storage_nodes_to_edge_attributes(
'Azure': 'Azure',
'IBM': 'IBM'
}
bucket_name = (f'bucket-for-{src.name}-to-{dst.name}-'
f'{common_utils.get_user_hash()}').lower()

bucket_name_tmp = (
f'bucket-for-{src.name}-to-{dst.name}-'
f'{common_utils.get_user_hash()}-{uuid.uuid4()}')
bucket_name = re.sub(r'[._]', '-', bucket_name_tmp).lower()
best_storage = Storage(name=bucket_name)
if storage_node.best_resources is not None:
assert storage_node.best_resources.cloud is not None
Expand Down

0 comments on commit 2872d0f

Please sign in to comment.