Commit 0957535
authored
chore(librarian): fix
This PR resolves the following stack traces which appear in the last
`librarian generate` job
```
Traceback (most recent call last):
File "/app/./cli.py", line 532, in handle_generate
_generate_api(api_path, library_id, source, output, version)
File "/app/./cli.py", line 764, in _generate_api
py_gapic_config = _read_bazel_build_py_rule(api_path, source)
File "/app/./cli.py", line 556, in _read_bazel_build_py_rule
result = parse_googleapis_content.parse_content(content)
File "/app/parse_googleapis_content.py", line 149, in parse_content
sl.eval(mod, ast, glb, sl.FileLoader(load))
starlark.StarlarkError: error: Variable `proto_library` not found
--> BUILD.bazel:28:1
|
28 | proto_library(
| ^^^^^^^^^^^^^
|
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/./cli.py", line 1412, in <module>
args.func(
File "/app/./cli.py", line 538, in handle_generate
raise ValueError("Generation failed.") from e
ValueError: Generation failed.
time=2025-10-02T11:28:44.666Z level=INFO msg="=== Docker end ================================================================="
time=2025-10-02T11:28:44.667Z level=ERROR msg="failed to generate library" id=google-cloud-source-context err="exit status 1"
```
```
Traceback (most recent call last):
File "/app/./cli.py", line 532, in handle_generate
_generate_api(api_path, library_id, source, output, version)
File "/app/./cli.py", line 764, in _generate_api
py_gapic_config = _read_bazel_build_py_rule(api_path, source)
File "/app/./cli.py", line 556, in _read_bazel_build_py_rule
result = parse_googleapis_content.parse_content(content)
File "/app/parse_googleapis_content.py", line 149, in parse_content
sl.eval(mod, ast, glb, sl.FileLoader(load))
starlark.StarlarkError: error: Variable `py_test` not found
--> BUILD.bazel:188:1
|
188 | py_test(
| ^^^^^^^
|
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/./cli.py", line 1412, in <module>
args.func(
File "/app/./cli.py", line 538, in handle_generate
raise ValueError("Generation failed.") from e
ValueError: Generation failed.
time=2025-10-02T12:32:33.921Z level=INFO msg="=== Docker end ================================================================="
time=2025-10-02T12:32:33.921Z level=ERROR msg="failed to generate library" id=google-cloud-recommendations-ai err="exit status 1"
```proto_library/py_test not found error (#14631)1 parent 12790db commit 0957535
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | 93 | | |
95 | | - | |
96 | 94 | | |
97 | 95 | | |
98 | 96 | | |
| |||
130 | 128 | | |
131 | 129 | | |
132 | 130 | | |
| 131 | + | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
0 commit comments