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
22 changes: 19 additions & 3 deletions devservices/commands/up.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ def up(args: Namespace) -> None:
lambda: console.warning(f"Starting '{service.name}' in mode: '{mode}'"),
lambda: console.success(f"{service.name} started"),
) as status:
services_with_local_runtime = state.get_services_by_runtime(
ServiceRuntime.LOCAL
)
for service_with_local_runtime in services_with_local_runtime:
if (
mode in modes
and service_with_local_runtime != service.name
and service_with_local_runtime in modes[mode]
):
status.warning(
f"Skipping '{service_with_local_runtime}' as it is set to run locally"
)
try:
status.info("Retrieving dependencies")
remote_dependencies = install_and_verify_dependencies(
Expand All @@ -110,10 +122,14 @@ def up(args: Namespace) -> None:
# Add the service to the starting services table
state.update_service_entry(service.name, mode, StateTables.STARTING_SERVICES)
mode_dependencies = modes[mode]
for service_with_local_runtime in services_with_local_runtime:
if service_with_local_runtime in [
dep.service_name for dep in remote_dependencies
]:
status.warning(
f"Skipping '{service_with_local_runtime}' as it is set to run locally"
)
# We want to ignore any dependencies that are set to run locally
services_with_local_runtime = state.get_services_by_runtime(
ServiceRuntime.LOCAL
)
mode_dependencies = [
dep for dep in mode_dependencies if dep not in services_with_local_runtime
]
Expand Down
Loading
Loading