From 1ce25139203a64b80fb3416c4097087e319e0d6b Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 13 Jul 2018 10:00:38 -0500 Subject: [PATCH] Use context from stdlib in google physical backends (#4922) * Use context from stdlib in google physical backends * Do not prefix logs (Vault will do it) --- physical/gcs/gcs.go | 2 +- physical/gcs/gcs_ha.go | 2 +- physical/gcs/gcs_ha_test.go | 2 +- physical/gcs/gcs_test.go | 2 +- physical/spanner/spanner.go | 2 +- physical/spanner/spanner_ha.go | 2 +- physical/spanner/spanner_ha_test.go | 2 +- physical/spanner/spanner_test.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/physical/gcs/gcs.go b/physical/gcs/gcs.go index 19058f382d10..68930fb559fd 100644 --- a/physical/gcs/gcs.go +++ b/physical/gcs/gcs.go @@ -1,6 +1,7 @@ package gcs import ( + "context" "errors" "fmt" "io/ioutil" @@ -18,7 +19,6 @@ import ( "cloud.google.com/go/storage" "github.com/armon/go-metrics" - "golang.org/x/net/context" "google.golang.org/api/iterator" "google.golang.org/api/option" ) diff --git a/physical/gcs/gcs_ha.go b/physical/gcs/gcs_ha.go index fafd1f3a6dca..feca0a7a14a9 100644 --- a/physical/gcs/gcs_ha.go +++ b/physical/gcs/gcs_ha.go @@ -1,6 +1,7 @@ package gcs import ( + "context" "encoding/json" "fmt" "sync" @@ -12,7 +13,6 @@ import ( uuid "github.com/hashicorp/go-uuid" "github.com/hashicorp/vault/physical" "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/api/googleapi" ) diff --git a/physical/gcs/gcs_ha_test.go b/physical/gcs/gcs_ha_test.go index 4f8940cc95be..891a478661c3 100644 --- a/physical/gcs/gcs_ha_test.go +++ b/physical/gcs/gcs_ha_test.go @@ -1,6 +1,7 @@ package gcs import ( + "context" "fmt" "math/rand" "os" @@ -11,7 +12,6 @@ import ( log "github.com/hashicorp/go-hclog" "github.com/hashicorp/vault/helper/logging" "github.com/hashicorp/vault/physical" - "golang.org/x/net/context" ) func TestHABackend(t *testing.T) { diff --git a/physical/gcs/gcs_test.go b/physical/gcs/gcs_test.go index 2a2027308dc8..79dfebef830c 100644 --- a/physical/gcs/gcs_test.go +++ b/physical/gcs/gcs_test.go @@ -1,6 +1,7 @@ package gcs import ( + "context" "fmt" "math/rand" "os" @@ -11,7 +12,6 @@ import ( log "github.com/hashicorp/go-hclog" "github.com/hashicorp/vault/helper/logging" "github.com/hashicorp/vault/physical" - "golang.org/x/net/context" "google.golang.org/api/googleapi" ) diff --git a/physical/spanner/spanner.go b/physical/spanner/spanner.go index 59a43d50926c..4724bec18f39 100644 --- a/physical/spanner/spanner.go +++ b/physical/spanner/spanner.go @@ -1,6 +1,7 @@ package spanner import ( + "context" "fmt" "os" "sort" @@ -20,7 +21,6 @@ import ( "cloud.google.com/go/spanner" "github.com/pkg/errors" - "golang.org/x/net/context" ) // Verify Backend satisfies the correct interfaces diff --git a/physical/spanner/spanner_ha.go b/physical/spanner/spanner_ha.go index 288b6e10e212..cc4b8bfe2633 100644 --- a/physical/spanner/spanner_ha.go +++ b/physical/spanner/spanner_ha.go @@ -1,6 +1,7 @@ package spanner import ( + "context" "fmt" "sync" "time" @@ -11,7 +12,6 @@ import ( uuid "github.com/hashicorp/go-uuid" "github.com/hashicorp/vault/physical" "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/physical/spanner/spanner_ha_test.go b/physical/spanner/spanner_ha_test.go index 2e36b0143dfb..94e0ef7f9569 100644 --- a/physical/spanner/spanner_ha_test.go +++ b/physical/spanner/spanner_ha_test.go @@ -1,6 +1,7 @@ package spanner import ( + "context" "os" "testing" @@ -8,7 +9,6 @@ import ( log "github.com/hashicorp/go-hclog" "github.com/hashicorp/vault/helper/logging" "github.com/hashicorp/vault/physical" - "golang.org/x/net/context" ) func TestHABackend(t *testing.T) { diff --git a/physical/spanner/spanner_test.go b/physical/spanner/spanner_test.go index 18f7ccf13f10..0ab460646cb8 100644 --- a/physical/spanner/spanner_test.go +++ b/physical/spanner/spanner_test.go @@ -1,6 +1,7 @@ package spanner import ( + "context" "os" "testing" @@ -8,7 +9,6 @@ import ( log "github.com/hashicorp/go-hclog" "github.com/hashicorp/vault/helper/logging" "github.com/hashicorp/vault/physical" - "golang.org/x/net/context" ) func testCleanup(t testing.TB, client *spanner.Client, table string) {