Commit Graph

72 Commits

Author SHA1 Message Date
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
Binaek Sarkar
be36276fd8 Add deprecation warnings for connection.options "connection" and global terminal options. CLoses #3246 2023-03-23 14:43:06 +00:00
kai
9f66908085 Fix clone_foreign_schema function to set table options. #3236 2023-03-20 16:15:39 +00: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
6c4782c26f Fixes issue where we didn't get a proper uninstall help message for plugins that failed to load. First draft of Failed Plugin table. Closes #3212 2023-03-15 14:53:52 +00:00
Binaek Sarkar
ee8b6647c4 Rationalising 'status hooks'. Do not show spinner when setting status, instead require an explicit Show. #2432 2023-03-14 11:48:14 +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
Patrick Decat
fff3689ca8 Set minimum connection to 0, as thousands of connections are created if it is unset 2023-03-13 14:25:39 +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
kai
9358051bed Fix Service Stop failing if invoked directly after a schema change notification. Closes #3206 2023-03-09 15:55:43 +00:00
kai
948d70388f Update executeSqlInTransaction to rollback transaction in case of error
Do not create a new client in pluginManager.OnConnectionsChanged, instead pass a client in.
Do not pass appname to plugin manager command - instead plugin manager adds prefix the pg app name. #3184. #3185
2023-03-08 10:56:29 +00:00
kaidaguerre
075fafec09 Use single Steampipe Postgres notification channel (#3191) 2023-03-07 17:34:41 +00:00
kaidaguerre
16fd991ee1 Fix tuple concurrently updated error when running multiple instances of steampipe dashboard concurrently. Closes #3188
* Add transaction to executeSqlAsRoot
* Add function executeInTransaction
* Add locking to ensureCommandSchema
* Add locking to ensureTempTablePermissions
* Add locking round schema update queries
2023-03-07 10:29:42 +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
Binaek Sarkar
bfc951b790 Add extra status updates for interactive start. Closes #3179 2023-03-02 12:57:23 +00:00
Binaek Sarkar
d98df11198 Adds better error messages for db connection timeouts. #3143 2023-02-24 12:01:31 +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
kai
01d53cfb9e Merge branch 'v0.18.x' into main
# Conflicts:
#	pkg/connectionwatcher/connection_watcher.go
2023-02-01 13:23:56 +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
0a14fd8610 Fixes issue where 'search_path' is not getting set from connection config watching in service mode. Closes #3047 2023-01-31 15:55:46 +00:00
kaidaguerre
34bea3d1ef Add support for aggregator connections with dynamic tables. Closes #2886 2023-01-27 19:47:43 +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
Binaek Sarkar
993259de52 Increase database connection timeout and improve the error message if connection failure occurs. Closes #2377 2023-01-18 14:26:19 +00:00
kaidaguerre
df1c8c404a Fix introspection table creation for check --where and --tag. Closes #3001 2023-01-17 12:52:59 +00:00
kaidaguerre
b59d86c8a9 Fix introspection table creation for check --where and --tag. Closes #3001 2023-01-17 12:47:41 +00:00
dependabot[bot]
bcbbaa2881 [dep][go](deps): Bump github.com/sethvargo/go-retry from 0.1.0 to 0.2.4 (#2875)
* [dep][go](deps): Bump github.com/sethvargo/go-retry from 0.1.0 to 0.2.4

Bumps [github.com/sethvargo/go-retry](https://github.com/sethvargo/go-retry) from 0.1.0 to 0.2.4.
- [Release notes](https://github.com/sethvargo/go-retry/releases)
- [Commits](https://github.com/sethvargo/go-retry/compare/v0.1.0...v0.2.4)

---
updated-dependencies:
- dependency-name: github.com/sethvargo/go-retry
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update for new goretry version

* trying with SDK main

* assignment

* updating SDK version

* update usage

* bump up SDK

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Binaek Sarkar <binaek@turbot.com>
2023-01-11 15:29:58 +00:00
kaidaguerre
0a391e9636 Update dashboard states to "initialized", "blocked", "running", "complete", "error", "canceled". Closes #2939 2023-01-04 14:08:56 +00:00
kaidaguerre
e45a47d40e Include nested struct values in introspection tables. Closes #2903 2022-12-21 17:45:31 +00:00
Binaek Sarkar
10bd95e687 Fixes issue where implicit services are not shutting down when the last instance of steampipe exits. Closes #2833 2022-12-12 17:09:58 +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
056fa56241 Fixes issue where interactive prompt was not showing timing data for 'json', 'csv' and 'line' outputs. Closes #2699 2022-11-29 10:57:37 +00:00
Binaek Sarkar
d2f8541385 Update the update checker to run asynchronously. Closes #2770 2022-11-25 11:26:50 +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
kai
f47d55b2bb Fix steampipe query --timing not outputting timing information if sharing or exporting a snapshot. Closes #2677 2022-11-07 14:05:39 +00:00
kai
7d28c99e27 Fix steampipe dashboard not showing progress when running a single dashboard. Closes #2685 2022-11-07 10:37:34 +00:00
Puskar Basu
7228dedca2 Fix unintuitive errors from steampipe plugin commands when a plugin (version) is missing. Closes #2361 2022-11-03 11:09:45 +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
42c2323eb2 Add query_timeout to workspace profile. Closes #2593
Improve timeout error message.
Remove refreshDbClient call after timeout.
Set default check query timeout to 240sec and query to 0 (no timeout)
2022-10-26 14:53:50 +01:00
François de Metz
b3838186e1 Add a configurable query timeout. Closes #666 2022-10-26 10:09:17 +01:00
kaidaguerre
0e27f38202 Update workspace profile parsing to load options blocks. Include these options values in viper with correct precedence. Closes #2579 2022-10-24 13:58:50 +01:00
Binaek Sarkar
509a5161ae Delete backups directory which was committed by mistake 2022-10-19 17:44:22 +05:30
kaidaguerre
1e3db26e8f Add support for workspace profiles - parse from config and select using --workspace arg. Closes #2510
Add support for implicit workspace. Closes #2514
If snapshot-location is a local file path, copy snapshot instead of uploading. Closes #2550
Do not show snapshot upload status if --progress=false. Closes #2517
Replace --workspace with --snapshot-location. Closes #2512
2022-10-19 13:02:24 +01:00