looker-open-source/gzr

After gazer version 0.2.59 released , unable to import dashboard

Closed this issue · 2 comments

jlu2 commented

We got the following error with the new gazer release. (0.2.59)

The message we are getting are errors.ShellProcessError: Shell process exited with code 1: /usr/local/bundle/gems/gazer-0.2.59/lib/gzr/commands/dashboard/import.rb:170:in sync_dashboard': undefined method each' for nil:NilClass (NoMethodError)
from /usr/local/bundle/gems/gazer-0.2.59/lib/gzr/commands/dashboard/import.rb:66:in block (2 levels) in execute' from /usr/local/bundle/gems/gazer-0.2.59/lib/gzr/modules/filehelper.rb:88:in read_file'
from /usr/local/bundle/gems/gazer-0.2.59/lib/gzr/commands/dashboard/import.rb:54:in block in execute' from /usr/local/bundle/gems/gazer-0.2.59/lib/gzr/modules/session.rb:249:in with_session'
from /usr/local/bundle/gems/gazer-0.2.59/lib/gzr/commands/dashboard/import.rb:50:in execute' from /usr/local/bundle/gems/gazer-0.2.59/lib/gzr/commands/dashboard.rb:78:in import'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in run' from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in invoke_command'

we use gazer cat command to save the dashboard into json format then use import. I was able to import dashboard using version (0.2.59) BUT using the json file created by gazer cat version (0.2.58). I noticed that in 0.2.58 when we save the json file, when the value is empty the json value has "NULL", but 0.2.59 the value become "".

4no0p commented

We experienced the same errors after upgrading to version 0.2.59. And the issue persists for dashboards exported from version 0.2.58 as well as 0.2.59.This is likely due to the recent migration to Looker API 4.0. Can someone please confirm, if Gazer plans to maintain backward compatibility and support dashboards exported from previous versions utilizing Looker API 3.1.

There are some changes to the API. In particular, Looker migrated from using spaces to folders in the API. In 3.1 the API supported space_id and folder_id as synonyms, but in 4.0 space_id no longer works. Version 0.2.60 converts everything from space for folder.