langgraph-cli 0.4.39__tar.gz → 0.4.40__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.
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/PKG-INFO +1 -1
- langgraph_cli-0.4.40/langgraph_cli/__init__.py +1 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/deploy.py +20 -8
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/host_backend.py +4 -1
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/cli/test_deploy_command.py +26 -7
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/test_deploy_helpers.py +56 -0
- langgraph_cli-0.4.39/langgraph_cli/__init__.py +0 -1
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/.gitignore +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/LICENSE +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/Makefile +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/README.md +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/.env.example +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/.gitignore +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/Makefile +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graph_prerelease_reqs/agent.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graph_prerelease_reqs/deps/additional_deps/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graph_prerelease_reqs/deps/zuper_deps/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graph_prerelease_reqs/langgraph.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graph_prerelease_reqs/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graph_prerelease_reqs_fail/agent.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graph_prerelease_reqs_fail/langgraph.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graph_prerelease_reqs_fail/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs/agent.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs/langgraph.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs/storm.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_a/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_a/graphs_submod/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_a/graphs_submod/agent.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_a/graphs_submod/subprompt.txt +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_a/hello.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_a/langgraph.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_a/prompt.txt +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_a/requirements.txt +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_b/graphs_submod/agent.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_b/graphs_submod/subprompt.txt +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_b/hello.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_b/langgraph.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_b/prompt.txt +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_b/requirements.txt +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_b/utils/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_b/utils/greeter.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/langgraph.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/my_app.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/pipconf.txt +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/generate_schema.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/.dockerignore +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/.editorconfig +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/.env.example +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/.eslintrc.cjs +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/.gitignore +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/LICENSE +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/README.md +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/jest.config.js +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/langgraph.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/package.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/src/agent/graph.ts +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/src/agent/state.ts +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/static/studio.png +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/tests/agent.test.ts +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/tests/graph.int.test.ts +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/tsconfig.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-examples/yarn.lock +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/.eslintrc.cjs +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/apps/agent/langgraph.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/apps/agent/package.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/apps/agent/src/graph.ts +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/apps/agent/src/state.ts +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/apps/agent/tsconfig.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/libs/shared/package.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/libs/shared/src/index.ts +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/libs/shared/tsconfig.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/package.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/tsconfig.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/turbo.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/js-monorepo-example/yarn.lock +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/__main__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/_ignore.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/analytics.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/archive.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/cli.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/config.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/constants.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/dependency_tracking.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/docker.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/exec.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/image_reference.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/progress.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/py.typed +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/schemas.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/templates.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/util.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/uv_lock.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/langgraph_cli/version.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/apps/agent/.env.example +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/apps/agent/langgraph.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/apps/agent/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/apps/agent/src/agent/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/apps/agent/src/agent/graph.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/apps/agent/src/agent/state.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/libs/common/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/libs/common/helpers.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/libs/shared/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/libs/shared/src/shared/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/libs/shared/src/shared/utils.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/schemas/schema.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/schemas/schema.v0.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/schemas/version.schema.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/integration_tests/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/integration_tests/test_cli.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/agent.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/cli/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/cli/langgraph.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/cli/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/cli/test_cli.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/cli/test_templates.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/conftest.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/graphs/agent.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/helpers.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/multiplatform/js.mts +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/multiplatform/python.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/pipconfig.txt +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/test_archive.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/test_config.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/test_config.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/test_dependency_tracking.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/test_deploy_agents.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/test_docker.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/test_exec.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/test_host_backend.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/test_image_reference.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/test_logs_helpers.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/tests/unit_tests/test_util.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/apps/agent/.env.example +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/apps/agent/langgraph.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/apps/agent/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/apps/agent/src/agent/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/apps/agent/src/agent/graph.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/libs/shared/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/libs/shared/src/shared/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/libs/shared/src/shared/utils.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/uv.lock +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/simple/.env.example +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/simple/langgraph.json +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/simple/pyproject.toml +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/simple/src/agent/__init__.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/simple/src/agent/graph.py +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/simple/uv.lock +0 -0
- {langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv.lock +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.40"
|
|
@@ -1061,6 +1061,8 @@ def _docker_config_for_token(registry_host: str, token: str, username: str):
|
|
|
1061
1061
|
|
|
1062
1062
|
_UPLOAD_TIMEOUT_SECONDS = 300
|
|
1063
1063
|
_BYTES_PER_MIB = 1_048_576
|
|
1064
|
+
# Byte range Cloud Storage signs into upload URLs, up to the 200 MB archive limit.
|
|
1065
|
+
_GCS_SIZE_RANGE = f"0,{200 * _BYTES_PER_MIB}"
|
|
1064
1066
|
|
|
1065
1067
|
|
|
1066
1068
|
class _ProgressReader:
|
|
@@ -1086,12 +1088,24 @@ class _ProgressReader:
|
|
|
1086
1088
|
return self._file_size
|
|
1087
1089
|
|
|
1088
1090
|
|
|
1089
|
-
def
|
|
1090
|
-
|
|
1091
|
+
def _upload_source_tarball(
|
|
1092
|
+
signed_url: str,
|
|
1093
|
+
file_path: str,
|
|
1094
|
+
file_size: int,
|
|
1095
|
+
upload_headers: dict[str, str] | None,
|
|
1096
|
+
) -> None:
|
|
1097
|
+
"""Upload tarball via signed PUT URL with progress display."""
|
|
1091
1098
|
import urllib.error
|
|
1092
1099
|
import urllib.request
|
|
1093
1100
|
|
|
1094
1101
|
em = _get_emitter()
|
|
1102
|
+
# Control planes that return no `upload_headers` sign for the Cloud Storage
|
|
1103
|
+
# size range. Content-Type is a fallback: without one, urllib sends a form
|
|
1104
|
+
# content type, which breaks signatures that cover it.
|
|
1105
|
+
headers = {
|
|
1106
|
+
"Content-Type": "application/gzip",
|
|
1107
|
+
**(upload_headers or {"X-Goog-Content-Length-Range": _GCS_SIZE_RANGE}),
|
|
1108
|
+
}
|
|
1095
1109
|
|
|
1096
1110
|
with open(file_path, "rb") as f:
|
|
1097
1111
|
reader = _ProgressReader(f, file_size, em)
|
|
@@ -1099,11 +1113,7 @@ def _upload_to_gcs(signed_url: str, file_path: str, file_size: int) -> None:
|
|
|
1099
1113
|
signed_url,
|
|
1100
1114
|
data=reader,
|
|
1101
1115
|
method="PUT",
|
|
1102
|
-
headers={
|
|
1103
|
-
"Content-Type": "application/gzip",
|
|
1104
|
-
"Content-Length": str(file_size),
|
|
1105
|
-
"X-Goog-Content-Length-Range": "0,209715200",
|
|
1106
|
-
},
|
|
1116
|
+
headers={**headers, "Content-Length": str(file_size)},
|
|
1107
1117
|
)
|
|
1108
1118
|
try:
|
|
1109
1119
|
urllib.request.urlopen(req, timeout=_UPLOAD_TIMEOUT_SECONDS)
|
|
@@ -1423,7 +1433,9 @@ def _run_remote_build(
|
|
|
1423
1433
|
step += 1
|
|
1424
1434
|
|
|
1425
1435
|
_log_deploy_step(step, "Uploading source")
|
|
1426
|
-
|
|
1436
|
+
_upload_source_tarball(
|
|
1437
|
+
signed_url, archive_path, file_size, upload_data.get("upload_headers")
|
|
1438
|
+
)
|
|
1427
1439
|
step += 1
|
|
1428
1440
|
|
|
1429
1441
|
_log_deploy_step(step, "Triggering remote build")
|
|
@@ -283,10 +283,13 @@ class HostBackendClient:
|
|
|
283
283
|
)
|
|
284
284
|
|
|
285
285
|
def request_upload_url(self, deployment_id: str) -> dict[str, Any]:
|
|
286
|
-
"""Get a signed
|
|
286
|
+
"""Get a signed URL for uploading the source tarball."""
|
|
287
|
+
# Tells the control plane this client sends the returned
|
|
288
|
+
# `upload_headers` with its upload, which some storage requires.
|
|
287
289
|
return self._request(
|
|
288
290
|
"POST",
|
|
289
291
|
f"/v2/deployments/{deployment_id}/upload-url",
|
|
292
|
+
{"supports_upload_headers": True},
|
|
290
293
|
)
|
|
291
294
|
|
|
292
295
|
def update_deployment(
|
|
@@ -96,6 +96,7 @@ class ControlPlaneDouble:
|
|
|
96
96
|
existing_deployments: list[dict] = field(default_factory=list)
|
|
97
97
|
push_token_status: int = 200
|
|
98
98
|
push_token_extra: dict = field(default_factory=dict)
|
|
99
|
+
upload_url_extra: dict = field(default_factory=dict)
|
|
99
100
|
create_error: str | None = None
|
|
100
101
|
listeners: list[dict] = field(default_factory=list)
|
|
101
102
|
listeners_by_id: dict[str, dict] = field(default_factory=dict)
|
|
@@ -163,7 +164,12 @@ class ControlPlaneDouble:
|
|
|
163
164
|
)
|
|
164
165
|
if path.endswith("/upload-url"):
|
|
165
166
|
return httpx.Response(
|
|
166
|
-
200,
|
|
167
|
+
200,
|
|
168
|
+
json={
|
|
169
|
+
"upload_url": SIGNED_UPLOAD_URL,
|
|
170
|
+
"object_path": OBJECT_PATH,
|
|
171
|
+
**self.upload_url_extra,
|
|
172
|
+
},
|
|
167
173
|
)
|
|
168
174
|
if method == "PATCH":
|
|
169
175
|
return httpx.Response(200, json={"tenant_id": "tenant-1"})
|
|
@@ -280,7 +286,7 @@ class DeployProject:
|
|
|
280
286
|
control_plane: ControlPlaneDouble
|
|
281
287
|
docker: DockerDouble
|
|
282
288
|
timeline: list[str]
|
|
283
|
-
uploads: list[tuple[str, str, int]]
|
|
289
|
+
uploads: list[tuple[str, str, int, dict[str, str] | None]]
|
|
284
290
|
|
|
285
291
|
def run(self, *args: str, host_url: str = CONTROL_PLANE_URL) -> Result:
|
|
286
292
|
return CliRunner().invoke(
|
|
@@ -317,16 +323,21 @@ def deploy_project(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> DeployPro
|
|
|
317
323
|
timeline: list[str] = []
|
|
318
324
|
control_plane = ControlPlaneDouble(timeline)
|
|
319
325
|
docker = DockerDouble(timeline)
|
|
320
|
-
uploads: list[tuple[str, str, int]] = []
|
|
326
|
+
uploads: list[tuple[str, str, int, dict[str, str] | None]] = []
|
|
321
327
|
|
|
322
328
|
@contextmanager
|
|
323
329
|
def fake_create_archive(config_path: Path, config: dict) -> Iterator[tuple]:
|
|
324
330
|
timeline.append("create_archive")
|
|
325
331
|
yield ARCHIVE
|
|
326
332
|
|
|
327
|
-
def fake_upload(
|
|
333
|
+
def fake_upload(
|
|
334
|
+
signed_url: str,
|
|
335
|
+
file_path: str,
|
|
336
|
+
file_size: int,
|
|
337
|
+
upload_headers: dict[str, str] | None,
|
|
338
|
+
) -> None:
|
|
328
339
|
timeline.append("upload_archive")
|
|
329
|
-
uploads.append((signed_url, file_path, file_size))
|
|
340
|
+
uploads.append((signed_url, file_path, file_size, upload_headers))
|
|
330
341
|
|
|
331
342
|
monkeypatch.setattr(deploy_module, "_no_input", False)
|
|
332
343
|
monkeypatch.setattr(deploy_module, "_emitter", None)
|
|
@@ -344,7 +355,7 @@ def deploy_project(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> DeployPro
|
|
|
344
355
|
)
|
|
345
356
|
monkeypatch.setattr(deploy_module.platform, "machine", lambda: "x86_64")
|
|
346
357
|
monkeypatch.setattr(archive_module, "create_archive", fake_create_archive)
|
|
347
|
-
monkeypatch.setattr(deploy_module, "
|
|
358
|
+
monkeypatch.setattr(deploy_module, "_upload_source_tarball", fake_upload)
|
|
348
359
|
return DeployProject(control_plane, docker, timeline, uploads)
|
|
349
360
|
|
|
350
361
|
|
|
@@ -703,6 +714,9 @@ def test_deployment_not_created_by_the_cli_gets_an_actionable_error(
|
|
|
703
714
|
def test_remote_build_creates_an_internal_source_deployment_and_uploads_the_archive(
|
|
704
715
|
deploy_project: DeployProject,
|
|
705
716
|
) -> None:
|
|
717
|
+
upload_headers = {"Content-Type": "application/gzip", "x-ms-blob-type": "BlockBlob"}
|
|
718
|
+
deploy_project.control_plane.upload_url_extra = {"upload_headers": upload_headers}
|
|
719
|
+
|
|
706
720
|
result = deploy_project.run("--remote", "--install-command", "yarn install")
|
|
707
721
|
|
|
708
722
|
assert result.exit_code == 0, result.output
|
|
@@ -717,7 +731,12 @@ def test_remote_build_creates_an_internal_source_deployment_and_uploads_the_arch
|
|
|
717
731
|
assert deploy_project.control_plane.bodies[CREATE_DEPLOYMENT]["source"] == (
|
|
718
732
|
"internal_source"
|
|
719
733
|
)
|
|
720
|
-
assert deploy_project.
|
|
734
|
+
assert deploy_project.control_plane.bodies[_upload_url(CREATED_ID)] == {
|
|
735
|
+
"supports_upload_headers": True
|
|
736
|
+
}
|
|
737
|
+
assert deploy_project.uploads == [
|
|
738
|
+
(SIGNED_UPLOAD_URL, ARCHIVE[0], ARCHIVE[1], upload_headers)
|
|
739
|
+
]
|
|
721
740
|
assert deploy_project.control_plane.bodies[_patch(CREATED_ID)] == {
|
|
722
741
|
"revision_source": "internal_source",
|
|
723
742
|
"source_revision_config": {
|
|
@@ -1458,3 +1458,59 @@ class TestPlacementOnAKnownListener:
|
|
|
1458
1458
|
def test_refuses_and_names_the_namespaces(self, request_, listener, message):
|
|
1459
1459
|
with pytest.raises(click.UsageError, match=message):
|
|
1460
1460
|
request_.on(listener)
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
DEFAULT_UPLOAD_HEADERS = {
|
|
1464
|
+
"content-type": "application/gzip",
|
|
1465
|
+
"content-length": "7",
|
|
1466
|
+
"x-goog-content-length-range": "0,209715200",
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
@pytest.mark.parametrize(
|
|
1471
|
+
("upload_headers", "expected"),
|
|
1472
|
+
[
|
|
1473
|
+
pytest.param(None, DEFAULT_UPLOAD_HEADERS, id="missing_sends_defaults"),
|
|
1474
|
+
pytest.param({}, DEFAULT_UPLOAD_HEADERS, id="empty_sends_defaults"),
|
|
1475
|
+
pytest.param(
|
|
1476
|
+
{
|
|
1477
|
+
"content-type": "application/x-gzip",
|
|
1478
|
+
"x-ms-blob-type": "BlockBlob",
|
|
1479
|
+
"content-length": "1",
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
"content-type": "application/x-gzip",
|
|
1483
|
+
"x-ms-blob-type": "BlockBlob",
|
|
1484
|
+
"content-length": "7",
|
|
1485
|
+
},
|
|
1486
|
+
id="returned_headers_replace_defaults",
|
|
1487
|
+
),
|
|
1488
|
+
pytest.param(
|
|
1489
|
+
{"x-ms-blob-type": "BlockBlob"},
|
|
1490
|
+
{
|
|
1491
|
+
"content-type": "application/gzip",
|
|
1492
|
+
"x-ms-blob-type": "BlockBlob",
|
|
1493
|
+
"content-length": "7",
|
|
1494
|
+
},
|
|
1495
|
+
id="returned_headers_keep_a_content_type",
|
|
1496
|
+
),
|
|
1497
|
+
],
|
|
1498
|
+
)
|
|
1499
|
+
def test_source_upload_sends_the_headers_the_signed_url_requires(
|
|
1500
|
+
tmp_path, mocker, upload_headers, expected
|
|
1501
|
+
):
|
|
1502
|
+
archive = tmp_path / "source.tar.gz"
|
|
1503
|
+
archive.write_bytes(b"tarball")
|
|
1504
|
+
sent = []
|
|
1505
|
+
mocker.patch(
|
|
1506
|
+
"langgraph_cli.deploy._get_emitter", return_value=MagicMock(json_mode=True)
|
|
1507
|
+
)
|
|
1508
|
+
mocker.patch(
|
|
1509
|
+
"urllib.request.urlopen", side_effect=lambda req, timeout: sent.append(req)
|
|
1510
|
+
)
|
|
1511
|
+
|
|
1512
|
+
deploy_mod._upload_source_tarball(
|
|
1513
|
+
"https://storage.example/signed", str(archive), 7, upload_headers
|
|
1514
|
+
)
|
|
1515
|
+
|
|
1516
|
+
assert {name.lower(): value for name, value in sent[0].header_items()} == expected
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.4.39"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graph_prerelease_reqs_fail/langgraph.json
RENAMED
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graph_prerelease_reqs_fail/pyproject.toml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_a/graphs_submod/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_a/graphs_submod/subprompt.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/examples/graphs_reqs_b/graphs_submod/subprompt.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/apps/agent/.env.example
RENAMED
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/apps/agent/langgraph.json
RENAMED
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/apps/agent/pyproject.toml
RENAMED
|
File without changes
|
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/apps/agent/src/agent/graph.py
RENAMED
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/apps/agent/src/agent/state.py
RENAMED
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/libs/common/__init__.py
RENAMED
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/libs/common/helpers.py
RENAMED
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/python-monorepo-example/libs/shared/pyproject.toml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/apps/agent/langgraph.json
RENAMED
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/apps/agent/pyproject.toml
RENAMED
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/apps/agent/src/agent/__init__.py
RENAMED
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/apps/agent/src/agent/graph.py
RENAMED
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/libs/shared/pyproject.toml
RENAMED
|
File without changes
|
|
File without changes
|
{langgraph_cli-0.4.39 → langgraph_cli-0.4.40}/uv-examples/monorepo/libs/shared/src/shared/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|