Skip to content

Commit 6ab1dc2

Browse files
authored
fix: SDK compile error, and add workflow (#234)
#### Summary Seems we need to add a build step as otherwise we ship passing test but broken version 🤔
1 parent 3ff1f78 commit 6ab1dc2

3 files changed

Lines changed: 15 additions & 28 deletions

File tree

.github/workflows/unittest.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,15 @@ jobs:
1010
unitests:
1111
runs-on: ubuntu-latest
1212
steps:
13+
- name: Check out code into the Go module directory
14+
uses: actions/checkout@v3
1315
- name: Set up Go 1.x
1416
uses: actions/setup-go@v3
1517
with:
1618
go-version: 1.19
17-
- name: Check out code into the Go module directory
18-
uses: actions/checkout@v3
19-
- uses: actions/cache@v3
20-
with:
21-
# In order:
22-
# * Module download cache
23-
# * Build cache (Linux)
24-
# * Build cache (Mac)
25-
# * Build cache (Windows)
26-
path: |
27-
~/go/pkg/mod
28-
~/.cache/go-build
29-
~/Library/Caches/go-build
30-
~\AppData\Local\go-build
31-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
32-
restore-keys: |
33-
${{ runner.os }}-go-
19+
cache: true
3420
- run: go mod download
21+
- run: go build ./...
3522
- name: Run tests
3623
run: go test -coverprofile=coverage.out ./...
3724
- name: Generate coverage report

plugins/destination.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ func NewDestinationPlugin(name string, version string, newDestinationClient NewD
5151
return p
5252
}
5353

54+
func (p *DestinationPlugin) Name() string {
55+
return p.name
56+
}
57+
58+
func (p *DestinationPlugin) Version() string {
59+
return p.version
60+
}
61+
5462
// we need lazy loading because we want to be able to initialize after
5563
func (p *DestinationPlugin) Init(ctx context.Context, logger zerolog.Logger, spec specs.Destination) error {
5664
var err error
@@ -63,14 +71,6 @@ func (p *DestinationPlugin) Init(ctx context.Context, logger zerolog.Logger, spe
6371
return nil
6472
}
6573

66-
func (p *DestinationPlugin) Name() string {
67-
return p.name
68-
}
69-
70-
func (p *DestinationPlugin) Version() string {
71-
return p.version
72-
}
73-
7474
// we implement all DestinationClient functions so we can hook into pre-post behavior
7575
func (p *DestinationPlugin) Migrate(ctx context.Context, tables schema.Tables) error {
7676
if p.client == nil {

schema/meta.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ type Meta struct {
2020
const FetchIDMetaKey = "cq_fetch_id"
2121

2222
var CqIDColumn = Column{Name: "_cq_id", Type: TypeUUID, Description: "Internal CQ ID of the row", Resolver: cqUUIDResolver()}
23-
var CqParentIDColumn = Column{Name: "_cq_parent_id", Type: TypeUUID, Description: "Internal CQ ID of the parent row", Resolver: parentCqUUIDResolver()}
24-
var CqSyncTime = Column{Name: "_cq_sync_time", Type: TypeTimestamp, Description: "Internal CQ row of when sync was started (this will be the same for all rows in a single fetch)"}
25-
var CqSourceName = Column{Name: "_cq_source_name", Type: TypeString, Description: "Internal CQ row that references the source plugin name data was retrieved"}
23+
var CqParentIDColumn = Column{Name: "_cq_parent_id", Type: TypeUUID, Description: "Internal CQ ID of the parent row", Resolver: parentCqUUIDResolver(), IgnoreInTests: true}
24+
var CqSyncTime = Column{Name: "_cq_sync_time", Type: TypeTimestamp, Description: "Internal CQ row of when sync was started (this will be the same for all rows in a single fetch)", IgnoreInTests: true}
25+
var CqSourceName = Column{Name: "_cq_source_name", Type: TypeString, Description: "Internal CQ row that references the source plugin name data was retrieved", IgnoreInTests: true}
2626

2727
func cqUUIDResolver() ColumnResolver {
2828
return func(_ context.Context, _ ClientMeta, r *Resource, c Column) error {

0 commit comments

Comments
 (0)