Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/acrcssc/azext_acrcssc/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
CONTINUOUSPATCH_OCI_ARTIFACT_CONFIG,
CONTINUOUSPATCH_CONFIG_SCHEMA_V1,
CONTINUOUSPATCH_CONFIG_SCHEMA_SIZE_LIMIT,
CONTINUOUSPATCH_CONFIG_SUPPORTED_VERSIONS,
CONTINUOUSPATCH_ALL_TASK_NAMES,
ERROR_MESSAGE_INVALID_TIMESPAN_FORMAT,
ERROR_MESSAGE_INVALID_TIMESPAN_VALUE,
Expand Down Expand Up @@ -74,8 +73,6 @@ def _validate_continuouspatch_config(config):
raise InvalidArgumentValueError(f"Configuration error: Repository '{repository['repository']}' with tag '{tag}' is not allowed. Tags ending with '*-patched' (floating tag) or '*-0' to '*-999' (incremental tag) are reserved for internal use.")
if tag == "*" and len(repository.get("tags", [])) > 1:
raise InvalidArgumentValueError("Configuration error: Tag '*' is not allowed with other tags in the same repository. Use '*' as the only tag in the repository to avoid overlaps.")
if config.get("version", "") not in CONTINUOUSPATCH_CONFIG_SUPPORTED_VERSIONS:
raise InvalidArgumentValueError(f"Configuration error: Version {config.get('version', '')} is not supported. Supported versions are {CONTINUOUSPATCH_CONFIG_SUPPORTED_VERSIONS}")


# to save on API calls, we the list of tasks found in the registry
Expand Down
4 changes: 2 additions & 2 deletions src/acrcssc/azext_acrcssc/helper/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ class TaskRunStatus(Enum):
},
}
CONTINUOUSPATCH_CONFIG_SCHEMA_SIZE_LIMIT = 1024 * 1024 * 10 # 10MB, we don't want to allow huge files
CONTINUOUSPATCH_CONFIG_SUPPORTED_VERSIONS = ["v1"]
CONTINUOUSPATCH_CONFIG_SCHEMA_V1 = {
"type": "object",
"properties": {
"version": {
"type": "string",
"pattern": "^(v1)$"
},
"tag-convention": {
"type": "string",
"pattern": "(?i)floating|incremental"
"pattern": "^(floating|incremental)$"
},
"repositories": {
"type": "array",
Expand Down