hypershell 2.9.0a5__tar.gz → 2.9.0a7__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 (253) hide show
  1. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/PKG-INFO +2 -2
  2. hypershell-2.9.0a7/docs/_ext/site_notice.py +39 -0
  3. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/client_help.rst +12 -2
  4. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/cluster_help.rst +20 -5
  5. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_param_ref.rst +212 -7
  6. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_task_env.rst +3 -0
  7. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/database.rst +44 -0
  8. hypershell-2.9.0a7/docs/_include/relay_desc.rst +76 -0
  9. hypershell-2.9.0a7/docs/_include/relay_help.rst +64 -0
  10. hypershell-2.9.0a7/docs/_include/relay_usage.rst +2 -0
  11. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/server_help.rst +10 -3
  12. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/submit_help.rst +11 -4
  13. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/templates.rst +10 -0
  14. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_static/custom.css +9 -0
  15. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/api/client.rst +8 -0
  16. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/api/cluster.rst +7 -0
  17. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/api/data.rst +7 -0
  18. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/api/server.rst +4 -0
  19. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/api/submit.rst +6 -0
  20. hypershell-2.9.0a7/docs/cli/client.rst +25 -0
  21. hypershell-2.9.0a7/docs/cli/cluster.rst +25 -0
  22. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/cli/index.rst +1 -0
  23. hypershell-2.9.0a7/docs/cli/initdb.rst +23 -0
  24. hypershell-2.9.0a7/docs/cli/relay.rst +43 -0
  25. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/cli/server.rst +4 -0
  26. hypershell-2.9.0a7/docs/cli/submit.rst +26 -0
  27. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/cli/task_info.rst +3 -0
  28. hypershell-2.9.0a7/docs/cli/task_search.rst +26 -0
  29. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/cli/task_submit.rst +5 -0
  30. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/cli/task_update.rst +3 -0
  31. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/cli/task_wait.rst +3 -0
  32. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/conf.py +24 -2
  33. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/config.rst +4 -0
  34. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/getting_started.rst +7 -0
  35. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/index.rst +1 -0
  36. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/install.rst +9 -0
  37. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/logging.rst +11 -5
  38. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/manual.rst +15 -0
  39. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/security.rst +78 -9
  40. hypershell-2.9.0a7/docs/whats_new.rst +224 -0
  41. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/pyproject.toml +2 -2
  42. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/share/bash_completion.d/hs +26 -1
  43. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/share/man/man1/hs.1 +398 -22
  44. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/share/man/man1/hsx.1 +398 -22
  45. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/share/man/man1/hyper-shell.1 +398 -22
  46. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/share/zsh/site-functions/_hs +23 -2
  47. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/__init__.py +4 -1
  48. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/client.py +8 -8
  49. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/cluster/__init__.py +7 -7
  50. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/cluster/remote.py +8 -1
  51. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/config.py +6 -1
  52. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/config.py +171 -2
  53. hypershell-2.9.0a7/src/hypershell/core/heartbeat.py +120 -0
  54. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/logging.py +1 -1
  55. hypershell-2.9.0a7/src/hypershell/core/reconnect.py +537 -0
  56. hypershell-2.9.0a7/src/hypershell/core/types.py +147 -0
  57. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/data/model.py +115 -37
  58. hypershell-2.9.0a7/src/hypershell/relay/__init__.py +1036 -0
  59. hypershell-2.9.0a7/src/hypershell/relay/site.py +318 -0
  60. hypershell-2.9.0a7/src/hypershell/relay/store.py +401 -0
  61. hypershell-2.9.0a7/src/hypershell/relay/upstream.py +848 -0
  62. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/server.py +88 -13
  63. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/submit.py +8 -6
  64. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/__init__.py +10 -3
  65. hypershell-2.9.0a7/tests/test_auth_variants.py +408 -0
  66. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_cluster.py +21 -0
  67. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_contended_recovery.py +26 -0
  68. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_contended_write.py +28 -4
  69. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_logging.py +2 -0
  70. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_main.py +11 -1
  71. hypershell-2.9.0a7/tests/test_relay_connector.py +639 -0
  72. hypershell-2.9.0a7/tests/test_relay_db.py +415 -0
  73. hypershell-2.9.0a7/tests/test_relay_fsm.py +929 -0
  74. hypershell-2.9.0a7/tests/test_relay_judge.py +331 -0
  75. hypershell-2.9.0a7/tests/test_relay_launch.py +789 -0
  76. hypershell-2.9.0a7/tests/test_relay_link.py +390 -0
  77. hypershell-2.9.0a7/tests/test_relay_outage.py +267 -0
  78. hypershell-2.9.0a7/tests/test_relay_return.py +716 -0
  79. hypershell-2.9.0a7/tests/test_relay_roster.py +519 -0
  80. hypershell-2.9.0a7/tests/test_relay_workload.py +1152 -0
  81. hypershell-2.9.0a7/tests/test_size_duration.py +364 -0
  82. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_upgrade_cli.py +3 -1
  83. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_writeback.py +19 -0
  84. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_zone_postgres.py +23 -2
  85. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/uv.lock +5 -5
  86. hypershell-2.9.0a5/docs/cli/client.rst +0 -18
  87. hypershell-2.9.0a5/docs/cli/cluster.rst +0 -18
  88. hypershell-2.9.0a5/docs/cli/initdb.rst +0 -18
  89. hypershell-2.9.0a5/docs/cli/submit.rst +0 -18
  90. hypershell-2.9.0a5/docs/cli/task_search.rst +0 -18
  91. hypershell-2.9.0a5/src/hypershell/core/heartbeat.py +0 -81
  92. hypershell-2.9.0a5/src/hypershell/core/types.py +0 -118
  93. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/.gitignore +0 -0
  94. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/CODE_OF_CONDUCT.md +0 -0
  95. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/LICENSE +0 -0
  96. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/README.rst +0 -0
  97. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/Makefile +0 -0
  98. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/citation.rst +0 -0
  99. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/client_desc.rst +0 -0
  100. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/client_usage.rst +0 -0
  101. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/cluster_desc.rst +0 -0
  102. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/cluster_usage.rst +0 -0
  103. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_desc.rst +0 -0
  104. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_edit_desc.rst +0 -0
  105. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_edit_help.rst +0 -0
  106. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_edit_usage.rst +0 -0
  107. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_get_desc.rst +0 -0
  108. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_get_help.rst +0 -0
  109. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_get_usage.rst +0 -0
  110. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_help.rst +0 -0
  111. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_intro.rst +0 -0
  112. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_intro_alt.rst +0 -0
  113. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_pythonpath.rst +0 -0
  114. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_set_desc.rst +0 -0
  115. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_set_help.rst +0 -0
  116. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_set_usage.rst +0 -0
  117. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_site_vars.rst +0 -0
  118. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_task_env_alt.rst +0 -0
  119. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_usage.rst +0 -0
  120. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_which_desc.rst +0 -0
  121. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_which_help.rst +0 -0
  122. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/config_which_usage.rst +0 -0
  123. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/database_alt.rst +0 -0
  124. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/desc.rst +0 -0
  125. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/exit_status.rst +0 -0
  126. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/initdb_desc.rst +0 -0
  127. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/initdb_help.rst +0 -0
  128. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/initdb_usage.rst +0 -0
  129. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/license.rst +0 -0
  130. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/security_alt.rst +0 -0
  131. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/server_desc.rst +0 -0
  132. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/server_usage.rst +0 -0
  133. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/signals.rst +0 -0
  134. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/submit_desc.rst +0 -0
  135. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/submit_usage.rst +0 -0
  136. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_groups_alt.rst +0 -0
  137. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_info_desc.rst +0 -0
  138. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_info_help.rst +0 -0
  139. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_info_usage.rst +0 -0
  140. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_run_desc.rst +0 -0
  141. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_run_help.rst +0 -0
  142. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_run_usage.rst +0 -0
  143. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_search_desc.rst +0 -0
  144. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_search_help.rst +0 -0
  145. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_search_usage.rst +0 -0
  146. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_submit_desc.rst +0 -0
  147. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_submit_help.rst +0 -0
  148. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_submit_usage.rst +0 -0
  149. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_update_desc.rst +0 -0
  150. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_update_help.rst +0 -0
  151. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_update_usage.rst +0 -0
  152. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_wait_desc.rst +0 -0
  153. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_wait_help.rst +0 -0
  154. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/task_wait_usage.rst +0 -0
  155. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/templates_alt.rst +0 -0
  156. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_include/tls_cli_options.rst +0 -0
  157. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_static/logo-dark-mode.png +0 -0
  158. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/_static/logo-light-mode.png +0 -0
  159. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/alternatives.rst +0 -0
  160. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/api/index.rst +0 -0
  161. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/cli/config.rst +0 -0
  162. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/cli/config_edit.rst +0 -0
  163. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/cli/config_get.rst +0 -0
  164. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/cli/config_set.rst +0 -0
  165. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/cli/config_which.rst +0 -0
  166. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/cli/task_run.rst +0 -0
  167. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/database.rst +0 -0
  168. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/docs/templates.rst +0 -0
  169. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/share/bash_completion.d/hsx +0 -0
  170. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/cluster/launch.py +0 -0
  171. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/cluster/local.py +0 -0
  172. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/cluster/ssh.py +0 -0
  173. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/__init__.py +0 -0
  174. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/dispatch.py +0 -0
  175. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/exceptions.py +0 -0
  176. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/fsm.py +0 -0
  177. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/platform.py +0 -0
  178. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/pretty_print.py +0 -0
  179. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/queue.py +0 -0
  180. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/remote.py +0 -0
  181. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/resource.py +0 -0
  182. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/signal.py +0 -0
  183. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/sys.py +0 -0
  184. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/tag.py +0 -0
  185. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/template.py +0 -0
  186. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/thread.py +0 -0
  187. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/tls.py +0 -0
  188. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/core/uuid.py +0 -0
  189. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/data/__init__.py +0 -0
  190. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/data/core.py +0 -0
  191. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/data/timescale.py +0 -0
  192. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/data/upgrade.py +0 -0
  193. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/src/hypershell/task.py +0 -0
  194. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/bench/bench_queue.py +0 -0
  195. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/cluster/build_archive.sh +0 -0
  196. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/cluster/compare.py +0 -0
  197. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/cluster/drive.sh +0 -0
  198. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/cluster/smoke.sh +0 -0
  199. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/conftest.py +0 -0
  200. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/fixtures/README.md +0 -0
  201. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/fixtures/hypershell-2.8.3.db +0 -0
  202. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/fixtures/make-2.8.3-db.sh +0 -0
  203. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/fixtures/make-legacy-postgres.sh +0 -0
  204. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_autoscale.py +0 -0
  205. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_cancel.py +0 -0
  206. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_card_info.py +0 -0
  207. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_card_integration.py +0 -0
  208. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_card_render.py +0 -0
  209. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_client.py +0 -0
  210. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_client_request.py +0 -0
  211. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_cluster_compare.py +0 -0
  212. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_cluster_launch.py +0 -0
  213. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_completions.py +0 -0
  214. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_data/__init__.py +0 -0
  215. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_data/test_core.py +0 -0
  216. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_data/test_model.py +0 -0
  217. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_data/test_upgrade.py +0 -0
  218. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_dispatch.py +0 -0
  219. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_dispatch_staged.py +0 -0
  220. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_dispatch_version.py +0 -0
  221. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_dispatch_workload.py +0 -0
  222. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_factory_fsm.py +0 -0
  223. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_group_order.py +0 -0
  224. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_groups.py +0 -0
  225. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_initdb.py +0 -0
  226. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_list.py +0 -0
  227. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_meta_status.py +0 -0
  228. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_queue.py +0 -0
  229. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_queue_address_family.py +0 -0
  230. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_queue_gc.py +0 -0
  231. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_queue_limits.py +0 -0
  232. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_queue_start.py +0 -0
  233. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_queue_tls.py +0 -0
  234. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_queue_workload.py +0 -0
  235. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_restart.py +0 -0
  236. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_retry_gate.py +0 -0
  237. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_server.py +0 -0
  238. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_server_fsm.py +0 -0
  239. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_signal.py +0 -0
  240. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_source.py +0 -0
  241. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_status_label.py +0 -0
  242. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_submit.py +0 -0
  243. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_submit_json.py +0 -0
  244. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_template.py +0 -0
  245. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_timescale.py +0 -0
  246. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_update.py +0 -0
  247. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_upgrade_postgres.py +0 -0
  248. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_writeback_postgres.py +0 -0
  249. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_writeback_statement.py +0 -0
  250. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_zone_dispatch.py +0 -0
  251. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_zone_display.py +0 -0
  252. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_zone_model.py +0 -0
  253. {hypershell-2.9.0a5 → hypershell-2.9.0a7}/tests/test_zone_workload.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: hypershell
3
- Version: 2.9.0a5
3
+ Version: 2.9.0a7
4
4
  Summary: A cross-platform, high-throughput computing utility for processing shell commands over a distributed, asynchronous queue.
5
5
  Project-URL: Homepage, https://hypershell.org
6
6
  Project-URL: Documentation, https://hypershell.readthedocs.io
@@ -21,7 +21,7 @@ Classifier: Programming Language :: Python :: 3.13
21
21
  Classifier: Programming Language :: Python :: 3.14
22
22
  Classifier: Topic :: Utilities
23
23
  Requires-Python: >=3.11
24
- Requires-Dist: cmdkit[toml]>=2.7.7
24
+ Requires-Dist: cmdkit[toml]>=2.8.0
25
25
  Requires-Dist: cryptography>=3.4
26
26
  Requires-Dist: paramiko>=3.4.0
27
27
  Requires-Dist: psutil>=7.0.0
@@ -0,0 +1,39 @@
1
+ """The site-wide notice shown while the docs are built from a pre-release or development version.
2
+
3
+ The published site builds from `develop`, so between releases it describes behaviour that the
4
+ stable release on PyPI does not have. `conf.py` passes `announcement(release)` to the Furo theme;
5
+ a final version yields no notice, so the notice goes away by itself when `develop` carries one.
6
+ """
7
+
8
+ from typing import Optional
9
+
10
+ from packaging.version import Version
11
+
12
+ __all__ = ['announcement']
13
+
14
+
15
+ def announcement(release: str, base: str = '') -> Optional[str]:
16
+ """The notice (HTML) for the docs of `release`, or None for a final release.
17
+
18
+ The notice is the same HTML on every page, so its link can't be relative to the page. `base` is
19
+ the site's root URL; the link is absolute under it, so it also works from a build opened from
20
+ disk.
21
+ """
22
+ base = base.rstrip('/')
23
+ version = Version(release)
24
+ if not (version.is_prerelease or version.is_devrelease):
25
+ return None
26
+ line = f'{version.major}.{version.minor}'
27
+ marker = f'{line}.{version.micro}'
28
+ if version.micro:
29
+ stable = f'the {line}.{version.micro - 1} release'
30
+ elif version.minor:
31
+ stable = f'the {version.major}.{version.minor - 1}.x stable release'
32
+ else:
33
+ stable = 'the current stable release'
34
+ return (f'These docs track the {line} development line. '
35
+ f'Items marked “Added in version {marker}” or “Changed in version '
36
+ f'{marker}” are not in {stable}. '
37
+ f'Install the pre-release with <code>pip install --pre hypershell</code>. '
38
+ f'Some may not be in a pre-release yet. '
39
+ f'See <a href="{base}/whats_new.html">What&rsquo;s new in {line}</a>, which says which are.')
@@ -105,6 +105,10 @@ Options
105
105
  The timeout counts from when the client starts, after any ``--delay-start``, so the delay
106
106
  does not count toward it.
107
107
 
108
+ Specify a number of seconds, units ``d``, ``h``, ``m`` and ``s`` in that order, whole or
109
+ fractional (e.g., ``90m``, ``1h30m``, ``1.5h``, ``1d12h``), or a Slurm time ``MM:SS``,
110
+ ``HH:MM:SS``, ``D-HH``, ``D-HH:MM`` or ``D-HH:MM:SS`` (e.g., ``1:30:00``).
111
+
108
112
 
109
113
  ``-W``, ``--task-timeout`` *SEC*
110
114
  Task-level walltime limit (default: none).
@@ -112,6 +116,10 @@ Options
112
116
  Executors will send a progression of SIGINT, SIGTERM, and SIGKILL.
113
117
  If the process still persists the executor itself will shutdown.
114
118
 
119
+ Specify a number of seconds, units ``d``, ``h``, ``m`` and ``s`` in that order, whole or
120
+ fractional (e.g., ``90m``, ``1h30m``, ``1.5h``, ``1d12h``), or a Slurm time ``MM:SS``,
121
+ ``HH:MM:SS``, ``D-HH``, ``D-HH:MM`` or ``D-HH:MM:SS`` (e.g., ``1:30:00``).
122
+
115
123
  ``-C``, ``--client-cores`` *NUM*
116
124
  Limit available cores for client (default: all cores).
117
125
 
@@ -125,8 +133,10 @@ Options
125
133
  Limit available memory for client (default: all memory).
126
134
 
127
135
  Sets an upper bound on the amount of memory that the client can use.
128
- Specify memory size with units (e.g., '16GB', '4096MB'). This allows running
129
- multiple clients on the same node by partitioning resources.
136
+ Specify memory size in bytes or with a unit ``K``, ``M``, ``G`` or ``T``, alone or followed
137
+ by ``B`` or ``iB``, in any case (e.g., '16G', '4096MB'). Each unit is a power of 1024, so
138
+ ``16G``, ``16GB`` and ``16GiB`` are the same size. This allows running multiple clients on
139
+ the same node by partitioning resources.
130
140
 
131
141
  ``--monitor``
132
142
  Enable resource monitoring for tasks.
@@ -252,12 +252,22 @@ Options
252
252
 
253
253
  This feature allows for gracefully scaling down a cluster when task throughput subsides.
254
254
 
255
+ Specify a number of seconds, units ``d``, ``h``, ``m`` and ``s`` in that order, whole or
256
+ fractional (e.g., ``90m``, ``1h30m``, ``1.5h``, ``1d12h``), or a Slurm time ``MM:SS``,
257
+ ``HH:MM:SS``, ``D-HH``, ``D-HH:MM`` or ``D-HH:MM:SS`` (e.g., ``1:30:00``).
258
+
255
259
  ``-W``, ``--task-timeout`` *SEC*
256
260
  Task-level walltime limit (default: none).
257
261
 
258
262
  Executors will send a progression of SIGINT, SIGTERM, and SIGKILL.
259
263
  If the process still persists the executor itself will shutdown.
260
264
 
265
+ Specify a number of seconds, units ``d``, ``h``, ``m`` and ``s`` in that order, whole or
266
+ fractional (e.g., ``90m``, ``1h30m``, ``1.5h``, ``1d12h``), or a Slurm time ``MM:SS``,
267
+ ``HH:MM:SS``, ``D-HH``, ``D-HH:MM`` or ``D-HH:MM:SS`` (e.g., ``1:30:00``).
268
+ Individual tasks can override this with inline comments, which take the same forms (e.g.,
269
+ ``#HYPERSHELL: timeout:1:30:00``).
270
+
261
271
  ``-c``, ``--cores`` *NUM*
262
272
  Number of CPU cores required per task (default: none).
263
273
 
@@ -267,9 +277,12 @@ Options
267
277
  ``-m``, ``--memory`` *MEM*
268
278
  Amount of memory required per task (default: none).
269
279
 
270
- Specify memory size with units (e.g., '4GB', '512MB'). Tasks will only be
271
- executed when the required memory is available. Used with resource-aware
272
- scheduling and backfill.
280
+ Specify memory size in bytes or with a unit ``K``, ``M``, ``G`` or ``T``, alone or followed
281
+ by ``B`` or ``iB``, in any case (e.g., '4GB', '512M'). Each unit is a power of 1024, so
282
+ ``16G``, ``16GB`` and ``16GiB`` are the same size. Individual tasks can override this with
283
+ inline comments, which take the same forms (e.g., ``#HYPERSHELL: memory:8G``). Tasks will
284
+ only be executed when the required memory is available. Used with resource-aware scheduling
285
+ and backfill.
273
286
 
274
287
  ``-C``, ``--client-cores`` *NUM*
275
288
  Limit available cores per client (default: all cores).
@@ -284,8 +297,10 @@ Options
284
297
  Limit available memory per client (default: all memory).
285
298
 
286
299
  Sets an upper bound on the amount of memory that each client can use.
287
- Specify memory size with units (e.g., '16GB', '4096MB'). This allows running
288
- multiple clients on the same node by partitioning resources.
300
+ Specify memory size in bytes or with a unit ``K``, ``M``, ``G`` or ``T``, alone or followed
301
+ by ``B`` or ``iB``, in any case (e.g., '16G', '4096MB'). Each unit is a power of 1024, so
302
+ ``16G``, ``16GB`` and ``16GiB`` are the same size. This allows running multiple clients on
303
+ the same node by partitioning resources.
289
304
 
290
305
  ``--monitor``
291
306
  Enable resource monitoring for tasks.
@@ -68,9 +68,10 @@
68
68
 
69
69
  ``.rotate``
70
70
  Rotation policy (default: ``never``). Either a size threshold such as ``512MB``
71
- (units ``KB``/``MB``/``GB``/``TB``, powers of 1024; a bare number is bytes) or a
72
- cron expression such as ``@daily``, ``@midnight``, or ``0 1 * * 0`` (requires the
73
- ``croniter`` package). Sending ``SIGHUP`` rotates on demand.
71
+ or ``2G`` (units ``K``/``M``/``G``/``T``, alone or followed by ``B`` or ``iB``,
72
+ powers of 1024; a bare number is bytes) or a cron expression such as ``@daily``,
73
+ ``@midnight``, or ``0 1 * * 0`` (requires the ``croniter`` package). A cron
74
+ expression may begin with a digit. Sending ``SIGHUP`` rotates on demand.
74
75
 
75
76
  ``.compress``
76
77
  Compression for rotated files (default: none). One of ``gzip``, ``bzip``,
@@ -99,6 +100,11 @@
99
100
  (requires the ``uuid7`` extra; see the TimescaleDB section of :ref:`database <database>`).
100
101
  Support for other providers may be considered in the future.
101
102
 
103
+ .. only:: html
104
+
105
+ .. versionchanged:: 2.9.0
106
+ :pr:`71`: the ``timescale`` provider.
107
+
102
108
  ``.file``
103
109
  Only applicable for SQLite provider.
104
110
  SQLite does not understand any other connection detail.
@@ -149,6 +155,11 @@
149
155
  (``"4 weeks"``). For example ``timescale = { chunk_interval = "1 day" }``.
150
156
  See the TimescaleDB section of :ref:`database <database>`.
151
157
 
158
+ .. only:: html
159
+
160
+ .. versionadded:: 2.9.0
161
+ :pr:`71`
162
+
152
163
  ``*``
153
164
  Any additional arguments are forwarded to the provider, e.g., ``encoding = 'utf-8'``.
154
165
 
@@ -209,6 +220,11 @@
209
220
 
210
221
  See also ``-b``/``--bundlesize`` command-line option.
211
222
 
223
+ .. only:: html
224
+
225
+ .. versionchanged:: 2.9.0
226
+ :pr:`78`: the size for a client that advertises none.
227
+
212
228
  ``.bundlemax``
213
229
  Most tasks the server hands a client in one reply (default: `1000`).
214
230
 
@@ -216,6 +232,11 @@
216
232
  than this many tasks, whatever a client asks for. The effective cap is never smaller than
217
233
  the server's own ``.bundlesize``. There is no command-line option.
218
234
 
235
+ .. only:: html
236
+
237
+ .. versionadded:: 2.9.0
238
+ :pr:`78`
239
+
219
240
  ``.attempts``
220
241
  Attempts for auto-retry on failed tasks (default: `1`).
221
242
 
@@ -346,6 +367,8 @@
346
367
  Timeout in seconds for client. Automatically shutdown if no tasks received (default: never).
347
368
 
348
369
  This feature allows for gracefully scaling down a cluster when task throughput subsides.
370
+ A string takes the same forms as ``-T``/``--timeout``: units ``d``, ``h``, ``m`` and
371
+ ``s`` (e.g., ``"1h30m"``, ``"1.5h"``) or a Slurm time (e.g., ``"1:30:00"``, ``"1-12"``).
349
372
 
350
373
  ``.cores``
351
374
  Client-level limit on CPU cores available for running tasks (default: all available).
@@ -359,7 +382,8 @@
359
382
  Client-level limit on memory (in bytes) available for running tasks (default: all available).
360
383
 
361
384
  A value of ``0`` means unconstrained. Set a lower value to partition a node's memory
362
- between multiple clients.
385
+ between multiple clients. A string may carry a unit ``K``, ``M``, ``G`` or ``T``, alone
386
+ or followed by ``B`` or ``iB``, each a power of 1024 (e.g., ``"16G"``).
363
387
 
364
388
  See also ``-M``/``--client-memory`` command-line option.
365
389
 
@@ -388,6 +412,11 @@
388
412
 
389
413
  See also ``-b``/``--bundlesize`` command-line option.
390
414
 
415
+ .. only:: html
416
+
417
+ .. versionchanged:: 2.9.0
418
+ :pr:`78`: a client advertises it as the size it requests.
419
+
391
420
  ``.bundlewait``
392
421
  Seconds to wait before flushing tasks (default: `5`).
393
422
 
@@ -414,16 +443,21 @@
414
443
  ``.memory``
415
444
  Default memory (in bytes) required per task (default: unconstrained).
416
445
 
417
- A value of ``0`` means unconstrained. Used with resource-aware scheduling and backfill;
418
- individual tasks may override this inline (e.g., ``# HYPERSHELL: memory:8GB``).
446
+ A value of ``0`` means unconstrained. A string may carry a unit ``K``, ``M``, ``G`` or
447
+ ``T``, alone or followed by ``B`` or ``iB``, each a power of 1024 (e.g., ``"16G"``). Used
448
+ with resource-aware scheduling and backfill; individual tasks may override this inline in
449
+ the same forms (e.g., ``# HYPERSHELL: memory:8G``).
419
450
 
420
451
  See also ``-m``/``--memory`` command-line option.
421
452
 
422
453
  ``.timeout``
423
- Task-level walltime limit (default: none).
454
+ Task-level walltime limit in seconds (default: none).
424
455
 
425
456
  Executors will send a progression of SIGINT, SIGTERM, and SIGKILL.
426
457
  If the process still persists the executor itself will shutdown.
458
+ A string takes the same forms as ``-W``: units ``d``, ``h``, ``m`` and ``s`` (e.g.,
459
+ ``"1h30m"``, ``"1.5h"``) or a Slurm time (e.g., ``"1:30:00"``, ``"1-12"``); individual
460
+ tasks may override this inline in the same forms (e.g., ``# HYPERSHELL: timeout:1h30m``).
427
461
 
428
462
  ``.signalwait``
429
463
  Wait period in seconds between signal escalation on task cancellation (default: 10).
@@ -517,6 +551,177 @@
517
551
  For a *dynamic* autoscaling policy, this sets an upper limit on the number of launched
518
552
  clients. When this number is reached, scaling stops regardless of task pressure.
519
553
 
554
+ ``[relay]``
555
+ Section for the `relay` workflow, which connects a site to an upstream *server*.
556
+
557
+ .. only:: html
558
+
559
+ .. versionadded:: 2.9.0
560
+ :pr:`82`
561
+
562
+ ``.database``
563
+ Path to the relay database (default: <lib>/relay/<host>.db).
564
+
565
+ The relay database is always a private SQLite file, whatever ``[database]`` names; a relay
566
+ never opens the configured database. The default is named for the host, since a home
567
+ directory is often shared between hosts. A node-local disk is a good place for it.
568
+
569
+ See also ``--database`` command-line option.
570
+
571
+ ``.bind``
572
+ Bind address of the relay-local *server* (default: `0.0.0.0`).
573
+
574
+ The *clients* at the site connect here. See also ``--bind`` command-line option.
575
+
576
+ ``.port``
577
+ Port of the relay-local *server* (default: `50002`).
578
+
579
+ See also ``--port`` command-line option.
580
+
581
+ ``.bundlesize``
582
+ Size of task bundle for the relay-local *server* and the *clients* at its site
583
+ (default: `1`).
584
+
585
+ It is never smaller than ``relay.num_threads``: a *client* asks for one bundle at a time,
586
+ so a smaller bundle would leave its executors idle between requests.
587
+
588
+ ``.bundlewait``
589
+ Seconds the relay waits before returning finished tasks upstream regardless of
590
+ `bundlesize` (default: `5`).
591
+
592
+ ``.poll``
593
+ Maximum polling interval of the relay-local scheduler in seconds (default: `0.1`).
594
+
595
+ Received tasks wait at most this long before the relay-local *server* hands them out.
596
+
597
+ ``.retention``
598
+ Seconds a result is kept in the relay database after it has been returned upstream
599
+ (default: `300`). Results not yet returned are always kept.
600
+
601
+ ``.zone``
602
+ Zone or zones the relay serves (default: none, the default zone).
603
+
604
+ One zone name, a list of names, or one table per zone, ``[relay.zone.NAME]``, which may
605
+ give that zone's own ``launcher``, ``launcher_args`` and ``size`` (each in place of the
606
+ relay's, for that zone's *clients* only); an empty table serves the zone with the relay's.
607
+ Upstream the relay is one *client* per zone, each with its own identity; at the site it
608
+ keeps one fleet of *clients* per zone, all served by the relay-local *server*. The first
609
+ zone's identity lists the site's *clients* upstream.
610
+
611
+ .. code-block:: toml
612
+
613
+ [relay.zone.cpu]
614
+
615
+ [relay.zone.gpu]
616
+ size = 2
617
+ launcher = "srun"
618
+ launcher_args = "--gres=gpu:1"
619
+
620
+ See also ``--zone`` command-line option, which names the zones in place of this one.
621
+
622
+ ``.site``
623
+ Name of the relay's site (default: none, the relay's host name).
624
+
625
+ The upstream *server* records the relay, and the *clients* at its site, under this name.
626
+
627
+ ``.size``
628
+ Number of *clients* the relay keeps launched at its site (default: `1`, at least `1`).
629
+
630
+ See also ``-N``, ``--size`` command-line option.
631
+
632
+ ``.launcher``
633
+ Command prefix used to launch each *client* at the site (default: none).
634
+
635
+ An empty value launches clients directly as ``hs client ...``.
636
+ See also ``--launcher`` command-line option.
637
+
638
+ ``.launcher_args``
639
+ Extra arguments for the launcher (default: none).
640
+
641
+ See also ``--launcher-args`` command-line option.
642
+
643
+ ``.num_threads``
644
+ Executor threads for each *client* at the site (default: `1`).
645
+
646
+ ``.template``
647
+ Command template for the *clients* at the site (default: `{}`).
648
+
649
+ ``.timeout``
650
+ Seconds a *client* at the site waits for tasks before it exits (default: `0`, never).
651
+
652
+ ``[upstream]``
653
+ Connection to the upstream *server*. These settings are never read from ``[server]``,
654
+ so the *clients* at the site keep using the relay's own ``[server.tls]``.
655
+
656
+ ``.host``
657
+ Hostname of the upstream *server* (default: `localhost`).
658
+
659
+ See also ``--upstream-host`` command-line option.
660
+
661
+ ``.port``
662
+ Port of the upstream *server* (default: `50001`).
663
+
664
+ See also ``--upstream-port`` command-line option.
665
+
666
+ ``.auth``
667
+ Cryptographic key for the upstream *server*.
668
+
669
+ Use ``.auth_env`` or ``.auth_eval`` to keep it out of the file; whichever form is set
670
+ in the highest-precedence place is used (two forms in one place are refused). The
671
+ upstream key stays in the relay: the *clients* at the site use a key the relay mints for
672
+ each run.
673
+
674
+ ``.bundlesize``
675
+ Bundle size the relay advertises upstream (default: `1000`).
676
+
677
+ The relay holds at most twice its connected *clients* times ``relay.bundlesize`` in
678
+ unfinished tasks. It asks for more only once half of that is left, and then for the
679
+ whole difference (never more than this size at once), so the site has a second round
680
+ of work ready while the first runs.
681
+
682
+ ``.heartrate``
683
+ Seconds between heartbeats to the upstream *server* (default: `10`).
684
+
685
+ ``.deadline``
686
+ Seconds a call to the upstream *server* may take before the relay takes the connection
687
+ as lost (default: `30`).
688
+
689
+ While the upstream *server* cannot be reached, the site keeps running and finished
690
+ tasks are kept in the relay database; the relay connects again, with backoff, and then
691
+ returns them before it asks for more work.
692
+
693
+ ``.backoff``
694
+ Longest wait in seconds between attempts to reach the upstream *server* again
695
+ (default: `60`).
696
+
697
+ Each wait is drawn at random up to a bound that starts at one second and doubles with
698
+ each failed attempt, up to this value.
699
+
700
+ ``.evict_hint``
701
+ Seconds of lost contact after which the relay takes the upstream *server* to have
702
+ evicted it (default: `600`, the *server*'s own default ``server.evict``).
703
+
704
+ Set it to the upstream ``server.evict``. Past it, the relay warns that the results it
705
+ holds will likely be refused as stale (the upstream *server* has put those tasks back
706
+ for other *clients*), and it does not repeat a confirmation the outage cut off. The
707
+ results are still returned when the connection comes back.
708
+
709
+ ``[tls]``
710
+ ``.enabled``
711
+ Use TLS on the upstream connection (default: `true`).
712
+
713
+ See also ``--no-tls`` command-line option.
714
+
715
+ ``.cert``
716
+ Upstream server certificate (default: `<auto>`).
717
+
718
+ ``.cafile``
719
+ Trust anchor for the upstream server (default: `<auto>`).
720
+
721
+ ``.fingerprint``
722
+ Pin the upstream server certificate fingerprint, e.g. ``SHA256:AB:CD:...``
723
+ (default: none).
724
+
520
725
  ``[console]``
521
726
  Rich text display and output parameters.
522
727
 
@@ -65,6 +65,9 @@ A few common environment variables are defined for every task.
65
65
  ``TASK_SLOT_COUNT``
66
66
  Number of concurrent executors on the client (``N``). Defaults to ``1``.
67
67
 
68
+ .. versionadded:: 2.9.0
69
+ ``TASK_SLOT`` and ``TASK_SLOT_COUNT`` (:pr:`52`).
70
+
68
71
  |
69
72
 
70
73
  Any user-defined tags are included as environment variables as well with
@@ -97,11 +97,16 @@ Individual pragmas can also be set from the command line:
97
97
 
98
98
  -------------------
99
99
 
100
+ .. _database_initialization:
101
+
100
102
  Initialization
101
103
  --------------
102
104
 
103
105
  |
104
106
 
107
+ .. versionchanged:: 2.9.0
108
+ :pr:`69`: a database from an earlier release is upgraded in place on first use.
109
+
105
110
  SQLite is automatically initialized upon opening the connection but
106
111
  Postgres must be explicitly initialized via ``hs initdb`` or at launch with
107
112
  the ``--initdb`` command-line option.
@@ -129,11 +134,50 @@ See also the :ref:`command-line interface <cli_initdb>` for ``hs initdb``.
129
134
 
130
135
  -------------------
131
136
 
137
+ .. _database_relay:
138
+
139
+ Relay Database
140
+ --------------
141
+
142
+ |
143
+
144
+ .. versionadded:: 2.9.0
145
+ :pr:`82`
146
+
147
+ A relay (``hs relay``) keeps its own database, apart from the one configured here. It is always a
148
+ private SQLite file, whatever ``[database]`` names (PostgreSQL included), and the configured database
149
+ is never opened by a relay process. It holds the tasks the relay has received and not yet finished,
150
+ their upstream assignments, and the results the relay holds until it has handed them back
151
+ (and for ``relay.retention`` seconds after), so it stays about the same size however long the relay
152
+ runs.
153
+
154
+ The file is ``relay.database`` (``--database``), by default ``<lib>/relay/<host>.db``: named for the
155
+ host, since a home directory is often shared between hosts. One relay uses a file at a time; a
156
+ second relay on the same file refuses to start (a lock file beside it, ``<file>.lock``, guards it).
157
+
158
+ Every insert of received tasks is committed with ``synchronous = FULL`` before the relay confirms
159
+ them upstream, so the file sees a steady stream of small, durable writes. Put it on a **node-local
160
+ disk** where the relay runs, not on a network filesystem: SQLite's locking is unreliable on many
161
+ network filesystems, and their latency slows each commit. WAL journaling is not turned on, for the
162
+ same reason; a node-local file may use it through ``[database] pragmas`` if wanted. A relay
163
+ restarted on the same file picks up where its earlier run stopped: results it still held go back
164
+ upstream, and tasks it was running run again at the site.
165
+
166
+ A relay given a configuration file with relay settings in it writes a copy for its site beside the
167
+ relay database (``<file>.site.toml``, readable by its owner only), removed when the relay ends.
168
+
169
+ -------------------
170
+
171
+ .. _database_timescale:
172
+
132
173
  TimescaleDB
133
174
  -----------
134
175
 
135
176
  |
136
177
 
178
+ .. versionadded:: 2.9.0
179
+ :pr:`71`
180
+
137
181
  `TimescaleDB <https://github.com/timescale/timescaledb>`_ is a PostgreSQL extension for
138
182
  time-series data. It splits a large table into *chunks* by time (a *hypertable*) and can convert
139
183
  older chunks into a compressed, column-oriented *columnstore*. A long-lived *HyperShell* database
@@ -0,0 +1,76 @@
1
+ Run relay for one site.
2
+
3
+ A *relay* connects a site to an upstream *server*. Upstream it is an ordinary *client*; at
4
+ the site it runs its own *server*, scheduling the tasks it receives to *clients* it launches
5
+ there, and returns their results upstream.
6
+
7
+ Upstream, the relay requests work for its zone under an identity of its own, derived from the
8
+ relay and the zone name and logged when it starts. It holds at most about two rounds of work for its
9
+ site (twice its connected *clients* times its bundle size, ``relay.bundlesize``, which is never
10
+ below a *client*'s executor threads), asks for more once half of that is left, and then for the
11
+ whole difference at once. It confirms the tasks it receives only once they are stored in the relay
12
+ database. The upstream key comes from
13
+ ``relay.upstream.auth`` (or its ``_env`` and ``_eval`` forms), never from the command line.
14
+ The key never reaches the site: before its first *client* is launched, the relay removes from its
15
+ own environment, which the site's *clients* and their tasks inherit, every relay setting
16
+ (``HYPERSHELL_RELAY_*``) and any variable holding the key. When ``HYPERSHELL_CONFIG_FILE`` names a
17
+ file that holds relay settings or the key, the site is given a copy of it instead, without the
18
+ ``[relay]`` section and without any value holding the key, readable by its owner only, and kept
19
+ beside the relay database; the site's *clients* keep the file's other settings, ``[server.tls]``
20
+ among them. (If the file cannot be read, the site gets none.) The copy is removed when the relay
21
+ exits, however it ends: when it finishes, when it fails, and on SIGINT or SIGTERM. Only a relay
22
+ killed outright leaves it behind (by SIGKILL, or by a second SIGTERM while it ends, which ends the
23
+ process at once), and the next relay on the same relay database to need a copy writes over it. The relay refuses to start if the *client* command line (launcher, launcher
24
+ arguments or template) or a variable exported to tasks (``[export]``) would carry the key.
25
+
26
+ At the site the relay runs its tasks on the *clients* it launches there, with a key it mints for
27
+ each run. Each *client* receives that key in its environment (``HYPERSHELL_SERVER_AUTH``), never on
28
+ its command line, and passes it to none of its tasks, so the launcher must pass the environment
29
+ through to the *client*. A site *client* that stops sending heartbeats is evicted by the relay
30
+ after ``server.evict`` seconds, and the tasks it held are run again at the site. The site never
31
+ retries a task: one that fails goes back upstream as it
32
+ ended, and the upstream *server* decides whether to run it again. Each result goes back attributed to the *client*
33
+ at the site that ran it, matched to the assignment the upstream *server* made. Results are kept in
34
+ the relay database until they have been handed over, and for a while after (``relay.retention``).
35
+ The relay's heartbeat names its site (``relay.site``, by default the relay's host name) and lists the
36
+ *clients* connected at the site, by id and host only. The upstream *server* records them as its own
37
+ *clients*, attributed to the site and the relay, and counts them (not the relay) as connected. They
38
+ never heartbeat upstream themselves: they disconnect there when they leave the site, and all at once
39
+ when the relay finishes or is evicted.
40
+ A relay may serve several zones (``--zone`` given more than once, or ``relay.zone`` as a list or as
41
+ one ``[relay.zone.NAME]`` table per zone). Upstream it is then one *client* per zone, each under its
42
+ own identity, all over the same connection: it takes the zones in turn, and asks for each only as
43
+ much as that zone's own *clients* at the site have room for. At the site it keeps one fleet of
44
+ *clients* per zone, launched alike but each serving its own zone, with that zone's own launcher,
45
+ launcher arguments and size if its table gives them; the one relay-local *server* serves them all.
46
+ The first zone's identity lists every *client* at the site upstream. Each identity sends its own
47
+ heartbeat, so if the relay fails, the upstream *server* evicts each one and puts back what each
48
+ held, in every zone.
49
+ When the upstream *server* shuts down, the relay finishes the tasks it holds, returns every result,
50
+ and ends its upstream registration. It hears of the shutdown in reply to a request for work, in any of
51
+ its zones; a zone with no *client* at the site and no task held then ends with the others. A relay
52
+ with no *client* at the site in any zone never asks, so it waits until it is drained or stopped.
53
+ SIGUSR1 or SIGUSR2, sent to the relay process, drain it the same way: the relay stops asking for work, its site finishes every task the relay holds (those not yet started
54
+ too), and the results go back before the registration ends. SIGINT and SIGTERM end the relay at
55
+ once, without draining: it ends the *clients* it launched and exits (on SIGTERM, by that signal; a
56
+ second SIGTERM ends the process at once). If
57
+ the relay fails (a part of its own *server* stops, say, or the upstream *server* refuses it), it ends
58
+ the *clients* it launched and exits with a non-zero status. Either way the upstream *server* puts
59
+ back the tasks the relay held when it evicts the relay.
60
+
61
+ A lost upstream connection is not a failure. While the upstream *server* cannot be reached (a call
62
+ gets no answer within ``relay.upstream.deadline``), the site keeps running the tasks the relay holds,
63
+ their results are kept in the relay database, and the relay connects again with backoff (at most
64
+ ``relay.upstream.backoff`` seconds apart). It logs the outage when it begins, now and then while it
65
+ lasts, and when it ends. Once connected again it sends a heartbeat first (the upstream *server*
66
+ registers it again if it had evicted it), then returns the results it holds, and only then asks for
67
+ more work. An outage shorter than the upstream eviction period (``relay.upstream.evict_hint``)
68
+ costs nothing: the results land. After a longer one, or after the upstream *server* restarted, the
69
+ upstream *server* has put those tasks back for other *clients*, so their results are refused as
70
+ stale and the tasks run again. A relay that is started while its upstream *server* cannot be reached
71
+ waits for it before it starts its site, and a relay restarted on the same relay database returns the
72
+ results its earlier run still held.
73
+
74
+ The relay database is always a private SQLite file, whatever database is configured, and the
75
+ configured database is never opened. One relay runs per process, and a second relay refuses to
76
+ start on the same relay database.
@@ -0,0 +1,64 @@
1
+ Options
2
+ ^^^^^^^
3
+
4
+ ``-H``, ``--upstream-host`` *ADDR*
5
+ Hostname or IP address of the upstream *server* (default: localhost).
6
+
7
+ See also ``relay.upstream.host``.
8
+
9
+ ``-p``, ``--upstream-port`` *NUM*
10
+ Port number of the upstream *server* (default: 50001).
11
+
12
+ See also ``relay.upstream.port``.
13
+
14
+ ``--no-tls``
15
+ Disable TLS on the connection to the upstream *server* (not recommended).
16
+
17
+ This affects only the upstream connection; the relay-local *server* keeps ``[server.tls]``.
18
+ See also ``relay.upstream.tls.enabled``.
19
+
20
+ ``--zone`` *NAME*
21
+ Zone this relay serves (default: the default zone). Give it more than once to serve several.
22
+
23
+ The relay asks upstream only for tasks of the zones it serves, and keeps one fleet of
24
+ *clients* at the site for each zone (``-N`` *clients* each, unless the zone gives its own
25
+ ``size``). Zones named here take the place of ``relay.zone``; each still takes its own
26
+ settings from ``[relay.zone.NAME]``. See also ``relay.zone``.
27
+
28
+ ``-N``, ``--size`` *NUM*
29
+ Number of *clients* the relay keeps launched at its site (default: 1).
30
+
31
+ A *client* that exits is launched again. The size must be at least 1: with no *client* at the
32
+ site the relay would never ask upstream for work. See also ``relay.size``.
33
+
34
+ ``--launcher`` *CMD*
35
+ Command prefix used to launch each *client* at the site (default: none).
36
+
37
+ With none, *clients* run directly on the relay's host. Otherwise each is launched as
38
+ ``CMD [ARGS...] hyper-shell client ...`` (e.g., ``srun``). The *clients* connect back to the
39
+ relay by its host name. The launcher must pass the environment through: each *client*
40
+ receives the site key there (``HYPERSHELL_SERVER_AUTH``), never on its command line.
41
+ See also ``relay.launcher``.
42
+
43
+ ``--launcher-args`` *ARGS*
44
+ Extra arguments for the launcher, placed after it (quoted as one argument).
45
+
46
+ See also ``relay.launcher_args``.
47
+
48
+ ``--bind`` *ADDR*
49
+ Bind address of the relay-local *server* (default: 0.0.0.0).
50
+
51
+ The *clients* at the site connect to the relay here, so it must be reachable from the
52
+ nodes they run on. See also ``relay.bind``.
53
+
54
+ ``--port`` *NUM*
55
+ Port of the relay-local *server* (default: 50002).
56
+
57
+ The default differs from the *server* default (50001), so a relay can run beside a
58
+ *server* on the same host. See also ``relay.port``.
59
+
60
+ ``--database`` *PATH*
61
+ Path to the relay database (default: <lib>/relay/<host>.db).
62
+
63
+ The default is named for the host, since a home directory is often shared between hosts.
64
+ A node-local disk is a good place for it. See also ``relay.database``.
@@ -0,0 +1,2 @@
1
+ ``hs`` ``relay`` ``[-h]`` ``[-H ADDR]`` ``[-p NUM]`` ``[--no-tls]`` ``[--zone NAME ...]`` ``[-N NUM]``
2
+ ``[--launcher CMD]`` ``[--launcher-args ARGS]`` ``[--bind ADDR]`` ``[--port NUM]`` ``[--database PATH]``