Commit 22b9640
authored
chore(librarian): resolve issue where generation failed for certain packages (#14828)
This PR fixes an issue where generation fails for libraries when
`/input/packages/google-cloud-<api>` does not exist.
```
Traceback (most recent call last):
File "/app/./cli.py", line 620, in handle_generate
_copy_files_needed_for_post_processing(output, input, library_id, is_mono_repo)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/./cli.py", line 372, in _copy_files_needed_for_post_processing
shutil.copytree(
~~~~~~~~~~~~~~~^
source_dir,
^^^^^^^^^^^
...<2 lines>...
ignore=shutil.ignore_patterns("client-post-processing"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.14/shutil.py", line 652, in copytree
with os.scandir(src) as itr:
~~~~~~~~~~^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/input/packages/google-cloud-hypercomputecluster'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/./cli.py", line 1582, in <module>
args.func(
~~~~~~~~~^
librarian=args.librarian,
^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
input=args.input,
^^^^^^^^^^^^^^^^^
)
^
File "/app/./cli.py", line 628, in handle_generate
raise ValueError("Generation failed.") from e
ValueError: Generation failed.
```1 parent 5ba8437 commit 22b9640
2 files changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
378 | 379 | | |
379 | 380 | | |
380 | 381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
859 | 859 | | |
860 | 860 | | |
861 | 861 | | |
| 862 | + | |
862 | 863 | | |
863 | 864 | | |
864 | 865 | | |
| |||
0 commit comments