Looker Project Git Pull Endpoint

low_priority
done
reply
(Dirty Looker) #1

The Looker platform has an endpoint for the production model to run a git pull from the repository.

Normally, this is automatically done when a Looker developer pushes changes. However, if LookML is being worked on or generated from another source, then Looker’s LookML can get out of sync with the repository. To re-sync a project, open the following URL in a new tab in your browser:

[hostname]/webhooks/projects/[project name]/deploy

Here [hostname] is your Looker URL and [project name] is the name of the project you want to sync.

When you run this, you’ll get a white screen with a success message.

Nothing to worry about, just navigate back to your instance and see the updated LookML.

1 Like

OEM Dedicated Instance Modeling and Deployment Architecture
(sam) #2

For information on setting up Looker with Git, see this page in our documentation.
For information on using Git with Looker, see this page in our documentation.

If your workflow relies on editing LookML outside of Looker, then you’ll want to hit this endpoint every time you make a commit in your repository.

For a Github repo, you can set this up to happen automatically.

  1. Once in the repo, navigate to Settings -> Webhooks -> “Add Webhook”

  2. Enter the endpoint and choose which events should trigger the webhook (commit, release, etc).

0 Likes

(Noha Taha) #3

Is there a way to rollback Looker to an older commit/tag id or does it always pick the latest master commit

0 Likes

(Izzy) #4

Looker always picks the latest master commit. You can, however, roll back to the commit in git outside of Looker (like in github or your source control provider of choice), and then hit the deploy webhook as described in this post (we also have a help center article here: https://help.looker.com/hc/en-us/articles/360001288268-Deploy-Webhook-Pulling-From-Remote-Git-Repository) to sync Looker up to that.

So you totally can do it, just not directly from within the product.

0 Likes