flowmesh-cli-stack 0.1.2__tar.gz → 0.1.3rc1__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.
Files changed (20) hide show
  1. {flowmesh_cli_stack-0.1.2/src/flowmesh_cli_stack.egg-info → flowmesh_cli_stack-0.1.3rc1}/PKG-INFO +3 -3
  2. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/pyproject.toml +3 -3
  3. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/src/flowmesh_cli_stack/assets/.env.example +1 -0
  4. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/src/flowmesh_cli_stack/env_schema.py +6 -0
  5. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/src/flowmesh_cli_stack/worker.py +23 -1
  6. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1/src/flowmesh_cli_stack.egg-info}/PKG-INFO +3 -3
  7. flowmesh_cli_stack-0.1.3rc1/src/flowmesh_cli_stack.egg-info/requires.txt +5 -0
  8. flowmesh_cli_stack-0.1.2/src/flowmesh_cli_stack.egg-info/requires.txt +0 -5
  9. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/LICENSE +0 -0
  10. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/README.md +0 -0
  11. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/setup.cfg +0 -0
  12. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/src/flowmesh_cli_stack/__init__.py +0 -0
  13. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/src/flowmesh_cli_stack/assets/compose.yml +0 -0
  14. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/src/flowmesh_cli_stack/assets/docker-bake.hcl +0 -0
  15. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/src/flowmesh_cli_stack/bundle.py +0 -0
  16. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/src/flowmesh_cli_stack/stack.py +0 -0
  17. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/src/flowmesh_cli_stack/utils.py +0 -0
  18. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/src/flowmesh_cli_stack.egg-info/SOURCES.txt +0 -0
  19. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/src/flowmesh_cli_stack.egg-info/dependency_links.txt +0 -0
  20. {flowmesh_cli_stack-0.1.2 → flowmesh_cli_stack-0.1.3rc1}/src/flowmesh_cli_stack.egg-info/top_level.txt +0 -0
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flowmesh-cli-stack
3
- Version: 0.1.2
3
+ Version: 0.1.3rc1
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.2
10
- Requires-Dist: flowmesh-sdk-stack==0.1.2
9
+ Requires-Dist: flowmesh-cli==0.1.3rc1
10
+ Requires-Dist: flowmesh-sdk-stack==0.1.3rc1
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.2"
7
+ version = "0.1.3rc1"
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.2",
15
- "flowmesh-sdk-stack==0.1.2",
14
+ "flowmesh-cli==0.1.3rc1",
15
+ "flowmesh-sdk-stack==0.1.3rc1",
16
16
  "docker>=7.1.0",
17
17
  "packaging>=24",
18
18
  "pyyaml>=6.0.2",
@@ -117,6 +117,7 @@ TASK_MERGE_MAX_BATCH_SIZE=4
117
117
  ENABLE_CONTEXT_REUSE=true
118
118
  WORKER_CACHE_TTL_SEC=3600
119
119
  ENABLE_STAGE_WEIGHT_STICKINESS=false
120
+ TASK_NO_WORKER_GRACE_SEC=60
120
121
  ENABLE_WORKER_WATCHDOG=true
121
122
  WORKER_DEATH_CHECK_INTERVAL=30
122
123
  WORKER_DEATH_GRACE_SEC=60
@@ -388,6 +388,12 @@ STACK_ENV_SCHEMA = EnvSchema(
388
388
  "false",
389
389
  var_type=EnvVarType.BOOL,
390
390
  ),
391
+ EnvVar(
392
+ "TASK_NO_WORKER_GRACE_SEC",
393
+ "60",
394
+ var_type=EnvVarType.INT,
395
+ min_value=0,
396
+ ),
391
397
  EnvVar("ENABLE_WORKER_WATCHDOG", "true", var_type=EnvVarType.BOOL),
392
398
  EnvVar(
393
399
  "WORKER_DEATH_CHECK_INTERVAL",
@@ -18,7 +18,13 @@ from flowmesh_stack.workers import (
18
18
  select_worker_images,
19
19
  )
20
20
 
21
- from .utils import DEFAULT_ENV_FILE, STACK_PATH_KEYS, stack_node_client
21
+ from .utils import (
22
+ DEFAULT_ENV_FILE,
23
+ STACK_PATH_KEYS,
24
+ STACK_SLUG_ENV,
25
+ stack_node_client,
26
+ stack_resource_env_overrides,
27
+ )
22
28
 
23
29
  app = get_typer(help="Create and manage workers on the local node.")
24
30
 
@@ -74,6 +80,15 @@ def worker_up(
74
80
  "Repeat --config-raw to provide multiple configs."
75
81
  ),
76
82
  ),
83
+ name_template: str | None = typer.Option(
84
+ None,
85
+ "--name-template",
86
+ help=(
87
+ "Worker name template for cpu/gpu presets. Placeholders: "
88
+ "{slug}, {kind}, {idx}, {gpu}. "
89
+ "Default: '{slug}_worker_{kind}_{idx|gpu}'."
90
+ ),
91
+ ),
77
92
  env_file: Path = typer.Option(
78
93
  DEFAULT_ENV_FILE, "--env-file", help="Env file to load defaults"
79
94
  ),
@@ -84,6 +99,11 @@ def worker_up(
84
99
  ) -> None:
85
100
  """Create and start one or more workers from presets or a custom config file."""
86
101
  client = stack_node_client(env_file, base_url, token or None)
102
+ try:
103
+ slug = stack_resource_env_overrides(os.environ)[STACK_SLUG_ENV]
104
+ except ValueError as exc:
105
+ logging.error(str(exc))
106
+ raise typer.Exit(code=1)
87
107
  logging.info("Creating workers...")
88
108
  try:
89
109
  created = create_workers(
@@ -93,6 +113,8 @@ def worker_up(
93
113
  targets=targets,
94
114
  config_paths=config,
95
115
  config_raw=config_raw,
116
+ name_template=name_template,
117
+ slug=slug,
96
118
  )
97
119
  except FlowMeshError as exc:
98
120
  logging.error(str(exc))
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flowmesh-cli-stack
3
- Version: 0.1.2
3
+ Version: 0.1.3rc1
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.2
10
- Requires-Dist: flowmesh-sdk-stack==0.1.2
9
+ Requires-Dist: flowmesh-cli==0.1.3rc1
10
+ Requires-Dist: flowmesh-sdk-stack==0.1.3rc1
11
11
  Requires-Dist: docker>=7.1.0
12
12
  Requires-Dist: packaging>=24
13
13
  Requires-Dist: pyyaml>=6.0.2
@@ -0,0 +1,5 @@
1
+ flowmesh-cli==0.1.3rc1
2
+ flowmesh-sdk-stack==0.1.3rc1
3
+ docker>=7.1.0
4
+ packaging>=24
5
+ pyyaml>=6.0.2
@@ -1,5 +0,0 @@
1
- flowmesh-cli==0.1.2
2
- flowmesh-sdk-stack==0.1.2
3
- docker>=7.1.0
4
- packaging>=24
5
- pyyaml>=6.0.2