Skip to content

Commit 72b8298

Browse files
authored
Fix update protos workflow (#385)
1 parent c423b1d commit 72b8298

10 files changed

+48
-88
lines changed

.github/workflows/update_protos.yml

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
- name: Update api
2222
run: |
2323
echo ${{ github.event.client_payload.tag }} > api_version.lock
24-
sudo chown -R testbot .
25-
sudo -u testbot bash -lc 'make update-buf'
2624
2725
- name: Add + Commit + Open PR
2826
uses: peter-evans/create-pull-request@v6

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ update-buf: $(node_modules)
5454

5555
.PHONY: build-buf
5656
build-buf: $(node_modules) clean-buf
57-
$(buf) generate $$(./scripts/get-buf-lock-version.js buf.build/googleapis/googleapis)
57+
$(buf) generate buf.build/googleapis/googleapis
5858
$(buf) generate buf.build/viamrobotics/api:$$(cat api_version.lock) --path common,component,robot,service,app,provisioning,tagger,stream
59-
$(buf) generate $$(./scripts/get-buf-lock-version.js buf.build/viamrobotics/goutils)
59+
$(buf) generate buf.build/viamrobotics/goutils
6060

6161
# js targets
6262

api_version.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.1.345
1+
v0.1.347

buf.gen.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
version: v1
1+
version: v2
22
managed:
33
enabled: true
44
plugins:
5-
- plugin: buf.build/connectrpc/es:v1.5.0
5+
- remote: buf.build/connectrpc/es:v1.5.0
66
out: src/gen
7-
- plugin: buf.build/bufbuild/es:v1.10.0
7+
- remote: buf.build/bufbuild/es:v1.10.0
88
out: src/gen

buf.lock

-18
This file was deleted.

buf.yaml

-11
This file was deleted.

package-lock.json

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@
5151
},
5252
"homepage": "https://github.com/viamrobotics/viam-typescript-sdk#readme",
5353
"dependencies": {
54-
"exponential-backoff": "^3.1.1",
5554
"@bufbuild/protobuf": "^1.10.0",
56-
"@connectrpc/connect": "^1.5.0",
57-
"@connectrpc/connect-web": "^1.5.0"
55+
"@connectrpc/connect": "^1.6.0",
56+
"@connectrpc/connect-web": "^1.6.0",
57+
"exponential-backoff": "^3.1.1"
5858
},
5959
"devDependencies": {
6060
"@bufbuild/buf": "^1.15.0-1",

scripts/get-buf-lock-version.js

-39
This file was deleted.

src/app/billing-client.spec.ts

+30
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ import {
1010
GetInvoicePdfResponse,
1111
GetInvoicesSummaryResponse,
1212
PaymentMethodType,
13+
ResourceUsageCosts,
14+
ResourceUsageCostsBySource,
15+
SourceType,
16+
UsageCost,
17+
UsageCostType,
1318
} from '../gen/app/v1/billing_pb';
1419
import {
1520
BillingClient,
@@ -38,6 +43,17 @@ const testMonthUsage: GetCurrentMonthUsageResponse = {
3843
binaryDataCloudStorageUsageCost: 9,
3944
otherCloudStorageUsageCost: 10,
4045
perMachineUsageCost: 11,
46+
subtotal: 12,
47+
resourceUsageCostsBySource: [
48+
new ResourceUsageCostsBySource({
49+
sourceType: SourceType.ORG,
50+
resourceUsageCosts: new ResourceUsageCosts({
51+
usageCosts: [
52+
new UsageCost({ resourceType: UsageCostType.UNSPECIFIED, cost: 13 }),
53+
],
54+
}),
55+
}),
56+
],
4157
startDate: testStartDate,
4258
endDate: testEndDate,
4359
start: new Date(SECONDS * 1000 + NANOS / 1_000_000),
@@ -81,6 +97,20 @@ describe('BillingClient tests', () => {
8197
binaryDataCloudStorageUsageCost: 9,
8298
otherCloudStorageUsageCost: 10,
8399
perMachineUsageCost: 11,
100+
subtotal: 12,
101+
resourceUsageCostsBySource: [
102+
new ResourceUsageCostsBySource({
103+
sourceType: SourceType.ORG,
104+
resourceUsageCosts: new ResourceUsageCosts({
105+
usageCosts: [
106+
new UsageCost({
107+
resourceType: UsageCostType.UNSPECIFIED,
108+
cost: 13,
109+
}),
110+
],
111+
}),
112+
}),
113+
],
84114
startDate: testStartDate,
85115
endDate: testEndDate,
86116
} as GetCurrentMonthUsageResponse;

0 commit comments

Comments
 (0)