googleapis / googleapis/google-cloud-java

[sdk-platform-java] There are no instructions to run the hermetic build ITs locally

Aperta
#12,384 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
priority: p3 type: docs
Lingua principale
Java
Stelle
2.1k
Fork
1.2k
Merge medio
1g 23h
PR unite (30g)
154

Descrizione

I found some potential improvements for https://github.com/googleapis/sdk-platform-java/blob/main/hermetic_build/DEVELOPMENT.md#run-the-integration-tests. Mainly, to explain how to run the integration test locally.

For example, https://github.com/googleapis/sdk-platform-java/pull/3472 simplified the IT setup and moved it to Cloud Build in order to leverage Airlock and parallelize the different setup stages of the IT. The configuration for such IT also introduced changes in the way it's run.

With such guide, the commits after https://github.com/googleapis/sdk-platform-java/pull/3726/commits/6b5c220626c7b995281363cc36112d620bd1baf4 as part of https://github.com/googleapis/sdk-platform-java/pull/3723 would have probably been less.

After inspecting the [IT's `.cloudbuild` file](https://github.com/googleapis/sdk-platform-java/blob/main/.cloudbuild/library_generation/cloudbuild-library-generation-integration-test.yaml) and related files, I understood that:
- The generation config at https://github.com/googleapis/google-cloud-java/commit/f20c3115f0b4a341a475c2356655cccfbd14f627 has no effect. Instead, [the golden configuration in sdk-platform-java](https://github.com/googleapis/sdk-platform-java/blob/f1f979d873868c0ef77b0a2d1f987aeb5ec5716f/hermetic_build/library_generation/tests/resources/integration/google-cloud-java/generation_config.yaml) is used. Although I was involved in this codebase, it's a fact I forgot and had me wondering why the generation produces a mismatch with the golden branch :)
- The Dockerfile for the integration tests is not the traditional one, but the [Airlock version](https://github.com/googleapis/sdk-platform-java/blob/main/.cloudbuild/library_generation/library_generation_airlock.Dockerfile).
- The generator is [separately downloaded](https://github.com/googleapis/sdk-platform-java/blob/f1f979d873868c0ef77b0a2d1f987aeb5ec5716f/.cloudbuild/library_generation/cloudbuild-library-generation-integration-test.yaml#L69-L75) and locked to a specific version that overrides [the one compiled in the image building job](https://github.com/googleapis/sdk-platform-java/blob/f1f979d873868c0ef77b0a2d1f987aeb5ec5716f/.cloudbuild/library_generation/library_generation_airlock.Dockerfile#L27-L29).

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.