spectacles-ci / spectacles

A continuous integration tool for Looker and LookML.
https://spectacles.dev
MIT License
217 stars 35 forks source link

Wait for expired queries to resolve themselves or retry #716

Closed joshtemple closed 1 year ago

joshtemple commented 1 year ago

Change description

The Looker API returns the status expired for certain queries. However, sometimes it's a false alarm as the query eventually resolves itself to a completed status.

This change waits up to 30 seconds for that resolution to happen. If the query's status is still expired at that point, it puts the query back on the queue to be retried. After 2 retries it gives up and adds an error to the Explore.

Type of change

Related issues

Closes #111.

Checklists

Security

Code review

joshtemple commented 1 year ago

This PR still needs tests. I also need to investigate if a run with both Explore and dimension-level errors will be problematic for printing out in the CLI.