Skip to content

Commit

Permalink
Bugfix validation 'env' can be any type (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejbrown committed Oct 30, 2023
1 parent 9e4bbcf commit 51a349a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions buildrunner/validation/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
with the terms of the Adobe license agreement accompanying it.
"""

from typing import Dict, List, Optional, Set, Union
from typing import Any, Dict, List, Optional, Set, Union

# pylint: disable=no-name-in-module
from pydantic import BaseModel, Field, field_validator, ValidationError
Expand Down Expand Up @@ -39,7 +39,7 @@ class SSHKey(BaseModel, extra='forbid'):

github: Optional[Dict[str, GithubModel]] = None
# Global config attributes
env: Optional[Dict[str, str]] = None
env: Optional[Dict[str, Any]] = None
build_servers: Optional[Dict[str, Union[str, List[str]]]] = Field(alias='build-servers', default=None)
# Intentionally has loose restrictions on ssh-keys since documentation isn't clear
ssh_keys: Optional[Union[SSHKey, List[SSHKey]]] = Field(alias='ssh-keys', default=None)
Expand Down
2 changes: 1 addition & 1 deletion buildrunner/validation/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class RunAndServicesBase(BaseModel):
dns: Optional[List[str]] = None
dns_search: Optional[str] = None
extra_hosts: Optional[Dict[str, str]] = None
env: Optional[Dict[str, Optional[str]]] = None
env: Optional[Dict[str, Optional[Any]]] = None
files: Optional[Dict[str, str]] = None
volumes_from: Optional[List[str]] = None
ports: Optional[Dict[int, Optional[int]]] = None
Expand Down

0 comments on commit 51a349a

Please sign in to comment.