Skip to content

feat(google/datastore/v1): onboard a new library#8856

Draft
quirogas wants to merge 1 commit into
googleapis:mainfrom
quirogas:feat/onboard-datastore-api
Draft

feat(google/datastore/v1): onboard a new library#8856
quirogas wants to merge 1 commit into
googleapis:mainfrom
quirogas:feat/onboard-datastore-api

Conversation

@quirogas

Copy link
Copy Markdown
Contributor

No description provided.

@quirogas quirogas requested a review from a team as a code owner July 10, 2026 21:05
@quirogas quirogas marked this pull request as draft July 10, 2026 21:05

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the auto-generated @google-cloud/datastore-api package, onboarding client libraries, protobuf definitions, samples, and tests for both the main Datastore and Datastore Admin APIs. However, a critical issue was identified where sequential generation runs caused the admin API generation to overwrite several shared files. As a result, DatastoreClient is completely missing from the package exports, which breaks the test suite. Additionally, the package description, README links, and webpack configuration are incorrect because they only reference the admin client instead of the entire Datastore API. The generation orchestrator or configuration needs to be updated to ensure both clients are generated and exported together.

// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

export { DatastoreAdminClient } from './datastore_admin_client';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The 'DatastoreClient' (from 'google/datastore/v1') is generated in 'src/v1/datastore_client.ts' but is completely missing from the exports in 'src/v1/index.ts'. This typically happens when the generator is run sequentially for multiple APIs, causing the second run (for 'admin/v1') to overwrite the index files generated by the first run. Since these are auto-generated files, please do not edit them manually. Instead, the generation orchestrator or configuration should be updated to ensure both clients are generated and exported together without overwriting each other.

References
  1. Do not manually edit generated TypeScript client files. Any changes or updates must be made upstream in the generator.

Comment on lines +24 to +25
export {v1, DatastoreAdminClient};
export default {v1, DatastoreAdminClient};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Only 'DatastoreAdminClient' is exported here. 'DatastoreClient' is completely omitted from the package's main entry point. This is a critical issue resulting from the sequential generation overwrite of the index files. Please update the generation process to ensure both clients are correctly exported from the package.

References
  1. Do not manually edit generated TypeScript client files. Any changes or updates must be made upstream in the generator.


it('should create a client with no option', () => {
const client = new datastoreModule.v1.DatastoreClient();
assert(client);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Because 'DatastoreClient' is not exported in 'src/v1/index.ts', importing and instantiating 'datastoreModule.v1.DatastoreClient' here will fail at compile time and runtime. This confirms that the sequential generation overwrite of the index files has broken the build and test suite for the main 'DatastoreClient'.

References
  1. Do not manually edit generated TypeScript client files. Any changes or updates must be made upstream in the generator.

{
"name": "@google-cloud/datastore-api",
"version": "0.1.0",
"description": "Admin client for Node.js",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The description 'Admin client for Node.js' is misleading for a package that is supposed to onboard the entire Datastore API (including the main 'DatastoreClient'). This is another symptom of the sequential generation overwrite issue, where the second generation run (for 'admin/v1') overwrote the 'package.json' from the first run. Please ensure the generation process merges or correctly sets the package metadata.

References
  1. Do not manually edit generated client configuration JSON files. Any changes or updates must be made upstream in the generator.

Comment on lines +106 to +108
[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-datastore-admin/samples
[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-datastore-admin/CHANGELOG.md
[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-datastore-admin

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The generated links at the bottom of the README point to 'packages/google-datastore-admin' instead of 'packages/google-cloud-datastore-api'. This is likely because the generator used the last API path ('google/datastore/admin/v1') to construct these links during the sequential generation. Please ensure the generation orchestrator correctly uses the package directory name 'google-cloud-datastore-api' for these links.

References
  1. Do not manually edit auto-generated files to fix typos or make other changes, as these edits will be overwritten during the next regeneration. Instead, apply the fixes upstream in the generator or templates.

Comment on lines +20 to +21
library: 'DatastoreAdmin',
filename: './datastore-admin.js',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The webpack configuration exports the library as 'DatastoreAdmin' and outputs to 'datastore-admin.js'. For a unified 'google-cloud-datastore-api' package, this should ideally represent the entire Datastore API (or both clients). This is another side-effect of the sequential generation overwrite where the admin client's configuration overwrote the main client's configuration.

@quirogas quirogas changed the title feat: onboard datastore api feat(google/datastore/v1): onboard a new library Jul 10, 2026
@quirogas quirogas force-pushed the feat/onboard-datastore-api branch from c270c15 to d65d7a6 Compare July 10, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant