googleapis / googleapis/google-cloud-java

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

未关闭
#12,384 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
priority: p3 type: docs
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
154

描述

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).

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。