Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: new owl bot post processor docker image #1284

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
docker:
digest: sha256:c3eae37a355402067b97cbeb6f5a7d2dd87aecfd064aeb2d2ea0bde40778cf68
image: gcr.io/repo-automation-bots/owlbot-nodejs:latest

image: gcr.io/repo-automation-bots/owlbot-nodejs:latest
digest: sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f
13 changes: 13 additions & 0 deletions .github/generated-files-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
generatedFiles:
- path: '.kokoro/**'
message: '`.kokoro` files are templated and should be updated in [`synthtool`](https://github.com/googleapis/synthtool)'
- path: '.github/CODEOWNERS'
message: 'CODEOWNERS should instead be modified via the `codeowner_team` property in .repo-metadata.json'
- path: '.github/workflows/**'
message: '`.github/workflows` (GitHub Actions) should be updated in [`synthtool`](https://github.com/googleapis/synthtool)'
- path: '.github/generated-files-bot.+(yml|yaml)'
message: '`.github/generated-files-bot.(yml|yaml)` should be updated in [`synthtool`](https://github.com/googleapis/synthtool)'
- path: 'README.md'
message: '`README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/master/.readme-partials.yaml'
- path: 'samples/README.md'
message: '`samples/README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/master/.readme-partials.yaml'
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- $default-branch
- master
pull_request:
name: ci
jobs:
Expand Down
14 changes: 7 additions & 7 deletions protos/protos.d.ts

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

28 changes: 14 additions & 14 deletions protos/protos.js

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

13 changes: 6 additions & 7 deletions src/iam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,12 @@ export class IAM {
}

const availablePermissions = arrify(resp!.permissions!);
const permissionHash: IamPermissionsMap = (permissions as string[]).reduce(
(acc, permission) => {
acc[permission] = availablePermissions.indexOf(permission) > -1;
return acc;
},
{} as {[key: string]: boolean}
);
const permissionHash: IamPermissionsMap = (
permissions as string[]
).reduce((acc, permission) => {
acc[permission] = availablePermissions.indexOf(permission) > -1;
return acc;
}, {} as {[key: string]: boolean});
callback!(null, permissionHash, resp!);
}
);
Expand Down
13 changes: 4 additions & 9 deletions src/publisher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,8 @@ export class Publisher {
setOptions(options = {} as PublishOptions): void {
const defaults = this.getOptionDefaults();

const {
batching,
gaxOpts,
messageOrdering,
enableOpenTelemetryTracing,
} = extend(true, defaults, options);
const {batching, gaxOpts, messageOrdering, enableOpenTelemetryTracing} =
extend(true, defaults, options);

this.settings = {
batching: {
Expand Down Expand Up @@ -325,9 +321,8 @@ export class Publisher {
message.attributes = {};
}

message.attributes[
'googclient_OpenTelemetrySpanContext'
] = JSON.stringify(span.context());
message.attributes['googclient_OpenTelemetrySpanContext'] =
JSON.stringify(span.context());
}

return span;
Expand Down
5 changes: 2 additions & 3 deletions src/pubsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -664,9 +664,8 @@ export class PubSub {
// If this looks like a GCP URL of some kind, don't go into emulator
// mode. Otherwise, supply a fake SSL provider so a real cert isn't
// required for running the emulator.
const officialUrlMatch = this.options.servicePath!.endsWith(
'.googleapis.com'
);
const officialUrlMatch =
this.options.servicePath!.endsWith('.googleapis.com');
if (!officialUrlMatch) {
const grpcInstance = this.options.grpc || gax.grpc;
this.options.sslCreds = grpcInstance.credentials.createInsecure();
Expand Down
10 changes: 5 additions & 5 deletions src/subscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,8 @@ export class Subscriber extends EventEmitter {
options.streamingOptions = {} as MessageStreamOptions;
}

const {
maxStreams = defaultOptions.subscription.maxStreams,
} = options.streamingOptions;
const {maxStreams = defaultOptions.subscription.maxStreams} =
options.streamingOptions;
options.streamingOptions.maxStreams = Math.min(
maxStreams,
this.maxMessages
Expand Down Expand Up @@ -471,8 +470,9 @@ export class Subscriber extends EventEmitter {
[MessagingAttribute.MESSAGING_DESTINATION_KIND]: 'topic',
[MessagingAttribute.MESSAGING_MESSAGE_ID]: message.id,
[MessagingAttribute.MESSAGING_PROTOCOL]: 'pubsub',
[MessagingAttribute.MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES]: (message.data as Buffer)
.length,
[MessagingAttribute.MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES]: (
message.data as Buffer
).length,
// Not in Opentelemetry semantic convention but mimics naming
'messaging.pubsub.received_at': message.received,
'messaging.pubsub.acknowlege_id': message.ackId,
Expand Down
13 changes: 7 additions & 6 deletions src/topic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,12 +573,13 @@ export class Topic {
const options = typeof optsOrCallback === 'object' ? optsOrCallback : {};
callback = typeof optsOrCallback === 'function' ? optsOrCallback : callback;

const reqOpts: google.pubsub.v1.IListTopicSubscriptionsRequest = Object.assign(
{
topic: this.name,
},
options as SubscriptionOptions
);
const reqOpts: google.pubsub.v1.IListTopicSubscriptionsRequest =
Object.assign(
{
topic: this.name,
},
options as SubscriptionOptions
);

delete (reqOpts as PageOptions).gaxOpts;
delete (reqOpts as PageOptions).autoPaginate;
Expand Down
Loading