turbot / steampipe

Zero-ETL, infinite possibilities. Live query APIs, code & more with SQL. No DB required.
https://steampipe.io
GNU Affero General Public License v3.0
6.84k stars 264 forks source link

Dashboard command cannot ruin arbitrary SQL #2763

Closed whalito closed 1 year ago

whalito commented 1 year ago

Describe the bug After updating Steampipe 0.16.1 to 0.17.1 with the described WSL update procedure, running the dashboard after upgrade, results in the following error message: Error: dashboard command cannot run arbitrary SQL

Steampipe version (steampipe -v) Example: v0.17.1

To reproduce Run steampipe in v0.16.1 with all components working. Update to the latest version 0.17.1 and run steampipe dashboard start to see the error

Expected behavior I expected to see steampipe working after the easy update procedure.

Additional context No other context

e-gineer commented 1 year ago

@whalito sorry you've hit this bump in the upgrade.

Can you please share more information? What's the command and the output?

Please try running:

STEAMPIPE_LOG=trace steampipe dashboard
whalito commented 1 year ago

Sure.

I did a plain and simple upgrade with the WSL bash command published on the update site. And as advise from the CLI interface that there was update available towards 0.17.1. Once successfully executed, the command steampipe dashboard start gave the mentioned ERROR sql arbitrary issue. This only happens when executing the command ‘steampipe dashboard start or status’ Running steampipe in check or query mode, no issue has been reported.

As I use the dashboard service the most, I’d like to know how to fix it without reinstallation required.

Kr Bert From: Nathan Wallace @.> Sent: donderdag 17 november 2022 12:09 To: turbot/steampipe @.> Cc: Bert Vaerendonck @.>; Mention @.> Subject: Re: [turbot/steampipe] Dashboard command cannot ruin arbitrary SQL (Issue #2763)

@whalitohttps://github.com/whalito sorry you've hit this bump in the upgrade.

Can you please share more information? What's the command and the output?

Please try running:

STEAMPIPE_LOG=trace steampipe dashboard

— Reply to this email directly, view it on GitHubhttps://github.com/turbot/steampipe/issues/2763#issuecomment-1318470855, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABRQOOZ3TMRLV5UXF7I3ZSTWIYG4NANCNFSM6AAAAAASDHUYFA. You are receiving this because you were mentioned.Message ID: @.***>

kaidaguerre commented 1 year ago

@whalito I think I see the problem.

The command steampipe dashboard start is not in fact correct. To start the dashboard server in the foreground, you can just run steampipe dashboard.

To run in the background you can run steampipe service start --dashboard. To get the status of a the steampipe services you can run steampipe service status

In version 16 it would ignore the additional argument start. However in version 17 we added the ability to run individual dashboard by passing the dashboard name to the dashboard command, for example:

steampipe dashboard dashboard.aws_cloudtrail_trail_dashboard

What is happening here is that steampipe is looking for a resource in the mod matching the name start and as it fails to find one, it assumes you are trying to run a sql query directly (e.g. steampipe dashboard "select * from aws_account" ) which is not valid.

I agree the error message could probably be improved.

kaidaguerre commented 1 year ago

tl;dr try running steampipe dashbnoard or steampipe service start --dashboard

whalito commented 1 year ago

steampipe service start --dashboard does the trick thanks for the swift support and answers Closing the issue

whalito commented 1 year ago

solved by using steampipe service start --dashboard (twice) to enable the service again. changes in cli were not listed in the update information