Skip to content

Commit

Permalink
fix: fixes for dynamic routing and streaming descriptors (#4)
Browse files Browse the repository at this point in the history
* fix: fixes for dynamic routing and streaming descriptors

Use gapic-generator-typescript v2.14.5.

PiperOrigin-RevId: 450616838

Source-Link: googleapis/googleapis@7a47b72

Source-Link: googleapis/googleapis-gen@42cc633
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDJjYzYzMzFiYWUwYjk5ZjYxYjhlMDFhZTE1YjA1MjExNzE2YzRmOSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* refactor: resolving lint errors

* fix: resolving broken doc link

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Patti Shin <pattishin@users.noreply.github.com>
  • Loading branch information
3 people committed Jun 2, 2022
1 parent 7ee24c9 commit 93c870f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-run/.repo-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "run",
"name_pretty": "Cloud Run",
"product_documentation": "https://cloud.google.com/run",
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/run/latest",
"client_documentation": "https://googleapis.dev/nodejs/run/latest",
"issue_tracker": "https://github.com/googleapis/nodejs-run/issues",
"release_level": "beta",
"language": "nodejs",
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-run/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Apache Version 2.0

See [LICENSE](https://github.com/googleapis/nodejs-run/blob/main/LICENSE)

[client-docs]: https://cloud.google.com/nodejs/docs/reference/run/latest
[client-docs]: https://googleapis.dev/nodejs/run/latest
[product-docs]: https://cloud.google.com/run
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[projects]: https://console.cloud.google.com/project
Expand Down
9 changes: 4 additions & 5 deletions packages/google-cloud-run/src/v2/services_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1013,16 +1013,15 @@ export class ServicesClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
const routingParameter = {};
const reqService = request.service || {};
if (
typeof request.service?.name !== 'undefined' &&
typeof reqService.name !== 'undefined' &&
RegExp('projects/[^/]+/locations/(?<location>[^/]+)(?:/.*)?').test(
request.service.name!
reqService.name!
)
) {
Object.assign(routingParameter, {
location: request.service?.name!.match(
RegExp('(?<location>[^/]+)')
)![0],
location: reqService.name!.match(RegExp('(?<location>[^/]+)'))![0],
});
}

Expand Down
4 changes: 0 additions & 4 deletions packages/google-cloud-run/test/gapic_revisions_v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ describe('v2.RevisionsClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.run.v2.ListRevisionsRequest()
);
const expectedHeaderRequestParams = '';
const expectedResponse = [
generateSampleMessage(new protos.google.cloud.run.v2.Revision()),
generateSampleMessage(new protos.google.cloud.run.v2.Revision()),
Expand Down Expand Up @@ -711,7 +710,6 @@ describe('v2.RevisionsClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.run.v2.ListRevisionsRequest()
);
const expectedHeaderRequestParams = '';
const expectedError = new Error('expected');
client.descriptors.page.listRevisions.createStream =
stubPageStreamingCall(undefined, expectedError);
Expand Down Expand Up @@ -745,7 +743,6 @@ describe('v2.RevisionsClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.run.v2.ListRevisionsRequest()
);
const expectedHeaderRequestParams = '';
const expectedResponse = [
generateSampleMessage(new protos.google.cloud.run.v2.Revision()),
generateSampleMessage(new protos.google.cloud.run.v2.Revision()),
Expand Down Expand Up @@ -776,7 +773,6 @@ describe('v2.RevisionsClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.run.v2.ListRevisionsRequest()
);
const expectedHeaderRequestParams = '';
const expectedError = new Error('expected');
client.descriptors.page.listRevisions.asyncIterate =
stubAsyncIterationCall(undefined, expectedError);
Expand Down
4 changes: 0 additions & 4 deletions packages/google-cloud-run/test/gapic_services_v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,6 @@ describe('v2.ServicesClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.run.v2.ListServicesRequest()
);
const expectedHeaderRequestParams = '';
const expectedResponse = [
generateSampleMessage(new protos.google.cloud.run.v2.Service()),
generateSampleMessage(new protos.google.cloud.run.v2.Service()),
Expand Down Expand Up @@ -1470,7 +1469,6 @@ describe('v2.ServicesClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.run.v2.ListServicesRequest()
);
const expectedHeaderRequestParams = '';
const expectedError = new Error('expected');
client.descriptors.page.listServices.createStream = stubPageStreamingCall(
undefined,
Expand Down Expand Up @@ -1506,7 +1504,6 @@ describe('v2.ServicesClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.run.v2.ListServicesRequest()
);
const expectedHeaderRequestParams = '';
const expectedResponse = [
generateSampleMessage(new protos.google.cloud.run.v2.Service()),
generateSampleMessage(new protos.google.cloud.run.v2.Service()),
Expand Down Expand Up @@ -1537,7 +1534,6 @@ describe('v2.ServicesClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.run.v2.ListServicesRequest()
);
const expectedHeaderRequestParams = '';
const expectedError = new Error('expected');
client.descriptors.page.listServices.asyncIterate =
stubAsyncIterationCall(undefined, expectedError);
Expand Down

0 comments on commit 93c870f

Please sign in to comment.