diff --git a/.github/release-note-generation/golden/java-vertexai/CHANGELOG.md b/.github/release-note-generation/golden/java-vertexai/CHANGELOG.md new file mode 100644 index 000000000000..fc8e1b839602 --- /dev/null +++ b/.github/release-note-generation/golden/java-vertexai/CHANGELOG.md @@ -0,0 +1,28 @@ +# Changelog + +## 0.50.0 (2023-06-08) + +### Features + +* some handwritten changes ([#1234](https://github.com/googleapis/google-cloud-java/issues/1234)) ([a268c80](https://github.com/googleapis/google-cloud-java/commit/a268c8016262a7a5a13be6a9983294f83d1ecc3f)) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.5.6 ([#9494](https://github.com/googleapis/google-cloud-java/issues/9494)) ([739763f](https://github.com/googleapis/google-cloud-java/commit/739763f15ffa2434d7fa089899165f1e8fa5f870)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.11.0 ([#9505](https://github.com/googleapis/google-cloud-java/issues/9505)) ([30bc6f0](https://github.com/googleapis/google-cloud-java/commit/30bc6f0aef5b95549230dbd5b5246f2a8dab4ba4)) + + +## [0.15.0](https://github.com/googleapis/google-cloud-java/compare/google-analytics-admin-v0.14.1-SNAPSHOT...google-analytics-admin-v0.15.0) (2022-10-24) + + +### Features + +* Old Feature Release Note Entry + + +### Bug Fixes + +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#8325](https://github.com/googleapis/google-cloud-java/issues/8325)) ([01f492b](https://github.com/googleapis/google-cloud-java/commit/01f492be424acdb90edb23ba66656aeff7cf39eb)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#8528](https://github.com/googleapis/google-cloud-java/issues/8528)) ([bd36199](https://github.com/googleapis/google-cloud-java/commit/bd361998ac4eb7c78eef3b3eac39aef31a0cf44e)) +* owl-bot-staging should not be commited ([#8337](https://github.com/googleapis/google-cloud-java/issues/8337)) ([c9bb4a9](https://github.com/googleapis/google-cloud-java/commit/c9bb4a97aa19032b78c86c951fe9920f24ac4eec)) +* revert reverting [Many APIs] Update WORKSPACE files for rules_gapic, gax_java, generator_java versions ([#8340](https://github.com/googleapis/google-cloud-java/issues/8340)) ([dedef71](https://github.com/googleapis/google-cloud-java/commit/dedef71f600e85b1c38e7110f5ffd44bf2ba32b4)) diff --git a/.github/release-note-generation/golden_test.sh b/.github/release-note-generation/golden_test.sh index ea1b14f4bb84..aa210ea95862 100644 --- a/.github/release-note-generation/golden_test.sh +++ b/.github/release-note-generation/golden_test.sh @@ -15,7 +15,7 @@ python3 "${basedir}/split_release_note.py" \ python3 "${basedir}/split_release_note.py" \ "${basedir}/testdata/main_release_note.txt" "${temp_dir}/testdata" -for module in java-analytics-admin java-maps-mapsplatformdatasets; do +for module in java-analytics-admin java-maps-mapsplatformdatasets java-vertexai; do diff -u "${temp_dir}/testdata/${module}/CHANGELOG.md" "${basedir}/golden/${module}/CHANGELOG.md" done diff --git a/.github/release-note-generation/split_release_note.py b/.github/release-note-generation/split_release_note.py index 6476c60f7bdf..e6dc356aaf9c 100644 --- a/.github/release-note-generation/split_release_note.py +++ b/.github/release-note-generation/split_release_note.py @@ -15,6 +15,7 @@ import re from collections import defaultdict from pathlib import Path +import json import xml.etree.ElementTree as ET @@ -39,26 +40,43 @@ def __repr__(self): # Returns the list of target modules that has CHANGELOG.md def detect_modules(root_directory: Path): modules = [] - for owlbot_yaml_path in root_directory.glob('*/.OwlBot.yaml'): - + for repo_metadata_path in root_directory.glob('*/.repo-metadata.json'): # This CHANGELOG.md might not exist for newly created libraries - changelog = owlbot_yaml_path.parent / 'CHANGELOG.md' + changelog = repo_metadata_path.parent / 'CHANGELOG.md' - module_pom_xml = owlbot_yaml_path.parent / 'pom.xml' + module_path = repo_metadata_path.parent + module_pom_xml = module_path / 'pom.xml' + owlbot_yaml_path = module_path/ '.OwlBot.yaml' if not module_pom_xml.exists(): continue tree = ET.parse(module_pom_xml) root = tree.getroot() version = root.find('mvn:version', POM_NAMESPACES).text + if owlbot_yaml_path.exists(): + # If OwlBot configuration file exists (most cases), it's the better + # source to get the OwlBot-generated pull request title prefix than + # the repo-metadata.json + with open(owlbot_yaml_path, 'r') as file: + owlbot_yaml_content = file.read() + match = re.search(r'api-name: (.+)', owlbot_yaml_content) + if match: + api_name = match.group(1) + modules.append(LibraryModule(module_path, api_name, + version, + changelog)) + else: + # vertexai (handwritten) does not have OwlBot yaml file + with open(repo_metadata_path, 'r') as file: + repo_metadata = json.load(file) + api_name = repo_metadata['api_shortname'] + if api_name: + modules.append(LibraryModule(repo_metadata_path.parent, api_name, + version, + changelog)) + else: + raise Exception(f'repo_metadata_path {repo_metadata_path} does' + f' not have api_shortname field') - with open(owlbot_yaml_path, 'r') as file: - owlbot_yaml_content = file.read() - match = re.search(r'api-name: (.+)', owlbot_yaml_content) - if match: - api_name = match.group(1) - modules.append(LibraryModule(owlbot_yaml_path, api_name, - version, - changelog)) return modules diff --git a/.github/release-note-generation/testdata/java-analytics-admin/.repo-metadata.json b/.github/release-note-generation/testdata/java-analytics-admin/.repo-metadata.json new file mode 100644 index 000000000000..4fe648985369 --- /dev/null +++ b/.github/release-note-generation/testdata/java-analytics-admin/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_shortname": "analyticsadmin", + "name_pretty": "Analytics Admin", + "product_documentation": "https://developers.google.com/analytics", + "api_description": "allows you to manage Google Analytics accounts and properties.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-analytics-admin/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-analytics-admin", + "distribution_name": "com.google.analytics:google-analytics-admin", + "api_id": "analyticsadmin.googleapis.com", + "requires_billing": true, + "codeowner_team": "@googleapis/analytics-dpe", + "library_type": "GAPIC_AUTO" +} diff --git a/.github/release-note-generation/testdata/java-maps-mapsplatformdatasets/.repo-metadata.json b/.github/release-note-generation/testdata/java-maps-mapsplatformdatasets/.repo-metadata.json new file mode 100644 index 000000000000..1f8132184201 --- /dev/null +++ b/.github/release-note-generation/testdata/java-maps-mapsplatformdatasets/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "maps-mapsplatformdatasets", + "name_pretty": "Maps Platform Datasets API", + "product_documentation": "https://developers.google.com/maps/documentation", + "api_description": "The Maps Platform Datasets API enables developers to ingest geospatially-tied datasets\n that they can use to enrich their experience of Maps Platform solutions (e.g. styling, routing).", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-maps-mapsplatformdatasets/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-maps-mapsplatformdatasets", + "repo_short": "java-maps-mapsplatformdatasets", + "distribution_name": "com.google.maps:google-maps-mapsplatformdatasets", + "api_id": "mapsplatformdatasets.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/.github/release-note-generation/testdata/java-vertexai/.repo-metadata.json b/.github/release-note-generation/testdata/java-vertexai/.repo-metadata.json new file mode 100644 index 000000000000..ce125aa5663f --- /dev/null +++ b/.github/release-note-generation/testdata/java-vertexai/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "vertexai", + "name_pretty": "VertexAI API", + "product_documentation": "https://cloud.google.com/vertex-ai/docs", + "api_description": "Vertex AI is an integrated suite of machine learning tools and services for building and using ML models with AutoML or custom code. It offers both novices and experts the best workbench for the entire machine learning development lifecycle.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-vertexai/latest/overview", + "release_level": "preview", + "transport": "both", + "language": "java", + "repo": "googleapis/java-vertexai", + "repo_short": "java-vertexai", + "distribution_name": "com.google.cloud:google-cloud-vertexai", + "api_id": "vertexai.googleapis.com", + "library_type": "GAPIC_COMBO", + "requires_billing": true +} diff --git a/.github/release-note-generation/testdata/java-vertexai/CHANGELOG.md b/.github/release-note-generation/testdata/java-vertexai/CHANGELOG.md new file mode 100644 index 000000000000..0b539d83d025 --- /dev/null +++ b/.github/release-note-generation/testdata/java-vertexai/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +## [0.15.0](https://github.com/googleapis/google-cloud-java/compare/google-analytics-admin-v0.14.1-SNAPSHOT...google-analytics-admin-v0.15.0) (2022-10-24) + + +### Features + +* Old Feature Release Note Entry + + +### Bug Fixes + +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#8325](https://github.com/googleapis/google-cloud-java/issues/8325)) ([01f492b](https://github.com/googleapis/google-cloud-java/commit/01f492be424acdb90edb23ba66656aeff7cf39eb)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#8528](https://github.com/googleapis/google-cloud-java/issues/8528)) ([bd36199](https://github.com/googleapis/google-cloud-java/commit/bd361998ac4eb7c78eef3b3eac39aef31a0cf44e)) +* owl-bot-staging should not be commited ([#8337](https://github.com/googleapis/google-cloud-java/issues/8337)) ([c9bb4a9](https://github.com/googleapis/google-cloud-java/commit/c9bb4a97aa19032b78c86c951fe9920f24ac4eec)) +* revert reverting [Many APIs] Update WORKSPACE files for rules_gapic, gax_java, generator_java versions ([#8340](https://github.com/googleapis/google-cloud-java/issues/8340)) ([dedef71](https://github.com/googleapis/google-cloud-java/commit/dedef71f600e85b1c38e7110f5ffd44bf2ba32b4)) diff --git a/.github/release-note-generation/testdata/java-vertexai/pom.xml b/.github/release-note-generation/testdata/java-vertexai/pom.xml new file mode 100644 index 000000000000..022883324831 --- /dev/null +++ b/.github/release-note-generation/testdata/java-vertexai/pom.xml @@ -0,0 +1,13 @@ + + + 4.0.0 + com.google.cloud + google-vertexai-parent + pom + 0.50.0 + Google VertexAI Parent + + Java idiomatic client for Google VertexAI. + + + diff --git a/.github/release-note-generation/testdata/main_release_note.txt b/.github/release-note-generation/testdata/main_release_note.txt index e2fa591b4b4a..7dc276c3cea9 100644 --- a/.github/release-note-generation/testdata/main_release_note.txt +++ b/.github/release-note-generation/testdata/main_release_note.txt @@ -14,7 +14,7 @@ * [clouddeploy] Add support for disabling Pod overprovisioning in the progressive deployment strategy configuration for a Kubernetes Target ([#9499](https://github.com/googleapis/google-cloud-java/issues/9499)) ([b7890c5](https://github.com/googleapis/google-cloud-java/commit/b7890c57859116d1f6033af9f485598d84428f44)) * [analyticsadmin] Add the resource definition of a STT recognizer ([#9492](https://github.com/googleapis/google-cloud-java/issues/9492)) ([f2baa92](https://github.com/googleapis/google-cloud-java/commit/f2baa928c4f4d9959591ea905d7c9042320dbc71)) * [maps-mapsplatformdatasets] new module for migrationcenter ([#9514](https://github.com/googleapis/google-cloud-java/issues/9514)) ([a268c80](https://github.com/googleapis/google-cloud-java/commit/a268c8016262a7a5a13be6a9983294f83d1ecc3f)) - +* [vertexai] some handwritten changes ([#1234](https://github.com/googleapis/google-cloud-java/issues/1234)) ([a268c80](https://github.com/googleapis/google-cloud-java/commit/a268c8016262a7a5a13be6a9983294f83d1ecc3f)) ### Bug Fixes