GoogleCloudPlatform / GoogleCloudPlatform/spring-cloud-gcp
The Spring Autogen Script should automatically remove the modules that aren't in the libraries-bom
- Dominant language
- Java
- Stars
- 551
- Forks
- 349
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 14
Description
Recently, the `com.google.cloud:google-cloud-game-servers` library was removed from libraries-bom. However, running the `Generate Spring Auto-Configurations` job results in the following error, requiring a manual removal of the module in https://github.com/GoogleCloudPlatform/spring-cloud-gcp/pull/2175:
```
Error: The project com.google.cloud:google-cloud-game-servers-spring-starter:4.7.3-SNAPSHOT-preview (/home/runner/work/spring-cloud-gcp/spring-cloud-gcp/spring-cloud-previews/google-cloud-game-servers-spring-starter/pom.xml) has 1 error
Error: 'dependencies.dependency.version' for com.google.cloud:google-cloud-game-servers:jar is missing. @ com.google.cloud:google-cloud-game-servers-spring-starter:${project.parent.version}-preview, /home/runner/work/spring-cloud-gcp/spring-cloud-gcp/spring-cloud-previews/google-cloud-game-servers-spring-starter/pom.xml, line 19, column 17
```
This [line in the generate.sh script ](https://github.com/GoogleCloudPlatform/spring-cloud-gcp/blob/736fcdcb6af258481c60a45e548baec3ecc3af72/spring-cloud-generator/scripts/generate.sh#L44)has some logic to get the list of libraries from the monorepo given a [LIBRARIES_BOM version].
However, this happens a little late in the job cycle: https://github.com/GoogleCloudPlatform/spring-cloud-gcp/blob/736fcdcb6af258481c60a45e548baec3ecc3af72/.github/workflows/generateAutoConfigs.yaml#L80
Specifically, after the `Compile auto-gen libraries step`
Potential Solution: We may need to add some logic to the `generate.sh` script to determine which modules are currently absent from the libraries-bom and delete them spring-cloud-gcp-previews.
Contributor guide
Assessment
This issue has not been assessed yet.