Skip to content

Commit

Permalink
minor fixes for revision suffix validation
Browse files Browse the repository at this point in the history
  • Loading branch information
StrawnSC committed Oct 4, 2022
1 parent 3aab8b1 commit ae8d23b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Release History
* Add 'az containerapp env update' to update managed environment properties
* Add custom domains support to 'az containerapp env create' and 'az containerapp env update'
* Add tcp support for ingress transport and scale rules
* 'az containerapp create/update': validate revision suffixes

0.3.11
++++++
Expand Down
2 changes: 1 addition & 1 deletion src/containerapp/azext_containerapp/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def validate_revision_suffix(value):
if value is not None:
matched = re.match(r"^[a-z](?!.*-{2})([-a-z0-9]*[a-z0-9])?$", value)
if not matched:
raise ValidationError(f"Invalid Container App revision name {value}. A revision name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character and cannot have '--'.")
raise ValidationError(f"Invalid Container App revision name '{value}'. A revision name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character and cannot have '--'.")



Expand Down
1 change: 1 addition & 0 deletions src/containerapp/azext_containerapp/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ def update_containerapp_logic(cmd,
registry_user=None,
registry_pass=None):
_validate_subscription_registered(cmd, CONTAINER_APPS_RP)
validate_revision_suffix(revision_suffix)

# Validate that max_replicas is set to 0-30
if max_replicas is not None:
Expand Down

0 comments on commit ae8d23b

Please sign in to comment.