Skip to content

Commit 2d08a79

Browse files
author
Laurie T. Malau
committed
update imports, build yaml, and leeway build
1 parent 027532d commit 2d08a79

19 files changed

+326
-36
lines changed

components/gitpod-db/go-db/BUILD.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
packages:
2+
- name: lib
3+
type: go
4+
srcs:
5+
- "**/*.go"
6+
- "go.mod"
7+
- "go.sum"
8+
deps:
9+
- components/common-go:lib
10+
- :init-testdb
11+
env:
12+
- CGO_ENABLED=0
13+
- GOOS=linux
14+
config:
15+
packaging: library
16+
- name: init-testdb
17+
type: generic
18+
deps:
19+
- components/gitpod-db:dbtest-init
20+
ephemeral: true

components/gitpod-db/go-db/cost_center_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
common_db "github.com/gitpod-io/gitpod/common-go/db"
13-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
13+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1414
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db/dbtest"
1515
"github.com/google/uuid"
1616
"github.com/stretchr/testify/require"

components/gitpod-db/go-db/dbtest/cost_center.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"time"
1010

1111
common_db "github.com/gitpod-io/gitpod/common-go/db"
12-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
12+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1313
"github.com/google/uuid"
1414
"github.com/stretchr/testify/require"
1515
"gorm.io/gorm"

components/gitpod-db/go-db/dbtest/stripe_customer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
common_db "github.com/gitpod-io/gitpod/common-go/db"
13-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
13+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1414
"github.com/google/uuid"
1515
"github.com/stretchr/testify/require"
1616
"gorm.io/gorm"

components/gitpod-db/go-db/dbtest/usage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"testing"
1010

1111
common_db "github.com/gitpod-io/gitpod/common-go/db"
12-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
12+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1313
"github.com/google/uuid"
1414
"github.com/stretchr/testify/require"
1515
"gorm.io/gorm"

components/gitpod-db/go-db/dbtest/workspace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package dbtest
77
import (
88
"database/sql"
99
"github.com/gitpod-io/gitpod/common-go/namegen"
10-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
10+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1111
"github.com/google/uuid"
1212
"github.com/stretchr/testify/require"
1313
"gorm.io/gorm"

components/gitpod-db/go-db/dbtest/workspace_instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"time"
1212

1313
common_db "github.com/gitpod-io/gitpod/common-go/db"
14-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
14+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1515
"github.com/google/uuid"
1616
"github.com/stretchr/testify/require"
1717
"gorm.io/gorm"

components/gitpod-db/go-db/go.mod

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
module github.com/gitpod-io/gitpod/components/gitpod-db/go-db
22

33
go 1.19
4+
5+
require (
6+
github.com/go-sql-driver/mysql v1.6.0 // indirect
7+
github.com/golang/protobuf v1.5.2 // indirect
8+
github.com/google/uuid v1.3.0 // indirect
9+
github.com/jinzhu/inflection v1.0.0 // indirect
10+
github.com/jinzhu/now v1.1.5 // indirect
11+
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
12+
google.golang.org/grpc v1.50.1 // indirect
13+
google.golang.org/protobuf v1.27.1 // indirect
14+
gorm.io/datatypes v1.0.7 // indirect
15+
gorm.io/driver/mysql v1.3.2 // indirect
16+
gorm.io/gorm v1.24.1 // indirect
17+
)

components/gitpod-db/go-db/go.sum

Lines changed: 261 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/gitpod-db/go-db/project_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strings"
1010
"testing"
1111

12-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
12+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1313
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db/dbtest"
1414
"github.com/google/uuid"
1515
"github.com/stretchr/testify/require"

components/gitpod-db/go-db/stripe_customer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
common_db "github.com/gitpod-io/gitpod/common-go/db"
13-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
13+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1414
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db/dbtest"
1515
"github.com/google/uuid"
1616
"github.com/stretchr/testify/require"

components/gitpod-db/go-db/team_membership_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package db_test
66

77
import (
88
"context"
9-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
9+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1010
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db/dbtest"
1111
"github.com/google/uuid"
1212
"github.com/stretchr/testify/require"

components/gitpod-db/go-db/usage_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"time"
1212

1313
common_db "github.com/gitpod-io/gitpod/common-go/db"
14-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
14+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1515
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db/dbtest"
1616
"github.com/google/uuid"
1717
"github.com/stretchr/testify/require"

components/gitpod-db/go-db/workspace_instance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/gitpod-io/gitpod/usage/pkg/apiv1"
1414

1515
common_db "github.com/gitpod-io/gitpod/common-go/db"
16-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
16+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1717
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db/dbtest"
1818
"github.com/google/uuid"
1919
"github.com/stretchr/testify/require"

components/gitpod-db/go-db/workspace_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"testing"
1010

1111
common_db "github.com/gitpod-io/gitpod/common-go/db"
12-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
12+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1313
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db/dbtest"
1414
"github.com/stretchr/testify/require"
1515
)

components/usage/BUILD.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ packages:
66
- "go.mod"
77
- "go.sum"
88
deps:
9+
- components/gitpod-db/go-db:lib
10+
- components/gitpod-db/go-db:init-testdb
911
- components/common-go:lib
1012
- components/usage-api/go:lib
1113
- components/content-service-api/go:lib
12-
- :init-testdb
1314
env:
1415
- CGO_ENABLED=0
1516
- GOOS=linux
@@ -20,6 +21,7 @@ packages:
2021
- name: lib
2122
type: go
2223
deps:
24+
- components/gitpod-db/go-db:lib
2325
- components/common-go:lib
2426
- components/usage-api/go:lib
2527
- components/content-service-api/go:lib
@@ -31,12 +33,6 @@ packages:
3133
packaging: library
3234
dontTest: true
3335

34-
- name: init-testdb
35-
type: generic
36-
deps:
37-
- components/gitpod-db:dbtest-init
38-
ephemeral: true
39-
4036
- name: docker
4137
type: docker
4238
deps:

components/usage/go.mod

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ go 1.19
44

55
require (
66
github.com/gitpod-io/gitpod/common-go v0.0.0-00010101000000-000000000000
7+
github.com/gitpod-io/gitpod/components/gitpod-db/go-db v0.0.0-00010101000000-000000000000
78
github.com/gitpod-io/gitpod/usage-api v0.0.0-00010101000000-000000000000
89
github.com/google/go-cmp v0.5.8
9-
github.com/google/uuid v1.1.2
10+
github.com/google/uuid v1.3.0
1011
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
1112
github.com/prometheus/client_golang v1.13.0
1213
github.com/robfig/cron v1.2.0
1314
github.com/spf13/cobra v1.4.0
1415
github.com/stretchr/testify v1.7.0
1516
github.com/stripe/stripe-go/v72 v72.114.0
16-
google.golang.org/grpc v1.49.0
17+
google.golang.org/grpc v1.50.1
1718
google.golang.org/protobuf v1.28.1
18-
gorm.io/datatypes v1.0.6
1919
gorm.io/gorm v1.24.1
2020
)
2121

@@ -49,9 +49,12 @@ require (
4949
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
5050
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154 // indirect
5151
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
52+
gorm.io/datatypes v1.0.7 // indirect
5253
gorm.io/driver/mysql v1.4.4 // indirect
5354
)
5455

56+
replace github.com/gitpod-io/gitpod/components/gitpod-db/go-db => ../gitpod-db/go-db // leeway
57+
5558
replace github.com/gitpod-io/gitpod/common-go => ../common-go // leeway
5659

5760
replace github.com/gitpod-io/gitpod/content-service/api => ../content-service-api/go // leeway

components/usage/go.sum

Lines changed: 9 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/usage/pkg/apiv1/billing_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"context"
99
"testing"
1010

11-
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
11+
db "github.com/gitpod-io/gitpod/components/gitpod-db/go-db"
1212
"github.com/gitpod-io/gitpod/components/gitpod-db/go-db/dbtest"
1313
"github.com/google/uuid"
1414
"github.com/stretchr/testify/require"

0 commit comments

Comments
 (0)