katalon-cli 0.3.0__tar.gz → 0.3.2__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.
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/PKG-INFO +1 -1
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/pyproject.toml +1 -1
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/pyproject.toml.orig +1 -1
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/core/checks.py +2 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/core/reindex.py +12 -4
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/core/release.py +2 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/main.py +26 -1
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/README.md +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/__init__.py +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/core/__init__.py +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/core/backup.py +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/core/compose_gen.py +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/core/docker.py +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/core/paths.py +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/core/permissions.py +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/core/selfupdate.py +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/core/state.py +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/py.typed +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/templates/Caddyfile.j2 +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/templates/compose.yaml.j2 +0 -0
- {katalon_cli-0.3.0 → katalon_cli-0.3.2}/src/katalon_cli/templates/nginx.conf.j2 +0 -0
|
@@ -26,6 +26,8 @@ def check_docker() -> CheckResult:
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def check_compose() -> CheckResult:
|
|
29
|
+
if not shutil.which("docker"):
|
|
30
|
+
return CheckResult("Docker Compose", False, "Docker fehlt")
|
|
29
31
|
probe = subprocess.run(["docker", "compose", "version"], capture_output=True, text=True)
|
|
30
32
|
if probe.returncode == 0:
|
|
31
33
|
return CheckResult("Docker Compose", True, probe.stdout.strip())
|
|
@@ -49,10 +49,15 @@ finally:
|
|
|
49
49
|
_run(engine.dispose())
|
|
50
50
|
"""
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
# Logzeilen von bulk_reindex_type_task. Katalon >= 1.42 (Alias-Swap-Rebuild) loggt
|
|
53
|
+
# "streaming N docs", "n/N docs" und "indexed N, removed M stale"; ältere Versionen
|
|
54
|
+
# "building N index docs", "n/N docs built" und "successfully indexed N records".
|
|
55
|
+
_BUILDING = re.compile(r"(?:building|streaming) (\d+) (?:index )?docs for '(\w+)'")
|
|
56
|
+
_BUILT = re.compile(r"(\d+)/(\d+) docs (?:built )?for '(\w+)'")
|
|
57
|
+
_INDEXED = re.compile(r"(?:successfully indexed (\d+) records|indexed (\d+), removed \d+ stale) for '(\w+)'")
|
|
55
58
|
_FINISHED = re.compile(r"Task katalon\.reindex_all\[(?P<id>[0-9a-f-]+)\] (?P<state>succeeded|raised|failed)")
|
|
59
|
+
# Ergebnis von reindex_all ab Katalon 1.42: {..., 'types': {'object': {'indexed': 31815, ...}}}
|
|
60
|
+
_RESULT_INDEXED = re.compile(r"'(\w+)': \{'status': '\w+', 'indexed': (\d+)")
|
|
56
61
|
_RECEIVED = re.compile(r"Task katalon\.reindex_all\[(?P<id>[0-9a-f-]+)\] received")
|
|
57
62
|
|
|
58
63
|
|
|
@@ -98,10 +103,13 @@ def parse_progress(log_text: str, task_id: str, known_totals: dict[str, int] | N
|
|
|
98
103
|
progress.current = m[3]
|
|
99
104
|
progress.built[m[3]] = int(m[1])
|
|
100
105
|
elif (m := _INDEXED.search(line)):
|
|
101
|
-
progress.indexed[m[
|
|
106
|
+
progress.indexed[m[3]] = int(m[1] or m[2])
|
|
102
107
|
elif (m := _FINISHED.search(line)) and m["id"] == task_id:
|
|
103
108
|
progress.finished = True
|
|
104
109
|
progress.failed = m["state"] != "succeeded"
|
|
110
|
+
# Das Task-Ergebnis ist die verlässlichste Quelle für die Endzahlen.
|
|
111
|
+
for rtype, count in _RESULT_INDEXED.findall(line[m.end():]):
|
|
112
|
+
progress.indexed[rtype] = int(count)
|
|
105
113
|
return progress
|
|
106
114
|
|
|
107
115
|
|
|
@@ -34,6 +34,8 @@ class ReleaseMetadata(BaseModel):
|
|
|
34
34
|
version: str
|
|
35
35
|
minimum_installer_version: str
|
|
36
36
|
migration_required: bool
|
|
37
|
+
# Suchindex-Kopien der Vorversion sind veraltet (Katalon >= 1.43.2); fehlt bei älteren Releases.
|
|
38
|
+
reindex_required: bool = False
|
|
37
39
|
breaking: bool
|
|
38
40
|
compose_revision: int
|
|
39
41
|
requires: ReleaseRequirements = ReleaseRequirements()
|
|
@@ -490,6 +490,9 @@ def _ensure_media_permissions(dir: Path) -> bool:
|
|
|
490
490
|
|
|
491
491
|
|
|
492
492
|
def _start(dir: Path, show_credentials: bool = False) -> None:
|
|
493
|
+
# Ohne capture: Fortschritt sichtbar, sonst wirkt der erste Image-Pull wie ein Hänger.
|
|
494
|
+
console.print("Lade Images (beim ersten Start einige Minuten) …")
|
|
495
|
+
docker.compose(dir, "pull")
|
|
493
496
|
_ensure_media_permissions(dir)
|
|
494
497
|
docker.compose(dir, "up", "-d")
|
|
495
498
|
console.print("[green]✔[/] Stack gestartet.")
|
|
@@ -680,6 +683,9 @@ def update(
|
|
|
680
683
|
dir: Path | None = typer.Option(None, "--dir"),
|
|
681
684
|
target: str = typer.Option(None, "--target", help="Zielversion, default = latest"),
|
|
682
685
|
yes: bool = typer.Option(False, "--yes", help="Ohne Rückfrage"),
|
|
686
|
+
reindex: bool = typer.Option(
|
|
687
|
+
False, "--reindex", help="Suchindex nach dem Update neu aufbauen, wenn das Release es verlangt."
|
|
688
|
+
),
|
|
683
689
|
):
|
|
684
690
|
"""Update auf neue Version — Backup zuerst, immer."""
|
|
685
691
|
dir = instance_dir_or_raise(dir)
|
|
@@ -711,6 +717,12 @@ def update(
|
|
|
711
717
|
console.print("[red]⚠ Breaking Change in diesem Release.[/]")
|
|
712
718
|
if meta.migration_required:
|
|
713
719
|
console.print("[yellow]⚠ DB-Migration erforderlich.[/]")
|
|
720
|
+
reindex_needed = any(item.reindex_required for item in update_releases) or meta.reindex_required
|
|
721
|
+
if reindex_needed:
|
|
722
|
+
console.print(
|
|
723
|
+
"[yellow]⚠ Suchindex muss danach neu aufgebaut werden. Bis dahin liefern OAI und "
|
|
724
|
+
"Exporte langsamer (Aufbau aus der Datenbank).[/]"
|
|
725
|
+
)
|
|
714
726
|
if meta.compose_revision != state.compose_revision:
|
|
715
727
|
console.print(
|
|
716
728
|
f"[yellow]⚠ compose.yaml wird neu generiert "
|
|
@@ -780,6 +792,12 @@ def update(
|
|
|
780
792
|
console.rule("Changelog")
|
|
781
793
|
console.print(notes)
|
|
782
794
|
|
|
795
|
+
if reindex_needed:
|
|
796
|
+
if reindex or (not yes and Confirm.ask("Suchindex jetzt neu aufbauen?", default=True)):
|
|
797
|
+
_run_reindex(dir)
|
|
798
|
+
else:
|
|
799
|
+
console.print("[yellow]⚠ Suchindex neu aufbauen:[/] [bold]katalon reindex[/]")
|
|
800
|
+
|
|
783
801
|
_print_next_steps(dir, state.base_url)
|
|
784
802
|
|
|
785
803
|
|
|
@@ -863,7 +881,14 @@ def _run_reindex(dir: Path, wait: bool = True) -> None:
|
|
|
863
881
|
raise typer.Exit(1) from exc
|
|
864
882
|
bar.update(task, description="Reindex", total=bar.tasks[task].total, completed=bar.tasks[task].total)
|
|
865
883
|
indexed = sum(final.indexed.values())
|
|
866
|
-
|
|
884
|
+
if not indexed:
|
|
885
|
+
console.print(
|
|
886
|
+
"[yellow]⚠[/] Reindex beendet, aber keine indizierten Datensätze erkannt — "
|
|
887
|
+
"bitte prüfen: [bold]katalon logs worker[/]"
|
|
888
|
+
)
|
|
889
|
+
return
|
|
890
|
+
per_type = ", ".join(f"{t} {n}" for t, n in final.indexed.items())
|
|
891
|
+
console.print(f"[green]✔[/] Suchindex neu aufgebaut ({indexed} Datensätze: {per_type}).")
|
|
867
892
|
|
|
868
893
|
|
|
869
894
|
@app.command()
|
|
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
|