Skip to content

Commit 54e4a46

Browse files
authored
chore(librarian): specify all generated files in remove_regex (#1556)
This PR resolves the following issue when running `librarian generate`. Librarian now prevents generated files from clobbering existing files. All generated files must match `remove_regex` otherwise we will see errotr like `file existed in destination` ``` time=2025-11-06T20:18:57.185Z level=INFO msg="=== Docker end =================================================================" time=2025-11-06T20:18:57.185Z level=INFO msg="cleaning directories" "source roots"=[.] time=2025-11-06T20:18:57.200Z level=INFO msg="copying library files" id=google-cloud-pubsub destination=/usr/local/google/home/partheniou/git/python-pubsub source=/tmp/librarian-2318048050/output/google-cloud-pubsub time=2025-11-06T20:18:57.201Z level=ERROR msg="failed to generate library" id=google-cloud-pubsub err="file existed in destination: /usr/local/google/home/partheniou/git/python-pubsub/.coveragerc" time=2025-11-06T20:18:57.201Z level=INFO msg="generation statistics" all=1 successes=0 skipped=0 failures=1 time=2025-11-06T20:18:57.201Z level=ERROR msg="librarian command failed" err="all 1 libraries failed to generate (skipped: 0)" ``` Command used ``` librarian generate --generate-unchanged ```
1 parent 78418d4 commit 54e4a46

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

.librarian/state.yaml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,36 @@ image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-li
22
libraries:
33
- id: google-cloud-pubsub
44
version: 2.33.0
5-
last_generated_commit: fee5b32df810adbd07d6a20bd97d9239937ef6e4
5+
last_generated_commit: 9fcfbea0aa5b50fa22e190faceb073d74504172b
66
apis:
77
- path: google/pubsub/v1
88
service_config: pubsub_v1.yaml
99
source_roots:
1010
- .
1111
preserve_regex: []
1212
remove_regex:
13-
- google/pubsub
14-
- google/pubsub_v1
15-
- tests/unit/gapic
13+
- ^google/pubsub
14+
- ^google/pubsub_v1
15+
- ^tests/unit/gapic
16+
- ^tests/__init__.py
17+
- ^tests/unit/__init__.py
18+
- ^.coveragerc
19+
- ^.flake8
20+
- ^.pre-commit-config.yaml
21+
- ^.repo-metadata.json
22+
- ^.trampolinerc
23+
- ^LICENSE
24+
- ^MANIFEST.in
25+
- ^SECURITY.md
26+
- ^mypy.ini
27+
- ^noxfile.py
28+
- ^owlbot.py
29+
- ^renovate.json
30+
- ^samples/AUTHORING_GUIDE.md
31+
- ^samples/CONTRIBUTING.md
32+
- ^samples/generated_samples
33+
- ^scripts/fixup_pubsub_v1_keywords.py
34+
- ^setup.py
35+
- ^testing/constraints-3.9
36+
- ^testing/constraints-3.1
1637
tag_format: v{version}

0 commit comments

Comments
 (0)