Skip to content

Commit

Permalink
chore: new owl bot post processor docker image (#160)
Browse files Browse the repository at this point in the history
gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f
  • Loading branch information
gcf-owl-bot[bot] authored May 10, 2021
1 parent 909bbe9 commit 4d36a11
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 99 deletions.
10 changes: 5 additions & 5 deletions packages/google-cloud-bigquery-storage/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions packages/google-cloud-bigquery-storage/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,14 @@ export class BigQueryReadClient {
];
for (const methodName of bigQueryReadStubMethods) {
const callPromise = this.bigQueryReadStub.then(
stub => (...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
stub =>
(...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error | null | undefined) => () => {
throw err;
}
Expand Down Expand Up @@ -432,11 +433,10 @@ export class BigQueryReadClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
'read_session.table': request.readSession!.table || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
'read_session.table': request.readSession!.table || '',
});
this.initialize();
return this.innerApiCalls.createReadSession(request, options, callback);
}
Expand Down Expand Up @@ -549,11 +549,10 @@ export class BigQueryReadClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
name: request.name || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
return this.innerApiCalls.splitReadStream(request, options, callback);
}
Expand Down Expand Up @@ -595,11 +594,10 @@ export class BigQueryReadClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
read_stream: request.readStream || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
read_stream: request.readStream || '',
});
this.initialize();
return this.innerApiCalls.readRows(request, options);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,14 @@ export class BigQueryStorageClient {
];
for (const methodName of bigQueryStorageStubMethods) {
const callPromise = this.bigQueryStorageStub.then(
stub => (...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
stub =>
(...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error | null | undefined) => () => {
throw err;
}
Expand Down Expand Up @@ -437,12 +438,11 @@ export class BigQueryStorageClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
'table_reference.project_id': request.tableReference!.projectId || '',
'table_reference.dataset_id': request.tableReference!.datasetId || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
'table_reference.project_id': request.tableReference!.projectId || '',
'table_reference.dataset_id': request.tableReference!.datasetId || '',
});
this.initialize();
return this.innerApiCalls.createReadSession(request, options, callback);
}
Expand Down Expand Up @@ -543,11 +543,10 @@ export class BigQueryStorageClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
'session.name': request.session!.name || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
'session.name': request.session!.name || '',
});
this.initialize();
return this.innerApiCalls.batchCreateReadSessionStreams(
request,
Expand Down Expand Up @@ -658,11 +657,10 @@ export class BigQueryStorageClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
'stream.name': request.stream!.name || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
'stream.name': request.stream!.name || '',
});
this.initialize();
return this.innerApiCalls.finalizeStream(request, options, callback);
}
Expand Down Expand Up @@ -776,11 +774,10 @@ export class BigQueryStorageClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
'original_stream.name': request.originalStream!.name || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
'original_stream.name': request.originalStream!.name || '',
});
this.initialize();
return this.innerApiCalls.splitReadStream(request, options, callback);
}
Expand Down Expand Up @@ -822,11 +819,10 @@ export class BigQueryStorageClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
'read_position.stream.name': request.readPosition!.stream!.name || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
'read_position.stream.name': request.readPosition!.stream!.name || '',
});
this.initialize();
return this.innerApiCalls.readRows(request, options);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ import {PassThrough} from 'stream';
import {protobuf} from 'google-gax';

function generateSampleMessage<T extends object>(instance: T) {
const filledObject = (instance.constructor as typeof protobuf.Message).toObject(
instance as protobuf.Message<T>,
{defaults: true}
);
const filledObject = (
instance.constructor as typeof protobuf.Message
).toObject(instance as protobuf.Message<T>, {defaults: true});
return (instance.constructor as typeof protobuf.Message).fromObject(
filledObject
) as T;
Expand Down Expand Up @@ -209,9 +208,8 @@ describe('v1.BigQueryReadClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.bigquery.storage.v1.ReadSession()
);
client.innerApiCalls.createReadSession = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.createReadSession =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.createReadSession(
request,
Expand Down Expand Up @@ -322,9 +320,8 @@ describe('v1.BigQueryReadClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.bigquery.storage.v1.SplitReadStreamResponse()
);
client.innerApiCalls.splitReadStream = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.splitReadStream =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.splitReadStream(
request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ import {PassThrough} from 'stream';
import {protobuf} from 'google-gax';

function generateSampleMessage<T extends object>(instance: T) {
const filledObject = (instance.constructor as typeof protobuf.Message).toObject(
instance as protobuf.Message<T>,
{defaults: true}
);
const filledObject = (
instance.constructor as typeof protobuf.Message
).toObject(instance as protobuf.Message<T>, {defaults: true});
return (instance.constructor as typeof protobuf.Message).fromObject(
filledObject
) as T;
Expand Down Expand Up @@ -217,9 +216,8 @@ describe('v1beta1.BigQueryStorageClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.bigquery.storage.v1beta1.ReadSession()
);
client.innerApiCalls.createReadSession = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.createReadSession =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.createReadSession(
request,
Expand Down Expand Up @@ -303,9 +301,8 @@ describe('v1beta1.BigQueryStorageClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsResponse()
);
client.innerApiCalls.batchCreateReadSessionStreams = stubSimpleCall(
expectedResponse
);
client.innerApiCalls.batchCreateReadSessionStreams =
stubSimpleCall(expectedResponse);
const [response] = await client.batchCreateReadSessionStreams(request);
assert.deepStrictEqual(response, expectedResponse);
assert(
Expand Down Expand Up @@ -337,9 +334,8 @@ describe('v1beta1.BigQueryStorageClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsResponse()
);
client.innerApiCalls.batchCreateReadSessionStreams = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.batchCreateReadSessionStreams =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.batchCreateReadSessionStreams(
request,
Expand Down Expand Up @@ -455,9 +451,8 @@ describe('v1beta1.BigQueryStorageClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.protobuf.Empty()
);
client.innerApiCalls.finalizeStream = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.finalizeStream =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.finalizeStream(
request,
Expand Down Expand Up @@ -570,9 +565,8 @@ describe('v1beta1.BigQueryStorageClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.bigquery.storage.v1beta1.SplitReadStreamResponse()
);
client.innerApiCalls.splitReadStream = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.splitReadStream =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.splitReadStream(
request,
Expand Down

0 comments on commit 4d36a11

Please sign in to comment.