googleapis / googleapis/google-cloud-go

auth: directpath no longer emits warning if misconfigured using new auth support

Open
#11,001 13 comments 0 reactions 1 assignee Assigned to @cpriti-os View on GitHub
priority: p2 type: docs
Dominant language
Go
Stars
4.5k
Forks
1.6k
Avg merge
1d 13h
Merged PRs (30d)
109

Description

## Client

Storage

## Code and Dependencies

```go
package main

import (
"context"
"log"

"cloud.google.com/go/storage"
)

func main() {
ctx := context.Background()

// Creates a gRPC enabled client
// If used outside of GCE a warning used to be emitted.
client, err := storage.NewGRPCClient(ctx)
if err != nil {
log.Fatalf("Failed to create client: %v", err)
}
defer client.Close()
}
```

## Expected behavior

Warnings were introduced into google-api-go-client (https://github.com/googleapis/google-api-go-client/pull/2225) to tell users that DirectPath is misconfigured client side; such as running gRPC API client outside of GCE.

## Actual behavior

New google-cloud-go auth support reimplemented this logic but didn't bring along the warning.
https://github.com/googleapis/google-cloud-go/blob/main/auth/grpctransport/directpath.go#L96

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.