looker-open-source / pylookml

A pythonic api for automatic lookml
https://pylookml.readthedocs.io/en/latest/introduction.html
MIT License
44 stars 22 forks source link

Catch project.deploy() not updating #30

Open bryan-at-looker opened 3 years ago

bryan-at-looker commented 3 years ago

Having an invalid looker_project_name may not give errors, but it means the deploy webhook might fail silently. Ideally we catch the response from the webhook and notify that nothing was updated

proj = lookml.Project(
  repo= "organization/customer-repo",
  access_token="abc123",
  #Optional args for the deploy URL (for deploying directly to prodcution mode)
  looker_host="https://customer.looker.com/",
  looker_project_name="wrong_project_name"
)

for f in files:
  proj.put(f)

proj.deploy()
russlooker commented 3 years ago

Should just be the trailing slash in the looker_host arg, will add a safety check in an upcoming update