Skip to content

Bugfix validation 'env' can be any type (#6) #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 30, 2023
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
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