looker-open-source / henry

A command line tool for Looker instance cleanup
MIT License
79 stars 27 forks source link

Henry uses default `looker` key auth options #4

Closed msandt3 closed 4 years ago

msandt3 commented 4 years ago

This bit me when playing with the tool - would love to see something included in the readme about it. In the readme, you've got examples of different configs for auth.

hosts:
  dev_looker:
    host: devhostname.looker.com
    id: AbCdEfGhIjKlMnOp
    secret: QrStUvWxYz1234567890
  staging_looker:
    host: staginghostname.looker.com
    id: AbCdEfGhIjKlMnOp
    secret: QrStUvWxYz1234567890

However, when you run henry via henry pulse with this config file it'll spit out a non-descript error like so:

$ henry pulse
ERROR: 'looker' not found

You can rectify it by naming the host you wish to connect to looker. E.g.:

hosts:
  looker:
    host: devhostname.looker.com
    id: AbCdEfGhIjKlMnOp
    secret: QrStUvWxYz1234567890
  staging_looker:
    host: staginghostname.looker.com
    id: AbCdEfGhIjKlMnOp
    secret: QrStUvWxYz1234567890

Figured it out - but it would be cool to be able to pass in which host you want to run henry against via the CLI.

josephaxisa commented 4 years ago

Hi @msandt3, you could point henry to any of the hosts in your config file using the --host argument. So for example to point it to dev_looker you would use henry pulse --host=dev_looker. If you do not specify a host, it defaults to looker, i.e. host pulse is equivalent to henry pulse --host=looker.

JarredLHumphrey commented 4 years ago

I ran into the same question. Can we extend the README.md to include an example of this? Currently the docs are misleading in that the --host option only seems to be a specific url like instance.looker.com rather than a named host within the config file.