Skip to content

Commit

Permalink
Upgrade deps and fix datastore, nats breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Raddon committed Nov 20, 2016
2 parents 28f3dad + 7cbd948 commit f126b5d
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 51 deletions.
57 changes: 38 additions & 19 deletions GLOCKFILE
Original file line number Diff line number Diff line change
@@ -1,45 +1,64 @@
cloud.google.com/go 4fa13efd3e95632b326090d097cec09cedda7507
github.com/araddon/dateparse 86f3852b68545a6c7db45021ba05484cd15a372b
github.com/araddon/gou 4060436435c0b91885cb45241edb764c632ed8ae
github.com/araddon/qlbridge 447cae3d3e74da9b8ee755319256a6fc49e619a9
github.com/araddon/dateparse 352f0d71491b7b0b975c6ffcc774eeff085b44eb
github.com/araddon/gou 0ab1e8f997e35d27da012072dc531fcc0204da5a
github.com/araddon/qlbridge 86e965b3ed9cf8ef6c044ee4c5974488454a2951
github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9
github.com/bitly/go-hostpool d0e59c22a56e8dadfed24f74f452cea5a52722d2
github.com/bmizerany/assert b7ed37b82869576c289d7d97fb2bbd8b64a0cb28
github.com/coreos/etcd 207c92b62785d220edc74ed791fd8a22a18e378e
github.com/coreos/go-etcd de3514f25635bbfb024fdaf2a8d5f67378492675
github.com/dchest/siphash 6d8617816bb5d8268011ffbfb8720f17ce9af63c
github.com/go-sql-driver/mysql 0b58b37b664c21f3010e836f1b931e1d0b0b0685
github.com/boltdb/bolt 315c65d4cf4f5278c73477a35fb1f9b08365d340
github.com/cockroachdb/cmux b64f5908f4945f4b11ed4a0a9d3cc1e23350866d
github.com/coreos/etcd 7e7c7e157e760a2e9876a46abe610337a63f33bc
github.com/coreos/go-etcd 003851be7bb0694fe3cc457a49529a19388ee7cf
github.com/coreos/go-semver 8ab6407b697782a06568d4b7f1db25550ec2e4c6
github.com/coreos/go-systemd 48702e0da86bd25e76cfef347e2adeb434a0d0a6
github.com/coreos/pkg 447b7ec906e523386d9c53be15b55a8ae86ea944
github.com/dchest/siphash 4ebf1de738443ea7f45f02dc394c4df1942a126d
github.com/ghodss/yaml bea76d6a4713e18b7f5321a2b020738552def3ea
github.com/go-sql-driver/mysql 665b83488b90b902ce0a305ef6652e599771cdf9
github.com/gocql/gocql 3ac1aabebaf2705c6f695d4ef2c25ab6239e88b3
github.com/gogo/protobuf 966a6f4b3274f2692aa2f30df2ea5c7172c832ca
github.com/golang/protobuf 888eb0692c857ec880338addf316bd662d5e630e
github.com/gogo/protobuf 8d70fb3182befc465c4a1eac8ad4d38ff49778e2
github.com/golang/protobuf 8ee79997227bf9b34611aee7946ae64735e6fd93
github.com/golang/snappy d9eb7a3d35ec988b8585d4a0068e462c27d28380
github.com/google/btree 7d79101e329e5a3adf994758c578dab82b90c017
github.com/google/btree 925471ac9e2131377a91e1595defec898166fe49
github.com/grpc-ecosystem/go-grpc-prometheus 6b7015e65d366bf3f19b2b2a000a831940f0f7e0
github.com/grpc-ecosystem/grpc-gateway 9108558898db5ff1671121738778c71a49c5aab4
github.com/hailocab/go-hostpool e80d13ce29ede4452c43dea11e79b9bc8a15b478
github.com/hashicorp/go-immutable-radix afc5a0dbb18abdf82c277a7bc01533e81fa1d6b8
github.com/hashicorp/go-memdb 98f52f52d7a476958fa9da671354d270c50661a7
github.com/hashicorp/golang-lru 0a025b7e63adc15a622f29b0b2c4c3848243bbf6
github.com/jmoiron/sqlx 7396209bbeada6a4fcc28aa9408f89b2e71cac39
github.com/jmoiron/sqlx a9cfc4a06cca420057207ac0a619e7f45fcbf4b7
github.com/jonboulle/clockwork bcac9884e7502bb2b474c0339d889cb981a2f27f
github.com/kr/pretty cfb55aafdaf3ec08f0db22699ab822c50091b1c4
github.com/kr/text 7cafcd837844e784b526369c9bce262804aebc60
github.com/leekchan/timeutil 28917288c48df3d2c1cfe468c273e0b2adda0aa5
github.com/lytics/cloudstorage 2edc5b3d8e00f8080edfb7dccd7b7c1c837e30be
github.com/lytics/cloudstorage f9fc98a8d49dce1c6ed958065351ad37fb66e62d
github.com/lytics/confl f12b6bace2ff295fc6730f6dbaf009289e2f6e80
github.com/lytics/datemath 988020f3ad34814005ab10b6c7863e31672b5f63
github.com/lytics/dfa 63e35f788f7fa5203fcd2dcd7e318da5a1b981e5
github.com/lytics/grid fe6326a222d957ebf8c2d882fbb4711a1e16c39b
github.com/lytics/grid 5aba86beba450af45a1cfe2cbfb6c9b98cce7f5e
github.com/lytics/logrus e235deef5707e991535a3ba490328ffff3ef8e0f
github.com/lytics/metafora 57cc27a66f10e0d6fcbaf89d98303e0b5ad889ad
github.com/lytics/sereno f6128b640de0742892a439b3672ac88637df977d
github.com/mattbaird/elastigo 34c4c4d8425cbdcbc8e257943a2044d5e9f7dab5
github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c
github.com/mb0/glob 1eb79d2de6c448664e7272f8b9fe1938239e3aaa
github.com/nats-io/gnatsd e41d360e77711885108008ccb6735a5b7637dd8e
github.com/nats-io/nats ea8b4fd12ebb823073c0004b9f09ac8748f4f165
github.com/nats-io/nuid a5152d67cf63cbfb5d992a395458722a45194715
github.com/pborman/uuid b984ec7fa9ff9e428bd0cf0abf429384dfbe3e37
github.com/nats-io/go-nats 61923ed1eaf8398000991fbbee2ef11ab5a5be0d
github.com/nats-io/nuid 289cccf02c178dc782430d534e3c1f5b72af807f
github.com/pborman/uuid 3d4f2ba23642d3cfd06bd4b54cf03d99d95c0f1b
github.com/prometheus/client_golang 573acbcb7f88b0ceb1cd5a61e23985f8a4846536
github.com/prometheus/client_model fa8ad6fec33561be4280a8f0514318c79d7f6cb6
github.com/prometheus/common 0d5de9d6d8629cb8bee6d4674da4127cd8b615a3
github.com/prometheus/procfs abf152e5f3e97f2fafac028d2cc06c1feb87ffa5
github.com/sony/sonyflake fa881fb1052b152e977c41023052c2f2a1c475e9
github.com/ugorji/go 45ce7596ace4534e47b69051a92aef7b64ec7b3f
golang.org/x/net 6250b412798208e6c90b03b7c4f226de5aa299e2
github.com/ugorji/go faddd6128c66c4708f45fdc007f575f75e592a3c
github.com/xiang90/probing 07dd2e8dfe18522e9c447ba95f2fe95262f63bb2
golang.org/x/crypto 351dc6a5bf92a5f2ae22fadeee08eb6a45aa2d93
golang.org/x/net 4971afdc2f162e82d185353533d3cf16188a9f4e
golang.org/x/oauth2 4d549c893be7d4011bab739cc585d091a7188d27
google.golang.org/api 93f710e7c7e7f084a7043ec18aab7359e7626811
google.golang.org/genproto 44808ed2d86e258615bb701d395cbbfe6686a3e6
google.golang.org/grpc 79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b
gopkg.in/inf.v0 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4
gopkg.in/mgo.v2 22287bab4379e1fbf6002fb4eb769888f3fb224c
gopkg.in/yaml.v2 a83829b6f1293c91addabc89d0571c246397bbf4
k8s.io/client-go 3a5b96cfd3d3ff1d53d979b4297c4f3b869aab09
11 changes: 6 additions & 5 deletions backends/datastore/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"golang.org/x/net/context"
"golang.org/x/oauth2/google"
"golang.org/x/oauth2/jwt"
"google.golang.org/api/iterator"
"google.golang.org/api/option"

"github.com/araddon/qlbridge/datasource"
Expand Down Expand Up @@ -245,12 +246,12 @@ func (m *GoogleDSDataSource) loadTableNames() error {
tablesOriginal := make(map[string]string)
rows := pageQuery(m.dsClient.Run(m.dsCtx, datastore.NewQuery("__kind__")))
for _, row := range rows {
if !strings.HasPrefix(row.key.Name(), "__") {
tableLower := strings.ToLower(row.key.Name())
if !strings.HasPrefix(row.key.Name, "__") {
tableLower := strings.ToLower(row.key.Name)
//u.Debugf("found table %q %#v", tableLower, row.key)
tablesLower = append(tablesLower, tableLower)
tablesOriginal[tableLower] = row.key.Name()
m.loadTableSchema(tableLower, row.key.Name())
tablesOriginal[tableLower] = row.key.Name
m.loadTableSchema(tableLower, row.key.Name)
}
}
m.tablesLower = tablesLower
Expand Down Expand Up @@ -371,7 +372,7 @@ func pageQuery(iter *datastore.Iterator) []schemaType {
for {
row := schemaType{}
if key, err := iter.Next(&row); err != nil {
if err == datastore.Done {
if err == iterator.Done {
break
}
u.Errorf("error: %v", err)
Expand Down
4 changes: 2 additions & 2 deletions backends/datastore/datastore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ const (
)

func articleKey(title string) *datastore.Key {
return datastore.NewKey(ctx, ArticleKind, title, 0, nil)
return datastore.NameKey(ArticleKind, title, nil)
}

func userKey(id string) *datastore.Key {
return datastore.NewKey(ctx, UserKind, id, 0, nil)
return datastore.NameKey(UserKind, id, nil)
}

func validateQuerySpec(t *testing.T, testSpec tu.QuerySpec) {
Expand Down
5 changes: 3 additions & 2 deletions backends/datastore/resultreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"cloud.google.com/go/datastore"
u "github.com/araddon/gou"
"google.golang.org/api/iterator"

"github.com/araddon/qlbridge/datasource"
"github.com/araddon/qlbridge/exec"
Expand Down Expand Up @@ -170,7 +171,7 @@ func (m *ResultReader) Run() error {
row := Row{}
key, err := iter.Next(&row)
if err != nil {
if err == datastore.Done {
if err == iterator.Done {
u.Infof("done? rowct=%v", len(m.Vals))
break
}
Expand Down Expand Up @@ -227,7 +228,7 @@ func pageRowsQuery(iter *datastore.Iterator) []Row {
for {
row := Row{}
if key, err := iter.Next(&row); err != nil {
if err == datastore.Done {
if err == iterator.Done {
break
}
u.Errorf("error: %v", err)
Expand Down
6 changes: 3 additions & 3 deletions backends/datastore/sql_to_datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func (m *SqlToDatstore) Put(ctx context.Context, key schema.Key, val interface{}
curRow := make([]driver.Value, len(cols))

if key != nil {
dskey = datastore.NewKey(m.dsCtx, m.tbl.NameOriginal, fmt.Sprintf("%v", key.Key()), 0, nil)
dskey = datastore.NameKey(m.tbl.NameOriginal, fmt.Sprintf("%v", key.Key()), nil)
}

var sel *rel.SqlSelect
Expand Down Expand Up @@ -305,7 +305,7 @@ func (m *SqlToDatstore) Put(ctx context.Context, key schema.Key, val interface{}
}
}
// Create the key by position? HACK
dskey = datastore.NewKey(m.dsCtx, m.tbl.NameOriginal, fmt.Sprintf("%v", row[0]), 0, nil)
dskey = datastore.NameKey(m.tbl.NameOriginal, fmt.Sprintf("%v", row[0]), nil)

case map[string]driver.Value:
for i, f := range m.tbl.Fields {
Expand Down Expand Up @@ -362,7 +362,7 @@ func (m *SqlToDatstore) PutMulti(ctx context.Context, keys []schema.Key, src int
}

func (m *SqlToDatstore) Delete(key driver.Value) (int, error) {
dskey := datastore.NewKey(m.dsCtx, m.tbl.NameOriginal, fmt.Sprintf("%v", key), 0, nil)
dskey := datastore.NameKey(m.tbl.NameOriginal, fmt.Sprintf("%v", key), nil)
u.Infof("dskey: %s table=%s", dskey, m.tbl.NameOriginal)
err := m.dsClient.Delete(m.dsCtx, dskey)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion frontends/mysqlfe/testmysql/runtestserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
u "github.com/araddon/gou"
"github.com/bmizerany/assert"
"github.com/coreos/etcd/embed"
"github.com/lytics/grid/natsunit"
"github.com/lytics/grid/grid.v2/natsunit"

// Frontend's side-effect imports
_ "github.com/dataux/dataux/frontends/mysqlfe"
Expand Down
2 changes: 1 addition & 1 deletion planner/actormaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

u "github.com/araddon/gou"
"github.com/lytics/grid"
"github.com/lytics/grid/grid.v2"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion planner/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

u "github.com/araddon/gou"
"github.com/lytics/grid"
"github.com/lytics/grid/grid.v2"

"github.com/araddon/qlbridge/exec"
"github.com/araddon/qlbridge/plan"
Expand Down
4 changes: 2 additions & 2 deletions planner/plan_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

u "github.com/araddon/gou"
"github.com/lytics/grid"
"github.com/lytics/grid/condition"
"github.com/lytics/grid/grid.v2"
"github.com/lytics/grid/grid.v2/condition"
"github.com/lytics/metafora"
"github.com/sony/sonyflake"

Expand Down
2 changes: 1 addition & 1 deletion planner/sink_nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

u "github.com/araddon/gou"
"github.com/lytics/grid"
"github.com/lytics/grid/grid.v2"

"github.com/araddon/qlbridge/datasource"
"github.com/araddon/qlbridge/exec"
Expand Down
2 changes: 1 addition & 1 deletion planner/source_nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

u "github.com/araddon/gou"
"github.com/lytics/grid"
"github.com/lytics/grid/grid.v2"

"github.com/araddon/qlbridge/datasource"
"github.com/araddon/qlbridge/exec"
Expand Down
6 changes: 3 additions & 3 deletions planner/sql_master.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"time"

u "github.com/araddon/gou"
"github.com/lytics/grid"
"github.com/lytics/grid/condition"
"github.com/lytics/grid/ring"
"github.com/lytics/grid/grid.v2"
"github.com/lytics/grid/grid.v2/condition"
"github.com/lytics/grid/grid.v2/ring"

"github.com/araddon/qlbridge/exec"
"github.com/araddon/qlbridge/plan"
Expand Down
4 changes: 2 additions & 2 deletions planner/sqlactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
u "github.com/araddon/gou"

"github.com/lytics/dfa"
"github.com/lytics/grid"
"github.com/lytics/grid/condition"
"github.com/lytics/grid/grid.v2"
"github.com/lytics/grid/grid.v2/condition"

"github.com/araddon/qlbridge/datasource"
"github.com/araddon/qlbridge/exec"
Expand Down
4 changes: 2 additions & 2 deletions planner/sqlworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"time"

u "github.com/araddon/gou"
"github.com/lytics/grid"
"github.com/lytics/grid/condition"
"github.com/lytics/grid/grid.v2"
"github.com/lytics/grid/grid.v2/condition"

"github.com/araddon/qlbridge/datasource"
)
Expand Down
39 changes: 33 additions & 6 deletions updatepackages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,37 @@
cd $GOPATH/src/github.com/araddon/dateparse && git checkout master && git pull
cd $GOPATH/src/github.com/araddon/gou && git checkout master && git pull
#cd $GOPATH/src/github.com/araddon/qlbridge && git checkout master && git pull
cd $GOPATH/src/github.com/beorn7/perks && git checkout master && git pull
cd $GOPATH/src/github.com/bitly/go-hostpool && git checkout master && git pull
cd $GOPATH/src/github.com/bmizerany/assert && git checkout master && git pull
# we are pinned to a slightly older version of etcd until
# we are pinned to a slightly older version of etcd/bolt until
# metafora upgrades
#cd $GOPATH/src/github.com/coreos/etcd && git checkout master && git pull
#cd $GOPATH/src/github.com/coreos/go-etcd && git checkout master && git pull
cd $GOPATH/src/github.com/boltdb/bolt && git checkout master && git pull
cd $GOPATH/src/github.com/cockroachdb/cmux && git checkout master && git pull
cd $GOPATH/src/github.com/coreos/etcd && git checkout master && git pull
cd $GOPATH/src/github.com/coreos/go-etcd && git checkout master && git pull
cd $GOPATH/src/github.com/coreos/go-semver && git checkout master && git pull
cd $GOPATH/src/github.com/coreos/go-systemd && git checkout master && git pull
cd $GOPATH/src/github.com/coreos/pkg && git checkout master && git pull

cd $GOPATH/src/github.com/couchbaselabs/goforestdb && git checkout master && git pull
cd $GOPATH/src/github.com/dchest/siphash && git checkout master && git pull
cd $GOPATH/src/github.com/go-sql-driver/mysql && git checkout master && git pull
cd $GOPATH/src/github.com/ghodss/yaml && git checkout master && git pull
cd $GOPATH/src/github.com/gocql/gocql && git checkout master && git pull
cd $GOPATH/src/github.com/gogo/protobuf && git checkout master && git pull
cd $GOPATH/src/github.com/golang/protobuf && git checkout master && git pull
cd $GOPATH/src/github.com/golang/snappy && git checkout master && git pull
cd $GOPATH/src/github.com/google/btree && git checkout master && git pull
cd $GOPATH/src/github.com/grpc-ecosystem/go-grpc-prometheus && git checkout master && git pull
cd $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway && git checkout master && git pull

cd $GOPATH/src/github.com/hailocab/go-hostpool && git checkout master && git pull
cd $GOPATH/src/github.com/hashicorp/go-immutable-radix && git checkout master && git pull
cd $GOPATH/src/github.com/hashicorp/go-memdb && git checkout master && git pull
cd $GOPATH/src/github.com/hashicorp/golang-lru && git checkout master && git pull
cd $GOPATH/src/github.com/jmoiron/sqlx && git checkout master && git pull
cd $GOPATH/src/github.com/jonboulle/clockwork && git checkout master && git pull
cd $GOPATH/src/github.com/kr/pretty && git checkout master && git pull
cd $GOPATH/src/github.com/kr/pty && git checkout master && git pull
cd $GOPATH/src/github.com/kr/text && git checkout master && git pull
Expand All @@ -38,23 +50,38 @@ cd $GOPATH/src/github.com/lytics/sereno && git checkout master && git pull
cd $GOPATH/src/github.com/mattbaird/elastigo && git checkout master && git pull
cd $GOPATH/src/github.com/mb0/glob && git checkout master && git pull
cd $GOPATH/src/github.com/nats-io/gnatsd && git checkout master && git pull
cd $GOPATH/src/github.com/nats-io/nats && git checkout master && git pull
cd $GOPATH/src/github.com/nats-io/go-nats && git checkout master && git pull
cd $GOPATH/src/github.com/nats-io/nuid && git checkout master && git pull
cd $GOPATH/src/github.com/pborman/uuid && git checkout master && git pull
cd $GOPATH/src/github.com/prometheus/client_golang && git checkout master && git pull
cd $GOPATH/src/github.com/prometheus/client_model && git checkout master && git pull
cd $GOPATH/src/github.com/prometheus/common && git checkout master && git pull
cd $GOPATH/src/github.com/prometheus/procfs && git checkout master && git pull
cd $GOPATH/src/github.com/rcrowley/go-metrics && git checkout master && git pull
cd $GOPATH/src/github.com/sony/sonyflake && git checkout master && git pull

cd $GOPATH/src/github.com/sony/sonyflake && git checkout master && git pull
cd $GOPATH/src/github.com/sony/sonyflake && git checkout master && git pull
# this one if updated breaks older versions of etcd
#cd $GOPATH/src/github.com/ugorji/go && git checkout master && git pull

#cd $GOPATH/src/github.com/uxiang90/probing && git checkout master && git pull


cd $GOPATH/src/github.com/googleapis/gax-go && git checkout master && git pull
cd $GOPATH/src/golang.org/x/crypto && git checkout master && git pull
cd $GOPATH/src/golang.org/x/net && git checkout master && git pull
cd $GOPATH/src/golang.org/x/oauth2 && git checkout master && git pull
cd $GOPATH/src/google.golang.org/api && git checkout master && git pull
cd $GOPATH/src/cloud.google.com/go/ && git checkout master && git pull
cd $GOPATH/src/google.golang.org/genproto && git checkout master && git pull
cd $GOPATH/src/google.golang.org/grpc && git checkout master && git pull
cd $GOPATH/src/cloud.google.com/go/ && git checkout master && git pull
cd $GOPATH/src/gopkg.in/inf.v0 && git checkout master && git pull
# this one is a pain, don't update manually, c headers?
#cd $GOPATH/src/gopkg.in/mgo.v2 && git checkout master && git pull
cd $GOPATH/src/gopkg.in/yaml.v2 && git checkout master && git pull

# wtf
cd $GOPATH/src/k8s.io/client-go && git checkout release-1.4 && git pull

#go get -u -v ./...

Expand Down

0 comments on commit f126b5d

Please sign in to comment.