fastapi-cloud-cli 0.25.0__tar.gz → 0.27.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.
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/PKG-INFO +2 -2
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/pyproject.toml +3 -3
- fastapi_cloud_cli-0.27.0/src/fastapi_cloud_cli/__init__.py +1 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/api/__init__.py +9 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/api/_models.py +57 -5
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/api/client.py +36 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/deploy/archive.py +4 -2
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/deploy/cloud.py +1 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/deploy/command.py +74 -6
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/deploy/wait.py +40 -11
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/deployments.py +99 -59
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/env/_shared.py +1 -22
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/env/delete.py +19 -31
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/env/get.py +3 -5
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/env/list.py +3 -5
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/env/set.py +24 -20
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/integrations/resources/get.py +1 -5
- fastapi_cloud_cli-0.27.0/src/fastapi_cloud_cli/utils/build_logs.py +14 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/cli.py +5 -1
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/domains/test_cli.py +7 -5
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/integrations/resources/test_disconnect.py +11 -6
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/integrations/resources/test_get.py +4 -2
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_api_client.py +42 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli.py +60 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli_deploy.py +377 -4
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli_deployments.py +434 -10
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli_setup_ci.py +6 -3
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_deploy_utils.py +18 -1
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_env_delete.py +85 -29
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_env_set.py +242 -25
- fastapi_cloud_cli-0.25.0/src/fastapi_cloud_cli/__init__.py +0 -1
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/LICENSE +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/README.md +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/scripts/add_latest_release_date.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/scripts/format.sh +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/scripts/lint.sh +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/scripts/prepare_release.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/scripts/test-cov-html.sh +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/scripts/test.sh +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/__main__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/_app.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/api/_errors.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/api/_retry.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/cli.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/_auth.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/_flow.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/apps/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/apps/_app.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/apps/create.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/apps/get.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/apps/link.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/apps/list.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/apps/unlink.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/apps/update.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/auth/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/auth/_app.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/auth/wait.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/ci/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/ci/_app.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/ci/print_workflow.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/deploy/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/deploy/configure.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/deploy/upload.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/domains/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/domains/_app.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/domains/_setup.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/domains/_shared.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/domains/add.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/domains/get.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/domains/list.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/domains/remove.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/domains/rendering.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/domains/restart.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/env/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/env/_app.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/integrations/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/integrations/providers/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/integrations/providers/_app.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/integrations/providers/list.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/integrations/resources/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/integrations/resources/_app.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/integrations/resources/connect.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/integrations/resources/disconnect.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/integrations/resources/list.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/integrations/resources/providers.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/login.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/logout.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/logs.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/setup_ci.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/teams/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/teams/_app.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/teams/get.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/teams/list.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/tokens/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/tokens/_app.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/tokens/create.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/tokens/delete.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/tokens/list.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/whoami.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/config.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/logging.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/py.typed +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/apps.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/auth.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/config.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/dates.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/env.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/errors.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/execution.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/progress_file.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/sentry.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/teams.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/utils/version_check.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/conftest.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/domains/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/domains/test_setup.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/integrations/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/integrations/providers/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/integrations/providers/test_list.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/integrations/resources/__init__.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/integrations/resources/test_connect.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/integrations/resources/test_list.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_archive.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_auth.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli_apps.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli_ci.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli_link.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli_login.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli_logout.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli_teams.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli_tokens.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli_unlink.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_cli_whoami.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_config.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_dates.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_env_get.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_env_list.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_logs.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_prepare_release.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_progress_file.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_sentry.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_utils_apps.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/test_version_check.py +0 -0
- {fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/tests/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fastapi-cloud-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.27.0
|
|
4
4
|
Summary: Deploy and manage FastAPI Cloud apps from the command line 🚀
|
|
5
5
|
Author-Email: Patrick Arminio <patrick@fastapilabs.com>
|
|
6
6
|
License: MIT
|
|
@@ -33,7 +33,7 @@ Requires-Dist: typer>=0.26.1
|
|
|
33
33
|
Requires-Dist: uvicorn[standard]>=0.17.6
|
|
34
34
|
Requires-Dist: rignore>=0.5.1
|
|
35
35
|
Requires-Dist: httpx>=0.27.0
|
|
36
|
-
Requires-Dist: rich-toolkit>=0.20.
|
|
36
|
+
Requires-Dist: rich-toolkit>=0.20.6
|
|
37
37
|
Requires-Dist: pydantic[email]>=2.7.4; python_version < "3.13"
|
|
38
38
|
Requires-Dist: pydantic[email]>=2.8.0; python_version == "3.13"
|
|
39
39
|
Requires-Dist: pydantic[email]>=2.12.0; python_version >= "3.14"
|
|
@@ -33,7 +33,7 @@ dependencies = [
|
|
|
33
33
|
"uvicorn[standard] >= 0.17.6",
|
|
34
34
|
"rignore >= 0.5.1",
|
|
35
35
|
"httpx >= 0.27.0",
|
|
36
|
-
"rich-toolkit>=0.20.
|
|
36
|
+
"rich-toolkit>=0.20.6",
|
|
37
37
|
"pydantic[email] >= 2.7.4; python_version < '3.13'",
|
|
38
38
|
"pydantic[email] >= 2.8.0; python_version == '3.13'",
|
|
39
39
|
"pydantic[email] >= 2.12.0; python_version >= '3.14'",
|
|
@@ -42,7 +42,7 @@ dependencies = [
|
|
|
42
42
|
"detect-installer>=0.1.0",
|
|
43
43
|
"agent-detector>=1.1.0",
|
|
44
44
|
]
|
|
45
|
-
version = "0.
|
|
45
|
+
version = "0.27.0"
|
|
46
46
|
|
|
47
47
|
[project.license]
|
|
48
48
|
text = "MIT"
|
|
@@ -64,7 +64,7 @@ dev = [
|
|
|
64
64
|
"prek>=0.2.24,<1.0.0",
|
|
65
65
|
"pytest>=7.0.0,<10.0.0",
|
|
66
66
|
"coverage[toml]>=7.2,<8.0",
|
|
67
|
-
"mypy==2.
|
|
67
|
+
"mypy==2.4.1",
|
|
68
68
|
"ruff>=0.15.16",
|
|
69
69
|
"respx==0.23.1",
|
|
70
70
|
"time-machine>=2.19.0",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.27.0"
|
|
@@ -4,12 +4,21 @@ from ._errors import _get_response_error_message as _get_response_error_message
|
|
|
4
4
|
from ._errors import get_http_error_code as get_http_error_code
|
|
5
5
|
from ._errors import get_http_error_hint as get_http_error_hint
|
|
6
6
|
from ._errors import handle_http_error as handle_http_error
|
|
7
|
+
from ._models import BUILD_FAILED_STATUSES as BUILD_FAILED_STATUSES
|
|
7
8
|
from ._models import SUCCESSFUL_STATUSES as SUCCESSFUL_STATUSES
|
|
9
|
+
from ._models import TERMINAL_STATUSES as TERMINAL_STATUSES
|
|
8
10
|
from ._models import AppLogEntry as AppLogEntry
|
|
11
|
+
from ._models import BuildFailure as BuildFailure
|
|
12
|
+
from ._models import BuildLogLineGeneric as BuildLogLineGeneric
|
|
9
13
|
from ._models import BuildLogLineMessage as BuildLogLineMessage
|
|
10
14
|
from ._models import CustomDomain as CustomDomain
|
|
11
15
|
from ._models import CustomDomainRecord as CustomDomainRecord
|
|
12
16
|
from ._models import CustomDomainStatus as CustomDomainStatus
|
|
17
|
+
from ._models import Deployment as Deployment
|
|
13
18
|
from ._models import DeploymentStatus as DeploymentStatus
|
|
19
|
+
from ._models import EnvironmentVariable as EnvironmentVariable
|
|
20
|
+
from ._models import (
|
|
21
|
+
EnvironmentVariableCreatePayload as EnvironmentVariableCreatePayload,
|
|
22
|
+
)
|
|
14
23
|
from ._retry import STREAM_LOGS_MAX_RETRIES as STREAM_LOGS_MAX_RETRIES
|
|
15
24
|
from .client import APIClient as APIClient
|
|
@@ -4,6 +4,22 @@ from typing import Annotated, Literal
|
|
|
4
4
|
from pydantic import BaseModel, Field, TypeAdapter
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
class EnvironmentVariable(BaseModel):
|
|
8
|
+
name: str
|
|
9
|
+
value: str | None = None
|
|
10
|
+
is_secret: bool = False
|
|
11
|
+
updated_at: str | None = None
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class EnvironmentVariableResponse(BaseModel):
|
|
15
|
+
data: list[EnvironmentVariable]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class EnvironmentVariableCreatePayload(BaseModel):
|
|
19
|
+
value: str
|
|
20
|
+
is_secret: bool = False
|
|
21
|
+
|
|
22
|
+
|
|
7
23
|
class AppLogEntry(BaseModel):
|
|
8
24
|
timestamp: str
|
|
9
25
|
message: str
|
|
@@ -21,6 +37,13 @@ class BuildLogLineMessage(BaseModel):
|
|
|
21
37
|
id: str | None = None
|
|
22
38
|
|
|
23
39
|
|
|
40
|
+
class BuildFailure(BaseModel):
|
|
41
|
+
error_code: str
|
|
42
|
+
error_title: str
|
|
43
|
+
error_message: str
|
|
44
|
+
error_hint: str
|
|
45
|
+
|
|
46
|
+
|
|
24
47
|
BuildLogLine = BuildLogLineMessage | BuildLogLineGeneric
|
|
25
48
|
BuildLogAdapter: TypeAdapter[BuildLogLine] = TypeAdapter(
|
|
26
49
|
Annotated[BuildLogLine, Field(discriminator="type")]
|
|
@@ -77,6 +100,8 @@ class DeploymentStatus(str, Enum):
|
|
|
77
100
|
waiting_upload = "waiting_upload"
|
|
78
101
|
upload_cancelled = "upload_cancelled"
|
|
79
102
|
ready_for_build = "ready_for_build"
|
|
103
|
+
build_skipped_filtered = "build_skipped_filtered"
|
|
104
|
+
build_skipped_superseded = "build_skipped_superseded"
|
|
80
105
|
building = "building"
|
|
81
106
|
extracting = "extracting"
|
|
82
107
|
extracting_failed = "extracting_failed"
|
|
@@ -97,12 +122,20 @@ class DeploymentStatus(str, Enum):
|
|
|
97
122
|
expired = "expired"
|
|
98
123
|
failed = "failed"
|
|
99
124
|
|
|
125
|
+
unknown = "unknown"
|
|
126
|
+
|
|
127
|
+
@classmethod
|
|
128
|
+
def _missing_(cls, value: object) -> "DeploymentStatus":
|
|
129
|
+
return cls.unknown
|
|
130
|
+
|
|
100
131
|
@classmethod
|
|
101
132
|
def to_human_readable(cls, status: "DeploymentStatus") -> str:
|
|
102
133
|
return {
|
|
103
134
|
cls.waiting_upload: "Awaiting Upload",
|
|
104
135
|
cls.upload_cancelled: "Upload Cancelled",
|
|
105
136
|
cls.ready_for_build: "Build Queued",
|
|
137
|
+
cls.build_skipped_filtered: "Build Skipped (Filtered)",
|
|
138
|
+
cls.build_skipped_superseded: "Build Skipped (Superseded)",
|
|
106
139
|
cls.building: "Building",
|
|
107
140
|
cls.extracting: "Extracting Upload",
|
|
108
141
|
cls.extracting_failed: "Extraction Failed",
|
|
@@ -122,19 +155,38 @@ class DeploymentStatus(str, Enum):
|
|
|
122
155
|
cls.degraded: "Degraded",
|
|
123
156
|
cls.expired: "Expired",
|
|
124
157
|
cls.failed: "Failed",
|
|
158
|
+
cls.unknown: "Unknown",
|
|
125
159
|
}[status]
|
|
126
160
|
|
|
127
161
|
|
|
162
|
+
class Deployment(BaseModel):
|
|
163
|
+
id: str
|
|
164
|
+
app_id: str
|
|
165
|
+
slug: str
|
|
166
|
+
status: DeploymentStatus
|
|
167
|
+
created_at: str
|
|
168
|
+
url: str | None = None
|
|
169
|
+
dashboard_url: str | None = None
|
|
170
|
+
failure: BuildFailure | None = None
|
|
171
|
+
|
|
172
|
+
|
|
128
173
|
SUCCESSFUL_STATUSES = {DeploymentStatus.success, DeploymentStatus.verifying_skipped}
|
|
129
|
-
|
|
174
|
+
BUILD_FAILED_STATUSES = {
|
|
175
|
+
DeploymentStatus.building_image_failed,
|
|
176
|
+
DeploymentStatus.building_image_failed_timeout,
|
|
177
|
+
DeploymentStatus.extracting_failed,
|
|
178
|
+
DeploymentStatus.extracting_failed_archive_too_large,
|
|
179
|
+
}
|
|
180
|
+
FAILED_STATUSES = BUILD_FAILED_STATUSES | {
|
|
181
|
+
DeploymentStatus.build_skipped_filtered,
|
|
182
|
+
DeploymentStatus.build_skipped_superseded,
|
|
130
183
|
DeploymentStatus.failed,
|
|
131
184
|
DeploymentStatus.verifying_failed,
|
|
132
185
|
DeploymentStatus.verification_failed_oom,
|
|
133
186
|
DeploymentStatus.deploying_failed,
|
|
134
187
|
DeploymentStatus.deploying_skipped,
|
|
135
|
-
DeploymentStatus.
|
|
136
|
-
DeploymentStatus.
|
|
137
|
-
DeploymentStatus.
|
|
138
|
-
DeploymentStatus.extracting_failed_archive_too_large,
|
|
188
|
+
DeploymentStatus.degraded,
|
|
189
|
+
DeploymentStatus.degraded_oom,
|
|
190
|
+
DeploymentStatus.expired,
|
|
139
191
|
}
|
|
140
192
|
TERMINAL_STATUSES = SUCCESSFUL_STATUSES | FAILED_STATUSES
|
|
@@ -30,7 +30,10 @@ from ._models import (
|
|
|
30
30
|
BuildLogLine,
|
|
31
31
|
CustomDomain,
|
|
32
32
|
CustomDomainsAPIResponse,
|
|
33
|
+
Deployment,
|
|
33
34
|
DeploymentStatus,
|
|
35
|
+
EnvironmentVariableCreatePayload,
|
|
36
|
+
EnvironmentVariableResponse,
|
|
34
37
|
)
|
|
35
38
|
from ._retry import (
|
|
36
39
|
STREAM_LOGS_MAX_RETRIES,
|
|
@@ -136,6 +139,39 @@ class APIClient(httpx.Client):
|
|
|
136
139
|
|
|
137
140
|
raise typer.Exit(1) from None
|
|
138
141
|
|
|
142
|
+
def get_deployment(self, deployment_id: str) -> Deployment:
|
|
143
|
+
response = self.get(f"/deployments/{deployment_id}")
|
|
144
|
+
response.raise_for_status()
|
|
145
|
+
return Deployment.model_validate(response.json())
|
|
146
|
+
|
|
147
|
+
def get_environment_variables(self, *, app_id: str) -> EnvironmentVariableResponse:
|
|
148
|
+
response = self.get(f"/apps/{app_id}/environment-variables/")
|
|
149
|
+
response.raise_for_status()
|
|
150
|
+
|
|
151
|
+
return EnvironmentVariableResponse.model_validate(response.json())
|
|
152
|
+
|
|
153
|
+
def batch_environment_variables(
|
|
154
|
+
self,
|
|
155
|
+
*,
|
|
156
|
+
app_id: str,
|
|
157
|
+
upsert: dict[str, EnvironmentVariableCreatePayload],
|
|
158
|
+
delete: list[str],
|
|
159
|
+
redeploy: bool = True,
|
|
160
|
+
) -> EnvironmentVariableResponse:
|
|
161
|
+
response = self.put(
|
|
162
|
+
f"/apps/{app_id}/environment-variables/",
|
|
163
|
+
json={
|
|
164
|
+
"upsert": {
|
|
165
|
+
name: payload.model_dump() for name, payload in upsert.items()
|
|
166
|
+
},
|
|
167
|
+
"delete": delete,
|
|
168
|
+
"redeploy": redeploy,
|
|
169
|
+
},
|
|
170
|
+
)
|
|
171
|
+
response.raise_for_status()
|
|
172
|
+
|
|
173
|
+
return EnvironmentVariableResponse.model_validate(response.json())
|
|
174
|
+
|
|
139
175
|
def get_custom_domains(self, *, app_id: str) -> CustomDomainsAPIResponse:
|
|
140
176
|
response = self.get(f"/apps/{app_id}/custom-domains")
|
|
141
177
|
response.raise_for_status()
|
|
@@ -57,6 +57,7 @@ def _should_exclude_entry(path: Path) -> bool:
|
|
|
57
57
|
".git",
|
|
58
58
|
".gitignore",
|
|
59
59
|
".fastapicloudignore",
|
|
60
|
+
".fastapicloud",
|
|
60
61
|
]
|
|
61
62
|
|
|
62
63
|
if any(part in path.parts for part in parts_to_exclude):
|
|
@@ -80,7 +81,8 @@ def _rignore_walk(path: Path) -> rignore.Walker:
|
|
|
80
81
|
)
|
|
81
82
|
|
|
82
83
|
|
|
83
|
-
def archive(path: Path, tar_path: Path) ->
|
|
84
|
+
def archive(path: Path, tar_path: Path) -> int:
|
|
85
|
+
"""Write the files to upload into `tar_path` and return how many there were."""
|
|
84
86
|
logger.debug("Starting archive creation for path: %s", path)
|
|
85
87
|
files = _rignore_walk(path)
|
|
86
88
|
|
|
@@ -98,7 +100,7 @@ def archive(path: Path, tar_path: Path) -> Path:
|
|
|
98
100
|
file_count += 1
|
|
99
101
|
|
|
100
102
|
logger.debug("Archive created successfully with %s files", file_count)
|
|
101
|
-
return
|
|
103
|
+
return file_count
|
|
102
104
|
|
|
103
105
|
|
|
104
106
|
def _get_large_files(path: Path, threshold_mb: int) -> list[tuple[Path, int]]:
|
|
@@ -99,16 +99,61 @@ def _render_linked_app_not_found(
|
|
|
99
99
|
)
|
|
100
100
|
|
|
101
101
|
|
|
102
|
+
def _confirm_home_directory_deploy(
|
|
103
|
+
toolkit: FastAPIRichToolkit, *, json_output: bool
|
|
104
|
+
) -> None:
|
|
105
|
+
if json_output or is_ci_enabled():
|
|
106
|
+
toolkit.fail(
|
|
107
|
+
"invalid_input",
|
|
108
|
+
"Refusing to deploy your home directory.",
|
|
109
|
+
hint="Pass the directory of your app, or use --force.",
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
if not toolkit.confirm(
|
|
113
|
+
"You are deploying your home directory. Do you want to continue?",
|
|
114
|
+
default=False,
|
|
115
|
+
emoji="🚨",
|
|
116
|
+
):
|
|
117
|
+
toolkit.print_line()
|
|
118
|
+
toolkit.print("Deployment cancelled.")
|
|
119
|
+
raise typer.Exit(0)
|
|
120
|
+
|
|
121
|
+
toolkit.print_line()
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def _check_app_directory(
|
|
125
|
+
toolkit: FastAPIRichToolkit, *, app: AppResponse, path_to_deploy: Path
|
|
126
|
+
) -> None:
|
|
127
|
+
"""Stop before uploading when the app's directory isn't in the upload."""
|
|
128
|
+
if app.directory is None or (path_to_deploy / app.directory).is_dir():
|
|
129
|
+
return
|
|
130
|
+
|
|
131
|
+
if app.github_repository:
|
|
132
|
+
hint = (
|
|
133
|
+
f"This app is connected to {app.github_repository} and builds from "
|
|
134
|
+
f"`{app.directory}` in that repository. Run "
|
|
135
|
+
f"`fastapi deploy --app-id {app.id}` from the repository root, or use --force."
|
|
136
|
+
)
|
|
137
|
+
else:
|
|
138
|
+
hint = (
|
|
139
|
+
"Deploy from the folder that contains it, update the app directory "
|
|
140
|
+
"with `fastapi cloud apps update --directory`, or use --force."
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
toolkit.fail(
|
|
144
|
+
"invalid_input",
|
|
145
|
+
f"The app directory `{app.directory}` doesn't exist in {path_to_deploy}.",
|
|
146
|
+
hint=hint,
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
|
|
102
150
|
@app.command()
|
|
103
151
|
@cloud_app.command()
|
|
104
152
|
def deploy(
|
|
105
153
|
path: Annotated[
|
|
106
154
|
Path | None,
|
|
107
155
|
typer.Argument(
|
|
108
|
-
help=(
|
|
109
|
-
"Path to the directory with your app's pyproject.toml "
|
|
110
|
-
"(defaults to current directory)"
|
|
111
|
-
)
|
|
156
|
+
help="Path to the directory to deploy (defaults to current directory)"
|
|
112
157
|
),
|
|
113
158
|
] = None,
|
|
114
159
|
skip_wait: Annotated[
|
|
@@ -131,6 +176,13 @@ def deploy(
|
|
|
131
176
|
),
|
|
132
177
|
] = 10,
|
|
133
178
|
json_output: JsonOutputOption = False,
|
|
179
|
+
force: Annotated[
|
|
180
|
+
bool,
|
|
181
|
+
typer.Option(
|
|
182
|
+
"--force",
|
|
183
|
+
help="Deploy even if the app directory is missing or the path is your home directory",
|
|
184
|
+
),
|
|
185
|
+
] = False,
|
|
134
186
|
) -> Any:
|
|
135
187
|
"""
|
|
136
188
|
Deploy a [bold]FastAPI[/bold] app to FastAPI Cloud.
|
|
@@ -212,6 +264,9 @@ def deploy(
|
|
|
212
264
|
path_to_deploy = path or Path.cwd()
|
|
213
265
|
logger.debug("Deploying from path: %s", path_to_deploy)
|
|
214
266
|
|
|
267
|
+
if not force and path_to_deploy.resolve() == Path.home().resolve():
|
|
268
|
+
_confirm_home_directory_deploy(toolkit, json_output=json_output)
|
|
269
|
+
|
|
215
270
|
app_config = get_app_config(path_to_deploy)
|
|
216
271
|
|
|
217
272
|
if app_config and provided_app_id and app_config.app_id != provided_app_id:
|
|
@@ -230,7 +285,7 @@ def deploy(
|
|
|
230
285
|
elif app_config:
|
|
231
286
|
target_app_id = app_config.app_id
|
|
232
287
|
else:
|
|
233
|
-
if json_output:
|
|
288
|
+
if json_output or is_ci_enabled():
|
|
234
289
|
toolkit.fail(
|
|
235
290
|
"missing_required_input",
|
|
236
291
|
"App ID is required.",
|
|
@@ -281,6 +336,9 @@ def deploy(
|
|
|
281
336
|
|
|
282
337
|
app = cast(AppResponse, app)
|
|
283
338
|
|
|
339
|
+
if not force:
|
|
340
|
+
_check_app_directory(toolkit, app=app, path_to_deploy=path_to_deploy)
|
|
341
|
+
|
|
284
342
|
large_files = _get_large_files(
|
|
285
343
|
path_to_deploy, threshold_mb=large_file_threshold
|
|
286
344
|
)
|
|
@@ -316,9 +374,19 @@ def deploy(
|
|
|
316
374
|
with tempfile.TemporaryDirectory() as temp_dir:
|
|
317
375
|
logger.debug("Creating archive for deployment")
|
|
318
376
|
archive_path = Path(temp_dir) / "archive.tar"
|
|
319
|
-
archive(path_to_deploy, archive_path)
|
|
377
|
+
file_count = archive(path_to_deploy, archive_path)
|
|
320
378
|
archive_size = archive_path.stat().st_size
|
|
321
379
|
|
|
380
|
+
if file_count == 0:
|
|
381
|
+
toolkit.fail(
|
|
382
|
+
"invalid_input",
|
|
383
|
+
f"Nothing to deploy: no files to upload in {path_to_deploy}.",
|
|
384
|
+
hint=(
|
|
385
|
+
"Check the path, and that .gitignore or "
|
|
386
|
+
".fastapicloudignore don't exclude your app's files."
|
|
387
|
+
),
|
|
388
|
+
)
|
|
389
|
+
|
|
322
390
|
with (
|
|
323
391
|
toolkit.progress(
|
|
324
392
|
title="Creating deployment",
|
{fastapi_cloud_cli-0.25.0 → fastapi_cloud_cli-0.27.0}/src/fastapi_cloud_cli/commands/deploy/wait.py
RENAMED
|
@@ -1,19 +1,29 @@
|
|
|
1
|
+
import contextlib
|
|
1
2
|
import time
|
|
2
3
|
from itertools import cycle
|
|
3
4
|
from textwrap import dedent
|
|
4
5
|
|
|
5
6
|
import typer
|
|
7
|
+
from httpx import HTTPError
|
|
6
8
|
from rich.text import Text
|
|
7
9
|
from rich_toolkit import RichToolkit
|
|
8
10
|
|
|
9
11
|
from fastapi_cloud_cli.api import (
|
|
10
12
|
SUCCESSFUL_STATUSES,
|
|
11
13
|
APIClient,
|
|
14
|
+
BuildFailure,
|
|
12
15
|
DeploymentStatus,
|
|
13
16
|
StreamLogError,
|
|
14
17
|
TooManyRetriesError,
|
|
15
18
|
)
|
|
16
19
|
from fastapi_cloud_cli.commands.deploy.cloud import CreateDeploymentResponse
|
|
20
|
+
from fastapi_cloud_cli.utils.build_logs import print_build_error
|
|
21
|
+
from fastapi_cloud_cli.utils.cli import FastAPIRichToolkit
|
|
22
|
+
from fastapi_cloud_cli.utils.execution import is_ci_enabled
|
|
23
|
+
|
|
24
|
+
# The build finished but we couldn't confirm the deployment came up. Distinct
|
|
25
|
+
# from 1 so scripts can tell "still verifying" from "failed".
|
|
26
|
+
UNCONFIRMED_EXIT_CODE = 3
|
|
17
27
|
|
|
18
28
|
# (bullet emoji, message) — the emoji replaces the progress animation
|
|
19
29
|
WAITING_MESSAGES = [
|
|
@@ -49,6 +59,7 @@ def _verify_deployment(
|
|
|
49
59
|
deployment: CreateDeploymentResponse,
|
|
50
60
|
) -> None:
|
|
51
61
|
failed_status: str | None = None
|
|
62
|
+
unconfirmed = False
|
|
52
63
|
|
|
53
64
|
with toolkit.progress(
|
|
54
65
|
title="Verifying deployment...",
|
|
@@ -63,15 +74,18 @@ def _verify_deployment(
|
|
|
63
74
|
f"Could not confirm deployment status. "
|
|
64
75
|
f"Check the dashboard: [link={deployment.dashboard_url}]{deployment.dashboard_url}[/link]"
|
|
65
76
|
)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if final_status in SUCCESSFUL_STATUSES:
|
|
69
|
-
progress.current_message = "Ready the chicken! 🐔"
|
|
77
|
+
unconfirmed = True
|
|
70
78
|
else:
|
|
71
|
-
|
|
72
|
-
|
|
79
|
+
if final_status in SUCCESSFUL_STATUSES:
|
|
80
|
+
progress.current_message = "Ready the chicken! 🐔"
|
|
81
|
+
else:
|
|
82
|
+
progress.metadata["done_emoji"] = "❌"
|
|
83
|
+
progress.current_message = "Deployment failed"
|
|
84
|
+
|
|
85
|
+
failed_status = DeploymentStatus.to_human_readable(final_status)
|
|
73
86
|
|
|
74
|
-
|
|
87
|
+
if unconfirmed:
|
|
88
|
+
raise typer.Exit(UNCONFIRMED_EXIT_CODE)
|
|
75
89
|
|
|
76
90
|
if failed_status is not None:
|
|
77
91
|
toolkit.print_line()
|
|
@@ -89,7 +103,7 @@ def _verify_deployment(
|
|
|
89
103
|
|
|
90
104
|
|
|
91
105
|
def _wait_for_deployment(
|
|
92
|
-
toolkit:
|
|
106
|
+
toolkit: FastAPIRichToolkit,
|
|
93
107
|
client: APIClient,
|
|
94
108
|
app_id: str,
|
|
95
109
|
deployment: CreateDeploymentResponse,
|
|
@@ -107,12 +121,15 @@ def _wait_for_deployment(
|
|
|
107
121
|
"Checking the status of your deployment",
|
|
108
122
|
inline_logs=True,
|
|
109
123
|
lines_to_show=20,
|
|
124
|
+
# Keep the log panel replaceable by a diagnosis, but retain CI logs.
|
|
125
|
+
preserve_logs=is_ci_enabled(),
|
|
110
126
|
emoji="👀",
|
|
111
127
|
done_emoji="🚀",
|
|
112
128
|
) as progress,
|
|
113
129
|
):
|
|
114
130
|
build_complete = False
|
|
115
131
|
build_failed = False
|
|
132
|
+
build_error: BuildFailure | None = None
|
|
116
133
|
|
|
117
134
|
try:
|
|
118
135
|
for log in client.stream_build_logs(deployment.id):
|
|
@@ -128,6 +145,12 @@ def _wait_for_deployment(
|
|
|
128
145
|
|
|
129
146
|
if log.type == "failed":
|
|
130
147
|
build_failed = True
|
|
148
|
+
build_error = None
|
|
149
|
+
|
|
150
|
+
with contextlib.suppress(HTTPError):
|
|
151
|
+
build_error = client.get_deployment(deployment.id).failure
|
|
152
|
+
|
|
153
|
+
progress.transient = build_error is not None
|
|
131
154
|
# the headline comes from the title once there are log
|
|
132
155
|
# lines, and from current_message when there are none
|
|
133
156
|
progress.title = "Build failed"
|
|
@@ -157,10 +180,16 @@ def _wait_for_deployment(
|
|
|
157
180
|
raise typer.Exit(1) from None
|
|
158
181
|
|
|
159
182
|
if build_failed:
|
|
160
|
-
|
|
183
|
+
if build_error is not None:
|
|
184
|
+
print_build_error(toolkit, build_error)
|
|
185
|
+
toolkit.print_line()
|
|
186
|
+
message = "Check out the logs at"
|
|
187
|
+
else:
|
|
188
|
+
toolkit.print_line()
|
|
189
|
+
message = "Oh no! Something went wrong. Check out the logs at"
|
|
161
190
|
toolkit.print(
|
|
162
|
-
f"
|
|
163
|
-
emoji="😔",
|
|
191
|
+
f"{message} [link={deployment.dashboard_url}]{deployment.dashboard_url}[/link]",
|
|
192
|
+
emoji="👀" if build_error is not None else "😔",
|
|
164
193
|
)
|
|
165
194
|
raise typer.Exit(1)
|
|
166
195
|
|