googleapis / googleapis/google-cloud-java
[sdk-platform-java] There are no instructions to run the hermetic build ITs locally
- Langage dominant
- Java
- Étoiles
- 2.1k
- Forks
- 1.2k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 154
Description
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).
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.