diff --git a/.github/workflows/ci-v2.yaml b/.github/workflows/ci-v2.yaml index f76cd08f..47295f10 100644 --- a/.github/workflows/ci-v2.yaml +++ b/.github/workflows/ci-v2.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: [ '1.11.x', '1.12.x', '1.13.x', '1.14.x', '1.15.x'] + go-version: [ '1.11.x', '1.12.x', '1.13.x', '1.14.x', '1.15.x', '1.16.x'] env: working-directory: ./v2 @@ -76,7 +76,7 @@ jobs: restore-keys: | ${{ runner.os }}-${{ matrix.go-version }}-go- - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@master + uses: google-github-actions/setup-gcloud@v0 - name: Install working-directory: ${{env.working-directory}} env: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a87d23a7..ff05a206 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: [ '1.11.x', '1.12.x', '1.13.x', '1.14.x', '1.15.x'] + go-version: [ '1.11.x', '1.12.x', '1.13.x', '1.14.x', '1.15.x', '1.16.x'] steps: - name: Set up Go @@ -70,7 +70,7 @@ jobs: restore-keys: | ${{ runner.os }}-${{ matrix.go-version }}-go- - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@master + uses: google-github-actions/setup-gcloud@v0 - name: Install env: GO111MODULE: off diff --git a/README.md b/README.md index c0cf5cc9..4e3f50f4 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ A few APIs were cleaned up, and there are some differences: * `appengine/socket` is not required on App Engine flexible environment / Managed VMs. Use the standard `net` package instead. -## Key Encode/Decode compatibiltiy to help with datastore library migrations +## Key Encode/Decode compatibility to help with datastore library migrations Key compatibility updates have been added to help customers transition from google.golang.org/appengine/datastore to cloud.google.com/go/datastore. The `EnableKeyConversion` enables automatic conversion from a key encoded with cloud.google.com/go/datastore to google.golang.org/appengine/datastore key type. diff --git a/v2/internal/api.go b/v2/internal/api.go index a1c507ab..96df8204 100644 --- a/v2/internal/api.go +++ b/v2/internal/api.go @@ -67,7 +67,7 @@ var ( backgroundContextOnce sync.Once backgroundContext netcontext.Context - logStream io.Writer = os.Stdout // For test hooks. + logStream io.Writer = os.Stderr // For test hooks. timeNow func() time.Time = time.Now // For test hooks. ) diff --git a/v2/internal/log.go b/v2/internal/log.go index e4f14ba6..210df597 100644 --- a/v2/internal/log.go +++ b/v2/internal/log.go @@ -108,7 +108,7 @@ func chunkLog(msg string) []string { } func traceAndSpan(c *context) (string, string) { - headers := c.req.Header["Cloud-Trace-Context"] + headers := c.req.Header["X-Cloud-Trace-Context"] if len(headers) < 1 { return "", "" } diff --git a/v2/internal/log_test.go b/v2/internal/log_test.go index aeecb43e..b724153d 100644 --- a/v2/internal/log_test.go +++ b/v2/internal/log_test.go @@ -437,7 +437,7 @@ func buildContextWithTraceHeaders(t *testing.T, headers []string) *context { t.Fatal(err) } for _, h := range headers { - req.Header.Add("Cloud-Trace-Context", h) + req.Header.Add("X-Cloud-Trace-Context", h) } return fromContext(ContextForTesting(req)) }