@@ -310,10 +310,20 @@ Options:
310
310
311
311
Sometimes, a library generation requires special handling for
312
312
Maven coordinates or API ID, especially when the library is not
313
- specific to Google Cloud. Refer to the following command example when we
314
- generated Google Maps Routes API Java client library.
313
+ specific to Google Cloud. The table below is the summary of the
314
+ special cases:
315
315
316
- ** Note that for ` maps ` clients, include ` maps ` as a prefix to the ` api_shortname ` .**
316
+ | API paths | ` --api_shortname ` | ` --distribution-name ` |
317
+ | -------------------| -----------------------------| --------------------------------------------------------|
318
+ | google/shopping/* | ` shopping-<API short name> ` | ` com.google.shipping:google-shopping-<API short name> ` |
319
+ | google/maps/* | ` maps-<API short name> ` | ` com.google.maps:google-maps-<API short name> ` |
320
+
321
+ where ` <API short name> ` is the value from Cloud Drop file.
322
+
323
+ For example, the following command example was when we generated Google Maps Routes
324
+ API Java client library.
325
+ Notice ` maps ` as a prefix to the ` --api_shortname ` and it specifies ` com.google.maps ` group ID in
326
+ ` --distribution-name ` , while keeping ` --api-id ` with the value in Cloud Drop page.
317
327
318
328
```
319
329
~/google-cloud-java$ python3.9 generation/new_client/new-client.py generate \
@@ -327,6 +337,7 @@ generated Google Maps Routes API Java client library.
327
337
--requires-billing=true \
328
338
--distribution-name="com.google.maps:google-maps-routing"
329
339
```
340
+
330
341
### Example with duplicate api_short_name
331
342
332
343
Let's say you get a new library request where the Cloud Drop value for ` api_short_name ` is ` maps-routing ` .
@@ -356,12 +367,13 @@ Let's say that after some discussion, `maps-routing-gps` is selected as a suitab
356
367
# Principles
357
368
358
369
The script should finish creating a pull request even when the newly created
359
- module fails to compile. This gives the user flexibility to fix things in the
370
+ module fails to compile. This gives the user (release manager) some flexibility to fix things in the
360
371
created pull request.
361
372
362
373
# Common Errors
363
374
364
375
## Unable to clone googleapis-gen
376
+
365
377
```
366
378
Creating a new module /usr/local/google/home/lawrenceqiu/IdeaProjects/google-cloud-java/java-vmwareengine
367
379
gcr.io/cloud-devrel-public-resources/owlbot-java:latest
@@ -390,11 +402,14 @@ Traceback (most recent call last):
390
402
raise CalledProcessError(retcode, cmd)
391
403
subprocess.CalledProcessError: Command '['git', 'clone', '-q', 'https://github.com/googleapis/googleapis-gen.git', './gen/googleapis-gen']' returned non-zero exit status 128.
392
404
```
405
+
393
406
### Solution
407
+
394
408
Run ` gh auth login ` and choose to authenticate with HTTPS. You may already be authenticated with SSH.
395
409
![ img.png] ( img.png )
396
410
397
411
## Owl-bot Staging Directory Not Found
412
+
398
413
```
399
414
Removing googleapis-gen...
400
415
mv: cannot stat 'owl-bot-staging': No such file or directory
@@ -419,9 +434,11 @@ subprocess.CalledProcessError: Command '['mv', 'owl-bot-staging', '../']' return
419
434
```
420
435
421
436
### Solution
437
+
422
438
The proto path is incorrect. See the ` Proto Path ` section to find the correct path.
423
439
424
440
## Python3.9 is not Installed
441
+
425
442
```
426
443
pyenv: version `3.9.13' is not installed (set by /workspace/.python-version)
427
444
Traceback (most recent call last):
@@ -445,6 +462,7 @@ subprocess.CalledProcessError: Command '['docker', 'run', '--rm', '-v', '/usr/lo
445
462
```
446
463
447
464
### Solution
465
+
448
466
You have run the ` pyenv local 3.9.13 ` in the ` google-cloud-java ` repo.
449
467
1 . Remove the ` .python-version ` file in ` google-cloud-java ` .
450
468
2 . ` cd .. ` out to the parent directory and run ` pyenv local 3.9.13 ` there
0 commit comments