Skip to content

fix: lazy load Resource Manager client in create flow#5770

Closed
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/create-lazy-resource-manager-import
Closed

fix: lazy load Resource Manager client in create flow#5770
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/create-lazy-resource-manager-import

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • move the Resource Manager import out of module import time
  • keep list_gcp_projects() returning an empty list when the optional Resource Manager dependency is unavailable
  • add coverage for the missing-dependency path

Fixes #5766

To verify

  • .\.venv\Scripts\python.exe -m pytest tests/unittests/cli/utils/test_gcp_utils.py -q -p no:cacheprovider
  • .\.venv\Scripts\python.exe -m py_compile src\google\adk\cli\utils\gcp_utils.py tests\unittests\cli\utils\test_gcp_utils.py
  • uv run --extra dev mypy --config-file pyproject.toml src\google\adk\cli\utils\gcp_utils.py
  • uv run --extra dev pyink --check src\google\adk\cli\utils\gcp_utils.py tests\unittests\cli\utils\test_gcp_utils.py
  • git diff --check

Notes

  • uv run --extra test ... is currently blocked on Windows by yarl==1.24.1, which has no win_amd64 wheel or source distribution.

@sasha-gitg
Copy link
Copy Markdown
Collaborator

This is fixed in main

@sasha-gitg sasha-gitg closed this May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADK 2.0 CLI fails at creation command due to module not found error

2 participants