looker-open-source / looker_deployer

A tool to help deploy objects from one Looker instance to another
Apache License 2.0
56 stars 25 forks source link

Dashboard import error #114

Closed im-SN closed 1 year ago

im-SN commented 1 year ago

When attempting to import a dashboard in local machine to a cloud Looker instance, the following error is displayed:

/Library/Ruby/Gems/2.6.0/gems/gazer-0.2.56/lib/gzr/commands/dashboard/import.rb:97:in 'block (3 levels) in execute': undefined method 'first' for nil:NilClass (NoMethodError)

This happens specifically in step {"levelname": "INFO", "module": "deploy_content", "funcName": "import_content", "message": "Deploying content", "content_type": "dashboard", ...

It seems that is coming from the gazer library, any ideas what might be the issue here?

danieldiamond commented 1 year ago

@im-SN can you confirm that your export command is in fact saving the dashboard? i.e. can you confirm the local machine has the actual json to export?

im-SN commented 1 year ago

@danieldiamond I can confirm that I am exporting the dashboard json to local machine. That part is working without issues.

danieldiamond commented 1 year ago

alright, i was recently running into an issue when moving my app (my commands) to a container. i basically narrowed it down to that the fact that my local setup has gem package looker-sdk (0.1.2) installed and the container had looker-sdk (0.1.4).

In the Dockerfile, I added

    gem install looker-sdk -v 0.1.2 && \
    gem uninstall looker-sdk -v 0.1.4

and it seems to work now

BradDay625 commented 1 year ago

@danieldiamond Hi Daniel, I am experiencing the same error and your fix works for smaller dashboards but the error persists when trying to import larger files. Any ideas? Cheers

JanChen22 commented 1 year ago

Hi, I got exactly the same error as @im-SN when tyring to import serveral new dashboards into production instance using ldeploy in Github Action. Any updates or ideas for the solution?

Thanks

im-SN commented 1 year ago

@JanChen22 the only workaround I have found so far is to use the Gazer import directly.

gzr dashboard import ./local_folder/your_dashboard.json [Looker folder ID] --host=yourLookerInstance.looker.com --force

See wiki for reference: [https://github.com/looker-open-source/gzr/wiki]

peter-monaco commented 1 year ago

I am also experiencing the same problem. It can import some dashboards, but other ones fail. I also get an error now when trying to export content to local.

JanChen22 commented 1 year ago

@peter-monaco This is what I've been told. This appears to be related to a recent deployment of Gazer v 0.2.59. It worked for me after made the change with the following:

To address in the short term, update the lines of code in the .yml file:

gem install gazer

to

gem install gazer -v 0.2.58

AdamMinton commented 1 year ago

Latest version of gazer should have issues addressed.