render-lab-tasks-render 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- render_lab_tasks_render-0.1.0/.gitignore +11 -0
- render_lab_tasks_render-0.1.0/LICENSE +21 -0
- render_lab_tasks_render-0.1.0/PKG-INFO +54 -0
- render_lab_tasks_render-0.1.0/README.md +41 -0
- render_lab_tasks_render-0.1.0/pyproject.toml +22 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/__init__.py +1 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/_app.py +3 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/await_deploy.py +18 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/client.py +525 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/create_private_service.py +20 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/create_project.py +18 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/delete_project.py +18 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/delete_resource.py +18 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/ensure_service.py +18 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/get_deploy_diagnostics.py +20 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/get_service.py +18 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/provision_key_value.py +18 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/provision_postgres.py +18 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/provision_service.py +43 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/py.typed +0 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/resume_service.py +18 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/retry.py +5 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/scale_service.py +18 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/suspend_service.py +18 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/tasks.py +50 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/trigger_deploy.py +18 -0
- render_lab_tasks_render-0.1.0/src/render_lab_tasks_render/types.py +367 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Render Lab
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: render-lab-tasks-render
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: render tasks for Render Workflows
|
|
5
|
+
Project-URL: Repository, https://github.com/render-lab/render-tasks-python
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.12
|
|
9
|
+
Requires-Dist: httpx<0.29,>=0.28
|
|
10
|
+
Requires-Dist: render-lab-tasks-core<0.2,>=0.1.1
|
|
11
|
+
Requires-Dist: render==1.0.1
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# render-lab-tasks-render
|
|
15
|
+
|
|
16
|
+
Fifteen Render control-plane tasks for services, deploys, Postgres, Key Value,
|
|
17
|
+
projects, and diagnostics. Import `render_lab_tasks_render.tasks` to register;
|
|
18
|
+
every operation also exports injectable async `*_impl(ctx, input, *, deps=...)`.
|
|
19
|
+
|
|
20
|
+
`RENDER_API_KEY` is read lazily. Provision/create operations accept `ownerId` or
|
|
21
|
+
use `RENDER_OWNER_ID`. Pass explicit ownerId for name-based lookup scoping and
|
|
22
|
+
`environmentId` for project placement. Names are not a concurrency-safe unique
|
|
23
|
+
key: simultaneous creators or matches beyond the first 20 results need care.
|
|
24
|
+
|
|
25
|
+
`render.provisionService` uses ctx.run on the wrapped `render.ensureService`
|
|
26
|
+
child. The checkpointed ensure phase does not repeat on every deploy poll.
|
|
27
|
+
Terminal deploy failure returns live=false; pending states throw to drive the
|
|
28
|
+
durable retry. Inject a context runner plus the read port for composition tests.
|
|
29
|
+
Other awaiters retain source error-message/retry behavior, including source
|
|
30
|
+
messages built before status reads (created/undefined in progress messages).
|
|
31
|
+
|
|
32
|
+
Service reconciliation checks managed serviceDetails fields. Environment-only,
|
|
33
|
+
repository, or branch drift does not trigger reconciliation, matching TS. Docker
|
|
34
|
+
commands use envSpecificDetails; image sources are top-level and exclude repo.
|
|
35
|
+
|
|
36
|
+
Python uses durable retries only; the source's in-process 429/5xx exception is
|
|
37
|
+
not reproduced. This matches the Python repository's single retry owner rule.
|
|
38
|
+
Diagnostics actually clips UTF-8 log message bytes to maxBytes rather than the
|
|
39
|
+
source's ineffective drop-one-line heuristic. These deviations and required live
|
|
40
|
+
checks are recorded in ADR-0013 and the shared testing backlog.
|
|
41
|
+
|
|
42
|
+
No resources are created by importing the package. Live control-plane writes,
|
|
43
|
+
project placement, quota handling, and durable checkpoint replay remain unverified.
|
|
44
|
+
Any new Render-DX test services must belong to taskpack-test/testing.
|
|
45
|
+
|
|
46
|
+
`Deps.ensure_service` can inject the provisioning creation collaborator. If omitted
|
|
47
|
+
on custom dependencies, the injected port handles creation. Default wrapped calls
|
|
48
|
+
continue to checkpoint `render.ensureService` through `ctx.run`.
|
|
49
|
+
|
|
50
|
+
## Installation
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
pip install render-lab-tasks-render==0.1.0
|
|
54
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# render-lab-tasks-render
|
|
2
|
+
|
|
3
|
+
Fifteen Render control-plane tasks for services, deploys, Postgres, Key Value,
|
|
4
|
+
projects, and diagnostics. Import `render_lab_tasks_render.tasks` to register;
|
|
5
|
+
every operation also exports injectable async `*_impl(ctx, input, *, deps=...)`.
|
|
6
|
+
|
|
7
|
+
`RENDER_API_KEY` is read lazily. Provision/create operations accept `ownerId` or
|
|
8
|
+
use `RENDER_OWNER_ID`. Pass explicit ownerId for name-based lookup scoping and
|
|
9
|
+
`environmentId` for project placement. Names are not a concurrency-safe unique
|
|
10
|
+
key: simultaneous creators or matches beyond the first 20 results need care.
|
|
11
|
+
|
|
12
|
+
`render.provisionService` uses ctx.run on the wrapped `render.ensureService`
|
|
13
|
+
child. The checkpointed ensure phase does not repeat on every deploy poll.
|
|
14
|
+
Terminal deploy failure returns live=false; pending states throw to drive the
|
|
15
|
+
durable retry. Inject a context runner plus the read port for composition tests.
|
|
16
|
+
Other awaiters retain source error-message/retry behavior, including source
|
|
17
|
+
messages built before status reads (created/undefined in progress messages).
|
|
18
|
+
|
|
19
|
+
Service reconciliation checks managed serviceDetails fields. Environment-only,
|
|
20
|
+
repository, or branch drift does not trigger reconciliation, matching TS. Docker
|
|
21
|
+
commands use envSpecificDetails; image sources are top-level and exclude repo.
|
|
22
|
+
|
|
23
|
+
Python uses durable retries only; the source's in-process 429/5xx exception is
|
|
24
|
+
not reproduced. This matches the Python repository's single retry owner rule.
|
|
25
|
+
Diagnostics actually clips UTF-8 log message bytes to maxBytes rather than the
|
|
26
|
+
source's ineffective drop-one-line heuristic. These deviations and required live
|
|
27
|
+
checks are recorded in ADR-0013 and the shared testing backlog.
|
|
28
|
+
|
|
29
|
+
No resources are created by importing the package. Live control-plane writes,
|
|
30
|
+
project placement, quota handling, and durable checkpoint replay remain unverified.
|
|
31
|
+
Any new Render-DX test services must belong to taskpack-test/testing.
|
|
32
|
+
|
|
33
|
+
`Deps.ensure_service` can inject the provisioning creation collaborator. If omitted
|
|
34
|
+
on custom dependencies, the injected port handles creation. Default wrapped calls
|
|
35
|
+
continue to checkpoint `render.ensureService` through `ctx.run`.
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
pip install render-lab-tasks-render==0.1.0
|
|
41
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27,<2"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "render-lab-tasks-render"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "render tasks for Render Workflows"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = ">=3.12"
|
|
13
|
+
dependencies = ["render==1.0.1", "httpx>=0.28,<0.29", "render-lab-tasks-core>=0.1.1,<0.2"]
|
|
14
|
+
|
|
15
|
+
[project.urls]
|
|
16
|
+
Repository = "https://github.com/render-lab/render-tasks-python"
|
|
17
|
+
|
|
18
|
+
[tool.uv.sources]
|
|
19
|
+
render-lab-tasks-core = { workspace = true }
|
|
20
|
+
|
|
21
|
+
[tool.hatch.build.targets.wheel]
|
|
22
|
+
packages = ["src/render_lab_tasks_render"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Import .tasks explicitly to register durable tasks."""
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from render import TaskContext
|
|
2
|
+
|
|
3
|
+
from ._app import app
|
|
4
|
+
from .client import Deps, dependencies
|
|
5
|
+
from .retry import AWAIT_DEPLOY_RETRY
|
|
6
|
+
from .types import AwaitDeployInput, AwaitDeployResult
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
async def await_deploy_impl(
|
|
10
|
+
ctx: TaskContext, input: AwaitDeployInput, *, deps: Deps | None = None
|
|
11
|
+
) -> AwaitDeployResult:
|
|
12
|
+
async with dependencies(deps) as resolved:
|
|
13
|
+
return await resolved.render.await_deploy(input)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@app.task(name="render.awaitDeploy", retry=AWAIT_DEPLOY_RETRY)
|
|
17
|
+
async def await_deploy(ctx: TaskContext, input: AwaitDeployInput) -> AwaitDeployResult:
|
|
18
|
+
return await await_deploy_impl(ctx, input)
|