Skip to content

Commit 5130cfb

Browse files
Omkar KulkarniOmkar Kulkarni
authored andcommitted
feat: removing bad commit
1 parent 5a27b85 commit 5130cfb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/ray/serve/_private/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
except ImportError:
4040
np = None
4141

42+
FILE_NAME_REGEX = r'[^a-zA-Z0-9_-]'
4243
MESSAGE_PACK_OFFSET = 9
4344
GENERATOR_COMPOSITION_NOT_SUPPORTED_ERROR = RuntimeError(
4445
"Streaming deployment handle results cannot be passed to "
@@ -568,8 +569,8 @@ def get_component_file_name(
568569
str: The formatted file name.
569570
"""
570571
# Sanitize component_name and component_id by replacing special characters with underscores
571-
component_name = re.sub(r'[^a-zA-Z0-9_-]', '_', component_name)
572-
component_id = re.sub(r'[^a-zA-Z0-9_-]', '_', component_id)
572+
component_name = re.sub(FILE_NAME_REGEX, '_', component_name)
573+
component_id = re.sub(FILE_NAME_REGEX, '_', component_id)
573574

574575
# For DEPLOYMENT component type, we want to log the deployment name
575576
# instead of adding the component type to the component name.

0 commit comments

Comments
 (0)