Skip to content

Commit

Permalink
Fix assignment of template field in __init__ in `container_instance…
Browse files Browse the repository at this point in the history
…s.py` (#36529)
  • Loading branch information
romsharon98 authored Jan 15, 2024
1 parent 03cf692 commit d7081ac
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def __init__(

self.ci_conn_id = ci_conn_id
self.resource_group = resource_group
self.name = self._check_name(name)
self.name = name
self.image = image
self.region = region
self.registry_conn_id = registry_conn_id
Expand Down Expand Up @@ -370,9 +370,6 @@ def _log_last(self, logs: list | None, last_line_logged: Any) -> Any | None:

@staticmethod
def _check_name(name: str) -> str:
if "{{" in name:
# Let macros pass as they cannot be checked at construction time
return name
regex_check = re.match("[a-z0-9]([-a-z0-9]*[a-z0-9])?", name)
if regex_check is None or regex_check.group() != name:
raise AirflowException('ACI name must match regex [a-z0-9]([-a-z0-9]*[a-z0-9])? (like "my-name")')
Expand Down

0 comments on commit d7081ac

Please sign in to comment.