@@ -95,8 +95,8 @@ def __init__(
95
95
id : UUID ,
96
96
name : str ,
97
97
* ,
98
- environment : Dict [str , str ],
99
- secrets : List [UUID ],
98
+ environment : Optional [ Dict [str , str ]] = None ,
99
+ secrets : Optional [ List [UUID ]] = None ,
100
100
orchestrator : "BaseOrchestrator" ,
101
101
artifact_store : "BaseArtifactStore" ,
102
102
container_registry : Optional ["BaseContainerRegistry" ] = None ,
@@ -134,8 +134,8 @@ def __init__(
134
134
"""
135
135
self ._id = id
136
136
self ._name = name
137
- self ._environment = environment
138
- self ._secrets = secrets
137
+ self ._environment = environment or {}
138
+ self ._secrets = secrets or []
139
139
self ._orchestrator = orchestrator
140
140
self ._artifact_store = artifact_store
141
141
self ._container_registry = container_registry
@@ -201,9 +201,9 @@ def from_components(
201
201
cls ,
202
202
id : UUID ,
203
203
name : str ,
204
- environment : Dict [str , str ],
205
- secrets : List [UUID ],
206
204
components : Dict [StackComponentType , "StackComponent" ],
205
+ environment : Optional [Dict [str , str ]] = None ,
206
+ secrets : Optional [List [UUID ]] = None ,
207
207
) -> "Stack" :
208
208
"""Creates a stack instance from a dict of stack components.
209
209
@@ -212,11 +212,11 @@ def from_components(
212
212
Args:
213
213
id: Unique ID of the stack.
214
214
name: The name of the stack.
215
+ components: The components of the stack.
215
216
environment: Environment variables to set when running on this
216
217
stack.
217
218
secrets: Secrets to set as environment variables when running on
218
219
this stack.
219
- components: The components of the stack.
220
220
221
221
Returns:
222
222
A stack instance consisting of the given components.
0 commit comments