ci: update sdk-platform-java templates and tests for monorepo migration#12831
ci: update sdk-platform-java templates and tests for monorepo migration#12831
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates repository references from googleapis/sdk-platform-java to googleapis/google-cloud-java across various configuration files, tests, and scripts, reflecting a move to a monorepo structure. It also includes minor CI script adjustments like removing a maven mirror setup and adding debug diffs. Feedback suggests ensuring that workflow templates are updated to match the new paths in update_generation_config.sh and renovate.json to prevent failures. Additionally, it is recommended to rename the SDK_PLATFORM_JAVA constant and associated test methods to accurately reflect the new repository name for better maintainability.
|
|
||
| # Update composite action version to latest gapic-generator-java version | ||
| update_action "googleapis/sdk-platform-java/.github/scripts" \ | ||
| update_action "googleapis/google-cloud-java/sdk-platform-java/.github/scripts" \ |
There was a problem hiding this comment.
The update_action call is updated to search for the new monorepo path. If the workflow templates (e.g., in .github/workflows/) still reference the old googleapis/sdk-platform-java path, this script will fail to find and update the action version. The workflow files should be updated to use the new path to ensure the generation process continues to work correctly.
| ], | ||
| "matchStrings": [ | ||
| "uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v(?<currentValue>.+?)\\n" | ||
| "uses: googleapis/google-cloud-java/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@v(?<currentValue>.+?)\\n" |
There was a problem hiding this comment.
| self.assertEqual(test_input + "\n", result) | ||
|
|
||
| def test_get_library_repository_with_common_protos_returns_sdk_platform_java(self): | ||
| config = self.__get_a_gen_config(3) |
There was a problem hiding this comment.
The test method name is now inconsistent with the updated assertion on line 186. Renaming it to reflect the new expected repository name would improve maintainability.
| config = self.__get_a_gen_config(3) | |
| def test_get_library_repository_with_common_protos_returns_google_cloud_java(self): |
|
|
||
| script_dir = os.path.dirname(os.path.realpath(__file__)) | ||
| SDK_PLATFORM_JAVA = "googleapis/sdk-platform-java" | ||
| SDK_PLATFORM_JAVA = "googleapis/google-cloud-java" |
There was a problem hiding this comment.
6f44ad4 to
3a7d92b
Compare
Update templates for update_generation_config.sh and renovate.json to use the new action paths and gapic-libraries-bom. Update SDK_PLATFORM_JAVA constant and related tests/goldens. b/503444342
6f44ad4 to
9862492
Compare
|
Working on this error https://github.com/googleapis/google-cloud-java/pull/12831/checks?check_run_id=71851340776: |
This PR updates the templates and tests in sdk-platform-java to reflect its new location in the google-cloud-java monorepo. It also switches the unmanaged dependency check to track gapic-libraries-bom. b/503444342