hypershell 2.9.0a2__tar.gz → 2.9.0a4__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.
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/PKG-INFO +1 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/client_desc.rst +2 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/client_help.rst +17 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/client_usage.rst +1 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/cluster_help.rst +7 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/cluster_usage.rst +1 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_param_ref.rst +27 -3
- hypershell-2.9.0a4/docs/_include/database.rst +412 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/database_alt.rst +6 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/server_desc.rst +5 -4
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/server_help.rst +2 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/submit_desc.rst +2 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/submit_help.rst +11 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/submit_usage.rst +1 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_groups_alt.rst +9 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_info_help.rst +1 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_submit_desc.rst +1 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_submit_help.rst +6 -0
- hypershell-2.9.0a4/docs/_include/task_submit_usage.rst +1 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_wait_help.rst +1 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/alternatives.rst +4 -4
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/install.rst +2 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/security.rst +10 -8
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/pyproject.toml +1 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/share/bash_completion.d/hs +4 -4
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/share/man/man1/hs.1 +94 -17
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/share/man/man1/hsx.1 +94 -17
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/share/man/man1/hyper-shell.1 +94 -17
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/share/zsh/site-functions/_hs +5 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/client.py +106 -48
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/cluster/__init__.py +23 -7
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/cluster/local.py +9 -2
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/cluster/remote.py +20 -3
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/cluster/ssh.py +11 -2
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/config.py +1 -0
- hypershell-2.9.0a4/src/hypershell/core/dispatch.py +480 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/logging.py +1 -1
- hypershell-2.9.0a4/src/hypershell/core/queue.py +1131 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/tls.py +9 -6
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/data/__init__.py +25 -2
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/data/core.py +8 -7
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/data/model.py +419 -57
- hypershell-2.9.0a4/src/hypershell/data/timescale.py +636 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/server.py +265 -44
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/submit.py +42 -13
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/task.py +67 -16
- hypershell-2.9.0a4/tests/bench/bench_queue.py +593 -0
- hypershell-2.9.0a4/tests/cluster/build_archive.sh +82 -0
- hypershell-2.9.0a4/tests/cluster/compare.py +282 -0
- hypershell-2.9.0a4/tests/cluster/drive.sh +317 -0
- hypershell-2.9.0a4/tests/cluster/smoke.sh +117 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/conftest.py +36 -2
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/fixtures/make-legacy-postgres.sh +31 -0
- hypershell-2.9.0a4/tests/test_client_request.py +161 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_cluster.py +1 -0
- hypershell-2.9.0a4/tests/test_cluster_compare.py +147 -0
- hypershell-2.9.0a4/tests/test_contended_recovery.py +605 -0
- hypershell-2.9.0a4/tests/test_contended_write.py +338 -0
- hypershell-2.9.0a4/tests/test_dispatch.py +319 -0
- hypershell-2.9.0a4/tests/test_dispatch_staged.py +276 -0
- hypershell-2.9.0a4/tests/test_dispatch_version.py +204 -0
- hypershell-2.9.0a4/tests/test_dispatch_workload.py +258 -0
- hypershell-2.9.0a4/tests/test_group_order.py +470 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_groups.py +34 -11
- hypershell-2.9.0a4/tests/test_queue.py +574 -0
- hypershell-2.9.0a4/tests/test_queue_address_family.py +461 -0
- hypershell-2.9.0a4/tests/test_queue_gc.py +915 -0
- hypershell-2.9.0a4/tests/test_queue_limits.py +234 -0
- hypershell-2.9.0a4/tests/test_queue_start.py +228 -0
- hypershell-2.9.0a4/tests/test_queue_workload.py +126 -0
- hypershell-2.9.0a4/tests/test_server_fsm.py +302 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_submit.py +1 -0
- hypershell-2.9.0a4/tests/test_timescale.py +1086 -0
- hypershell-2.9.0a4/tests/test_writeback.py +508 -0
- hypershell-2.9.0a4/tests/test_writeback_postgres.py +240 -0
- hypershell-2.9.0a4/tests/test_writeback_statement.py +290 -0
- hypershell-2.9.0a4/tests/test_zone_dispatch.py +254 -0
- hypershell-2.9.0a4/tests/test_zone_display.py +93 -0
- hypershell-2.9.0a4/tests/test_zone_model.py +279 -0
- hypershell-2.9.0a4/tests/test_zone_postgres.py +133 -0
- hypershell-2.9.0a4/tests/test_zone_workload.py +112 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/uv.lock +1 -1
- hypershell-2.9.0a2/docs/_include/database.rst +0 -128
- hypershell-2.9.0a2/docs/_include/task_submit_usage.rst +0 -1
- hypershell-2.9.0a2/src/hypershell/core/queue.py +0 -449
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/.gitignore +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/CODE_OF_CONDUCT.md +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/LICENSE +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/README.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/Makefile +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/citation.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/cluster_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_edit_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_edit_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_edit_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_get_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_get_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_get_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_intro.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_intro_alt.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_pythonpath.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_set_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_set_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_set_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_site_vars.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_task_env.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_task_env_alt.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_which_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_which_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/config_which_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/exit_status.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/initdb_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/initdb_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/initdb_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/license.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/security_alt.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/server_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/signals.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_info_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_info_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_run_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_run_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_run_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_search_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_search_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_search_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_update_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_update_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_update_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_wait_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/task_wait_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/templates.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/templates_alt.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_include/tls_cli_options.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_static/custom.css +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_static/logo-dark-mode.png +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/_static/logo-light-mode.png +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/api/client.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/api/cluster.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/api/data.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/api/index.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/api/server.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/api/submit.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/client.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/cluster.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/config.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/config_edit.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/config_get.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/config_set.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/config_which.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/index.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/initdb.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/server.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/submit.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/task_info.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/task_run.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/task_search.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/task_submit.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/task_update.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/cli/task_wait.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/conf.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/config.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/database.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/getting_started.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/index.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/logging.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/manual.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/docs/templates.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/share/bash_completion.d/hsx +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/__init__.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/config.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/__init__.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/exceptions.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/fsm.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/heartbeat.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/platform.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/pretty_print.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/remote.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/resource.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/signal.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/sys.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/tag.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/template.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/thread.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/types.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/core/uuid.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/src/hypershell/data/upgrade.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/__init__.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/fixtures/README.md +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/fixtures/hypershell-2.8.3.db +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/fixtures/make-2.8.3-db.sh +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_autoscale.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_cancel.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_card_info.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_card_integration.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_card_render.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_client.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_completions.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_data/__init__.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_data/test_core.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_data/test_model.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_data/test_upgrade.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_factory_fsm.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_initdb.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_list.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_logging.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_main.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_meta_status.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_queue_tls.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_restart.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_retry_gate.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_server.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_signal.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_source.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_status_label.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_submit_json.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_template.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_update.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_upgrade_cli.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a4}/tests/test_upgrade_postgres.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: hypershell
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.0a4
|
|
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
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Launch client directly, run tasks in parallel.
|
|
2
2
|
|
|
3
|
-
The client connects to the server and
|
|
3
|
+
The client connects to the server and, whenever it is ready for work, requests a bundle of tasks
|
|
4
|
+
of its own size (``-b``/``--bundlesize``; the server's size when not given).
|
|
4
5
|
These tasks are run locally by some number of a parallel task executors.
|
|
5
6
|
|
|
6
7
|
The environment for tasks are the same as for the client. Standard output and error
|
|
@@ -17,7 +17,14 @@ Options
|
|
|
17
17
|
See section on `templates`.
|
|
18
18
|
|
|
19
19
|
``-b``, ``--bundlesize`` *SIZE*
|
|
20
|
-
Size of task bundle (default:
|
|
20
|
+
Size of task bundle to request from the server and to return results in (default: the
|
|
21
|
+
server's).
|
|
22
|
+
|
|
23
|
+
When given (on the command line, by ``HYPERSHELL_SUBMIT_BUNDLESIZE``, or in a configuration
|
|
24
|
+
file as ``submit.bundlesize``), the client advertises this size and the server replies with
|
|
25
|
+
up to this many tasks, never more than its cap (``server.bundlemax``). When not given, the
|
|
26
|
+
client advertises no size and the server uses its own ``--bundlesize``; finished tasks are then
|
|
27
|
+
returned in bundles of the built-in default (1).
|
|
21
28
|
|
|
22
29
|
Using larger bundles is a good idea for large distributed workflows; specifically, it is best
|
|
23
30
|
to coordinate bundle size with the number of executors in use by each client.
|
|
@@ -33,6 +40,13 @@ Options
|
|
|
33
40
|
|
|
34
41
|
See also ``--bundlesize``.
|
|
35
42
|
|
|
43
|
+
``--zone`` *NAME*
|
|
44
|
+
Run only tasks of this zone (default: none, tasks without a zone).
|
|
45
|
+
|
|
46
|
+
The client names its zone when it requests work, and the server replies with tasks of that
|
|
47
|
+
zone only. A client given no ``--zone`` (or ``--zone default``) runs only tasks submitted
|
|
48
|
+
without one. See ``--zone`` on `submit`.
|
|
49
|
+
|
|
36
50
|
``-H``, ``--host`` *ADDR*
|
|
37
51
|
Hostname or IP address to connect with server (default: localhost).
|
|
38
52
|
|
|
@@ -88,6 +102,8 @@ Options
|
|
|
88
102
|
Timeout in seconds for client. Automatically shutdown if no tasks received (default: never).
|
|
89
103
|
|
|
90
104
|
This feature allows for gracefully scaling down a cluster when task throughput subsides.
|
|
105
|
+
The timeout counts from when the client starts, after any ``--delay-start``, so the delay
|
|
106
|
+
does not count toward it.
|
|
91
107
|
|
|
92
108
|
|
|
93
109
|
``-W``, ``--task-timeout`` *SEC*
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
``[-N NUM]`` ``[-t TEMPLATE]`` ``[-b SIZE]`` ``[-w SEC]`` ``[-H ADDR]`` ``[-p PORT]``
|
|
3
3
|
``[-k KEY]`` ``[--capture | [-o PATH] [-e PATH]]`` ``[--no-confirm]``
|
|
4
4
|
``[-d SEC]`` ``[-T SEC]`` ``[-W SEC]`` ``[-S SEC]`` ``[-R NUM]``
|
|
5
|
-
``[-C NUM]`` ``[-M MEM]`` ``[--monitor]``
|
|
5
|
+
``[-C NUM]`` ``[-M MEM]`` ``[--monitor]`` ``[--zone NAME]``
|
|
6
6
|
``[--no-tls | [--tls-ca PATH] [--tls-cert PATH] [--tls-key PATH]]``
|
|
@@ -116,6 +116,13 @@ Options
|
|
|
116
116
|
With ``--no-db`` enabled, there is no scheduler and instead the `submit` thread publishes
|
|
117
117
|
bundles directly to the queue.
|
|
118
118
|
|
|
119
|
+
``--zone`` *NAME*
|
|
120
|
+
Zone of the submitted tasks and of every client the cluster launches (default: none).
|
|
121
|
+
|
|
122
|
+
The tasks read from *FILE* (or ``--from-json``) are placed in this zone, and each client is
|
|
123
|
+
launched with the same ``--zone``, so it runs them. Zones are recorded in the database, so
|
|
124
|
+
``--zone`` cannot be used with ``--no-db``.
|
|
125
|
+
|
|
119
126
|
``--initdb``
|
|
120
127
|
Auto-initialize database.
|
|
121
128
|
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
``[-H ADDR]`` ``[-p PORT]`` ``[-r NUM [--eager]]`` ``[-f PATH]`` ``[--capture | [-o PATH] [-e PATH]]``
|
|
4
4
|
``[--ssh [HOST... | --ssh-group NAME] [--env] | --mpi | --launcher=ARGS...]``
|
|
5
5
|
``[--no-db [--no-confirm] | --initdb]`` ``[-d SEC]`` ``[-T SEC]`` ``[-W SEC]`` ``[-S SEC]`` ``[-R NUM]``
|
|
6
|
-
``[-c NUM]`` ``[-m MEM]`` ``[-C NUM]`` ``[-M MEM]`` ``[--monitor]``
|
|
6
|
+
``[-c NUM]`` ``[-m MEM]`` ``[-C NUM]`` ``[-M MEM]`` ``[--monitor]`` ``[--zone NAME]``
|
|
7
7
|
``[--autoscaling [MODE] [-P SEC] [-F VALUE] [-I NUM] [-X NUM] [-Y NUM]]``
|
|
8
8
|
``[--no-tls | [--tls-ca PATH] [--tls-cert PATH] [--tls-key PATH]]``
|
|
@@ -94,8 +94,10 @@
|
|
|
94
94
|
|
|
95
95
|
``.provider``
|
|
96
96
|
Database provider (default: 'sqlite'). Supported alternatives include
|
|
97
|
-
'postgres' (or compatible)
|
|
98
|
-
the
|
|
97
|
+
'postgres' (or compatible) and 'timescale' (alias 'timescaledb'), which is PostgreSQL
|
|
98
|
+
with the TimescaleDB extension: ``hs initdb`` makes the task table a hypertable
|
|
99
|
+
(requires the ``uuid7`` extra; see the TimescaleDB section of :ref:`database <database>`).
|
|
100
|
+
Support for other providers may be considered in the future.
|
|
99
101
|
|
|
100
102
|
``.file``
|
|
101
103
|
Only applicable for SQLite provider.
|
|
@@ -139,6 +141,14 @@
|
|
|
139
141
|
Specify one or more pragmas to apply to database connections (SQLite only).
|
|
140
142
|
For example ``pragmas = { journal_mode = "wal" }`` to enable WAL-mode.
|
|
141
143
|
|
|
144
|
+
``[timescale]``
|
|
145
|
+
Settings for the TimescaleDB shape ``hs initdb`` gives the task table (``timescale``
|
|
146
|
+
provider only; never forwarded to the connection). Keys: ``chunk_interval``
|
|
147
|
+
(default ``"1 week"``), ``columnstore`` (``true``), ``segmentby`` (``"client_id"``),
|
|
148
|
+
``orderby`` (``"id DESC"``), ``policy`` (``true``), and ``compress_after``
|
|
149
|
+
(``"4 weeks"``). For example ``timescale = { chunk_interval = "1 day" }``.
|
|
150
|
+
See the TimescaleDB section of :ref:`database <database>`.
|
|
151
|
+
|
|
142
152
|
``*``
|
|
143
153
|
Any additional arguments are forwarded to the provider, e.g., ``encoding = 'utf-8'``.
|
|
144
154
|
|
|
@@ -195,8 +205,17 @@
|
|
|
195
205
|
Using larger bundles is a good idea for large distributed workflows; specifically, it is best
|
|
196
206
|
to coordinate bundle size with the number of executors in use by each client.
|
|
197
207
|
|
|
208
|
+
It is also the size of the bundle given to a client that advertises no size of its own.
|
|
209
|
+
|
|
198
210
|
See also ``-b``/``--bundlesize`` command-line option.
|
|
199
211
|
|
|
212
|
+
``.bundlemax``
|
|
213
|
+
Most tasks the server hands a client in one reply (default: `1000`).
|
|
214
|
+
|
|
215
|
+
A client advertises its own bundle size (its ``-b``); the server never replies with more
|
|
216
|
+
than this many tasks, whatever a client asks for. The effective cap is never smaller than
|
|
217
|
+
the server's own ``.bundlesize``. There is no command-line option.
|
|
218
|
+
|
|
200
219
|
``.attempts``
|
|
201
220
|
Attempts for auto-retry on failed tasks (default: `1`).
|
|
202
221
|
|
|
@@ -362,6 +381,11 @@
|
|
|
362
381
|
Using larger bundles is a good idea for large distributed workflows; specifically, it is best
|
|
363
382
|
to coordinate bundle size with the number of executors in use by each client.
|
|
364
383
|
|
|
384
|
+
The `client` reads its ``-b``/``--bundlesize`` default from this key. When it is set (here
|
|
385
|
+
or by ``HYPERSHELL_SUBMIT_BUNDLESIZE``), a client advertises it as the size of bundle it
|
|
386
|
+
requests; when it is left at the built-in default, a client advertises no size and the
|
|
387
|
+
server uses its own.
|
|
388
|
+
|
|
365
389
|
See also ``-b``/``--bundlesize`` command-line option.
|
|
366
390
|
|
|
367
391
|
``.bundlewait``
|
|
@@ -498,7 +522,7 @@
|
|
|
498
522
|
|
|
499
523
|
``.theme``
|
|
500
524
|
Color scheme to use by default in output (default: `monokai`), such as with
|
|
501
|
-
``hs info`` and ``hs
|
|
525
|
+
``hs info`` and ``hs list``.
|
|
502
526
|
|
|
503
527
|
This option is passed to the `rich <https://rich.readthedocs.io/en/latest/>`_ library.
|
|
504
528
|
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
|
|
|
2
|
+
|
|
3
|
+
*HyperShell* can operate entirely within memory and does not require a database.
|
|
4
|
+
This is desirable for ad-hoc, short-lived, or in extreme high-throughput scenarios.
|
|
5
|
+
However, some capabilities are only possible when a database is active
|
|
6
|
+
(such as server restart, task retry, task history, etc).
|
|
7
|
+
|
|
8
|
+
-------------------
|
|
9
|
+
|
|
10
|
+
Connecting
|
|
11
|
+
----------
|
|
12
|
+
|
|
13
|
+
|
|
|
14
|
+
|
|
15
|
+
Connection details must to be specified by your configuration.
|
|
16
|
+
This can be entirely through environment variables or within files.
|
|
17
|
+
|
|
18
|
+
SQLite only needs the local file path.
|
|
19
|
+
|
|
20
|
+
.. admonition:: Configuration with SQLite file path
|
|
21
|
+
:class: note
|
|
22
|
+
|
|
23
|
+
.. code-block:: toml
|
|
24
|
+
|
|
25
|
+
[database]
|
|
26
|
+
file = "/var/lib/hypershell/main.db"
|
|
27
|
+
|
|
28
|
+
Or via a single environment variable, ``HYPERSHELL_DATABASE_FILE=/tmp/pipeline/task.db``.
|
|
29
|
+
|
|
30
|
+
The default `provider` is SQLite; Postgres must be enabled and requires the ``postgres``
|
|
31
|
+
extra (or a production variant — see :ref:`install`). A local database with local account
|
|
32
|
+
authentication simply needs to know the database name.
|
|
33
|
+
|
|
34
|
+
.. admonition:: Configuration file with basic Postgres
|
|
35
|
+
:class: note
|
|
36
|
+
|
|
37
|
+
.. code-block:: toml
|
|
38
|
+
|
|
39
|
+
[database]
|
|
40
|
+
provider = "postgres"
|
|
41
|
+
database = "hypershell"
|
|
42
|
+
|
|
43
|
+
The ``port`` is assumed to be 5432 but can be specified. If a ``user`` is given then so too must
|
|
44
|
+
a ``password``. The default `public` schema is assumed but can also be specified. Anything else
|
|
45
|
+
is forwarded to the database as a connection parameter; e.g., ``encoding = "utf-8"``.
|
|
46
|
+
|
|
47
|
+
Any parameter ending in the special suffixes ``_env`` or ``_eval`` are interpolated into the
|
|
48
|
+
configuration. E.g., ``password_env`` treats its value as the name of an environment variable
|
|
49
|
+
and ``password_eval`` executes its value as a shell command, both exposing a ``.password`` as the
|
|
50
|
+
expanded version.
|
|
51
|
+
|
|
52
|
+
The special ``.echo`` parameter can be set to ``true`` to enable verbose logging of all database
|
|
53
|
+
transactions. These will be emitted as ``INFO`` level messages.
|
|
54
|
+
|
|
55
|
+
See also the *database* section in the :ref:`configuration <config>` parameter reference.
|
|
56
|
+
|
|
57
|
+
-------------------
|
|
58
|
+
|
|
59
|
+
SQLite Pragmas
|
|
60
|
+
--------------
|
|
61
|
+
|
|
62
|
+
|
|
|
63
|
+
|
|
64
|
+
When using SQLite you can tune the underlying database connection with `pragmas
|
|
65
|
+
<https://sqlite.org/pragma.html>`_. Because pragmas apply per-connection and do not persist,
|
|
66
|
+
*HyperShell* re-applies them automatically every time it opens a connection. Specify them as a
|
|
67
|
+
``pragmas`` table within the ``[database]`` section:
|
|
68
|
+
|
|
69
|
+
.. admonition:: Configuration with SQLite pragmas
|
|
70
|
+
:class: note
|
|
71
|
+
|
|
72
|
+
.. code-block:: toml
|
|
73
|
+
|
|
74
|
+
[database]
|
|
75
|
+
file = "/var/lib/hypershell/main.db"
|
|
76
|
+
pragmas = {journal_mode = "wal", cache_size = 10000, busy_timeout = 5000}
|
|
77
|
+
|
|
78
|
+
Each entry is issued verbatim as ``PRAGMA <name>=<value>`` on connect. The example above is a good
|
|
79
|
+
general-purpose starting point for concurrent workflows: WAL journaling improves reader/writer
|
|
80
|
+
concurrency, a larger page cache reduces I/O, and a busy timeout lets writers wait briefly rather
|
|
81
|
+
than failing immediately when the database is momentarily locked.
|
|
82
|
+
|
|
83
|
+
Individual pragmas can also be set from the command line:
|
|
84
|
+
|
|
85
|
+
.. admonition:: Set a single pragma
|
|
86
|
+
:class: note
|
|
87
|
+
|
|
88
|
+
.. code-block:: shell
|
|
89
|
+
|
|
90
|
+
hs config set database.pragmas.journal_mode wal
|
|
91
|
+
|
|
92
|
+
.. note::
|
|
93
|
+
|
|
94
|
+
Running ``hs initdb`` (or launching with ``--initdb``) additionally performs a
|
|
95
|
+
``PRAGMA optimize``. This is safe to run routinely and helps SQLite keep its query-planner
|
|
96
|
+
statistics current. See `optimize <https://sqlite.org/pragma.html#pragma_optimize>`_ for details.
|
|
97
|
+
|
|
98
|
+
-------------------
|
|
99
|
+
|
|
100
|
+
Initialization
|
|
101
|
+
--------------
|
|
102
|
+
|
|
103
|
+
|
|
|
104
|
+
|
|
105
|
+
SQLite is automatically initialized upon opening the connection but
|
|
106
|
+
Postgres must be explicitly initialized via ``hs initdb`` or at launch with
|
|
107
|
+
the ``--initdb`` command-line option.
|
|
108
|
+
|
|
109
|
+
An existing database created by an earlier release is upgraded in place on first use,
|
|
110
|
+
for both SQLite and Postgres; there is no separate migration step. The upgrade only adds what
|
|
111
|
+
is missing (tables, columns, and indexes) and never drops or rewrites existing tasks. The one
|
|
112
|
+
removal is on Postgres, where the ``UNIQUE`` constraints on the retry-chain columns
|
|
113
|
+
(``previous_id`` and ``next_id``) are dropped. The upgrade holds an exclusive lock on the
|
|
114
|
+
tables while it adds columns and builds indexes, which can take minutes on a large database.
|
|
115
|
+
Processes started meanwhile wait for it, logging a line every 30 seconds, and then carry on.
|
|
116
|
+
If the lock is still held after 15 minutes (e.g., by a session left idle in a transaction), the
|
|
117
|
+
upgrade gives up with an error that names what it waited on and leaves the schema unchanged;
|
|
118
|
+
find and stop that session, then try again.
|
|
119
|
+
|
|
120
|
+
SQLite cannot drop a table constraint without rebuilding the table, so a SQLite database
|
|
121
|
+
created by an earlier release (2.8, or the 2.9.0a1 pre-release) keeps those ``UNIQUE``
|
|
122
|
+
constraints. This has no effect on behaviour in normal operation. It only matters in the rare cases where a failed task could be retried twice: two
|
|
123
|
+
servers running against one database (which is not supported), a server killed between
|
|
124
|
+
scheduling a retry and marking the original task as retried, or a task's ``retried`` flag reset
|
|
125
|
+
after the fact. In those cases an older SQLite database rejects the second retry with an error,
|
|
126
|
+
where a newer one records it.
|
|
127
|
+
|
|
128
|
+
See also the :ref:`command-line interface <cli_initdb>` for ``hs initdb``.
|
|
129
|
+
|
|
130
|
+
-------------------
|
|
131
|
+
|
|
132
|
+
TimescaleDB
|
|
133
|
+
-----------
|
|
134
|
+
|
|
135
|
+
|
|
|
136
|
+
|
|
137
|
+
`TimescaleDB <https://github.com/timescale/timescaledb>`_ is a PostgreSQL extension for
|
|
138
|
+
time-series data. It splits a large table into *chunks* by time (a *hypertable*) and can convert
|
|
139
|
+
older chunks into a compressed, column-oriented *columnstore*. A long-lived *HyperShell* database
|
|
140
|
+
fits this shape well: tasks arrive in time order, recent tasks are read and updated constantly,
|
|
141
|
+
and old tasks are kept for history but rarely touched.
|
|
142
|
+
|
|
143
|
+
Select it with the ``timescale`` provider (``timescaledb`` is an alias). It connects exactly like
|
|
144
|
+
PostgreSQL and needs both the ``postgres`` and the ``uuid7`` extras (see :ref:`install`).
|
|
145
|
+
|
|
146
|
+
.. admonition:: Install with TimescaleDB support
|
|
147
|
+
:class: note
|
|
148
|
+
|
|
149
|
+
.. code-block:: shell
|
|
150
|
+
|
|
151
|
+
uv tool install 'hypershell[postgres,uuid7]'
|
|
152
|
+
|
|
153
|
+
.. admonition:: Configuration file with TimescaleDB
|
|
154
|
+
:class: note
|
|
155
|
+
|
|
156
|
+
.. code-block:: toml
|
|
157
|
+
|
|
158
|
+
[database]
|
|
159
|
+
provider = "timescale"
|
|
160
|
+
database = "hypershell"
|
|
161
|
+
|
|
162
|
+
Then initialize the database with ``hs initdb``, or launch ``hs submit`` or ``hs cluster`` with
|
|
163
|
+
``--initdb``, which runs the same initialization. There is nothing else to run. ``hs server`` does
|
|
164
|
+
not initialize the database, even with ``--initdb``; run ``hs initdb`` before launching it.
|
|
165
|
+
|
|
166
|
+
|
|
|
167
|
+
|
|
168
|
+
What initialization does
|
|
169
|
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
|
170
|
+
|
|
171
|
+
Before it creates any table, ``hs initdb`` checks the server. The ``timescaledb`` extension must
|
|
172
|
+
be installed on the server; if it is not yet created in the database we create it (the
|
|
173
|
+
database owner may do so, no superuser needed). We fail with a message naming the problem and the fix,
|
|
174
|
+
and create nothing, when the server does not offer the extension, when the role may not create
|
|
175
|
+
it, when the server does not preload its library (``shared_preload_libraries``), or when the
|
|
176
|
+
extension is older than 2.22.0.
|
|
177
|
+
|
|
178
|
+
After the usual schema step, we bring the ``task`` table to its TimescaleDB shape:
|
|
179
|
+
|
|
180
|
+
* **Hypertable.** ``task`` becomes a hypertable partitioned by its ``id`` column, in chunks of
|
|
181
|
+
one week. The ``client`` and ``source`` tables stay plain tables.
|
|
182
|
+
* **Columnstore.** The columnstore is enabled, segmented by ``client_id`` and ordered by
|
|
183
|
+
``id DESC``, so a compressed chunk keeps each client's tasks together, newest first.
|
|
184
|
+
* **Policy.** A columnstore policy converts chunks older than four weeks.
|
|
185
|
+
|
|
186
|
+
This is equivalent to the following statements, which you therefore never need to run:
|
|
187
|
+
|
|
188
|
+
.. admonition:: What ``hs initdb`` does for you
|
|
189
|
+
:class: note
|
|
190
|
+
|
|
191
|
+
.. code-block:: sql
|
|
192
|
+
|
|
193
|
+
SELECT create_hypertable('task', by_range('id', INTERVAL '1 week'));
|
|
194
|
+
ALTER TABLE task SET (timescaledb.enable_columnstore = true,
|
|
195
|
+
timescaledb.segmentby = 'client_id',
|
|
196
|
+
timescaledb.orderby = 'id DESC');
|
|
197
|
+
CALL add_columnstore_policy('task', after => INTERVAL '4 weeks');
|
|
198
|
+
|
|
199
|
+
Each step is checked first and applied only where something is missing, so running
|
|
200
|
+
``hs initdb`` again, launching ``hs submit`` or ``hs cluster`` with ``--initdb`` every time, or
|
|
201
|
+
truncating the database with ``hs initdb --truncate`` always arrives at the same state, with one
|
|
202
|
+
policy. A database already in shape logs nothing. Initialization runs in one transaction,
|
|
203
|
+
serialized with the schema step, so concurrent launches are safe.
|
|
204
|
+
|
|
205
|
+
If someone changed the chunk interval, the columnstore settings, or the policy's interval by hand,
|
|
206
|
+
the next ``hs initdb`` puts them back to the configured values (see *Tuning* below) and logs each
|
|
207
|
+
change. A new chunk interval applies to new
|
|
208
|
+
chunks only, and new columnstore settings apply to chunks converted from then on; existing chunks
|
|
209
|
+
keep theirs (recompress them by hand if needed). Turning the columnstore off is never done for
|
|
210
|
+
you; ``hs initdb`` warns instead. If the policy's last run failed, ``hs initdb`` warns and points
|
|
211
|
+
to ``timescaledb_information.job_stats``.
|
|
212
|
+
|
|
213
|
+
Only ``hs initdb`` (with or without ``--truncate``), and ``hs submit`` or ``hs cluster`` launched
|
|
214
|
+
with ``--initdb``, run this initialization. Every other command, including ``hs server`` with or
|
|
215
|
+
without ``--initdb`` and ``hs submit`` or ``hs cluster`` without it, runs only the schema step, as
|
|
216
|
+
for PostgreSQL, and stops on a database that was never initialized. Run ``hs initdb`` after
|
|
217
|
+
upgrading *HyperShell* or TimescaleDB.
|
|
218
|
+
|
|
219
|
+
|
|
|
220
|
+
|
|
221
|
+
Tuning
|
|
222
|
+
^^^^^^
|
|
223
|
+
|
|
224
|
+
The defaults suit most sites; zero configuration is the norm. To change them, add a ``timescale``
|
|
225
|
+
table to the ``[database]`` section. Each key is optional and falls back to its default.
|
|
226
|
+
|
|
227
|
+
.. admonition:: Configuration file with TimescaleDB settings
|
|
228
|
+
:class: note
|
|
229
|
+
|
|
230
|
+
.. code-block:: toml
|
|
231
|
+
|
|
232
|
+
[database]
|
|
233
|
+
provider = "timescale"
|
|
234
|
+
database = "hypershell"
|
|
235
|
+
|
|
236
|
+
[database.timescale]
|
|
237
|
+
chunk_interval = "1 day"
|
|
238
|
+
compress_after = "2 weeks"
|
|
239
|
+
|
|
240
|
+
================== =============== ==========================================================
|
|
241
|
+
Key Default Meaning
|
|
242
|
+
================== =============== ==========================================================
|
|
243
|
+
``chunk_interval`` ``"1 week"`` Time span of each chunk of ``task``.
|
|
244
|
+
``columnstore`` ``true`` Enable the columnstore on ``task``.
|
|
245
|
+
``segmentby`` ``"client_id"`` Columns that group rows in a compressed chunk
|
|
246
|
+
(comma-separated task columns, each once, or ``""`` for none).
|
|
247
|
+
``orderby`` ``"id DESC"`` Order of rows in a compressed chunk
|
|
248
|
+
(``<column> [ASC|DESC] [NULLS FIRST|LAST]``, comma-separated,
|
|
249
|
+
each column once). TimescaleDB appends ``id DESC`` when
|
|
250
|
+
neither list names ``id``.
|
|
251
|
+
``policy`` ``true`` Keep a columnstore policy on ``task``.
|
|
252
|
+
``compress_after`` ``"4 weeks"`` Age at which the policy converts a chunk.
|
|
253
|
+
================== =============== ==========================================================
|
|
254
|
+
|
|
255
|
+
Intervals are a positive whole number and a unit, from ``microseconds`` to ``months``
|
|
256
|
+
(e.g., ``"12 hours"``). Columns are task columns by name, quoted for you where SQL needs it
|
|
257
|
+
(``group``, for instance). An invalid value, an unknown or repeated column, an unknown key, or
|
|
258
|
+
``policy = true`` with ``columnstore = false`` stops every command at startup with a message
|
|
259
|
+
naming the key. So does a column named in both ``segmentby`` and ``orderby``, defaults included,
|
|
260
|
+
since TimescaleDB cannot use one column for both segmenting and ordering:
|
|
261
|
+
``orderby = "client_id DESC"`` needs a ``segmentby`` without ``client_id``, and
|
|
262
|
+
``segmentby = "id"`` needs an ``orderby`` without ``id``.
|
|
263
|
+
|
|
264
|
+
Changes take effect at the next ``hs initdb``, which applies them as described above: a new
|
|
265
|
+
``chunk_interval`` applies to new chunks only, new ``segmentby`` or ``orderby`` to chunks converted
|
|
266
|
+
from then on, and a new ``compress_after`` replaces the policy. Setting ``policy = false`` removes
|
|
267
|
+
an existing policy. Setting ``columnstore = false`` (with ``policy = false``) stops ``hs initdb``
|
|
268
|
+
from enabling the columnstore, but does not disable one that is already on; it warns instead.
|
|
269
|
+
|
|
270
|
+
|
|
|
271
|
+
|
|
272
|
+
Why the task identifier is the partition key
|
|
273
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
274
|
+
|
|
275
|
+
With the ``uuid7`` extra, every task identifier is a
|
|
276
|
+
`UUIDv7 <https://www.rfc-editor.org/rfc/rfc9562#name-uuid-version-7>`_, whose leading 48 bits are
|
|
277
|
+
the time it was created, in milliseconds. Since TimescaleDB 2.22.0 a hypertable can be partitioned
|
|
278
|
+
directly by such a column: the timestamp inside the id decides the chunk. So the primary key
|
|
279
|
+
carries row identity, creation time, and chunk routing in one value, and we need no separate time
|
|
280
|
+
column. A lookup or update by ``id`` needs only one chunk, and a range of ids is a range of
|
|
281
|
+
time, which lets PostgreSQL skip every chunk outside it (*chunk exclusion*).
|
|
282
|
+
|
|
283
|
+
.. important::
|
|
284
|
+
|
|
285
|
+
**Every process that creates tasks needs the** ``uuid7`` **extra**, not only the server:
|
|
286
|
+
anything running ``hs submit``, ``hs cluster`` or ``hsx``, or using the library to submit
|
|
287
|
+
tasks. TimescaleDB routes each row by the timestamp inside its id and rejects any other UUID
|
|
288
|
+
version: inserting a UUIDv4 fails with SQLSTATE ``0A000`` (``... is not a version 7 UUID``),
|
|
289
|
+
and the error aborts the whole ``INSERT``, so one bad id loses the entire bundle of tasks
|
|
290
|
+
submitted with it. *HyperShell* refuses to start under the ``timescale`` provider without
|
|
291
|
+
the extra.
|
|
292
|
+
|
|
293
|
+
|
|
|
294
|
+
|
|
295
|
+
Support matrix
|
|
296
|
+
^^^^^^^^^^^^^^
|
|
297
|
+
|
|
298
|
+
===================== =============================================================================
|
|
299
|
+
TimescaleDB Behavior
|
|
300
|
+
===================== =============================================================================
|
|
301
|
+
before 2.22.0 ``hs initdb`` fails: partitioning by a UUIDv7 column is not available.
|
|
302
|
+
2.22.0 – 2.24.x Hypertable and columnstore; **no policy**. These releases accept the policy,
|
|
303
|
+
but every run of it fails on a UUID-partitioned table, so we skip it and warn.
|
|
304
|
+
2.25.0 and later Everything above. Tested in CI on 2.31.0 (and on 2.24.0 for the gate).
|
|
305
|
+
===================== =============================================================================
|
|
306
|
+
|
|
307
|
+
Current TimescaleDB releases support PostgreSQL 16, 17 and 18 (2.29.0 dropped PostgreSQL 15).
|
|
308
|
+
|
|
309
|
+
TimescaleDB comes in two editions, and ``hs initdb`` reads which one the server runs
|
|
310
|
+
(``timescaledb.license``):
|
|
311
|
+
|
|
312
|
+
* **Community** (``timescaledb.license = 'timescale'``, the Timescale License): everything above.
|
|
313
|
+
This is what the official ``timescale/timescaledb`` container images and the TimescaleDB
|
|
314
|
+
packages ship.
|
|
315
|
+
* **Apache** (``timescaledb.license = 'apache'``, Apache-2.0 only, e.g. the ``-oss`` images):
|
|
316
|
+
hypertables, but no columnstore and no policy. We create the hypertable and skip the rest, with
|
|
317
|
+
a warning each time.
|
|
318
|
+
|
|
319
|
+
Where you run PostgreSQL matters. Self-hosted servers can use the official packages or container
|
|
320
|
+
images. *Tiger Cloud* is the managed service from the makers of TimescaleDB. Several other
|
|
321
|
+
managed PostgreSQL offerings do not ship the extension at all, and some ship only the Apache
|
|
322
|
+
edition (as of August 2026); check your provider's list of extensions before choosing the
|
|
323
|
+
``timescale`` provider there.
|
|
324
|
+
|
|
325
|
+
The project's naming has moved over time: *TimescaleDB* is the extension; the company, formerly
|
|
326
|
+
Timescale, is *TigerData* since 2025; and *Tiger Cloud* is its managed service.
|
|
327
|
+
|
|
328
|
+
|
|
|
329
|
+
|
|
330
|
+
Querying by time
|
|
331
|
+
^^^^^^^^^^^^^^^^
|
|
332
|
+
|
|
333
|
+
TimescaleDB adds functions for UUIDv7 values (since 2.22.0). To filter tasks by time, compare the
|
|
334
|
+
``id`` against a boundary id built from a timestamp with ``to_uuidv7_boundary()``. To show when a
|
|
335
|
+
task was created, read the timestamp back out with ``uuid_timestamp()``.
|
|
336
|
+
|
|
337
|
+
.. admonition:: Tasks created in the last day, with their creation time
|
|
338
|
+
:class: note
|
|
339
|
+
|
|
340
|
+
.. code-block:: sql
|
|
341
|
+
|
|
342
|
+
SELECT uuid_timestamp(id) AS created, args, exit_status
|
|
343
|
+
FROM task
|
|
344
|
+
WHERE id >= to_uuidv7_boundary(now() - INTERVAL '1 day')
|
|
345
|
+
ORDER BY id;
|
|
346
|
+
|
|
347
|
+
.. warning::
|
|
348
|
+
|
|
349
|
+
Filter on ``id`` itself, as above. A predicate on a function of the id, such as
|
|
350
|
+
``WHERE uuid_timestamp(id) > now() - INTERVAL '1 day'``, cannot use chunk exclusion and scans
|
|
351
|
+
every chunk, compressed ones included.
|
|
352
|
+
|
|
353
|
+
|
|
|
354
|
+
|
|
355
|
+
Background workers
|
|
356
|
+
^^^^^^^^^^^^^^^^^^
|
|
357
|
+
|
|
358
|
+
Policies run as TimescaleDB background jobs. The server needs one worker for the launcher, one
|
|
359
|
+
scheduler for each database that has the extension, and one more for each job while it runs, all
|
|
360
|
+
counted against ``timescaledb.max_background_workers`` (default 16), which in turn must fit within
|
|
361
|
+
PostgreSQL's ``max_worker_processes``. When the workers run out, a database's scheduler does not
|
|
362
|
+
start and its policies silently never run: the server log notes it once, and ``hs initdb`` cannot
|
|
363
|
+
see it. If many databases on one server use the extension, raise
|
|
364
|
+
``timescaledb.max_background_workers`` (and ``max_worker_processes``) and restart the server. See
|
|
365
|
+
the TimescaleDB documentation on configuring background workers.
|
|
366
|
+
|
|
367
|
+
|
|
|
368
|
+
|
|
369
|
+
Converting an existing table
|
|
370
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
371
|
+
|
|
372
|
+
``hs initdb`` converts ``task`` only while it is empty. A plain ``task`` table that already holds
|
|
373
|
+
tasks (for example, a database created by an earlier release, or under the ``postgres`` provider)
|
|
374
|
+
is left as it is: ``hs initdb`` succeeds, upgrades the schema, and warns. Everything keeps working
|
|
375
|
+
on the plain table.
|
|
376
|
+
|
|
377
|
+
To convert it yourself, stop every *HyperShell* process using the database and run:
|
|
378
|
+
|
|
379
|
+
.. admonition:: Convert a populated task table by hand
|
|
380
|
+
:class: note
|
|
381
|
+
|
|
382
|
+
.. code-block:: sql
|
|
383
|
+
|
|
384
|
+
SELECT create_hypertable('task', by_range('id', INTERVAL '1 week'),
|
|
385
|
+
create_default_indexes => false, migrate_data => true);
|
|
386
|
+
|
|
387
|
+
then run ``hs initdb`` to add the columnstore and its policy. Be aware that:
|
|
388
|
+
|
|
389
|
+
* It copies every row into chunks in a single transaction, holding an exclusive lock on ``task``
|
|
390
|
+
throughout; on a large table this takes a long time and needs room for a second copy.
|
|
391
|
+
* It aborts, converting nothing, if any task id is not a UUIDv7. Databases written without the
|
|
392
|
+
``uuid7`` extra (e.g., by releases before 2.9 with only the ``postgres`` extra) hold UUIDv4 ids
|
|
393
|
+
and cannot be converted in place; start a new database instead.
|
|
394
|
+
|
|
395
|
+
|
|
|
396
|
+
|
|
397
|
+
Beyond the defaults
|
|
398
|
+
^^^^^^^^^^^^^^^^^^^
|
|
399
|
+
|
|
400
|
+
We set up only what every *HyperShell* database benefits from. Data retention and continuous
|
|
401
|
+
aggregates are left to you, through TimescaleDB directly. On a hypertable partitioned by a UUIDv7
|
|
402
|
+
column, as ``task`` is, these need a newer TimescaleDB than the 2.22.0 floor:
|
|
403
|
+
|
|
404
|
+
* ``show_chunks`` and ``drop_chunks`` given a time or an interval (``older_than``,
|
|
405
|
+
``newer_than``): 2.23.0 (`#8746 <https://github.com/timescale/timescaledb/pull/8746>`_).
|
|
406
|
+
* Continuous aggregates: 2.24.0
|
|
407
|
+
(`#8939 <https://github.com/timescale/timescaledb/pull/8939>`_).
|
|
408
|
+
* Retention policies (``add_retention_policy``): 2.25.0
|
|
409
|
+
(`#9102 <https://github.com/timescale/timescaledb/pull/9102>`_).
|
|
410
|
+
|
|
411
|
+
See the TimescaleDB
|
|
412
|
+
`changelog <https://github.com/timescale/timescaledb/blob/main/CHANGELOG.md>`_ for these releases.
|
|
@@ -37,6 +37,12 @@ local account authentication simply needs to know the database name.
|
|
|
37
37
|
provider = "postgres"
|
|
38
38
|
database = "hypershell"
|
|
39
39
|
|
|
40
|
+
With the ``timescale`` provider (alias ``timescaledb``) the database is PostgreSQL with the
|
|
41
|
+
TimescaleDB extension, and ``hs initdb`` also makes the ``task`` table a hypertable partitioned by
|
|
42
|
+
its UUIDv7 ``id``, with columnstore compression and a policy where the server's TimescaleDB edition
|
|
43
|
+
and version support them. Every process that submits tasks then needs the ``uuid7`` extra.
|
|
44
|
+
See the TimescaleDB section of the database documentation.
|
|
45
|
+
|
|
40
46
|
The ``port`` is assumed to be 5432 but can be specified. If a ``user`` is given then so too must
|
|
41
47
|
a ``password``. The default `public` schema is assumed but can also be specified. Anything else
|
|
42
48
|
is forwarded to the database as a connection parameter; e.g., ``encoding = "utf-8"``.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Launch server, schedule directly or asynchronously from database.
|
|
2
2
|
|
|
3
|
-
The server includes a scheduler component that pulls tasks from the database and
|
|
4
|
-
them
|
|
3
|
+
The server includes a scheduler component that pulls tasks from the database and stages them
|
|
4
|
+
for clients, which request bundles of them when they are ready for work. It also has a receiver that collects the results
|
|
5
5
|
of finished tasks. Optionally, the server can submit tasks (*FILE*). When submitting tasks,
|
|
6
6
|
the ``-w``/``--bundlewait`` and ``-b``/``--bundlesize`` options are the same as for the
|
|
7
7
|
*submit* workflow.
|
|
@@ -9,5 +9,6 @@ the ``-w``/``--bundlewait`` and ``-b``/``--bundlesize`` options are the same as
|
|
|
9
9
|
With ``--max-retries`` greater than zero, the scheduler will check for a non-zero exit status
|
|
10
10
|
for tasks and re-submit them if their previous number of attempts is less.
|
|
11
11
|
|
|
12
|
-
Tasks are bundled
|
|
13
|
-
is one, meaning that at small scales there is
|
|
12
|
+
Tasks are bundled for each client at the size it asks for, or at the server's ``-b``/``--bundlesize``
|
|
13
|
+
when it asks for none. By default the bundle size is one, meaning that at small scales there is
|
|
14
|
+
greater concurrency.
|
|
@@ -32,7 +32,8 @@ Options
|
|
|
32
32
|
The default value allows for greater concurrency and responsiveness on small scales. This is
|
|
33
33
|
used by the `submit` thread to accumulate bundles for either database commits and/or publishing
|
|
34
34
|
to the queue. If a database is in use, the scheduler thread selects tasks from the database in
|
|
35
|
-
batches of this size.
|
|
35
|
+
batches of this size. It is also the size of the bundle given to a client that advertises no
|
|
36
|
+
size of its own (a client's ``-b`` is its advertised size).
|
|
36
37
|
|
|
37
38
|
Using larger bundles is a good idea for large distributed workflows; specifically, it is best
|
|
38
39
|
to coordinate bundle size with the number of executors in use by each client.
|
|
@@ -5,7 +5,8 @@ If a single positional argument refers to a non-executable file path,
|
|
|
5
5
|
tasks will be read from the file, one per line (use ``-f``/``--task-file`` to be explicit).
|
|
6
6
|
|
|
7
7
|
Tasks are accumulated and published in bundles to the database by default.
|
|
8
|
-
With ``-q``/``--queue``, tasks are submitted directly to a live queue, bypassing the database
|
|
8
|
+
With ``-q``/``--queue``, tasks are submitted directly to a live queue, bypassing the database;
|
|
9
|
+
the server must be running without a database (``--no-db``).
|
|
9
10
|
The ``-b``/``--bundlesize`` and ``-w``/``--bundlewait`` options control the
|
|
10
11
|
size of these bundles and how long to wait before flushing tasks regardless of
|
|
11
12
|
how many have accumulated.
|
|
@@ -44,6 +44,9 @@ Options
|
|
|
44
44
|
scheduling. This bypasses the database entirely, which is useful for transient
|
|
45
45
|
workflows or when a database is not configured.
|
|
46
46
|
|
|
47
|
+
The server must be running without a database (``--no-db``). A server with a database
|
|
48
|
+
schedules only from it, so it refuses the submission and the command exits with an error.
|
|
49
|
+
|
|
47
50
|
Requires ``-H``, ``-p``, and ``-k`` options to specify the server connection.
|
|
48
51
|
|
|
49
52
|
``-H``, ``--host`` *ADDR*
|
|
@@ -118,6 +121,14 @@ Options
|
|
|
118
121
|
All tasks default to group 0 for backwards compatibility. Users can organize tasks into
|
|
119
122
|
multiple groups (e.g., 0, 1, 2, ...) where lower-numbered groups execute first.
|
|
120
123
|
|
|
124
|
+
``--zone`` *NAME*
|
|
125
|
+
Zone of the submitted tasks (default: none, the reserved default zone).
|
|
126
|
+
|
|
127
|
+
Only a client launched with the same ``--zone`` runs these tasks; a client given no
|
|
128
|
+
``--zone`` runs only tasks without one. Zone names are arbitrary text (``default`` names the
|
|
129
|
+
default zone). Zones are recorded in the database, so ``--zone`` cannot be used with
|
|
130
|
+
``--queue``. Zone is placement only: task groups still run in order across all zones.
|
|
131
|
+
|
|
121
132
|
``--initdb``
|
|
122
133
|
Auto-initialize database.
|
|
123
134
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
``hs`` ``submit`` ``[-h]`` ``[ARGS... | -f FILE | --from-json SPEC]``
|
|
2
2
|
``[-q [-H ADDR] [-p NUM] [-k KEY] | --initdb]``
|
|
3
3
|
``[-b NUM]`` ``[-w SEC]`` ``[-c NUM]`` ``[-m MEM]`` ``[-W SEC]`` ``[-g NUM]``
|
|
4
|
-
``[--repeat | --update]`` ``[--template CMD]`` ``[-t TAG...]``
|
|
4
|
+
``[--repeat | --update]`` ``[--template CMD]`` ``[-t TAG...]`` ``[--zone NAME]``
|
|
5
5
|
``[--no-tls | [--tls-ca PATH] [--tls-cert PATH] [--tls-key PATH]]``
|