dayhoff-tools 1.4.8__tar.gz → 1.4.10__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.
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/PKG-INFO +1 -1
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/cli/engine_commands.py +15 -3
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/pyproject.toml +1 -1
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/README.md +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/__init__.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/chemistry/standardizer.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/chemistry/utils.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/cli/__init__.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/cli/cloud_commands.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/cli/main.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/cli/swarm_commands.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/cli/utility_commands.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/deployment/base.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/deployment/deploy_aws.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/deployment/deploy_utils.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/deployment/job_runner.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/deployment/processors.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/deployment/swarm.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/embedders.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/fasta.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/file_ops.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/h5.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/intake/gcp.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/intake/gtdb.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/intake/kegg.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/intake/mmseqs.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/intake/structure.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/intake/uniprot.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/logs.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/sqlite.py +0 -0
- {dayhoff_tools-1.4.8 → dayhoff_tools-1.4.10}/dayhoff_tools/warehouse.py +0 -0
@@ -1623,6 +1623,9 @@ def attach_studio(
|
|
1623
1623
|
else:
|
1624
1624
|
raise typer.Exit(1)
|
1625
1625
|
|
1626
|
+
# Track whether this command just started the engine (affects retry length)
|
1627
|
+
engine_started_now = False
|
1628
|
+
|
1626
1629
|
# Retrieve SSH public key (required for authorised_keys provisioning)
|
1627
1630
|
try:
|
1628
1631
|
public_key = get_ssh_public_key()
|
@@ -1639,7 +1642,7 @@ def attach_studio(
|
|
1639
1642
|
transient=True,
|
1640
1643
|
) as prog:
|
1641
1644
|
task = prog.add_task("Attaching studio (engine is still booting)…", total=None)
|
1642
|
-
ATTEMPT_LIMIT = 40 #
|
1645
|
+
ATTEMPT_LIMIT = 40 if engine_started_now else 6 # shorter retries for already-running engines
|
1643
1646
|
RETRY_DELAY = 10
|
1644
1647
|
for attempt in range(ATTEMPT_LIMIT):
|
1645
1648
|
success, error_msg = _attempt_studio_attach(studio, engine, target_user, public_key)
|
@@ -1648,7 +1651,8 @@ def attach_studio(
|
|
1648
1651
|
break # success!
|
1649
1652
|
|
1650
1653
|
# Update spinner description with attempt number
|
1651
|
-
|
1654
|
+
if attempt % 3 == 0: # update every 3rd attempt to avoid spam
|
1655
|
+
prog.update(task, description=f"Attaching studio (engine is still booting)… {attempt+1}/{ATTEMPT_LIMIT}")
|
1652
1656
|
|
1653
1657
|
if error_msg:
|
1654
1658
|
console.print(f"[red]❌ Failed to attach studio: {error_msg}[/red]")
|
@@ -1697,8 +1701,16 @@ def _attempt_studio_attach(studio, engine, target_user, public_key):
|
|
1697
1701
|
"failed to mount",
|
1698
1702
|
"device busy",
|
1699
1703
|
"not available",
|
1704
|
+
"pending", # VM state pending
|
1705
|
+
]
|
1706
|
+
FATAL_PATTERNS = [
|
1707
|
+
"in-use",
|
1708
|
+
"already attached",
|
1709
|
+
"permission",
|
1700
1710
|
]
|
1701
|
-
if any(p in err_msg for p in
|
1711
|
+
if any(p in err_msg for p in FATAL_PATTERNS):
|
1712
|
+
recoverable = False
|
1713
|
+
elif any(p in err_msg for p in RECOVERABLE_PATTERNS):
|
1702
1714
|
recoverable = True
|
1703
1715
|
|
1704
1716
|
if not recoverable:
|
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
|
|
5
5
|
|
6
6
|
[project]
|
7
7
|
name = "dayhoff-tools"
|
8
|
-
version = "1.4.
|
8
|
+
version = "1.4.10"
|
9
9
|
description = "Common tools for all the repos at Dayhoff Labs"
|
10
10
|
authors = [
|
11
11
|
{name = "Daniel Martin-Alarcon", email = "dma@dayhofflabs.com"}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|