Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

feat!: correct wrong return type for listOperations in Operation Client#1729

Merged
sofisl merged 5 commits intomainfrom
correctWrongType
Mar 18, 2025
Merged

feat!: correct wrong return type for listOperations in Operation Client#1729
sofisl merged 5 commits intomainfrom
correctWrongType

Conversation

@sofisl
Copy link
Contributor

@sofisl sofisl commented Mar 18, 2025

@sofisl sofisl requested a review from a team March 18, 2025 00:24
@sofisl sofisl requested a review from a team as a code owner March 18, 2025 00:24
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Mar 18, 2025
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. and removed size: xs Pull request size is extra small. labels Mar 18, 2025
@sofisl
Copy link
Contributor Author

sofisl commented Mar 18, 2025

System tests will fail on this because of the wrong type. This should be expected because gax is pulling in the latest version of system tests for a given API, which will fail because the annotated type is wrong, because this hasn't been generated yet: googleapis/gapic-generator-typescript#1702. The way we'll know this is safe to merge is if Browser tests pass, since I regenerated showcase with the new generator branch, which should be generated with the new future correct types.

"@types/node": "^20.11.26",
"gapic-tools": "./gapic-tools.tgz",
"typescript": "^5.7.3"
"@types/mocha": "^10.0.7",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a lot of dev dependencies changes - should it be?

Also, we should probably be pointing to local gapic-tools

@sofisl sofisl requested a review from leahecole March 18, 2025 19:09
Copy link
Contributor

@leahecole leahecole left a comment

Choose a reason for hiding this comment

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

more nits


The only modification is in `package.json`, where it's set to depend on the local
version of `google-gax` being tested.
version of `google-gax` being tested. No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

double check this for a whitespace error - I feel like it shouldn't have anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added a new line

LocationsClient,
LocationProtos,
} from 'google-gax';
import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, IamClient, IamProtos, LocationsClient, LocationProtos} from 'google-gax';
Copy link
Contributor

Choose a reason for hiding this comment

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

would this change be fixed by a lil npm run fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So this library doesn't have gts, I did run npm fix at the top level but it doesn't touch these files. I think in a future PR maybe I'll add something for linting in the generator, see: https://github.com/googleapis/gapic-generator-typescript/issues/1698

@@ -1,5 +1,5 @@
{
"extends": "../../node_modules/gts/tsconfig-google.json",
"extends": "./node_modules/gts/tsconfig-google.json",
Copy link
Contributor

Choose a reason for hiding this comment

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

double check the path, not sure if should change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call!

@sofisl sofisl requested a review from leahecole March 18, 2025 20:27
Copy link
Contributor

@leahecole leahecole left a comment

Choose a reason for hiding this comment

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

LGTM assuming the expected tests pass

@sofisl sofisl merged commit c5af911 into main Mar 18, 2025
26 of 27 checks passed
@sofisl sofisl deleted the correctWrongType branch March 18, 2025 20:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

listOperationsAsync Type Mismatch Due to gax-nodejs Pagination Handling

2 participants