Commit 5ca8803
authored
fix(templates): resolve core dependencies locally and batch pip installs (#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.1 parent 43dfc16 commit 5ca8803
9 files changed
Lines changed: 523 additions & 226 deletions
File tree
- packages/gapic-generator
- gapic/templates
- tests/integration/goldens
- asset
- credentials
- eventarc
- logging_internal
- logging
- redis_selective
- redis
- storagebatchoperations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
529 | 554 | | |
| 555 | + | |
| 556 | + | |
530 | 557 | | |
531 | 558 | | |
532 | 559 | | |
| |||
595 | 622 | | |
596 | 623 | | |
597 | 624 | | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
604 | 631 | | |
605 | 632 | | |
606 | | - | |
607 | | - | |
608 | | - | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
609 | 642 | | |
610 | 643 | | |
611 | 644 | | |
| |||
Lines changed: 58 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
521 | 546 | | |
| 547 | + | |
| 548 | + | |
522 | 549 | | |
523 | 550 | | |
524 | 551 | | |
| |||
588 | 615 | | |
589 | 616 | | |
590 | 617 | | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
596 | 623 | | |
597 | 624 | | |
598 | | - | |
599 | | - | |
600 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
601 | 634 | | |
602 | 635 | | |
603 | 636 | | |
| |||
Lines changed: 58 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
521 | 546 | | |
| 547 | + | |
| 548 | + | |
522 | 549 | | |
523 | 550 | | |
524 | 551 | | |
| |||
588 | 615 | | |
589 | 616 | | |
590 | 617 | | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
596 | 623 | | |
597 | 624 | | |
598 | | - | |
599 | | - | |
600 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
601 | 634 | | |
602 | 635 | | |
603 | 636 | | |
| |||
0 commit comments