Test update core deps#17034
Conversation
There was a problem hiding this comment.
Code Review
This pull request standardizes the installation of core dependencies from source across the monorepo by updating noxfile.py files to dynamically resolve sibling packages locally. It also includes a toolchain registration workaround in the gapic-generator workspace. Feedback highlights a regression in packages/google-auth-oauthlib/noxfile.py where the external dependency requests-oauthlib was removed from the source installation list and needs to be restored.
| core_packages = [ | ||
| "googleapis-common-protos", | ||
| "google-api-core", | ||
| "google-auth", | ||
| "grpc-google-iam-v1", | ||
| "proto-plus", | ||
| ] | ||
|
|
||
| for dep in core_dependencies_from_source: | ||
| session.install(dep, "--no-deps", "--ignore-installed") | ||
| print(f"Installed {dep}") | ||
| # Dynamically resolve sibling packages one level up in the monorepo | ||
| packages_dir = CURRENT_DIRECTORY.parent | ||
|
|
||
| for pkg in core_packages: | ||
| pkg_path = str(packages_dir / pkg) | ||
| session.install(pkg_path, "--no-deps", "--ignore-installed") | ||
| print(f"Installed {pkg} locally from {pkg_path}") |
There was a problem hiding this comment.
The removal of requests-oauthlib from the source installation list is a regression. This package is an external dependency and was previously being tested from source. It should be restored and installed using its git URL, as the new sibling-package resolution logic will not work for it. Per repository rules, dependencies required for tests to pass should be maintained. Additionally, verify that this library is present in the project's primary dependency specification (e.g., setup.py) if it is listed in any constraints files.
core_packages = [
"googleapis-common-protos",
"google-api-core",
"google-auth",
"grpc-google-iam-v1",
"proto-plus",
]
# Dynamically resolve sibling packages one level up in the monorepo
packages_dir = CURRENT_DIRECTORY.parent
for pkg in core_packages:
pkg_path = str(packages_dir / pkg)
session.install(pkg_path, "--no-deps", "--ignore-installed")
print(f"Installed {pkg} locally from {pkg_path}")
# Install external dependencies from source
session.install(
"requests-oauthlib @ git+https://github.com/requests/requests-oauthlib.git",
"--no-deps",
"--ignore-installed",
)References
- A dependency may be added as mandatory, even if it seems optional, if it is required for tests to pass.
- When reviewing dependency changes, verify that libraries listed in constraints files are present in the project's primary dependency specification (e.g., setup.py).
23d84a4 to
d5442e4
Compare
Just for testing purposes.