rocketdoo 3.7.0__tar.gz → 3.8.0__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 (139) hide show
  1. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/LICENSE +2 -2
  2. {rocketdoo-3.7.0/rocketdoo.egg-info → rocketdoo-3.8.0}/PKG-INFO +4 -4
  3. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/README.md +1 -1
  4. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/pyproject.toml +1 -1
  5. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/ci_cli.py +46 -12
  6. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/pack.py +24 -1
  7. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/static/index.html +72 -1
  8. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui_cli.py +39 -1
  9. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/ci/workflow.yaml.jinja +6 -0
  10. {rocketdoo-3.7.0 → rocketdoo-3.8.0/rocketdoo.egg-info}/PKG-INFO +4 -4
  11. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_ci_cli.py +136 -0
  12. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_gui_api.py +63 -0
  13. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_gui_static.py +45 -0
  14. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_pack_environment.py +85 -0
  15. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/MANIFEST.in +0 -0
  16. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/__init__.py +0 -0
  17. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/cli.py +0 -0
  18. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/cli_output.py +0 -0
  19. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/__init__.py +0 -0
  20. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/addons_path.py +0 -0
  21. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/compose.py +0 -0
  22. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/deploy/__init__.py +0 -0
  23. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/deploy/base.py +0 -0
  24. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/deploy/config_manager.py +0 -0
  25. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/deploy/module_packager.py +0 -0
  26. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/deploy/odoo_sh.py +0 -0
  27. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/deploy/vps.py +0 -0
  28. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/edition_setup.py +0 -0
  29. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/generator.py +0 -0
  30. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/gitignore_manager.py +0 -0
  31. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/gitman_config.py +0 -0
  32. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/instance/__init__.py +0 -0
  33. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/instance/config_manager.py +0 -0
  34. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/instance/deployer_docker.py +0 -0
  35. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/instance/deployer_native.py +0 -0
  36. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/instance/secrets_store.py +0 -0
  37. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/instance/ssh_utils.py +0 -0
  38. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/mailpit.py +0 -0
  39. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/models/__init__.py +0 -0
  40. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/models/deploy.py +0 -0
  41. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/models/instance.py +0 -0
  42. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/models/profiles.py +0 -0
  43. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/models/project.py +0 -0
  44. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/module_scanner.py +0 -0
  45. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/odoo_db.py +0 -0
  46. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/port_validation.py +0 -0
  47. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/project_info.py +0 -0
  48. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/service.py +0 -0
  49. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/ssh_manager.py +0 -0
  50. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/traefik.py +0 -0
  51. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/core/unpack.py +0 -0
  52. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/deploy_cli.py +0 -0
  53. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/docker_cli.py +0 -0
  54. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/__init__.py +0 -0
  55. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/__init__.py +0 -0
  56. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/deploy_ops.py +0 -0
  57. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/docker_ops.py +0 -0
  58. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/gitman.py +0 -0
  59. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/instances.py +0 -0
  60. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/mail.py +0 -0
  61. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/modules.py +0 -0
  62. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/odoo.py +0 -0
  63. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/pack_ops.py +0 -0
  64. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/project.py +0 -0
  65. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/setup.py +0 -0
  66. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/traefik_ops.py +0 -0
  67. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/api/workspace.py +0 -0
  68. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/gui/server.py +0 -0
  69. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/init_project.py +0 -0
  70. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/instance_cli.py +0 -0
  71. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/mail_cli.py +0 -0
  72. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/pack_environment.py +0 -0
  73. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/scaffold.py +0 -0
  74. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/.devcontainer/devcontainer.json +0 -0
  75. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/.devcontainer/docker-compose.yaml +0 -0
  76. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/.gitignore.jinja +0 -0
  77. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/.vscode/launch.json +0 -0
  78. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/.vscode/launch.json.jinja +0 -0
  79. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/.vscode/settings.json +0 -0
  80. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/Dockerfile.jinja +0 -0
  81. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/addons/.gitkeep +0 -0
  82. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/config/odoo.conf +0 -0
  83. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/config/odoo.conf.jinja +0 -0
  84. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/deploy/.deployignore +0 -0
  85. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/deploy/deploy.yaml +0 -0
  86. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/deploy/deploy.yaml.jinja +0 -0
  87. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/docker-compose.yaml.jinja +0 -0
  88. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/install_dependencies.sh +0 -0
  89. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/instance/Dockerfile.jinja +0 -0
  90. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/instance/docker-compose.jinja +0 -0
  91. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/instance/odoo.conf.jinja +0 -0
  92. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/odoo_pg_pass +0 -0
  93. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/README.md +0 -0
  94. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/odoo15-ce.yaml +0 -0
  95. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/odoo15-ee.yaml +0 -0
  96. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/odoo16-ce.yaml +0 -0
  97. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/odoo16-ee.yaml +0 -0
  98. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/odoo17-ce.yaml +0 -0
  99. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/odoo17-ee.yaml +0 -0
  100. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/odoo18-ce.yaml +0 -0
  101. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/odoo18-ee.yaml +0 -0
  102. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/odoo19-ce.yaml +0 -0
  103. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/odoo19-ee.yaml +0 -0
  104. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/odoo20-ce.yaml +0 -0
  105. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/templates/profiles/odoo20-ee.yaml +0 -0
  106. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/traefik_cli.py +0 -0
  107. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/unpack_environment.py +0 -0
  108. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo/welcome.py +0 -0
  109. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo.egg-info/SOURCES.txt +0 -0
  110. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo.egg-info/dependency_links.txt +0 -0
  111. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo.egg-info/entry_points.txt +0 -0
  112. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo.egg-info/requires.txt +0 -0
  113. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/rocketdoo.egg-info/top_level.txt +0 -0
  114. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/setup.cfg +0 -0
  115. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_addons_path.py +0 -0
  116. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_cli_output.py +0 -0
  117. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_compose.py +0 -0
  118. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_core_contract.py +0 -0
  119. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_deploy_config_manager.py +0 -0
  120. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_docker_cli.py +0 -0
  121. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_e2e_pack_unpack.py +0 -0
  122. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_e2e_scaffold.py +0 -0
  123. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_edition_setup.py +0 -0
  124. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_gitignore_manager.py +0 -0
  125. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_gui_mail.py +0 -0
  126. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_imports.py +0 -0
  127. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_mail_cli.py +0 -0
  128. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_mailpit.py +0 -0
  129. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_models.py +0 -0
  130. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_module_scanner.py +0 -0
  131. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_odoo_db.py +0 -0
  132. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_port_validation.py +0 -0
  133. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_profiles.py +0 -0
  134. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_project_info.py +0 -0
  135. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_secrets_hardening.py +0 -0
  136. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_ssh_manager.py +0 -0
  137. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_templates.py +0 -0
  138. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_traefik.py +0 -0
  139. {rocketdoo-3.7.0 → rocketdoo-3.8.0}/tests/test_unpack_environment.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.7.0"
60
+ Versión: "3.8.0"
61
61
  Autor: Horacio Montaño
62
- Fecha: 30/09/2026
62
+ Fecha: 03/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.7.0
3
+ Version: 3.8.0
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.7.0"
65
+ Versión: "3.8.0"
66
66
  Autor: Horacio Montaño
67
- Fecha: 30/09/2026
67
+ Fecha: 03/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.7.0"
100
+ - "3.8.0"
101
101
 
102
102
  ----------------------------------------------------------------------------------------------------------------------------------------------------------
103
103
 
@@ -15,7 +15,7 @@ Odoo Development Framework
15
15
  - "Horacio Montaño"
16
16
 
17
17
  ## Version:
18
- - "3.7.0"
18
+ - "3.8.0"
19
19
 
20
20
  ----------------------------------------------------------------------------------------------------------------------------------------------------------
21
21
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rocketdoo"
3
- version = "3.7.0"
3
+ version = "3.8.0"
4
4
  description = "Framework for creating Odoo development environments with Docker and custom templates."
5
5
  authors = [
6
6
  { name = "Horacio Montaño", email = "horaciomontano@hdmsoft.com.ar" }
@@ -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() == content:
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
- if context["unsupported_reasons"]:
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,13 +193,36 @@ def _create_zip(project_dir: Path, zip_path: Path, exclude_dirs: list[str]) -> i
193
193
  """
194
194
  excluded = _ALWAYS_EXCLUDE | set(exclude_dirs)
195
195
 
196
+ def is_the_archive(item: Path) -> bool:
197
+ """Whether this entry is the archive being written, under any name.
198
+
199
+ An output path inside the project is reached by the walk below, and
200
+ writing the archive into itself makes zipfile read a source whose
201
+ EOF recedes as fast as it is read: every chunk read back is a chunk
202
+ just appended. On compressible content the deflate ratio outruns the
203
+ read and the ZIP merely carries a corrupt copy of itself; on content
204
+ that does not compress - the dump and the filestore under
205
+ rkd_backups/ - nothing ends the loop and the file grows until the
206
+ disk is full.
207
+
208
+ Identity rather than path text, because the same growing file is
209
+ reachable under more than one name: a symlink or a hard link to it,
210
+ or the same directory entry spelled with different case on a
211
+ case-insensitive filesystem (WSL over /mnt/c, where this is normally
212
+ run). All three reopen the same hole.
213
+ """
214
+ try:
215
+ return item.samefile(zip_path)
216
+ except OSError:
217
+ return False
218
+
196
219
  file_count = 0
197
220
  with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED, compresslevel=6) as zf:
198
221
  for item in project_dir.rglob("*"):
199
222
  rel = item.relative_to(project_dir)
200
223
  if set(rel.parts) & excluded:
201
224
  continue
202
- if item.is_file():
225
+ if item.is_file() and not is_the_archive(item):
203
226
  zf.write(item, rel)
204
227
  file_count += 1
205
228
 
@@ -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
- const TOKEN = new URLSearchParams(location.search).get('token') || ''
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
- # Built first so the panel below can show the real, tokenized URL.
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)"
@@ -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.7.0
3
+ Version: 3.8.0
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.7.0"
65
+ Versión: "3.8.0"
66
66
  Autor: Horacio Montaño
67
- Fecha: 30/09/2026
67
+ Fecha: 03/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.7.0"
100
+ - "3.8.0"
101
101
 
102
102
  ----------------------------------------------------------------------------------------------------------------------------------------------------------
103
103
 
@@ -678,3 +678,139 @@ class TestEveryStartCommandSyncsTheAddonsPath:
678
678
  CliRunner().invoke(getattr(docker_cli, command_name), args)
679
679
 
680
680
  assert f"{CONTAINER_ADDONS_ROOT}/oca" in seen["conf"]
681
+
682
+
683
+ class TestPrepareRefusesAConfigThatIsNotADirectory:
684
+ """#196.1: `config` existing as a regular file.
685
+
686
+ render_template() reaches os.makedirs() and raises a bare
687
+ NotADirectoryError naming a path the user never typed, which reads like a
688
+ bug in rkd rather than something in their own directory.
689
+ """
690
+
691
+ def test_it_says_what_is_wrong_and_exits(self, project_dir):
692
+ _minimal_project(project_dir)
693
+ (project_dir / "config").write_text("not a directory\n")
694
+
695
+ result = CliRunner().invoke(ci_cli.prepare, [])
696
+
697
+ assert result.exit_code == 1
698
+ flat = " ".join(result.output.split())
699
+ assert "not a directory" in flat
700
+ assert "config" in flat
701
+
702
+
703
+ class TestInitExplainsItselfOnEveryOutcome:
704
+ """#196.2: the reasons used to print only after writing.
705
+
706
+ Re-running `rkd ci init` on a project that already has its workflow is the
707
+ common case, and it returned before reaching any of the advisories -- so
708
+ the user most likely to be wondering why their project has no install job
709
+ was exactly the one who never saw the reason.
710
+ """
711
+
712
+ def _enterprise_project(self, root):
713
+ _minimal_project(root, edition="Enterprise")
714
+
715
+ def test_the_reasons_show_up_when_nothing_changed(self, project_dir):
716
+ self._enterprise_project(project_dir)
717
+ first = CliRunner().invoke(ci_cli.init, ["--install-trigger", "pull_request"])
718
+ assert first.exit_code == 0, first.output
719
+ assert "install job was not generated" in " ".join(first.output.split())
720
+
721
+ again = CliRunner().invoke(ci_cli.init, ["--install-trigger", "pull_request"])
722
+
723
+ assert "already up to date" in " ".join(again.output.split())
724
+ assert "install job was not generated" in " ".join(again.output.split())
725
+
726
+ def test_the_reasons_show_up_when_the_file_differs(self, project_dir):
727
+ self._enterprise_project(project_dir)
728
+ CliRunner().invoke(ci_cli.init, ["--install-trigger", "pull_request"])
729
+ _workflow_path(project_dir).write_text("name: edited by hand\n")
730
+
731
+ result = CliRunner().invoke(ci_cli.init, ["--install-trigger", "pull_request"])
732
+
733
+ flat = " ".join(result.output.split())
734
+ assert "Not overwriting" in flat
735
+ assert "install job was not generated" in flat
736
+
737
+
738
+ class TestNeverLeavesATrace:
739
+ """#196.3: `--install-trigger never` emitted nothing at all.
740
+
741
+ A project Rocketdoo cannot support leaves its reasons as comments. A
742
+ project whose owner turned the job off left the same silence, so months
743
+ later the two are indistinguishable from the file alone.
744
+ """
745
+
746
+ def test_the_generated_file_says_it_was_turned_off(self, project_dir):
747
+ _minimal_project(project_dir)
748
+
749
+ result = CliRunner().invoke(ci_cli.init, ["--install-trigger", "never"])
750
+
751
+ assert result.exit_code == 0, result.output
752
+ workflow = _workflow_path(project_dir).read_text()
753
+ assert "turned off on purpose" in workflow
754
+ assert "install-trigger never" in workflow
755
+
756
+ def test_it_is_not_confused_with_an_unsupported_project(self, project_dir):
757
+ _minimal_project(project_dir)
758
+
759
+ CliRunner().invoke(ci_cli.init, ["--install-trigger", "never"])
760
+
761
+ workflow = _workflow_path(project_dir).read_text()
762
+ assert "is not generated for this project" not in workflow
763
+
764
+
765
+ class TestLineEndingsAreNotContent:
766
+ """#196.4 and #196.5: byte equality called an identical file modified.
767
+
768
+ A workflow that picked up CRLF from a Windows editor, or from git's own
769
+ core.autocrlf, was reported as changed and asked for --force to rewrite
770
+ something it already said. YAML does not read line endings, and the user
771
+ did not choose them.
772
+ """
773
+
774
+ def test_crlf_is_still_up_to_date(self, project_dir):
775
+ _minimal_project(project_dir)
776
+ CliRunner().invoke(ci_cli.init, ["--install-trigger", "pull_request"])
777
+ path = _workflow_path(project_dir)
778
+ path.write_bytes(path.read_text().replace("\n", "\r\n").encode())
779
+
780
+ result = CliRunner().invoke(ci_cli.init, ["--install-trigger", "pull_request"])
781
+
782
+ assert "already up to date" in " ".join(result.output.split())
783
+
784
+ def test_the_users_crlf_is_left_alone(self, project_dir):
785
+ """Reporting it unchanged and then rewriting it would be the same
786
+ unrequested edit, one step further along.
787
+ """
788
+ _minimal_project(project_dir)
789
+ CliRunner().invoke(ci_cli.init, ["--install-trigger", "pull_request"])
790
+ path = _workflow_path(project_dir)
791
+ path.write_bytes(path.read_text().replace("\n", "\r\n").encode())
792
+
793
+ CliRunner().invoke(ci_cli.init, ["--install-trigger", "pull_request"])
794
+
795
+ assert b"\r\n" in path.read_bytes()
796
+
797
+ def test_a_trailing_newline_is_not_a_change(self, project_dir):
798
+ _minimal_project(project_dir)
799
+ CliRunner().invoke(ci_cli.init, ["--install-trigger", "pull_request"])
800
+ path = _workflow_path(project_dir)
801
+ path.write_text(path.read_text() + "\n")
802
+
803
+ result = CliRunner().invoke(ci_cli.init, ["--install-trigger", "pull_request"])
804
+
805
+ assert "already up to date" in " ".join(result.output.split())
806
+
807
+ def test_a_real_edit_is_still_caught(self, project_dir):
808
+ """The normalisation must not swallow a change that is one."""
809
+ _minimal_project(project_dir)
810
+ CliRunner().invoke(ci_cli.init, ["--install-trigger", "pull_request"])
811
+ path = _workflow_path(project_dir)
812
+ path.write_text(path.read_text().replace("runs-on: ubuntu-latest", "runs-on: self-hosted", 1))
813
+
814
+ result = CliRunner().invoke(ci_cli.init, ["--install-trigger", "pull_request"])
815
+
816
+ assert "Not overwriting" in " ".join(result.output.split())
@@ -12,11 +12,13 @@ missing helper is not.
12
12
 
13
13
  import ast
14
14
  import asyncio
15
+ import socket
15
16
  import subprocess
16
17
  import sys
17
18
  from pathlib import Path
18
19
 
19
20
  import pytest
21
+ from click.testing import CliRunner
20
22
 
21
23
  fastapi_testclient = pytest.importorskip("fastapi.testclient")
22
24
 
@@ -849,3 +851,64 @@ class TestNoTracebackOverHTTP:
849
851
  offenders.append(f"{path.relative_to(ROCKETDOO_ROOT.parent)}:{node.lineno}")
850
852
 
851
853
  assert not offenders, "traceback.format_exc() under gui/:\n" + "\n".join(offenders)
854
+
855
+
856
+ class TestGuiRefusesABusyPort:
857
+ """#209: `rkd gui` used to announce success before it knew it could serve.
858
+
859
+ Every run mints a fresh token, and the panel hands it over as the way in.
860
+ But uvicorn only binds at the very end, so a second session on a busy port
861
+ printed a full success panel with a brand new token and buried the bind
862
+ error underneath it. The user copies the newest URL -- the obvious move --
863
+ reaches the server that is actually listening, and gets a 401 for a token
864
+ that server never issued. It reads as "the token is not recognised", which
865
+ is exactly how it was reported.
866
+ """
867
+
868
+ def _busy_port(self):
869
+ holder = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
870
+ holder.bind(("127.0.0.1", 0))
871
+ holder.listen(1)
872
+ return holder, holder.getsockname()[1]
873
+
874
+ def test_it_exits_non_zero_instead_of_serving(self, project_dir):
875
+ from rocketdoo.cli import main
876
+
877
+ holder, port = self._busy_port()
878
+ try:
879
+ result = CliRunner().invoke(main, ["gui", "--port", str(port)])
880
+ finally:
881
+ holder.close()
882
+
883
+ assert result.exit_code == 1, result.output
884
+ assert "already in use" in " ".join(result.output.split())
885
+
886
+ def test_no_token_is_handed_out_for_a_server_that_will_not_come_up(self, project_dir):
887
+ """The heart of #209: a token on screen is a promise the command cannot
888
+ keep here, and the user has no way to tell it apart from a good one.
889
+ """
890
+ from rocketdoo.cli import main
891
+
892
+ holder, port = self._busy_port()
893
+ try:
894
+ result = CliRunner().invoke(main, ["gui", "--port", str(port)])
895
+ finally:
896
+ holder.close()
897
+
898
+ assert "token=" not in result.output
899
+
900
+ def test_it_says_which_url_actually_works(self, project_dir):
901
+ """Pointing at the other session's URL is the fix for the common case:
902
+ two `rkd gui` on one port, not a port owned by something else.
903
+ """
904
+ from rocketdoo.cli import main
905
+
906
+ holder, port = self._busy_port()
907
+ try:
908
+ result = CliRunner().invoke(main, ["gui", "--port", str(port)])
909
+ finally:
910
+ holder.close()
911
+
912
+ flat = " ".join(result.output.split())
913
+ assert "rkd gui" in flat
914
+ assert "--port" in flat