Commit Graph

56 Commits

Author SHA1 Message Date
kaidaguerre
07782a2b13 Adds support for verbose timing information. Closes #4237. Closes #4244
- JSON output format has changed to move the rows to under a `rows` property, with timing information under the `metadata` property
- Update timing display to show rows returned and rows fetched, as well as adding verbose mode which lists all scans
- Use enums for output mode and timing mode - timing is now either `on`, `off` or `verbose`
- Bugfix: ensure error is returned from ExecuteSystemClientCall. Closes #4246
2024-04-17 10:12:17 +01:00
kaidaguerre
e6e9714e4c Update all ErrorAndWarnings function returns to pass by value, removing possibility of nil ErrorAndWarnings. Closes #3974 (#4212) 2024-03-21 11:46:10 +00:00
kaidaguerre
737efa381b Move hcl_helpers and type_conversion package to go-kit. Closes #3962 2023-10-16 06:01:45 +01:00
kaidaguerre
4fa11a424e Add function to clear connection cache. Closes #3937
* Add function to clear connection cache. 
* Update FDW to v1.9.0 - Add ability to clear connection cache by inserting into settings table.
* Update plugin sdk to v5.6.1
* fix listen unit tests
2023-09-29 19:48:17 +01:00
Puskar Basu
2438a122a6 Fixes issue where initialising rate limiter definitions was taking too long due to force recreation of tables. Closes #3902 2023-09-26 14:48:59 +01:00
kaidaguerre
79606c5bcd Rename internal introspection tables. Fix warning notifications from RefreshConnections. Improve error handlingh for config inconsistencies in conneciton and plugin config. Closes #3886 2023-09-22 16:02:41 +01:00
kaidaguerre
7feb305fde Provide mechanism for plugin manager to send warnings back to CLI. Closes #3603 (#3835) 2023-09-13 15:34:15 +01:00
Binaek Sarkar
a3a714d6cd Fixes issue where temporary tables are dropped in interactive prompt when pool connections are recycled. Closes #3359. Closes #3781 2023-09-06 16:46:40 +01:00
Binaek Sarkar
2f889e462e Merge branch 'v0.20.x' 2023-09-01 23:05:16 +05:30
Binaek Sarkar
b0fa6b6cbf Rotate SSL certificates before server starts, if necessary. Closes #3599 2023-09-01 22:57:58 +05:30
Binaek Sarkar
edfe58f815 Revert "Fixes issue where temporary tables are lost in the middle of a long running interactive session. Closes #3543" (#3789)
This reverts commit 047d8b5556.
2023-09-01 14:33:05 +01:00
Binaek Sarkar
047d8b5556 Fixes issue where temporary tables are lost in the middle of a long running interactive session. Closes #3543 2023-08-29 12:18:20 +01:00
Binaek Sarkar
08b447a261 Differentiate between user and system queries using application name. Closes #3600 2023-08-25 16:50:27 +01:00
Puskar Basu
84ffb71412 Steampipe commands should bypass plugin requirement check if installed plugin is local. Closes #3643 2023-07-27 12:58:52 +01:00
Binaek Sarkar
854819f8f1 Validates workspace profile cache settings. Closes #3646 2023-07-14 13:22:08 +01:00
Binaek Sarkar
37e4b94148 Move ErrorAndWarnings to error_helpers. Closes #3653 2023-07-12 13:58:57 +01:00
kai
1d9f22df7e Merge branch 'v0.20.x' 2023-07-03 15:31:22 +01:00
kaidaguerre
80466b0f51 fix meta_cache function to use correct setting key: cache_ttl (#3640) 2023-07-03 13:42:55 +01:00
Binaek Sarkar
a1caf53eeb Adds 'steampipe_server_settings' table populated with server settings data during service startup. Closes #3462 2023-06-21 13:23:14 +01:00
kaidaguerre
dd1c36b514 Re-add support for legacy command schema. Closes #3457 2023-05-19 15:45:38 +01:00
Binaek Sarkar
0fa28fcaf3 Introduces SQL functions to easily manipulate caching functionality. Closes #3442 2023-05-18 14:59:44 +01:00
kai
3d1423b235 Fix typo in constants.ForeighTableSettings. Update updateScanMetadataMaxId to use new table name. #3416 2023-05-18 08:57:31 +01:00
Binaek Sarkar
6d73804f3a Fixes issue where 'internal' would be added twice in the search_path if one is mentioned in the non default search path. Closes #3397 2023-05-17 15:19:45 +01:00
Binaek Sarkar
9653db55da Drops legacy 'internal' and 'steampipe_command' schema. Closes #3403 2023-05-17 13:31:37 +01:00
kaidaguerre
f4b5d64d71 Fix interactive timing output not including scan metadata (hydrate calls/ rows). Closes #3420 2023-05-17 11:29:04 +01:00
kaidaguerre
4635640f4e Remove 'steampipe_command' schema and move settings and scan_metadata foreign tables to 'steampipe_internal' schema. Closes #3416 2023-05-16 17:12:44 +01:00
kaidaguerre
40804a3201 Execute RefreshConnections asyncronously and optimise for high connection count. Add connection_state table.
- Execute RefreshConnections asyncronously
- Add connection_state table to indicate the loading state of connections
- Optimise RefreshConnections by cloning connection schemas
- Add locking to ensure only a single instance of RefreshConnections runs
- Start executing queries without waiting for connections to load, add smart error handling to wait for required connection
- Optimise autocomplete for high connection count
- Autocomplete and inspect data available before all conections are refreshed
- Update file watcher to respond to CHMOD, so thaat it pickes up deletion of file contents

 Closes #3394
 Closes #3267
2023-05-10 09:05:08 +01:00
Puskar Basu
746fcc80a6 Fixes issue where workspace introspection option was boolean instead of control/info/none. Closes #3389 2023-05-09 13:40:36 +01:00
Binaek Sarkar
299697ae2f Updates in cache configuration to allow disabling of all caching on server. Closes #3258
STEAMPIPE_CACHE environment variable resolves to service cache enabled as well as client cache enabled

service cache enabled is used by the plugin manager to enable/disable caching on the plugins during startup (runtime toggle is not allowed) - with a max_ttl

client cache enabled is used to enable/disable the cache on the database connection (fdw)
A TTL can also be set on the client side capped to max_ttl on the server
2023-03-31 15:12:25 +01:00
kaidaguerre
df9c3a253a Optimize RefreshConnections by cloning schemas where possible. Optimize plugineManager.Get when retrieving multiple connections from same plugin. Closes #3236 2023-03-16 14:43:56 +00:00
kaidaguerre
86246ed927 Only call RefreshConnections on service startup or after a file watching event. Closes #3229 2023-03-15 16:33:23 +00:00
Puskar Basu
8cb5935a36 Add query column in introspection tables to populate FullName if a QueryProvider references a named query. Closes #3161 2023-03-13 15:32:51 +00:00
kaidaguerre
92396d77c0 Remove connection pool min size. Remove need to create empty mod introspection tables if introspection is not enabled. Remove connection pool min size. Closes #3207
* Remove all references to prepared statements
* remove sessionInitWaitGroup
2023-03-09 16:55:08 +00:00
kaidaguerre
2171ce66ba Fix Postgres error "cached plan must not change result type" when dynamic plugin schema changes. Update interactive .inspect and autocomplete based on changes to connection config or dynamic schema updates. Closes #3184. Closes #3185 2023-03-03 18:45:40 +00:00
kaidaguerre
dd76a500e5 When acquiring a session, if the db schemas have changed, reload SteampipeConfig and re-set required search path. Closes #3137 2023-02-22 14:50:53 +00:00
kaidaguerre
4e13e4e6d1 When a plugin fails to load, remove connections for that plugin from the connection state file. Closes #3124 2023-02-17 18:01:49 +00:00
Binaek Sarkar
d7673ecf08 Adds a mechanism for status updates during initialisation. Closes #3108 2023-02-16 17:09:34 +00:00
Binaek Sarkar
d0ede13d4b Make database start timeout configurable. Closes #3038 2023-02-14 17:33:57 +00:00
Binaek Sarkar
e88d75a692 Fixes issue where '.inspect' was not working for table names with a '.'. Closes #2455 2023-02-13 15:11:37 +00:00
Binaek Sarkar
9053d7e121 Fixes issue where extra newline was added to interactive prompt before messages were printed. Closes #3027 2023-01-31 15:59:42 +00:00
Binaek Sarkar
5dc46c4e09 Increase database connection timeout and improve the error message if connection failure occurs. Closes #2377 2023-01-18 14:31:26 +00:00
kaidaguerre
b59d86c8a9 Fix introspection table creation for check --where and --tag. Closes #3001 2023-01-17 12:47:41 +00:00
kaidaguerre
e45a47d40e Include nested struct values in introspection tables. Closes #2903 2022-12-21 17:45:31 +00:00
kaidaguerre
dbd1d10fcc Add support for plugin sdk v5, with plugin message stream - support update of dynamic plugin schema based on file events. Closes #2767 2022-11-30 10:50:46 +00:00
Binaek Sarkar
18a1c51597 Upgrades 'pgx' to v5. Closes #2776 2022-11-23 17:34:21 +00:00
kaidaguerre
fe6365b1ef Remove usage of prepared statements - instead excute sql directly. Wrap with executions in LeafRuns to support runtime dependency resolution. Closes #2789. #2772 2022-11-23 14:11:56 +00:00
kaidaguerre
4f90440d26 Add support for with blocks. Closes #2772 2022-11-21 16:25:51 +00:00
kaidaguerre
59d224711c Fix regression - creating all prepared statements when executing a batch query. When connected to Steampipe cloud, create all prepared statements in a single sql statement to improve performance. Closes #2644. Closes #2650 2022-11-01 22:25:12 +00:00
Binaek Sarkar
4c490f1ecc Fixes issue where the CLI would fail to connect to local service if there are credential files in ~/.postgresql . Closes #1417 2022-10-27 17:46:22 +01:00
kaidaguerre
1dc28f4681 Add --source-snapshot option to dashboard command. Closes #2503. (#2491) 2022-10-11 23:36:27 +01:00