fix(sources/looker): Allow Looker to be configured without setting a Client Id or Secret (#1496)

Fixed a minor oversight from previous work on oauth.
This commit is contained in:
Dr. Strangelove
2025-09-26 13:10:56 -04:00
committed by GitHub
parent ab7d313f7f
commit 67d8221a2e
3 changed files with 4 additions and 5 deletions

View File

@@ -64,6 +64,7 @@ In this section, we will download Toolbox and run the Toolbox server.
```bash
export LOOKER_BASE_URL=https://looker.example.com
export LOOKER_VERIFY_SSL=true
export LOOKER_USE_CLIENT_OAUTH=true
```
In some instances you may need to append `:19999` to

View File

@@ -58,8 +58,8 @@ type Config struct {
Name string `yaml:"name" validate:"required"`
Kind string `yaml:"kind" validate:"required"`
BaseURL string `yaml:"base_url" validate:"required"`
ClientId string `yaml:"client_id" validate:"required"`
ClientSecret string `yaml:"client_secret" validate:"required"`
ClientId string `yaml:"client_id"`
ClientSecret string `yaml:"client_secret"`
SslVerification bool `yaml:"verify_ssl"`
UseClientOAuth bool `yaml:"use_client_oauth"`
Timeout string `yaml:"timeout"`

View File

@@ -100,10 +100,8 @@ func TestFailParseFromYamlLooker(t *testing.T) {
sources:
my-looker-instance:
kind: looker
base_url: http://example.looker.com/
client_id: jasdl;k;tjl
`,
err: "unable to parse source \"my-looker-instance\" as \"looker\": Key: 'Config.ClientSecret' Error:Field validation for 'ClientSecret' failed on the 'required' tag",
err: "unable to parse source \"my-looker-instance\" as \"looker\": Key: 'Config.BaseURL' Error:Field validation for 'BaseURL' failed on the 'required' tag",
},
}
for _, tc := range tcs {