taskfile 0.3.76__tar.gz → 0.3.78__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.
- taskfile-0.3.78/LICENSE +201 -0
- {taskfile-0.3.76/src/taskfile.egg-info → taskfile-0.3.78}/PKG-INFO +1 -1
- {taskfile-0.3.76 → taskfile-0.3.78}/pyproject.toml +1 -1
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/__init__.py +1 -1
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/api/app.py +1 -19
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/interactive/wizards.py +1 -19
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/deploy_recipes.py +83 -12
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/diagnostics/__init__.py +56 -2
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/diagnostics/checks.py +293 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/diagnostics/checks_ssh.py +36 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/diagnostics/llm_repair.py +0 -46
- taskfile-0.3.78/src/taskfile/models/__init__.py +29 -0
- taskfile-0.3.76/src/taskfile/models.py → taskfile-0.3.78/src/taskfile/models/config.py +4 -237
- taskfile-0.3.78/src/taskfile/models/environment.py +107 -0
- taskfile-0.3.78/src/taskfile/models/pipeline.py +81 -0
- taskfile-0.3.78/src/taskfile/models/task.py +68 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/quadlet.py +60 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/runner/__init__.py +5 -1
- taskfile-0.3.78/src/taskfile/runner/classifier.py +147 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/runner/commands.py +49 -46
- {taskfile-0.3.76 → taskfile-0.3.78/src/taskfile.egg-info}/PKG-INFO +1 -1
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile.egg-info/SOURCES.txt +10 -1
- taskfile-0.3.78/tests/test_classifier.py +290 -0
- taskfile-0.3.78/tests/test_deploy_validation.py +255 -0
- taskfile-0.3.78/tests/test_doctor_decomposition.py +191 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_doctor_e2e.py +0 -212
- taskfile-0.3.78/tests/test_graceful_restart.py +259 -0
- taskfile-0.3.76/LICENSE +0 -21
- {taskfile-0.3.76 → taskfile-0.3.78}/README.md +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/setup.cfg +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/__main__.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/addons/__init__.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/addons/monitoring.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/addons/postgres.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/addons/redis_addon.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/api/__init__.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/api/models.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cache.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cigen/__init__.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cigen/base.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cigen/drone.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cigen/gitea.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cigen/github.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cigen/gitlab.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cigen/jenkins.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cigen/makefile.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cirunner.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/__init__.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/api_cmd.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/auth.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/cache_cmds.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/ci.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/click_compat.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/completion.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/deploy.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/diagnostics.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/docker_cmds.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/e2e_cmd.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/explain_cmd.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/fleet.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/health.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/import_export.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/info_cmd.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/interactive/__init__.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/interactive/menu.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/main.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/quadlet.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/registry_cmds.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/release.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/setup.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/cli/version.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/compose.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/converters.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/deploy_utils.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/diagnostics/checks_ports.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/diagnostics/fixes.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/diagnostics/models.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/diagnostics/report.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/fleet.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/graph.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/health.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/importer.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/landing.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/notifications.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/parser.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/provisioner.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/registry.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/runner/core.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/runner/error_presenter.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/runner/explainer.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/runner/functions.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/runner/resolver.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/runner/ssh.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/__init__.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/codereview.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/full.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/minimal.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/multiplatform.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/podman.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/publish.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/templates/codereview.yml +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/templates/full.yml +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/templates/iot.yml +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/templates/kubernetes.yml +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/templates/minimal.yml +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/templates/multiplatform.yml +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/templates/podman.yml +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/templates/publish.yml +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/templates/saas.yml +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/templates/terraform.yml +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/templates/web.yml +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/scaffold/web.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/ssh.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/watch.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/webui/__init__.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/webui/dashboard.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/webui/handlers.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile/webui/server.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile.egg-info/dependency_links.txt +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile.egg-info/entry_points.txt +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile.egg-info/requires.txt +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/src/taskfile.egg-info/top_level.txt +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_api.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_auth.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_cigen.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_cli.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_compose.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_diagnostics.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_docker_e2e.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_dsl_commands.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_e2e_examples.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_fleet.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_health.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_landing.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_models.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_parser.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_provisioner.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_quadlet.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_release.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_resolver.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_runner.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_scaffold.py +0 -0
- {taskfile-0.3.76 → taskfile-0.3.78}/tests/test_setup.py +0 -0
taskfile-0.3.78/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: taskfile
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.78
|
|
4
4
|
Summary: Universal Taskfile runner with multi-environment deploy support. CI/CD agnostic — run locally or from any pipeline.
|
|
5
5
|
Author-email: Tom Sapletta <tom@sapletta.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "taskfile"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.78"
|
|
8
8
|
description = "Universal Taskfile runner with multi-environment deploy support. CI/CD agnostic — run locally or from any pipeline."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "Apache-2.0"
|
|
@@ -568,25 +568,7 @@ def _run_doctor(
|
|
|
568
568
|
|
|
569
569
|
diagnostics = ProjectDiagnostics()
|
|
570
570
|
|
|
571
|
-
|
|
572
|
-
diagnostics.check_preflight()
|
|
573
|
-
# Layer 2: Validation
|
|
574
|
-
diagnostics.check_taskfile()
|
|
575
|
-
# Layer 3: Diagnostics
|
|
576
|
-
diagnostics.check_env_files()
|
|
577
|
-
diagnostics.validate_taskfile_variables()
|
|
578
|
-
diagnostics.check_placeholder_values()
|
|
579
|
-
diagnostics.check_dependent_files()
|
|
580
|
-
diagnostics.check_ports()
|
|
581
|
-
diagnostics.check_docker()
|
|
582
|
-
diagnostics.check_registry_access()
|
|
583
|
-
diagnostics.check_ssh_keys()
|
|
584
|
-
diagnostics.check_git()
|
|
585
|
-
# Layer 3+: verbose checks
|
|
586
|
-
if verbose:
|
|
587
|
-
diagnostics.check_task_commands()
|
|
588
|
-
diagnostics.check_ssh_connectivity()
|
|
589
|
-
diagnostics.check_remote_health()
|
|
571
|
+
diagnostics.run_all_checks(verbose=verbose)
|
|
590
572
|
|
|
591
573
|
# Layer 4: Auto-fix
|
|
592
574
|
fixed_count = 0
|
|
@@ -264,25 +264,7 @@ curl -X POST http://localhost:8000/doctor -H "Content-Type: application/json" \
|
|
|
264
264
|
))
|
|
265
265
|
|
|
266
266
|
with console.status("[bold green]Checking project...[/]" if not remote else "[bold green]Checking remote server...[/]") if not report else _nullcontext():
|
|
267
|
-
|
|
268
|
-
diagnostics.check_preflight()
|
|
269
|
-
# Layer 2: Validation
|
|
270
|
-
diagnostics.check_taskfile()
|
|
271
|
-
# Layer 3: Diagnostics
|
|
272
|
-
diagnostics.check_env_files()
|
|
273
|
-
diagnostics.validate_taskfile_variables()
|
|
274
|
-
diagnostics.check_placeholder_values()
|
|
275
|
-
diagnostics.check_dependent_files()
|
|
276
|
-
diagnostics.check_ports()
|
|
277
|
-
diagnostics.check_docker()
|
|
278
|
-
diagnostics.check_registry_access()
|
|
279
|
-
diagnostics.check_ssh_keys()
|
|
280
|
-
diagnostics.check_git()
|
|
281
|
-
# Layer 3+: Task command checks and remote health (if verbose or remote)
|
|
282
|
-
if verbose or remote:
|
|
283
|
-
diagnostics.check_task_commands()
|
|
284
|
-
diagnostics.check_ssh_connectivity()
|
|
285
|
-
diagnostics.check_remote_health()
|
|
267
|
+
diagnostics.run_all_checks(verbose=verbose, remote=remote)
|
|
286
268
|
# Remote-only: extended remote diagnostics
|
|
287
269
|
if remote:
|
|
288
270
|
_run_remote_diagnostics(diagnostics)
|
|
@@ -41,6 +41,7 @@ def expand_deploy_recipe(deploy_section: dict[str, Any], variables: dict[str, st
|
|
|
41
41
|
health_retries = deploy_section.get("health_retries", 5)
|
|
42
42
|
health_delay = deploy_section.get("health_delay", 5)
|
|
43
43
|
rollback_mode = deploy_section.get("rollback", "manual") # auto | manual
|
|
44
|
+
restart_delay = deploy_section.get("restart_delay", 3) # seconds between stop→start
|
|
44
45
|
tag_var = "${TAG}"
|
|
45
46
|
|
|
46
47
|
tasks: dict[str, dict] = {}
|
|
@@ -86,16 +87,34 @@ def expand_deploy_recipe(deploy_section: dict[str, Any], variables: dict[str, st
|
|
|
86
87
|
"cmds": [f"echo 'All images pushed to {registry}'"],
|
|
87
88
|
}
|
|
88
89
|
|
|
90
|
+
# ── Validate deploy artifacts (pre-deploy gate) ──
|
|
91
|
+
tasks["validate-deploy"] = {
|
|
92
|
+
"desc": "Validate deploy artifacts — check for unresolved variables and placeholders",
|
|
93
|
+
"tags": ["ci", "validate"],
|
|
94
|
+
"silent": True,
|
|
95
|
+
"cmds": [
|
|
96
|
+
'@python from taskfile.diagnostics.checks import check_deploy_artifacts; '
|
|
97
|
+
'from taskfile.parser import find_taskfile, load_taskfile; '
|
|
98
|
+
'cfg = load_taskfile(find_taskfile()); '
|
|
99
|
+
'issues = check_deploy_artifacts(cfg); '
|
|
100
|
+
'[print(f"ERROR: {i.message}") for i in issues if i.severity == "error"]; '
|
|
101
|
+
'[print(f"WARN: {i.message}") for i in issues]; '
|
|
102
|
+
'exit(1) if any(i.severity == "error" for i in issues) else None',
|
|
103
|
+
],
|
|
104
|
+
}
|
|
105
|
+
|
|
89
106
|
# ── Deploy task (strategy-specific) ──
|
|
90
107
|
push_dep = "push-all" if len(images) > 1 else f"push-{list(images)[0]}" if images else None
|
|
91
|
-
deploy_deps = [
|
|
108
|
+
deploy_deps = ["validate-deploy"]
|
|
109
|
+
if push_dep:
|
|
110
|
+
deploy_deps.insert(0, push_dep)
|
|
92
111
|
|
|
93
112
|
if strategy == "compose":
|
|
94
113
|
tasks["deploy"] = _compose_deploy(deploy_deps)
|
|
95
114
|
elif strategy == "quadlet":
|
|
96
|
-
tasks["deploy"] = _quadlet_deploy(deploy_deps, images, registry, tag_var)
|
|
115
|
+
tasks["deploy"] = _quadlet_deploy(deploy_deps, images, registry, tag_var, restart_delay)
|
|
97
116
|
elif strategy == "ssh-push":
|
|
98
|
-
tasks["deploy"] = _ssh_push_deploy(deploy_deps, images, registry, tag_var)
|
|
117
|
+
tasks["deploy"] = _ssh_push_deploy(deploy_deps, images, registry, tag_var, restart_delay)
|
|
99
118
|
else:
|
|
100
119
|
tasks["deploy"] = _compose_deploy(deploy_deps)
|
|
101
120
|
|
|
@@ -111,6 +130,16 @@ def expand_deploy_recipe(deploy_section: dict[str, Any], variables: dict[str, st
|
|
|
111
130
|
],
|
|
112
131
|
}
|
|
113
132
|
|
|
133
|
+
# ── Post-deploy health gate ──
|
|
134
|
+
tasks["post-deploy"] = {
|
|
135
|
+
"desc": "Post-deploy health gate — verify all services are healthy after deploy",
|
|
136
|
+
"tags": ["deploy", "health"],
|
|
137
|
+
"silent": True,
|
|
138
|
+
"retries": health_retries,
|
|
139
|
+
"retry_delay": health_delay,
|
|
140
|
+
"cmds": _post_deploy_health_cmds(images, health_check, registry, tag_var),
|
|
141
|
+
}
|
|
142
|
+
|
|
114
143
|
# ── Rollback ──
|
|
115
144
|
if images:
|
|
116
145
|
rollback_cmds = []
|
|
@@ -118,7 +147,9 @@ def expand_deploy_recipe(deploy_section: dict[str, Any], variables: dict[str, st
|
|
|
118
147
|
image_var = f"{registry}/{svc_name}:{tag_var}"
|
|
119
148
|
rollback_cmds.append(f"@remote podman pull {image_var}")
|
|
120
149
|
for svc_name in images:
|
|
121
|
-
rollback_cmds.
|
|
150
|
+
rollback_cmds.extend(
|
|
151
|
+
_graceful_restart_cmds(svc_name, restart_delay)
|
|
152
|
+
)
|
|
122
153
|
tasks["rollback"] = {
|
|
123
154
|
"desc": "Rollback to specified version (--var TAG=<prev>)",
|
|
124
155
|
"tags": ["deploy", "rollback"],
|
|
@@ -128,6 +159,38 @@ def expand_deploy_recipe(deploy_section: dict[str, Any], variables: dict[str, st
|
|
|
128
159
|
return tasks
|
|
129
160
|
|
|
130
161
|
|
|
162
|
+
def _graceful_restart_cmds(svc_name: str, restart_delay: int = 3) -> list[str]:
|
|
163
|
+
"""Generate graceful restart commands for a single service.
|
|
164
|
+
|
|
165
|
+
Pattern: stop → sleep(delay) → start
|
|
166
|
+
This avoids the hard restart that causes dropped connections.
|
|
167
|
+
The delay allows in-flight requests to complete.
|
|
168
|
+
"""
|
|
169
|
+
return [
|
|
170
|
+
f"@remote systemctl --user stop ${{APP_NAME}}-{svc_name}",
|
|
171
|
+
f"sleep {restart_delay}",
|
|
172
|
+
f"@remote systemctl --user start ${{APP_NAME}}-{svc_name}",
|
|
173
|
+
]
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
def _post_deploy_health_cmds(
|
|
177
|
+
images: dict, health_check: str, registry: str, tag_var: str,
|
|
178
|
+
) -> list[str]:
|
|
179
|
+
"""Generate post-deploy health verification commands."""
|
|
180
|
+
cmds: list[str] = []
|
|
181
|
+
# Check each service container is running
|
|
182
|
+
for svc_name in images:
|
|
183
|
+
cmds.append(
|
|
184
|
+
f"@remote systemctl --user is-active --quiet ${{APP_NAME}}-{svc_name} "
|
|
185
|
+
f"&& echo '{svc_name}: running' || (echo '{svc_name}: NOT RUNNING' && exit 1)"
|
|
186
|
+
)
|
|
187
|
+
# Check HTTP health endpoint
|
|
188
|
+
cmds.append(
|
|
189
|
+
f"curl -sf https://${{DOMAIN}}{health_check} && echo 'Health: OK' || exit 1"
|
|
190
|
+
)
|
|
191
|
+
return cmds
|
|
192
|
+
|
|
193
|
+
|
|
131
194
|
def _compose_deploy(deps: list[str]) -> dict:
|
|
132
195
|
"""Generate compose-based deploy task."""
|
|
133
196
|
return {
|
|
@@ -143,8 +206,11 @@ def _compose_deploy(deps: list[str]) -> dict:
|
|
|
143
206
|
}
|
|
144
207
|
|
|
145
208
|
|
|
146
|
-
def _quadlet_deploy(
|
|
147
|
-
|
|
209
|
+
def _quadlet_deploy(
|
|
210
|
+
deps: list[str], images: dict, registry: str, tag_var: str,
|
|
211
|
+
restart_delay: int = 3,
|
|
212
|
+
) -> dict:
|
|
213
|
+
"""Generate Quadlet-based deploy task with graceful restart."""
|
|
148
214
|
cmds = [
|
|
149
215
|
"taskfile quadlet generate",
|
|
150
216
|
"taskfile quadlet upload",
|
|
@@ -153,12 +219,13 @@ def _quadlet_deploy(deps: list[str], images: dict, registry: str, tag_var: str)
|
|
|
153
219
|
for svc_name in images:
|
|
154
220
|
image_var = f"{registry}/{svc_name}:{tag_var}"
|
|
155
221
|
cmds.append(f"@remote podman pull {image_var}")
|
|
222
|
+
# Graceful restart: stop → delay → start (one service at a time)
|
|
156
223
|
for svc_name in images:
|
|
157
|
-
cmds.
|
|
224
|
+
cmds.extend(_graceful_restart_cmds(svc_name, restart_delay))
|
|
158
225
|
cmds.append("@remote podman image prune -f")
|
|
159
226
|
|
|
160
227
|
return {
|
|
161
|
-
"desc": "Deploy via Podman Quadlet (generate → upload → pull → restart)",
|
|
228
|
+
"desc": "Deploy via Podman Quadlet (generate → upload → pull → graceful restart)",
|
|
162
229
|
"deps": deps,
|
|
163
230
|
"tags": ["ci", "deploy"],
|
|
164
231
|
"retries": 2,
|
|
@@ -168,18 +235,22 @@ def _quadlet_deploy(deps: list[str], images: dict, registry: str, tag_var: str)
|
|
|
168
235
|
}
|
|
169
236
|
|
|
170
237
|
|
|
171
|
-
def _ssh_push_deploy(
|
|
172
|
-
|
|
238
|
+
def _ssh_push_deploy(
|
|
239
|
+
deps: list[str], images: dict, registry: str, tag_var: str,
|
|
240
|
+
restart_delay: int = 3,
|
|
241
|
+
) -> dict:
|
|
242
|
+
"""Generate simple SSH pull+graceful restart deploy task."""
|
|
173
243
|
cmds = []
|
|
174
244
|
for svc_name in images:
|
|
175
245
|
image_var = f"{registry}/{svc_name}:{tag_var}"
|
|
176
246
|
cmds.append(f"@remote podman pull {image_var}")
|
|
247
|
+
# Graceful restart: stop → delay → start (one service at a time)
|
|
177
248
|
for svc_name in images:
|
|
178
|
-
cmds.
|
|
249
|
+
cmds.extend(_graceful_restart_cmds(svc_name, restart_delay))
|
|
179
250
|
cmds.append("@remote podman image prune -f")
|
|
180
251
|
|
|
181
252
|
return {
|
|
182
|
-
"desc": "Deploy via SSH (pull + restart)",
|
|
253
|
+
"desc": "Deploy via SSH (pull + graceful restart)",
|
|
183
254
|
"deps": deps,
|
|
184
255
|
"tags": ["ci", "deploy"],
|
|
185
256
|
"retries": 1,
|
|
@@ -31,6 +31,9 @@ from taskfile.diagnostics.checks import (
|
|
|
31
31
|
check_task_commands,
|
|
32
32
|
check_examples,
|
|
33
33
|
check_placeholder_values,
|
|
34
|
+
check_deploy_artifacts,
|
|
35
|
+
_check_ufw_forward_policy,
|
|
36
|
+
_check_container_dns,
|
|
34
37
|
validate_before_run,
|
|
35
38
|
)
|
|
36
39
|
from taskfile.diagnostics.fixes import apply_fixes, apply_single_fix
|
|
@@ -168,10 +171,60 @@ class ProjectDiagnostics:
|
|
|
168
171
|
if config:
|
|
169
172
|
self._add_issues(check_remote_health(config))
|
|
170
173
|
|
|
174
|
+
def check_deploy_artifacts(self) -> None:
|
|
175
|
+
"""Scan deploy/ directory for unresolved variables and placeholders."""
|
|
176
|
+
config = self._load_config()
|
|
177
|
+
if config:
|
|
178
|
+
self._add_issues(check_deploy_artifacts(config))
|
|
179
|
+
|
|
180
|
+
def check_ufw_forward_policy(self) -> None:
|
|
181
|
+
"""Check if UFW default FORWARD policy is set to ACCEPT (needed for containers)."""
|
|
182
|
+
self._add_issues(_check_ufw_forward_policy())
|
|
183
|
+
|
|
184
|
+
def check_container_dns(self) -> None:
|
|
185
|
+
"""Check if Podman bridge network DNS resolves external domains."""
|
|
186
|
+
self._add_issues(_check_container_dns())
|
|
187
|
+
|
|
188
|
+
# ─── Composite pipelines ───
|
|
189
|
+
|
|
190
|
+
def run_all_checks(self, *, verbose: bool = False, remote: bool = False) -> None:
|
|
191
|
+
"""Run Layers 1-3 checks — single entry point for doctor pipeline.
|
|
192
|
+
|
|
193
|
+
This replaces the duplicated check sequences in wizards.py and api/app.py.
|
|
194
|
+
|
|
195
|
+
Args:
|
|
196
|
+
verbose: Include expensive checks (task commands, SSH connectivity, remote health)
|
|
197
|
+
remote: Include container infrastructure checks (UFW, DNS)
|
|
198
|
+
"""
|
|
199
|
+
# Layer 1: Preflight
|
|
200
|
+
self.check_preflight()
|
|
201
|
+
# Layer 2: Validation
|
|
202
|
+
self.check_taskfile()
|
|
203
|
+
# Layer 3: Diagnostics
|
|
204
|
+
self.check_env_files()
|
|
205
|
+
self.validate_taskfile_variables()
|
|
206
|
+
self.check_placeholder_values()
|
|
207
|
+
self.check_dependent_files()
|
|
208
|
+
self.check_ports()
|
|
209
|
+
self.check_docker()
|
|
210
|
+
self.check_registry_access()
|
|
211
|
+
self.check_ssh_keys()
|
|
212
|
+
self.check_git()
|
|
213
|
+
self.check_deploy_artifacts()
|
|
214
|
+
# Layer 3+: expensive checks (verbose or remote)
|
|
215
|
+
if verbose or remote:
|
|
216
|
+
self.check_task_commands()
|
|
217
|
+
self.check_ssh_connectivity()
|
|
218
|
+
self.check_remote_health()
|
|
219
|
+
# Infra checks for container deployments
|
|
220
|
+
if remote or verbose:
|
|
221
|
+
self.check_ufw_forward_policy()
|
|
222
|
+
self.check_container_dns()
|
|
223
|
+
|
|
171
224
|
# ─── Layer 4: Algorithmic fix ───
|
|
172
225
|
|
|
173
|
-
def auto_fix(self) -> int:
|
|
174
|
-
fixed_count = apply_fixes(self._issues)
|
|
226
|
+
def auto_fix(self, *, interactive: bool = False) -> int:
|
|
227
|
+
fixed_count = apply_fixes(self._issues, interactive=interactive)
|
|
175
228
|
# Remove fixed issues from legacy list
|
|
176
229
|
fixed_msgs = {i.message for i in self._issues if i.context and i.context.get("_fixed")}
|
|
177
230
|
self.issues = [(m, s, f) for m, s, f in self.issues if m not in fixed_msgs]
|
|
@@ -257,6 +310,7 @@ __all__ = [
|
|
|
257
310
|
"check_task_commands",
|
|
258
311
|
"check_examples",
|
|
259
312
|
"check_placeholder_values",
|
|
313
|
+
"check_deploy_artifacts",
|
|
260
314
|
"apply_fixes",
|
|
261
315
|
"apply_single_fix",
|
|
262
316
|
"print_report",
|