chore(langgraph): Track ADK/other library usage when deploying using cli (#7939)

<!-- Replace everything above this line with a 1-2 sentence description
of your change. Keep the "Fixes #xx" keyword and update the issue
number. -->
- Add a property to revisions table metadata column for Google ADK
version
- This helps us track the deployments that use Google ADK
- Similar to this PR:
https://github.com/langchain-ai/langchainplus/pull/22087

Read the full contributing guidelines:
https://docs.langchain.com/oss/python/contributing/overview

> **All contributions must be in English.** See the [language
policy](https://docs.langchain.com/oss/python/contributing/overview#language-policy).

If you paste a large clearly AI generated description here your PR may
be IGNORED or CLOSED!

Thank you for contributing to LangGraph! Follow these steps to have your
pull request considered as ready for review.

1. PR title: Should follow the format: TYPE(SCOPE): DESCRIPTION

    - feat(langgraph): add multi-tenant support
- Allowed TYPE and SCOPE values:
https://github.com/langchain-ai/langgraph/blob/main/.github/workflows/pr_lint.yml#L19-L43

2. PR description:

  - Write 1-2 sentences summarizing the change.
- The `Fixes #xx` line at the top is **required** for external
contributions — update the issue number and keep the keyword. This links
your PR to the approved issue and auto-closes it on merge.
  - If there are any breaking changes, please clearly describe them.
- If this PR depends on another PR being merged first, please include
"Depends on #PR_NUMBER" in the description.

3. 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.

4. How did you verify your code works?

Additional guidelines:

- All external PRs must link to an issue or discussion where a solution
has been approved by a maintainer, and you must be assigned to that
issue. PRs without prior approval will be closed.
- PRs should not touch more than one package unless absolutely
necessary.
- Do not update the `uv.lock` files or add dependencies to
`pyproject.toml` files (even optional ones) unless you have explicit
permission to do so by a maintainer.

## Social handles (optional)
<!-- If you'd like a shoutout on release, add your socials below -->
Twitter: @
LinkedIn: https://linkedin.com/in/
This commit is contained in:
syachamaneni-lc
2026-05-29 13:46:10 -07:00
committed by GitHub
parent b7fd3cf9c4
commit a9b0a05fb5
5 changed files with 365 additions and 1 deletions
+19 -1
View File
@@ -20,6 +20,7 @@ from dotenv import dotenv_values, set_key
import langgraph_cli.config
from langgraph_cli.analytics import log_command
from langgraph_cli.constants import DEFAULT_CONFIG
from langgraph_cli.dependency_tracking import find_tracked_packages
from langgraph_cli.docker import build_docker_image, can_build_locally
from langgraph_cli.exec import Runner, subp_exec
from langgraph_cli.host_backend import HostBackendClient, HostBackendError
@@ -902,6 +903,7 @@ def _run_local_build(
build_command: str | None,
docker_build_args: Sequence[str],
secrets: list[dict[str, str]],
tracked_packages: list[str] | None,
) -> BuildResult:
"""Build locally with Docker, push to registry, update deployment."""
# Use buildx to cross-compile for amd64 when running on a non-x86_64 host
@@ -1060,7 +1062,10 @@ def _run_local_build(
# -- Step: Update deployment --
_log_deploy_step(step, f"Updating deployment {deployment_id}")
updated = client.update_deployment(
deployment_id, resolved_image, secrets=secrets
deployment_id,
resolved_image,
secrets=secrets,
tracked_packages=tracked_packages,
)
return BuildResult(
@@ -1083,6 +1088,7 @@ def _run_remote_build(
install_command: str | None,
build_command: str | None,
secrets: list[dict[str, str]],
tracked_packages: list[str] | None,
) -> BuildResult:
"""Upload source tarball and trigger a remote build."""
from langgraph_cli.archive import create_archive
@@ -1113,6 +1119,7 @@ def _run_remote_build(
secrets=secrets,
install_command=install_command,
build_command=build_command,
tracked_packages=tracked_packages,
)
log_offset: str | None = None
@@ -1597,6 +1604,15 @@ def _deploy_cmd(
if not deployment_id:
raise click.ClickException("Failed to determine deployment ID")
# Scan local sources for tracked packages so the new revision carries
# the same metadata GitHub-backed deploys produce. Failures must never
# block a deploy.
try:
tracked_packages = find_tracked_packages(config, config_json) or None
except Exception as exc:
em.warn(f"Skipped tracked-package scan: {exc}")
tracked_packages = None
# -- 3. Build (divergent path) --
if use_remote_build:
build_result = _run_remote_build(
@@ -1609,6 +1625,7 @@ def _deploy_cmd(
install_command=install_command,
build_command=build_command,
secrets=secrets,
tracked_packages=tracked_packages,
)
else:
build_result = _run_local_build(
@@ -1628,6 +1645,7 @@ def _deploy_cmd(
build_command=build_command,
docker_build_args=docker_build_args,
secrets=secrets,
tracked_packages=tracked_packages,
)
# -- 4. Shared wait + result --