Commit f11bb69
authored
fix(internal/librarian): join protobuf-src subdir before passing down to sidekick (#3279)
This is a fix to follow-up on revert
#3277. Now it combines
protobuf root dir and subdir before passing down to sidekick config as
"protobuf-src-root".
Issue with implementation before revert: pass down both
`protobuf-src-root` and `protobuf-src-subdir` to sidekick, combine the
path in `protoc` when constructing protoc command. This was fine, but
sidekick flow joins path before this point in
[overrideSources](https://github.com/googleapis/librarian/blob/b405072f6a4f72adcc3ff299cb13de6bbe3d4327/internal/sidekick/sidekick/refreshall.go#L60),
but somehow kept `-subdir` config at a later point (Not totally clear
when, likely during a merge, need a bit more digging), then results in
`proto/path/subdir/subdir`.
Now: `librarian generate` comibines path after downloading, before
translating to sidekick config. `sidekick refresh` continue to do the
join in `overrideSources`. This code is not shared with librarian, so
logic not repeated.
Alternative: Keep path join logic within `protoc` function and remove
joins in librarian and `overrideSources`. Did not choose because wanted
to limit impact for sidekick codepath to avoid unexpected behaviors.
Fix #31831 parent b405072 commit f11bb69
2 files changed
+16
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 53 | + | |
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
598 | 599 | | |
599 | 600 | | |
600 | 601 | | |
| 602 | + | |
601 | 603 | | |
602 | 604 | | |
603 | 605 | | |
| |||
606 | 608 | | |
607 | 609 | | |
608 | 610 | | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
614 | 615 | | |
615 | 616 | | |
616 | 617 | | |
| |||
646 | 647 | | |
647 | 648 | | |
648 | 649 | | |
649 | | - | |
| 650 | + | |
650 | 651 | | |
651 | 652 | | |
652 | 653 | | |
| |||
0 commit comments