flowmesh-cli-stack 0.1.3rc1__tar.gz → 0.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flowmesh_cli_stack-0.1.3rc1/src/flowmesh_cli_stack.egg-info → flowmesh_cli_stack-0.1.5}/PKG-INFO +3 -3
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/pyproject.toml +3 -3
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack/assets/.env.example +1 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack/env_schema.py +6 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack/stack.py +65 -11
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5/src/flowmesh_cli_stack.egg-info}/PKG-INFO +3 -3
- flowmesh_cli_stack-0.1.5/src/flowmesh_cli_stack.egg-info/requires.txt +5 -0
- flowmesh_cli_stack-0.1.3rc1/src/flowmesh_cli_stack.egg-info/requires.txt +0 -5
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/LICENSE +0 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/README.md +0 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/setup.cfg +0 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack/__init__.py +0 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack/assets/compose.yml +0 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack/assets/docker-bake.hcl +0 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack/bundle.py +0 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack/utils.py +0 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack/worker.py +0 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack.egg-info/SOURCES.txt +0 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack.egg-info/dependency_links.txt +0 -0
- {flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack.egg-info/top_level.txt +0 -0
{flowmesh_cli_stack-0.1.3rc1/src/flowmesh_cli_stack.egg-info → flowmesh_cli_stack-0.1.5}/PKG-INFO
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flowmesh-cli-stack
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: FlowMesh CLI stack commands
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Requires-Python: >=3.12
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
License-File: LICENSE
|
|
9
|
-
Requires-Dist: flowmesh-cli==0.1.
|
|
10
|
-
Requires-Dist: flowmesh-sdk-stack==0.1.
|
|
9
|
+
Requires-Dist: flowmesh-cli==0.1.5
|
|
10
|
+
Requires-Dist: flowmesh-sdk-stack==0.1.5
|
|
11
11
|
Requires-Dist: docker>=7.1.0
|
|
12
12
|
Requires-Dist: packaging>=24
|
|
13
13
|
Requires-Dist: pyyaml>=6.0.2
|
|
@@ -4,15 +4,15 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "flowmesh-cli-stack"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.5"
|
|
8
8
|
description = "FlowMesh CLI stack commands"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12"
|
|
11
11
|
license = "Apache-2.0"
|
|
12
12
|
license-files = ["LICENSE"]
|
|
13
13
|
dependencies = [
|
|
14
|
-
"flowmesh-cli==0.1.
|
|
15
|
-
"flowmesh-sdk-stack==0.1.
|
|
14
|
+
"flowmesh-cli==0.1.5",
|
|
15
|
+
"flowmesh-sdk-stack==0.1.5",
|
|
16
16
|
"docker>=7.1.0",
|
|
17
17
|
"packaging>=24",
|
|
18
18
|
"pyyaml>=6.0.2",
|
|
@@ -531,33 +531,87 @@ def down(
|
|
|
531
531
|
logging.success("FlowMesh stack stopped.")
|
|
532
532
|
|
|
533
533
|
|
|
534
|
+
STACK_SERVICES = ("server", "redis_control", "redis_telemetry")
|
|
535
|
+
"""Compose services that can be restarted individually."""
|
|
536
|
+
|
|
537
|
+
WORKER_MANAGING_SERVICES = ("server",)
|
|
538
|
+
"""Services whose restart tears down the supervisor; drain workers first."""
|
|
539
|
+
|
|
540
|
+
|
|
534
541
|
@app.command()
|
|
535
542
|
def restart(
|
|
543
|
+
services: list[str] | None = typer.Argument(
|
|
544
|
+
None,
|
|
545
|
+
help=(
|
|
546
|
+
"Restart only these compose services in place (any of: "
|
|
547
|
+
f"{', '.join(STACK_SERVICES)}), leaving the rest of the stack "
|
|
548
|
+
"running. Omit to restart the whole stack."
|
|
549
|
+
),
|
|
550
|
+
),
|
|
536
551
|
env_file: Path = typer.Option(
|
|
537
552
|
DEFAULT_ENV_FILE, "--env-file", help="Env file for compose"
|
|
538
553
|
),
|
|
539
554
|
image_tag: str | None = typer.Option(
|
|
540
555
|
None, "--image-tag", help="Override FLOWMESH_VERSION"
|
|
541
556
|
),
|
|
557
|
+
pull: bool = typer.Option(
|
|
558
|
+
True, "--pull/--no-pull", help="Pull the target image before recreating."
|
|
559
|
+
),
|
|
542
560
|
) -> None:
|
|
543
|
-
"""Drain workers and restart the stack.
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
561
|
+
"""Drain workers and restart the stack, or recreate specific services in place.
|
|
562
|
+
|
|
563
|
+
With one or more SERVICE arguments the stack is left running and only those services
|
|
564
|
+
are recreated; when any of them manages workers (the server / supervisor) its
|
|
565
|
+
workers are drained first so their in-flight tasks requeue onto other nodes.
|
|
566
|
+
"""
|
|
567
|
+
if not services:
|
|
568
|
+
logging.info("Draining workers...")
|
|
569
|
+
_drain_workers(env_file)
|
|
570
|
+
_compose(
|
|
571
|
+
["down"],
|
|
572
|
+
env_file=env_file,
|
|
573
|
+
env=image_env_overrides(image_tag),
|
|
574
|
+
profile="root",
|
|
575
|
+
)
|
|
576
|
+
profile = "root" if _node_role(env_file) == NodeRole.ROOT else None
|
|
577
|
+
_compose(
|
|
578
|
+
["up", "-d", "--wait"],
|
|
579
|
+
env_file=env_file,
|
|
580
|
+
env=image_env_overrides(image_tag),
|
|
581
|
+
to_deploy=True,
|
|
582
|
+
profile=profile,
|
|
583
|
+
)
|
|
584
|
+
logging.success("FlowMesh stack is up.")
|
|
585
|
+
return
|
|
586
|
+
|
|
587
|
+
requested = list(dict.fromkeys(services))
|
|
588
|
+
unknown = [svc for svc in requested if svc not in STACK_SERVICES]
|
|
589
|
+
if unknown:
|
|
590
|
+
logging.error(
|
|
591
|
+
f"Unknown service(s): {', '.join(unknown)}. "
|
|
592
|
+
f"Known services: {', '.join(STACK_SERVICES)}."
|
|
593
|
+
)
|
|
594
|
+
raise typer.Exit(code=1)
|
|
595
|
+
|
|
596
|
+
if any(svc in WORKER_MANAGING_SERVICES for svc in requested):
|
|
597
|
+
logging.info("Draining workers...")
|
|
598
|
+
_drain_workers(env_file)
|
|
599
|
+
|
|
552
600
|
profile = "root" if _node_role(env_file) == NodeRole.ROOT else None
|
|
601
|
+
up_args = ["up", "-d", "--no-deps", "--force-recreate", "--wait"]
|
|
602
|
+
if pull:
|
|
603
|
+
up_args += ["--pull", "always"]
|
|
604
|
+
up_args += requested
|
|
605
|
+
joined = ", ".join(requested)
|
|
606
|
+
logging.info(f"Recreating service(s): {joined}...")
|
|
553
607
|
_compose(
|
|
554
|
-
|
|
608
|
+
up_args,
|
|
555
609
|
env_file=env_file,
|
|
556
610
|
env=image_env_overrides(image_tag),
|
|
557
611
|
to_deploy=True,
|
|
558
612
|
profile=profile,
|
|
559
613
|
)
|
|
560
|
-
logging.success("
|
|
614
|
+
logging.success(f"Service(s) restarted: {joined}.")
|
|
561
615
|
|
|
562
616
|
|
|
563
617
|
@app.command()
|
{flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5/src/flowmesh_cli_stack.egg-info}/PKG-INFO
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flowmesh-cli-stack
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: FlowMesh CLI stack commands
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Requires-Python: >=3.12
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
License-File: LICENSE
|
|
9
|
-
Requires-Dist: flowmesh-cli==0.1.
|
|
10
|
-
Requires-Dist: flowmesh-sdk-stack==0.1.
|
|
9
|
+
Requires-Dist: flowmesh-cli==0.1.5
|
|
10
|
+
Requires-Dist: flowmesh-sdk-stack==0.1.5
|
|
11
11
|
Requires-Dist: docker>=7.1.0
|
|
12
12
|
Requires-Dist: packaging>=24
|
|
13
13
|
Requires-Dist: pyyaml>=6.0.2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack/assets/compose.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowmesh_cli_stack-0.1.3rc1 → flowmesh_cli_stack-0.1.5}/src/flowmesh_cli_stack.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|