You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(librarian): update configure_state_yaml.py to avoid duplicate entries (#14452)
This PR resolves the issue where duplicate values for `id` could be
added to `state.yaml`. When duplicate entries exist in `state.yaml`
librarian seems to provide an empty `generate-request.json` which leads
to the following error (see
googleapis/librarian#2186):
```
Traceback (most recent call last):
File "/app/./cli.py", line 261, in handle_generate
request_data = _read_json_file(f"{librarian}/{GENERATE_REQUEST_FILE}")
File "/app/./cli.py", line 100, in _read_json_file
return json.load(f)
File "/usr/local/lib/python3.9/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 31 column 2 (char 755)
```
See output below for `google-cloud-dlp` and `google-cloud-eventarc`
which already exist in `.librarian/state.yaml`
```
partheniou@partheniou-vm-3:~/git/google-cloud-python/scripts/configure_state_yaml$ python3 configure_state_yaml.py
Skipping package 'google-cloud-dlp' as it already exists in state.yaml.
Skipping package 'google-cloud-eventarc' as it already exists in state.yaml.
```
0 commit comments