@@ -262,7 +262,39 @@ see the [project's README](https://github.com/googleapis/google-auth-library-jav
262262for how to use credentials with google-http-client and
263263[ javadoc] ( https://cloud.google.com/java/docs/reference/google-auth-library/latest/overview ) for more details.
264264
265- ## Generating the API clients
265+ ## How the code is updated and published
266+
267+ When a change is made in the API definitions, the following events happens:
268+
269+ 1 . [ The discovery-artifact-manager repository] ( https://github.com/googleapis/discovery-artifact-manager ) has
270+ [ update-discoveries job] ( https://github.com/googleapis/discovery-artifact-manager/blob/master/.github/workflows/update-disco.yml )
271+ that copies the definition files from https://discovery.googleapis.com/discovery/v1/apis to
272+ the repository.
273+ 2 . This google-api-java-client-services repository has ([ codegen workflow] (
274+ https://github.com/googleapis/google-api-java-client-services/blob/main/.github/workflows/codegen.yaml )).
275+ This daily workflow has the following jobs:
276+ - ** discovery** : It uses the discovery-artifact-manager repository's [ List discovery services workflow] (
277+ https://github.com/googleapis/discovery-artifact-manager/blob/master/.github/workflows/list-services.yml )
278+ to list the service names.
279+ Example values in the returned array include "storage" (from ` discoveries/storage.v1.json ` ) and "admin"
280+ (from ` discoveries/admin.datatransfer_v1.json ` ).
281+ - ** total_service_size_check** : This job ensures the size of the service name array does not exceed 300
282+ (00:30 to 02:30 implies 3 batches of size 100); otherwise it fails.
283+ As of November 2023, the size of the service name array is 269.
284+ - ** batch** This job splits the service names into chunks of maximum 100 and returns an array containing the chunks.
285+ This is to avoid one job that is too long to finish and also to avoid hitting the maximum parallel job limit of Github actions (256).
286+ - ** generate** : At the end, this job runs the code generator for each service in the chunk whose array index
287+ corresponds to the hour of the day. For details, see [ codegen.yaml] (
288+ https://github.com/googleapis/google-api-java-client-services/blob/main/.github/workflows/codegen.yaml ).
289+ If there are code changes, this job creates pull requests
290+ (Example: [ #18860 ] ( https://github.com/googleapis/google-api-java-client-services/pull/18860 ) ).
291+ 3 . The yoshi-approver and merge-on-green bots merge the pull requests automatically.
292+ 4 . [ The Kokoro job] ( http://fusion2/search?q=google-api-java-client-services%2Frelease&s=p )
293+ publishes the libraries in this repository.
294+
295+ ## Generating the API clients locally
296+
297+ If you want to generate certain code locally for troubleshooting purpose, please follow these steps:
266298
267299Generating the API clients requires git and Python 3.6.
268300
0 commit comments