Skip to content
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

Fix stack register CLI command #2958

Merged
merged 1 commit into from
Aug 28, 2024
Merged
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
12 changes: 7 additions & 5 deletions src/zenml/cli/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def register_stack(
pass

labels: Dict[str, str] = {}
components: Dict[StackComponentType, Union[UUID, ComponentInfo]] = {}
components: Dict[StackComponentType, List[Union[UUID, ComponentInfo]]] = {}

# Cloud Flow
created_objects: Set[str] = set()
Expand Down Expand Up @@ -490,7 +490,7 @@ def register_stack(
component_info = selected_component.id
component_name = selected_component.name

components[component_type] = component_info
components[component_type] = [component_info]
if component_type == StackComponentType.ARTIFACT_STORE:
artifact_store = component_name
if component_type == StackComponentType.ORCHESTRATOR:
Expand All @@ -515,9 +515,11 @@ def register_stack(
(StackComponentType.CONTAINER_REGISTRY, container_registry),
]:
if component_name_ and component_type_ not in components:
components[component_type_] = client.get_stack_component(
component_type_, component_name_
).id
components[component_type_] = [
client.get_stack_component(
component_type_, component_name_
).id
]

try:
created_stack = client.zen_store.create_stack(
Expand Down
Loading