fix(templates): resolve core dependencies locally and batch pip installs#17032
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the noxfile.py template and its corresponding golden files to install core dependencies from local paths instead of remote git repositories. Feedback indicates that a comment needs updating to reflect the new variable name core_packages. Additionally, the logic for locating the packages directory is currently too simplistic and will fail for nested golden files; a more robust traversal method was suggested to ensure the correct path is resolved.
parthea
approved these changes
May 12, 2026
nidhiii-27
pushed a commit
that referenced
this pull request
May 18, 2026
…lls (#17032) fix(templates): resolve core dependencies locally and batch pip installs Previously, the `core_deps_from_source` and `prerelease_deps` nox sessions installed core sibling packages sequentially. In a monorepo environment, this caused two major issues: 1. Correctness: It frequently fetched remote upstream code (or PyPI releases) instead of testing the actual local code modified in the active PR. 2. Performance: Sequential `pip install` commands triggered strict dependency resolution repeatedly, leading to severe CI timeouts. This updates the noxfile template to: * Dynamically resolve first-party dependencies from the local `packages/` directory to guarantee the presubmit tests the active PR's code. * Batch the `pip install` commands using `--no-deps` and `--ignore-installed` to bypass the resolver overhead and eliminate the sequential network bottleneck. * Dynamically sort packages in `prerelease_deps` into local vs. PyPI deployments using a regex parser, ensuring safe handling of complex version bounds (e.g., `grpcio>=1.75.1`) without hardcoding multiple lists.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(templates): resolve core dependencies locally and batch pip installs
Previously, the
core_deps_from_sourceandprerelease_depsnox sessions installed core sibling packages sequentially. In a monorepo environment, this caused two major issues:pip installcommands triggered strict dependency resolution repeatedly, leading to severe CI timeouts.This updates the noxfile template to:
packages/directory to guarantee the presubmit tests the active PR's code.pip installcommands using--no-depsand--ignore-installedto bypass the resolver overhead and eliminate the sequential network bottleneck.prerelease_depsinto local vs. PyPI deployments using a regex parser, ensuring safe handling of complex version bounds (e.g.,grpcio>=1.75.1) without hardcoding multiple lists.