rocketdoo 3.7.0__tar.gz → 3.8.1__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.
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/LICENSE +2 -2
- {rocketdoo-3.7.0/rocketdoo.egg-info → rocketdoo-3.8.1}/PKG-INFO +4 -4
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/README.md +1 -1
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/pyproject.toml +1 -1
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/ci_cli.py +46 -12
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/deploy/module_packager.py +0 -17
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/pack.py +76 -8
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/unpack.py +25 -2
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/static/index.html +72 -1
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui_cli.py +39 -1
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/pack_environment.py +6 -1
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/ci/workflow.yaml.jinja +6 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1/rocketdoo.egg-info}/PKG-INFO +4 -4
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_ci_cli.py +136 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_gui_api.py +63 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_gui_static.py +45 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_pack_environment.py +246 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_unpack_environment.py +97 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/MANIFEST.in +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/__init__.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/cli.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/cli_output.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/__init__.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/addons_path.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/compose.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/deploy/__init__.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/deploy/base.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/deploy/config_manager.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/deploy/odoo_sh.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/deploy/vps.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/edition_setup.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/generator.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/gitignore_manager.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/gitman_config.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/instance/__init__.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/instance/config_manager.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/instance/deployer_docker.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/instance/deployer_native.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/instance/secrets_store.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/instance/ssh_utils.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/mailpit.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/models/__init__.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/models/deploy.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/models/instance.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/models/profiles.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/models/project.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/module_scanner.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/odoo_db.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/port_validation.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/project_info.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/service.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/ssh_manager.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/core/traefik.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/deploy_cli.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/docker_cli.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/__init__.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/__init__.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/deploy_ops.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/docker_ops.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/gitman.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/instances.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/mail.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/modules.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/odoo.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/pack_ops.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/project.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/setup.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/traefik_ops.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/api/workspace.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/gui/server.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/init_project.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/instance_cli.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/mail_cli.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/scaffold.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/.devcontainer/devcontainer.json +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/.devcontainer/docker-compose.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/.gitignore.jinja +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/.vscode/launch.json +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/.vscode/launch.json.jinja +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/.vscode/settings.json +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/Dockerfile.jinja +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/addons/.gitkeep +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/config/odoo.conf +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/config/odoo.conf.jinja +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/deploy/.deployignore +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/deploy/deploy.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/deploy/deploy.yaml.jinja +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/docker-compose.yaml.jinja +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/install_dependencies.sh +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/instance/Dockerfile.jinja +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/instance/docker-compose.jinja +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/instance/odoo.conf.jinja +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/odoo_pg_pass +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/README.md +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/odoo15-ce.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/odoo15-ee.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/odoo16-ce.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/odoo16-ee.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/odoo17-ce.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/odoo17-ee.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/odoo18-ce.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/odoo18-ee.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/odoo19-ce.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/odoo19-ee.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/odoo20-ce.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/templates/profiles/odoo20-ee.yaml +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/traefik_cli.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/unpack_environment.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo/welcome.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo.egg-info/SOURCES.txt +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo.egg-info/dependency_links.txt +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo.egg-info/entry_points.txt +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo.egg-info/requires.txt +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/rocketdoo.egg-info/top_level.txt +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/setup.cfg +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_addons_path.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_cli_output.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_compose.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_core_contract.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_deploy_config_manager.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_docker_cli.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_e2e_pack_unpack.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_e2e_scaffold.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_edition_setup.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_gitignore_manager.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_gui_mail.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_imports.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_mail_cli.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_mailpit.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_models.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_module_scanner.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_odoo_db.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_port_validation.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_profiles.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_project_info.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_secrets_hardening.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_ssh_manager.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_templates.py +0 -0
- {rocketdoo-3.7.0 → rocketdoo-3.8.1}/tests/test_traefik.py +0 -0
|
@@ -57,7 +57,7 @@ If the Library as you received it specifies that a proxy can decide whether futu
|
|
|
57
57
|
<div RKD as ROCKETDOO V3=""></div>
|
|
58
58
|
|
|
59
59
|
Licencia: LGPL-3.0+
|
|
60
|
-
Versión: "3.
|
|
60
|
+
Versión: "3.8.1"
|
|
61
61
|
Autor: Horacio Montaño
|
|
62
|
-
Fecha:
|
|
62
|
+
Fecha: 06/10/2026
|
|
63
63
|
Descripción: Framework to development Odoo
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rocketdoo
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.8.1
|
|
4
4
|
Summary: Framework for creating Odoo development environments with Docker and custom templates.
|
|
5
5
|
Author-email: Horacio Montaño <horaciomontano@hdmsoft.com.ar>
|
|
6
6
|
License: GNU LESSER GENERAL PUBLIC LICENSE
|
|
@@ -62,9 +62,9 @@ License: GNU LESSER GENERAL PUBLIC LICENSE
|
|
|
62
62
|
<div RKD as ROCKETDOO V3=""></div>
|
|
63
63
|
|
|
64
64
|
Licencia: LGPL-3.0+
|
|
65
|
-
Versión: "3.
|
|
65
|
+
Versión: "3.8.1"
|
|
66
66
|
Autor: Horacio Montaño
|
|
67
|
-
Fecha:
|
|
67
|
+
Fecha: 06/10/2026
|
|
68
68
|
Descripción: Framework to development Odoo
|
|
69
69
|
Requires-Python: >=3.10
|
|
70
70
|
Description-Content-Type: text/markdown
|
|
@@ -97,7 +97,7 @@ Odoo Development Framework
|
|
|
97
97
|
- "Horacio Montaño"
|
|
98
98
|
|
|
99
99
|
## Version:
|
|
100
|
-
- "3.
|
|
100
|
+
- "3.8.1"
|
|
101
101
|
|
|
102
102
|
----------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
103
103
|
|
|
@@ -60,6 +60,13 @@ def prepare(admin_passwd):
|
|
|
60
60
|
pg_pass.write_text(PG_PASS_TEMPLATE.read_text())
|
|
61
61
|
created.append("odoo_pg_pass")
|
|
62
62
|
|
|
63
|
+
config_dir = project_root / "config"
|
|
64
|
+
if config_dir.exists() and not config_dir.is_dir():
|
|
65
|
+
# render_template() would reach os.makedirs() and raise a bare
|
|
66
|
+
# NotADirectoryError naming a path the user never typed.
|
|
67
|
+
console.print(f"[red]{config_dir} exists but is not a directory, so config/odoo.conf cannot be written.[/red]")
|
|
68
|
+
sys.exit(1)
|
|
69
|
+
|
|
63
70
|
odoo_conf = project_root / "config" / "odoo.conf"
|
|
64
71
|
if odoo_conf.exists():
|
|
65
72
|
kept.append("config/odoo.conf")
|
|
@@ -217,6 +224,41 @@ def _ci_context(project_root, install_trigger):
|
|
|
217
224
|
}
|
|
218
225
|
|
|
219
226
|
|
|
227
|
+
def _same_workflow(existing: str, generated: str) -> bool:
|
|
228
|
+
"""Whether the file on disk says the same thing as what would be generated.
|
|
229
|
+
|
|
230
|
+
Byte equality reported `modified` for a workflow that had only picked up
|
|
231
|
+
CRLF endings -- from a Windows editor, or from git's own core.autocrlf --
|
|
232
|
+
and asked for --force to rewrite an identical file. Neither line endings
|
|
233
|
+
nor a trailing newline are content here: YAML does not read them, and the
|
|
234
|
+
user did not choose them.
|
|
235
|
+
"""
|
|
236
|
+
return existing.replace("\r\n", "\n").rstrip("\n") == generated.replace("\r\n", "\n").rstrip("\n")
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
def _print_advisories(context, project_root):
|
|
240
|
+
"""Why this project's workflow looks the way it does.
|
|
241
|
+
|
|
242
|
+
Printed on every outcome, not just after writing. Re-running `rkd ci init`
|
|
243
|
+
on an already configured project is the common case, and it used to return
|
|
244
|
+
before reaching any of this -- so the one user most likely to be wondering
|
|
245
|
+
why their project has no install job was the one who never saw the reason.
|
|
246
|
+
"""
|
|
247
|
+
if context["unsupported_reasons"]:
|
|
248
|
+
console.print("[yellow]The install job was not generated:[/yellow]")
|
|
249
|
+
for reason in context["unsupported_reasons"]:
|
|
250
|
+
console.print(f" - {reason}")
|
|
251
|
+
elif context["install_trigger"] == "never":
|
|
252
|
+
console.print("[dim]The install job is turned off (--install-trigger never).[/dim]")
|
|
253
|
+
private_sources = _private_gitman_sources(project_root)
|
|
254
|
+
if private_sources:
|
|
255
|
+
console.print("[yellow]gitman.yaml clones over SSH; the runner has no key for:[/yellow]")
|
|
256
|
+
for repo in private_sources:
|
|
257
|
+
console.print(f" [yellow]- {repo}[/yellow]")
|
|
258
|
+
console.print("[yellow]The install job will fail there unless you supply a deploy key.[/yellow]")
|
|
259
|
+
console.print("[dim]The lint job runs ruff with its default rules over addons/.[/dim]")
|
|
260
|
+
|
|
261
|
+
|
|
220
262
|
def _render_workflow(context):
|
|
221
263
|
env = Environment(loader=FileSystemLoader(WORKFLOW_TEMPLATE_DIR))
|
|
222
264
|
return env.get_template("workflow.yaml.jinja").render(**context)
|
|
@@ -258,8 +300,9 @@ def init(install_trigger, force, yes):
|
|
|
258
300
|
output_path = project_root / WORKFLOW_RELATIVE_PATH
|
|
259
301
|
|
|
260
302
|
if output_path.exists():
|
|
261
|
-
if output_path.read_text()
|
|
303
|
+
if _same_workflow(output_path.read_text(), content):
|
|
262
304
|
console.print(f"[dim]{WORKFLOW_RELATIVE_PATH} is already up to date.[/dim]")
|
|
305
|
+
_print_advisories(context, project_root)
|
|
263
306
|
return
|
|
264
307
|
if not force:
|
|
265
308
|
console.print(
|
|
@@ -268,6 +311,7 @@ def init(install_trigger, force, yes):
|
|
|
268
311
|
"Rocketdoo version changed since it was generated). Not overwriting it; run "
|
|
269
312
|
"`rkd ci init --force` to regenerate it.[/yellow]"
|
|
270
313
|
)
|
|
314
|
+
_print_advisories(context, project_root)
|
|
271
315
|
return
|
|
272
316
|
output_path.write_text(content)
|
|
273
317
|
console.print(f"[green]Overwritten:[/green] {WORKFLOW_RELATIVE_PATH}")
|
|
@@ -276,14 +320,4 @@ def init(install_trigger, force, yes):
|
|
|
276
320
|
output_path.write_text(content)
|
|
277
321
|
console.print(f"[green]Created:[/green] {WORKFLOW_RELATIVE_PATH}")
|
|
278
322
|
|
|
279
|
-
|
|
280
|
-
console.print("[yellow]The install job was not generated:[/yellow]")
|
|
281
|
-
for reason in context["unsupported_reasons"]:
|
|
282
|
-
console.print(f" - {reason}")
|
|
283
|
-
private_sources = _private_gitman_sources(project_root)
|
|
284
|
-
if private_sources:
|
|
285
|
-
console.print("[yellow]gitman.yaml clones over SSH; the runner has no key for:[/yellow]")
|
|
286
|
-
for repo in private_sources:
|
|
287
|
-
console.print(f" [yellow]- {repo}[/yellow]")
|
|
288
|
-
console.print("[yellow]The install job will fail there unless you supply a deploy key.[/yellow]")
|
|
289
|
-
console.print("[dim]The lint job runs ruff with its default rules over addons/.[/dim]")
|
|
323
|
+
_print_advisories(context, project_root)
|
|
@@ -193,23 +193,6 @@ class ModulePackager:
|
|
|
193
193
|
|
|
194
194
|
return output_path
|
|
195
195
|
|
|
196
|
-
def extract_archive(self, archive_path: Path, target_dir: Path):
|
|
197
|
-
"""
|
|
198
|
-
Extracts a module archive
|
|
199
|
-
|
|
200
|
-
Args:
|
|
201
|
-
archive_path: Path to archive file
|
|
202
|
-
target_dir: Directory where to extract
|
|
203
|
-
"""
|
|
204
|
-
console.print(f"📦 Extracting archive to: {target_dir}")
|
|
205
|
-
|
|
206
|
-
target_dir.mkdir(parents=True, exist_ok=True)
|
|
207
|
-
|
|
208
|
-
with tarfile.open(archive_path, "r:gz") as tar:
|
|
209
|
-
tar.extractall(target_dir)
|
|
210
|
-
|
|
211
|
-
console.print("✅ Archive extracted successfully", style="green")
|
|
212
|
-
|
|
213
196
|
def get_module_size(self, module: Dict) -> int:
|
|
214
197
|
"""
|
|
215
198
|
Calculates total size of a module in bytes
|
|
@@ -17,6 +17,7 @@ import json
|
|
|
17
17
|
import re
|
|
18
18
|
import subprocess
|
|
19
19
|
import zipfile
|
|
20
|
+
from collections.abc import Iterable
|
|
20
21
|
from datetime import datetime
|
|
21
22
|
from pathlib import Path
|
|
22
23
|
|
|
@@ -33,6 +34,11 @@ _SSH_DOCKERFILE_PATTERNS = [
|
|
|
33
34
|
|
|
34
35
|
_ALWAYS_EXCLUDE = {".ssh", "__pycache__", "node_modules", ".mypy_cache"}
|
|
35
36
|
|
|
37
|
+
# The names pack writes under rkd_backups/. Public because core/unpack.py
|
|
38
|
+
# reads back what this module writes, and the two drifting apart is its own
|
|
39
|
+
# class of bug: the writer owns the format.
|
|
40
|
+
BACKUP_FILENAME = re.compile(r"^(db|filestore)_.+_\d{8}_\d{6}\.(dump|tar\.gz)$")
|
|
41
|
+
|
|
36
42
|
_FILESTORE_PATH_TEMPLATES = [
|
|
37
43
|
"/var/lib/odoo/.local/share/Odoo/filestore/{db}",
|
|
38
44
|
"/var/lib/odoo/filestore/{db}",
|
|
@@ -183,29 +189,81 @@ def _verify_no_ssh_in_zip(zip_path: Path) -> list[str]:
|
|
|
183
189
|
return suspicious
|
|
184
190
|
|
|
185
191
|
|
|
186
|
-
def _create_zip(project_dir: Path, zip_path: Path, exclude_dirs: list[str]) -> int:
|
|
192
|
+
def _create_zip(project_dir: Path, zip_path: Path, exclude_dirs: list[str], exclude_files: Iterable[Path] = ()) -> int:
|
|
187
193
|
"""Creates the ZIP archive of the full environment.
|
|
188
194
|
|
|
189
|
-
Excludes: .ssh/, __pycache__, node_modules,
|
|
190
|
-
`rkd_backups/`, like every other
|
|
191
|
-
`rglob` walk below - it never
|
|
192
|
-
number of files included.
|
|
195
|
+
Excludes: .ssh/, __pycache__, node_modules, any extra dirs provided, and
|
|
196
|
+
the individual files in `exclude_files`. `rkd_backups/`, like every other
|
|
197
|
+
project subdirectory, is picked up by the `rglob` walk below - it never
|
|
198
|
+
needed a dedicated branch. Returns the number of files included.
|
|
199
|
+
|
|
200
|
+
`exclude_files` is matched on the path relative to the project, not on
|
|
201
|
+
file identity the way the output archive is: these paths are enumerated
|
|
202
|
+
from this same tree, under this same spelling, rather than typed by a
|
|
203
|
+
caller who could name the file some other way.
|
|
193
204
|
"""
|
|
194
205
|
excluded = _ALWAYS_EXCLUDE | set(exclude_dirs)
|
|
206
|
+
excluded_rel = {Path(item).relative_to(project_dir) for item in exclude_files}
|
|
207
|
+
|
|
208
|
+
def is_the_archive(item: Path) -> bool:
|
|
209
|
+
"""Whether this entry is the archive being written, under any name.
|
|
210
|
+
|
|
211
|
+
An output path inside the project is reached by the walk below, and
|
|
212
|
+
writing the archive into itself makes zipfile read a source whose
|
|
213
|
+
EOF recedes as fast as it is read: every chunk read back is a chunk
|
|
214
|
+
just appended. On compressible content the deflate ratio outruns the
|
|
215
|
+
read and the ZIP merely carries a corrupt copy of itself; on content
|
|
216
|
+
that does not compress - the dump and the filestore under
|
|
217
|
+
rkd_backups/ - nothing ends the loop and the file grows until the
|
|
218
|
+
disk is full.
|
|
219
|
+
|
|
220
|
+
Identity rather than path text, because the same growing file is
|
|
221
|
+
reachable under more than one name: a symlink or a hard link to it,
|
|
222
|
+
or the same directory entry spelled with different case on a
|
|
223
|
+
case-insensitive filesystem (WSL over /mnt/c, where this is normally
|
|
224
|
+
run). All three reopen the same hole.
|
|
225
|
+
"""
|
|
226
|
+
try:
|
|
227
|
+
return item.samefile(zip_path)
|
|
228
|
+
except OSError:
|
|
229
|
+
return False
|
|
195
230
|
|
|
196
231
|
file_count = 0
|
|
197
232
|
with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED, compresslevel=6) as zf:
|
|
198
233
|
for item in project_dir.rglob("*"):
|
|
199
234
|
rel = item.relative_to(project_dir)
|
|
200
|
-
if set(rel.parts) & excluded:
|
|
235
|
+
if rel in excluded_rel or set(rel.parts) & excluded:
|
|
201
236
|
continue
|
|
202
|
-
if item.is_file():
|
|
237
|
+
if item.is_file() and not is_the_archive(item):
|
|
203
238
|
zf.write(item, rel)
|
|
204
239
|
file_count += 1
|
|
205
240
|
|
|
206
241
|
return file_count
|
|
207
242
|
|
|
208
243
|
|
|
244
|
+
def _stale_backups(backup_dir: Path, keep: set[Path | None]) -> list[Path]:
|
|
245
|
+
"""Backups left behind by earlier packs, which must not travel.
|
|
246
|
+
|
|
247
|
+
`rkd_backups/` grows by one (dump, filestore) pair per pack and nothing
|
|
248
|
+
removes them. `core/unpack.py` restores the newest pair and ignores the
|
|
249
|
+
rest, so every older pair is weight the recipient downloads and never
|
|
250
|
+
reads - gigabytes of it on a real database.
|
|
251
|
+
|
|
252
|
+
With `include_db=False` it is not only weight: `unpack()` decides whether
|
|
253
|
+
to restore from the dump existing, not from the manifest, so a pack that
|
|
254
|
+
carried no database on purpose arrived with an older one.
|
|
255
|
+
|
|
256
|
+
Only the names this module writes are recognised. The directory is rkd's;
|
|
257
|
+
the files in it are not necessarily, and dropping one the user put there
|
|
258
|
+
would be silent data loss in the shared copy.
|
|
259
|
+
"""
|
|
260
|
+
if not backup_dir.is_dir():
|
|
261
|
+
return []
|
|
262
|
+
return sorted(
|
|
263
|
+
item for item in backup_dir.iterdir() if item.is_file() and item not in keep and BACKUP_FILENAME.match(item.name)
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
|
|
209
267
|
# ─── read functions ──────────────────────────────────────────────────────────
|
|
210
268
|
|
|
211
269
|
|
|
@@ -340,8 +398,17 @@ def pack(
|
|
|
340
398
|
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
|
341
399
|
zip_path = Path(output) if output else root.parent / f"{project_name}_rkd_shared_{timestamp}.zip"
|
|
342
400
|
|
|
401
|
+
# A filestore with no dump beside it is dead weight: unpack() nests the
|
|
402
|
+
# whole restore, filestore included, under the dump existing. That is the
|
|
403
|
+
# shape left behind when pg_dump fails mid-pack, so this run's own
|
|
404
|
+
# filestore is only kept when its dump survived.
|
|
405
|
+
shipped = {db_backup_path, fs_backup_path} if db_backup_path else set()
|
|
406
|
+
stale = _stale_backups(backup_dir, shipped)
|
|
407
|
+
if stale:
|
|
408
|
+
report(f"{len(stale)} backup file(s) left out of the ZIP; unpack only restores the newest pair.")
|
|
409
|
+
|
|
343
410
|
try:
|
|
344
|
-
file_count = _create_zip(project_dir=root, zip_path=zip_path, exclude_dirs=[".ssh"])
|
|
411
|
+
file_count = _create_zip(project_dir=root, zip_path=zip_path, exclude_dirs=[".ssh"], exclude_files=stale)
|
|
345
412
|
except Exception as exc:
|
|
346
413
|
if original_dockerfile is not None:
|
|
347
414
|
_restore_dockerfile(dockerfile_path, original_dockerfile)
|
|
@@ -370,5 +437,6 @@ def pack(
|
|
|
370
437
|
"ssh_found_in_zip": bool(ssh_found_in_zip),
|
|
371
438
|
"ssh_suspicious": list(ssh_found_in_zip),
|
|
372
439
|
"file_count": file_count,
|
|
440
|
+
"stale_backups_skipped": len(stale),
|
|
373
441
|
"warnings": warnings,
|
|
374
442
|
}
|
|
@@ -21,6 +21,7 @@ import time
|
|
|
21
21
|
from pathlib import Path
|
|
22
22
|
|
|
23
23
|
from rocketdoo.core.compose import run_compose, run_compose_result
|
|
24
|
+
from rocketdoo.core.pack import BACKUP_FILENAME
|
|
24
25
|
from rocketdoo.core.port_validation import find_available_port, is_port_in_use
|
|
25
26
|
from rocketdoo.core.project_info import project_exists, read_docker_compose
|
|
26
27
|
from rocketdoo.core.service import ProgressCallback, ServiceError, reporter
|
|
@@ -53,8 +54,13 @@ def _find_backup_files(project_dir: Path) -> tuple[Path | None, Path | None]:
|
|
|
53
54
|
if not backup_dir.exists():
|
|
54
55
|
return None, None
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
# Filtered by the same pattern pack writes, not by a looser glob: a file
|
|
58
|
+
# the user happens to keep here ("db_notes.dump") sorts by name like any
|
|
59
|
+
# other and could win the "newest" slot, sending pg_restore after a
|
|
60
|
+
# database that does not exist -- which also skips the filestore, since
|
|
61
|
+
# that step is nested under a successful restore.
|
|
62
|
+
dumps = sorted((p for p in backup_dir.glob("db_*.dump") if BACKUP_FILENAME.match(p.name)), reverse=True)
|
|
63
|
+
filestores = sorted((p for p in backup_dir.glob("filestore_*.tar.gz") if BACKUP_FILENAME.match(p.name)), reverse=True)
|
|
58
64
|
return (dumps[0] if dumps else None), (filestores[0] if filestores else None)
|
|
59
65
|
|
|
60
66
|
|
|
@@ -535,6 +541,23 @@ def unpack(
|
|
|
535
541
|
warnings.append(message)
|
|
536
542
|
|
|
537
543
|
db_dump, filestore_tar = _find_backup_files(root)
|
|
544
|
+
if db_dump is not None and meta.get("has_db_backup") is False:
|
|
545
|
+
# The manifest states this environment was packed without a database,
|
|
546
|
+
# so the dump under rkd_backups/ is left over from an earlier pack of
|
|
547
|
+
# the same project and restoring it would hand the recipient data the
|
|
548
|
+
# sender never meant to send (#225). Packs from 3.8.1 on no longer
|
|
549
|
+
# ship it; this covers the ZIPs already in circulation.
|
|
550
|
+
#
|
|
551
|
+
# Only an explicit False counts. A manifest without the key is older
|
|
552
|
+
# or hand-made and has no opinion, and there the dump is trusted.
|
|
553
|
+
message = (
|
|
554
|
+
f"The manifest says this environment was packed without a database, so {db_dump.name} "
|
|
555
|
+
"is left over from an earlier pack and is not restored. Restore it by hand if you meant to receive it."
|
|
556
|
+
)
|
|
557
|
+
report(message, "warn")
|
|
558
|
+
warnings.append(message)
|
|
559
|
+
db_dump = None
|
|
560
|
+
|
|
538
561
|
db_restored = False
|
|
539
562
|
filestore_restored = False
|
|
540
563
|
|
|
@@ -198,8 +198,53 @@ const { createApp, ref, computed, onMounted, onActivated, onUnmounted, watch, ne
|
|
|
198
198
|
/* ── Session token ───────────────────────────────────────────────────────── */
|
|
199
199
|
// `rkd gui` prints the URL with `?token=...`; kept in the URL (not stripped
|
|
200
200
|
// after reading it) so a page refresh or a duplicated tab keeps working.
|
|
201
|
-
|
|
201
|
+
//
|
|
202
|
+
// Mirrored into sessionStorage because the URL is not the only way in: the
|
|
203
|
+
// VSCode port notification and its Ports panel both open the bare
|
|
204
|
+
// `http://localhost:8070/`, with no query at all. Remembering the last good
|
|
205
|
+
// token lets that arrival recover by itself instead of dead-ending. Per tab
|
|
206
|
+
// and cleared when the tab closes, which matches how long a token is good
|
|
207
|
+
// for -- every `rkd gui` restart invalidates the previous one.
|
|
208
|
+
const TOKEN_KEY = 'rkd_token'
|
|
209
|
+
|
|
210
|
+
function rememberedToken() {
|
|
211
|
+
try {
|
|
212
|
+
return sessionStorage.getItem(TOKEN_KEY) || ''
|
|
213
|
+
} catch (e) {
|
|
214
|
+
return ''
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function rememberToken(value) {
|
|
219
|
+
try {
|
|
220
|
+
sessionStorage.setItem(TOKEN_KEY, value)
|
|
221
|
+
} catch (e) {
|
|
222
|
+
// Private windows and blocked site data throw here. The token still works
|
|
223
|
+
// for this page load; only the remembering is lost.
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
let TOKEN = new URLSearchParams(location.search).get('token') || ''
|
|
228
|
+
if (TOKEN) {
|
|
229
|
+
rememberToken(TOKEN)
|
|
230
|
+
} else {
|
|
231
|
+
TOKEN = rememberedToken()
|
|
232
|
+
}
|
|
202
233
|
const authError = ref(!TOKEN)
|
|
234
|
+
const tokenEntry = ref('')
|
|
235
|
+
|
|
236
|
+
// Sets the pasted token and re-runs the load that failed. No round trip to
|
|
237
|
+
// validate it first: every call already reports a 401 by flipping authError,
|
|
238
|
+
// so a wrong paste lands back on this same screen.
|
|
239
|
+
function useTypedToken(reload) {
|
|
240
|
+
const value = tokenEntry.value.trim()
|
|
241
|
+
if (!value) return
|
|
242
|
+
TOKEN = value
|
|
243
|
+
rememberToken(TOKEN)
|
|
244
|
+
tokenEntry.value = ''
|
|
245
|
+
authError.value = false
|
|
246
|
+
reload()
|
|
247
|
+
}
|
|
203
248
|
|
|
204
249
|
function wsUrl(path) {
|
|
205
250
|
const proto = location.protocol === 'https:' ? 'wss' : 'ws'
|
|
@@ -483,6 +528,9 @@ const L = {
|
|
|
483
528
|
service: `Servicio`,
|
|
484
529
|
servicesSubtitle: `Servicios opcionales para desarrollo local`,
|
|
485
530
|
servicesTitle: `Servicios`,
|
|
531
|
+
pasteTokenHint: `Es la parte que sigue a <code>?token=</code> en esa URL.`,
|
|
532
|
+
pasteTokenLabel: `Token de sesión`,
|
|
533
|
+
pasteTokenPlaceholder: `Pegá el token acá`,
|
|
486
534
|
sessionTokenRequired: `Se requiere un token de sesión`,
|
|
487
535
|
sessionTokenRequiredDesc: `Esta página no tiene un token de sesión válido. Abre la URL que imprime <code>rkd gui</code> en la terminal donde se está ejecutando — termina con <code>?token=...</code>.`,
|
|
488
536
|
setupSubtitle: `Ejecuta Scaffold e inicializa un nuevo proyecto Rocketdoo en el directorio activo`,
|
|
@@ -527,6 +575,7 @@ const L = {
|
|
|
527
575
|
unpackEnvironmentDesc: `Restaura un entorno empaquetado previamente en el directorio actual. Requiere que exista <code style="background:var(--s);padding:1px 5px;border-radius:4px;color:var(--lk);font-size:11px;">rkd-shared.json</code>.`,
|
|
528
576
|
unpackingEllipsis: `Desempaquetando…`,
|
|
529
577
|
update: `Actualizar`,
|
|
578
|
+
useToken: `Usar token`,
|
|
530
579
|
userLabel: `Usuario`,
|
|
531
580
|
userPlaceholder: `ubuntu — usuario SSH en el VPS`,
|
|
532
581
|
usesPrivateRepositories: `Usa repositorios privados (requiere clave SSH)`,
|
|
@@ -856,6 +905,9 @@ const L = {
|
|
|
856
905
|
service: `Service`,
|
|
857
906
|
servicesSubtitle: `Optional services for local development`,
|
|
858
907
|
servicesTitle: `Services`,
|
|
908
|
+
pasteTokenHint: `It is the part after <code>?token=</code> in that URL.`,
|
|
909
|
+
pasteTokenLabel: `Session token`,
|
|
910
|
+
pasteTokenPlaceholder: `Paste the token here`,
|
|
859
911
|
sessionTokenRequired: `Session token required`,
|
|
860
912
|
sessionTokenRequiredDesc: `This page has no valid session token. Open the URL printed by <code>rkd gui</code> in the terminal it is running from — it ends with <code>?token=...</code>.`,
|
|
861
913
|
setupSubtitle: `Scaffold and initialize a new Rocketdoo project in the active directory`,
|
|
@@ -900,6 +952,7 @@ const L = {
|
|
|
900
952
|
unpackEnvironmentDesc: `Restore a previously packed environment in the current directory. Requires <code style="background:var(--s);padding:1px 5px;border-radius:4px;color:var(--lk);font-size:11px;">rkd-shared.json</code> to be present.`,
|
|
901
953
|
unpackingEllipsis: `Unpacking…`,
|
|
902
954
|
update: `Update`,
|
|
955
|
+
useToken: `Use token`,
|
|
903
956
|
userLabel: `User`,
|
|
904
957
|
userPlaceholder: `ubuntu — SSH user on the VPS`,
|
|
905
958
|
usesPrivateRepositories: `Uses private repositories (SSH key required)`,
|
|
@@ -3175,9 +3228,19 @@ const App = {
|
|
|
3175
3228
|
loadProjectContext()
|
|
3176
3229
|
loadNavCounts()
|
|
3177
3230
|
})
|
|
3231
|
+
// Same three calls onMounted makes, which it skipped while authError was
|
|
3232
|
+
// set: a pasted token has to reach the same starting state as a tokenised
|
|
3233
|
+
// URL, not a half-loaded one.
|
|
3234
|
+
const retryWithToken = () => useTypedToken(() => {
|
|
3235
|
+
init()
|
|
3236
|
+
loadProjectContext()
|
|
3237
|
+
loadNavCounts()
|
|
3238
|
+
})
|
|
3239
|
+
|
|
3178
3240
|
return {
|
|
3179
3241
|
view, navGroups, notifs, I, viewMap, currentPath, darkMode, toggleTheme, rkdVersion,
|
|
3180
3242
|
authError, lang, toggleLang, proj, ctrs, running, odooUp, openOdoo,
|
|
3243
|
+
tokenEntry, retryWithToken,
|
|
3181
3244
|
}
|
|
3182
3245
|
},
|
|
3183
3246
|
template: `
|
|
@@ -3187,6 +3250,14 @@ const App = {
|
|
|
3187
3250
|
<h2 style="font-size:16px;margin-bottom:8px;">{{ $t('sessionTokenRequired') }}</h2>
|
|
3188
3251
|
<p style="color:var(--mu);font-size:13px;line-height:1.6;" v-html="$t('sessionTokenRequiredDesc')">
|
|
3189
3252
|
</p>
|
|
3253
|
+
<div style="display:flex;gap:8px;margin-top:16px;">
|
|
3254
|
+
<input v-model="tokenEntry" class="input" style="flex:1;" :placeholder="$t('pasteTokenPlaceholder')"
|
|
3255
|
+
:aria-label="$t('pasteTokenLabel')" @keyup.enter="retryWithToken" />
|
|
3256
|
+
<button @click="retryWithToken" class="btn btn-primary" :disabled="!tokenEntry.trim()">
|
|
3257
|
+
{{ $t('useToken') }}
|
|
3258
|
+
</button>
|
|
3259
|
+
</div>
|
|
3260
|
+
<p style="color:var(--su);font-size:12px;margin-top:10px;">{{ $t('pasteTokenHint') }}</p>
|
|
3190
3261
|
</div>
|
|
3191
3262
|
</div>
|
|
3192
3263
|
<div v-else class="layout">
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import socket
|
|
2
|
+
import sys
|
|
3
|
+
|
|
1
4
|
import click
|
|
2
5
|
from rich import box
|
|
3
6
|
from rich.console import Console
|
|
@@ -8,6 +11,20 @@ from rocketdoo import __version__
|
|
|
8
11
|
console = Console()
|
|
9
12
|
|
|
10
13
|
|
|
14
|
+
def _port_unavailable(host: str, port: int) -> bool:
|
|
15
|
+
"""Whether binding (host, port) would fail, asked the way uvicorn asks it.
|
|
16
|
+
|
|
17
|
+
No SO_REUSEADDR: the probe has to fail where the real bind would fail, and
|
|
18
|
+
setting it would let the probe succeed on a port a listener still holds.
|
|
19
|
+
"""
|
|
20
|
+
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as probe:
|
|
21
|
+
try:
|
|
22
|
+
probe.bind((host, port))
|
|
23
|
+
except OSError:
|
|
24
|
+
return True
|
|
25
|
+
return False
|
|
26
|
+
|
|
27
|
+
|
|
11
28
|
@click.command("gui")
|
|
12
29
|
@click.option("--port", default=8070, show_default=True, help="Port to run the GUI server on")
|
|
13
30
|
@click.option("--host", default="127.0.0.1", show_default=True, help="Host address to bind")
|
|
@@ -35,7 +52,28 @@ def gui_command(port, host, auto_open, cwd):
|
|
|
35
52
|
|
|
36
53
|
from rocketdoo.gui.server import create_app
|
|
37
54
|
|
|
38
|
-
#
|
|
55
|
+
# Checked before anything is printed. Every run mints a fresh token and
|
|
56
|
+
# the panel below hands it to the user as the way in -- but uvicorn only
|
|
57
|
+
# tries to bind at the very end, so a busy port used to produce a full
|
|
58
|
+
# success panel, a brand new token, and then an error buried underneath.
|
|
59
|
+
# The user copies the newest URL, reaches the server that is actually
|
|
60
|
+
# listening, and gets a 401 for a token it never issued.
|
|
61
|
+
#
|
|
62
|
+
# A bind probe rather than core.port_validation.is_port_in_use(): that one
|
|
63
|
+
# answers "is something reachable on localhost:port", which is a near
|
|
64
|
+
# neighbour of the question but not it. This tries exactly what uvicorn is
|
|
65
|
+
# about to try, on exactly the address it will use.
|
|
66
|
+
if _port_unavailable(host, port):
|
|
67
|
+
console.print()
|
|
68
|
+
console.print(f"[red]✗[/red] Port [bold]{port}[/bold] on {host} is already in use.")
|
|
69
|
+
console.print("[dim] If another [cyan]rkd gui[/cyan] is running, open the URL that one printed:[/dim]")
|
|
70
|
+
console.print("[dim] its token is the only one the listening server accepts.[/dim]")
|
|
71
|
+
console.print(f"[dim] Otherwise pick a free port: [cyan]rkd gui --port {port + 1}[/cyan][/dim]")
|
|
72
|
+
console.print()
|
|
73
|
+
sys.exit(1)
|
|
74
|
+
|
|
75
|
+
# Built after the check so the panel never shows a token for a server
|
|
76
|
+
# that will not come up.
|
|
39
77
|
app = create_app(host=host, port=port)
|
|
40
78
|
url = f"http://{host}:{port}/?token={app.state.rkd_token}"
|
|
41
79
|
browser_note = "opening automatically" if auto_open else "not opened (--open to launch one here)"
|
|
@@ -143,12 +143,17 @@ def pack_environment(no_db, output, db_name, yes):
|
|
|
143
143
|
else:
|
|
144
144
|
db_line = "not available"
|
|
145
145
|
|
|
146
|
+
# Named rather than silently dropped: the ZIP is smaller than the project
|
|
147
|
+
# on disk, and the one number that explains why belongs next to the count.
|
|
148
|
+
stale_skipped = report.get("stale_backups_skipped") or 0
|
|
149
|
+
stale_line = f" [dim](+{stale_skipped} older backup file(s) left out)[/dim]" if stale_skipped else ""
|
|
150
|
+
|
|
146
151
|
console.print()
|
|
147
152
|
console.print(
|
|
148
153
|
Panel(
|
|
149
154
|
f"[bold green]✅ Environment packaged successfully[/bold green]\n\n"
|
|
150
155
|
f"[bold]📁 File:[/bold] [cyan]{zip_path}[/cyan]\n"
|
|
151
|
-
f"[bold]📦 Files included:[/bold] {report['file_count']}\n"
|
|
156
|
+
f"[bold]📦 Files included:[/bold] {report['file_count']}{stale_line}\n"
|
|
152
157
|
f"[bold]💾 Size:[/bold] {zip_size_mb:.1f} MB\n"
|
|
153
158
|
f"[bold]🔐 SSH Keys:[/bold] {'excluded ✓' if report['ssh_sanitized'] else 'not applicable'}\n"
|
|
154
159
|
f"[bold]💿 DB Backup:[/bold] {db_line}\n\n"
|
|
@@ -104,4 +104,10 @@ jobs:
|
|
|
104
104
|
# - {{ reason }}
|
|
105
105
|
{% endfor %}
|
|
106
106
|
# Fix the underlying limitation and run `rkd ci init --force` to try again.
|
|
107
|
+
{% else %}
|
|
108
|
+
|
|
109
|
+
# The install job was turned off on purpose (`rkd ci init --install-trigger never`).
|
|
110
|
+
# Without this note there is no way to tell that apart from Rocketdoo deciding
|
|
111
|
+
# the project cannot support it, which does leave its reasons above.
|
|
112
|
+
# Re-enable it with `rkd ci init --install-trigger pull_request --force`.
|
|
107
113
|
{% endif %}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rocketdoo
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.8.1
|
|
4
4
|
Summary: Framework for creating Odoo development environments with Docker and custom templates.
|
|
5
5
|
Author-email: Horacio Montaño <horaciomontano@hdmsoft.com.ar>
|
|
6
6
|
License: GNU LESSER GENERAL PUBLIC LICENSE
|
|
@@ -62,9 +62,9 @@ License: GNU LESSER GENERAL PUBLIC LICENSE
|
|
|
62
62
|
<div RKD as ROCKETDOO V3=""></div>
|
|
63
63
|
|
|
64
64
|
Licencia: LGPL-3.0+
|
|
65
|
-
Versión: "3.
|
|
65
|
+
Versión: "3.8.1"
|
|
66
66
|
Autor: Horacio Montaño
|
|
67
|
-
Fecha:
|
|
67
|
+
Fecha: 06/10/2026
|
|
68
68
|
Descripción: Framework to development Odoo
|
|
69
69
|
Requires-Python: >=3.10
|
|
70
70
|
Description-Content-Type: text/markdown
|
|
@@ -97,7 +97,7 @@ Odoo Development Framework
|
|
|
97
97
|
- "Horacio Montaño"
|
|
98
98
|
|
|
99
99
|
## Version:
|
|
100
|
-
- "3.
|
|
100
|
+
- "3.8.1"
|
|
101
101
|
|
|
102
102
|
----------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
103
103
|
|