WIP: chore(cli): support DR for deploy command (#7098)

- [ ] **Add tests and docs**: If you're adding a new integration, you
must include:
1. A test for the integration, preferably unit tests that do not rely on
network access,
2. An example notebook showing its use. It lives in
`docs/docs/integrations` directory.

- [ ] **Lint and test**: Run `make format`, `make lint` and `make test`
from the root of the package(s) you've modified. We will not consider a
PR unless these three are passing in CI. See [contribution
guidelines](https://docs.langchain.com/oss/python/contributing/overview)
for more.

Additional guidelines:

- Make sure optional dependencies are imported within a function.
- Please do not add dependencies to `pyproject.toml` files (even
optional ones) unless they are **required** for unit tests.
- Most PRs should not touch more than one package.
- Changes should be backwards compatible.
This commit is contained in:
Quanzheng Long
2026-03-10 10:03:32 -07:00
committed by GitHub
parent 4b4b91c7e7
commit db40389fbd
4 changed files with 103 additions and 6 deletions
+6
View File
@@ -82,12 +82,18 @@ class HostBackendClient:
deployment_id: str,
image_uri: str,
secrets: list[dict[str, str]] | None = None,
engine_runtime_mode: str | None = None,
deployed_api_version: str | None = None,
) -> dict[str, Any]:
payload: dict[str, Any] = {
"source_revision_config": {"image_uri": image_uri},
}
if secrets is not None:
payload["secrets"] = secrets
if engine_runtime_mode is not None:
payload["engine_runtime_mode"] = engine_runtime_mode
if deployed_api_version is not None:
payload["deployed_api_version"] = deployed_api_version
return self._request(
"PATCH",
f"/v2/deployments/{deployment_id}",