feat(internal/librarian): allow language-specific parallelism#4005
feat(internal/librarian): allow language-specific parallelism#4005jskeet merged 2 commits intogoogleapis:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the library generation process, separating the clean, generate, and format phases, and delegating parallel execution to language-specific implementations, which improves modularity and flexibility. However, a critical security vulnerability exists due to the lack of validation for the Output path in the library configuration. This unvalidated path is used in dangerous filesystem operations, such as arbitrary file deletion and creation, which could lead to the compromise of sensitive system files if a malicious configuration is used. Furthermore, critical issues related to goroutine safety in the new parallel generation logic for Dart and Rust have been identified, potentially causing race conditions.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4005 +/- ##
==========================================
- Coverage 82.30% 82.19% -0.11%
==========================================
Files 81 81
Lines 6629 6633 +4
==========================================
- Hits 5456 5452 -4
- Misses 818 825 +7
- Partials 355 356 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
31f0c08 to
e68c5c9
Compare
|
@JoeWang1127 This is now ready for review - it's only huge because I've added a new testdata API so that there are two APIs to generate for the tests :) (There's much more test code than production code.) |
df346bf to
6c4cc15
Compare
Refactors generation such that each phase of clean/generate/format is treated as a whole across all libraries, moving towards language-specific determination of when to perform operations in parallel within each phase. This commit only delegates that choice for generation, but the same pattern can be followed for cleaning and formatting when there's a desire to do so. Fixes googleapis#3933
6c4cc15 to
11e3a53
Compare
Refactors generation such that each phase of clean/generate/format is treated as a whole across all libraries, moving towards language-specific determination of when to perform operations in parallel within each phase.
This commit only delegates that choice for generation, but the same pattern can be followed for cleaning and formatting when there's a desire to do so.
Fixes #3933