Skip to content

Commit 53159ae

Browse files
authored
Update steampipe and steampipe-plugin-sdk references to include rate limiter support
1 parent 134d8dd commit 53159ae

File tree

6 files changed

+101
-241
lines changed

6 files changed

+101
-241
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
_Whats new_
33
* Re-add support for legacy command-schema. ([#313](https://github.com/turbot/steampipe-postgres-fdw/issues/313))
44

5-
65
## v1.7.1 [2023-05-18]
76
Rebuild to avoid Linux Arm build error
87

fdw.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ func goFdwBeginForeignScan(node *C.ForeignScanState, eflags C.int) {
188188
FdwError(fmt.Errorf("%v", r))
189189
}
190190
}()
191-
log.Printf("[TRACE] goFdwBeginForeignScan")
192191
// read the explain flag
193192
explain := eflags&C.EXEC_FLAG_EXPLAIN_ONLY == C.EXEC_FLAG_EXPLAIN_ONLY
194193

@@ -269,9 +268,10 @@ func goFdwIterateForeignScan(node *C.ForeignScanState) *C.TupleTableSlot {
269268
C.ExecClearTuple(slot)
270269
pluginHub, _ := hub.GetHub()
271270

271+
log.Printf("[INFO] goFdwIterateForeignScan, table '%s' (%p)", s.Opts["table"], s.Iter)
272272
// if the iterator has not started, start
273273
if s.Iter.Status() == hub.QueryStatusReady {
274-
log.Printf("[TRACE] goFdwIterateForeignScan calling pluginHub.StartScan")
274+
log.Printf("[INFO] goFdwIterateForeignScan calling pluginHub.StartScan, table '%s' (%p)", s.Opts["table"], s.Iter)
275275
if err := pluginHub.StartScan(s.Iter); err != nil {
276276
FdwError(err)
277277
return slot
@@ -281,12 +281,13 @@ func goFdwIterateForeignScan(node *C.ForeignScanState) *C.TupleTableSlot {
281281
// row is a map of column name to value (as an interface)
282282
row, err := s.Iter.Next()
283283
if err != nil {
284+
log.Printf("[INFO] goFdwIterateForeignScan Next returned error: %s (%p)", err.Error(), s.Iter)
284285
FdwError(err)
285286
return slot
286287
}
287288

288289
if len(row) == 0 {
289-
log.Printf("[TRACE] goFdwIterateForeignScan returned empty row - this scan complete (%p)", s.Iter)
290+
log.Printf("[INFO] goFdwIterateForeignScan returned empty row - this scan complete (%p)", s.Iter)
290291
// add scan metadata to hub
291292
pluginHub.AddScanMetadata(s.Iter)
292293
logging.LogTime("[fdw] IterateForeignScan end")
@@ -333,7 +334,10 @@ func goFdwReScanForeignScan(node *C.ForeignScanState) {
333334
FdwError(fmt.Errorf("%v", r))
334335
}
335336
}()
336-
log.Printf("[TRACE] goFdwReScanForeignScan")
337+
rel := BuildRelation(node.ss.ss_currentRelation)
338+
opts := GetFTableOptions(rel.ID)
339+
340+
log.Printf("[INFO] goFdwReScanForeignScan, connection '%s', table '%s'", opts["connection"], opts["table"])
337341
// restart the scan
338342
goFdwBeginForeignScan(node, 0)
339343
}
@@ -349,11 +353,12 @@ func goFdwEndForeignScan(node *C.ForeignScanState) {
349353
s := GetExecState(node.fdw_state)
350354
pluginHub, _ := hub.GetHub()
351355
if s != nil && pluginHub != nil {
352-
log.Printf("[TRACE] goFdwEndForeignScan, iterator: %p", s.Iter)
356+
log.Printf("[INFO] goFdwEndForeignScan, iterator: %p", s.Iter)
353357
pluginHub.EndScan(s.Iter, int64(s.State.limit))
354358
}
355359
ClearExecState(node.fdw_state)
356360
node.fdw_state = nil
361+
357362
}
358363

359364
//export goFdwAbortCallback
@@ -364,7 +369,7 @@ func goFdwAbortCallback() {
364369
// DO NOT call FdwError or we will recurse
365370
}
366371
}()
367-
log.Printf("[TRACE] goFdwAbortCallback")
372+
log.Printf("[INFO] goFdwAbortCallback")
368373
if pluginHub, err := hub.GetHub(); err == nil {
369374
pluginHub.Abort()
370375
}

go.mod

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,51 +8,55 @@ require (
88
github.com/hashicorp/go-hclog v1.5.0
99
github.com/hashicorp/go-version v1.6.0 // indirect
1010
github.com/turbot/go-kit v0.8.0-rc.0
11-
github.com/turbot/steampipe-plugin-sdk/v5 v5.6.0-dev.7
11+
github.com/turbot/steampipe v0.21.0-alpha.4
12+
github.com/turbot/steampipe-plugin-sdk/v5 v5.6.0-dev.22
1213
go.opentelemetry.io/otel v1.16.0
1314
google.golang.org/protobuf v1.31.0
1415
)
1516

1617
require (
1718
github.com/Masterminds/semver/v3 v3.2.1
18-
github.com/turbot/steampipe v0.20.9
1919
go.opentelemetry.io/otel/metric v1.16.0
2020
)
2121

2222
require (
2323
cloud.google.com/go v0.110.0 // indirect
24-
cloud.google.com/go/compute v1.19.0 // indirect
24+
cloud.google.com/go/compute v1.19.1 // indirect
2525
cloud.google.com/go/compute/metadata v0.2.3 // indirect
2626
cloud.google.com/go/iam v0.13.0 // indirect
2727
cloud.google.com/go/storage v1.28.1 // indirect
28+
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
2829
github.com/aws/aws-sdk-go v1.44.183 // indirect
2930
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
3031
github.com/briandowns/spinner v1.23.0 // indirect
3132
github.com/google/s2a-go v0.1.3 // indirect
3233
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
3334
github.com/googleapis/gax-go/v2 v2.8.0 // indirect
34-
github.com/hashicorp/go-getter v1.7.1 // indirect
35+
github.com/hashicorp/go-getter v1.7.2 // indirect
3536
github.com/hashicorp/go-safetemp v1.0.0 // indirect
3637
github.com/inconshreveable/mousetrap v1.1.0 // indirect
37-
github.com/jackc/pgx/v5 v5.3.1 // indirect
38-
github.com/jackc/puddle/v2 v2.2.0 // indirect
38+
github.com/jackc/pgx/v5 v5.4.3 // indirect
39+
github.com/jackc/puddle/v2 v2.2.1 // indirect
3940
github.com/jmespath/go-jmespath v0.4.0 // indirect
4041
github.com/karrick/gows v0.3.0 // indirect
41-
github.com/klauspost/compress v1.15.11 // indirect
42+
github.com/klauspost/compress v1.16.0 // indirect
43+
github.com/moby/locker v1.0.1 // indirect
44+
github.com/oras-project/oras-credentials-go v0.3.0 // indirect
4245
github.com/spf13/cobra v1.7.0 // indirect
4346
github.com/ulikunitz/xz v0.5.10 // indirect
4447
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
4548
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
46-
golang.org/x/term v0.8.0 // indirect
49+
golang.org/x/term v0.10.0 // indirect
4750
golang.org/x/time v0.1.0 // indirect
4851
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
4952
google.golang.org/api v0.122.0 // indirect
53+
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect
54+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
55+
oras.land/oras-go/v2 v2.2.1 // indirect
5056
)
5157

5258
require (
5359
github.com/Machiel/slugify v1.0.1 // indirect
54-
github.com/Microsoft/go-winio v0.5.2 // indirect
55-
github.com/Microsoft/hcsshim v0.8.22 // indirect
5660
github.com/XiaoMi/pegasus-go-client v0.0.0-20210427083443-f3b6b08bc4c2 // indirect; indirectUpdate GetPathKeys to treat key columns with AnyOf require property with the same precedence as Required. Closes #254
5761
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
5862
github.com/agext/levenshtein v1.2.2 // indirect
@@ -67,27 +71,23 @@ require (
6771
github.com/btubbs/datetime v0.1.1 // indirect
6872
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
6973
github.com/cespare/xxhash/v2 v2.2.0 // indirect
70-
github.com/containerd/cgroups v1.0.1 // indirect
71-
github.com/containerd/containerd v1.4.13 // indirect
74+
github.com/containerd/containerd v1.7.4 // indirect
7275
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
73-
github.com/deislabs/oras v0.9.0 // indirect
7476
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
7577
github.com/dustin/go-humanize v1.0.0 // indirect
7678
github.com/eko/gocache/v3 v3.1.2 // indirect
7779
github.com/fatih/color v1.15.0 // indirect
78-
github.com/felixge/httpsnoop v1.0.3 // indirect
7980
github.com/fsnotify/fsnotify v1.6.0 // indirect
8081
github.com/gertd/go-pluralize v0.2.1
8182
github.com/ghodss/yaml v1.0.0 // indirect
8283
github.com/go-logr/logr v1.2.4 // indirect
8384
github.com/go-logr/stdr v1.2.2 // indirect
8485
github.com/go-ole/go-ole v1.2.6 // indirect
8586
github.com/go-redis/redis/v8 v8.11.5 // indirect
86-
github.com/gogo/protobuf v1.3.2 // indirect
8787
github.com/golang/glog v1.1.0 // indirect
8888
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
8989
github.com/google/go-cmp v0.5.9 // indirect
90-
github.com/google/uuid v1.3.0 // indirect
90+
github.com/google/uuid v1.3.1 // indirect
9191
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
9292
github.com/hashicorp/errwrap v1.1.0 // indirect
9393
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
@@ -96,13 +96,13 @@ require (
9696
github.com/hashicorp/go-retryablehttp v0.5.2 // indirect
9797
github.com/hashicorp/go-uuid v1.0.1 // indirect
9898
github.com/hashicorp/hcl v1.0.0 // indirect
99-
github.com/hashicorp/hcl/v2 v2.16.2 // indirect
99+
github.com/hashicorp/hcl/v2 v2.17.0 // indirect
100100
github.com/hashicorp/terraform v0.15.1 // indirect
101101
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
102102
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
103103
github.com/iancoleman/strcase v0.3.0 // indirect
104104
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
105-
github.com/jackc/pgconn v1.14.0 // indirect
105+
github.com/jackc/pgconn v1.14.1 // indirect
106106
github.com/jackc/pgio v1.0.0 // indirect
107107
github.com/jackc/pgpassfile v1.0.0 // indirect
108108
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
@@ -122,7 +122,7 @@ require (
122122
github.com/oklog/run v1.0.0 // indirect
123123
github.com/olekukonko/tablewriter v0.0.5 // indirect
124124
github.com/opencontainers/go-digest v1.0.0 // indirect
125-
github.com/opencontainers/image-spec v1.0.2 // indirect
125+
github.com/opencontainers/image-spec v1.1.0-rc4 // indirect
126126
github.com/pegasus-kv/thrift v0.13.0 // indirect
127127
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
128128
github.com/pkg/errors v0.9.1 // indirect
@@ -147,7 +147,7 @@ require (
147147
github.com/tkrajina/go-reflector v0.5.6 // indirect
148148
github.com/xlab/treeprint v1.2.0 // indirect
149149
github.com/yusufpapurcu/wmi v1.2.2 // indirect
150-
github.com/zclconf/go-cty v1.13.2 // indirect
150+
github.com/zclconf/go-cty v1.13.3 // indirect
151151
github.com/zclconf/go-cty-yaml v1.0.3 // indirect
152152
go.opencensus.io v0.24.0 // indirect
153153
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect
@@ -159,23 +159,23 @@ require (
159159
go.opentelemetry.io/otel/sdk/metric v0.39.0 // indirect
160160
go.opentelemetry.io/otel/trace v1.16.0 // indirect
161161
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
162-
golang.org/x/crypto v0.9.0 // indirect
162+
golang.org/x/crypto v0.11.0 // indirect
163163
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
164164
golang.org/x/mod v0.9.0 // indirect
165-
golang.org/x/net v0.10.0 // indirect
165+
golang.org/x/net v0.12.0 // indirect
166166
golang.org/x/oauth2 v0.7.0 // indirect
167167
golang.org/x/sync v0.3.0 // indirect
168168
golang.org/x/sys v0.10.0 // indirect
169-
golang.org/x/text v0.10.0 // indirect
169+
golang.org/x/text v0.12.0 // indirect
170170
google.golang.org/appengine v1.6.7 // indirect
171-
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
172-
google.golang.org/grpc v1.55.0 // indirect
171+
google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect
172+
google.golang.org/grpc v1.57.0 // indirect
173173
gopkg.in/ini.v1 v1.67.0 // indirect
174174
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
175175
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637 // indirect
176176
gopkg.in/yaml.v2 v2.4.0 // indirect
177177
gopkg.in/yaml.v3 v3.0.1 // indirect
178-
k8s.io/apimachinery v0.25.3 // indirect
178+
k8s.io/apimachinery v0.26.2 // indirect
179179
sigs.k8s.io/yaml v1.3.0 // indirect
180180
)
181181

0 commit comments

Comments
 (0)