Open madhushreeray30 opened 9 months ago
Hello @madhushreeray30, and thanks for all the suggestions!
I've implemented most of them in https://github.com/jreyesr/steampipe-plugin-postgres/commit/ff39b1f20232a99e3618d89fa61197e0143788da. The only points that require a standalone comment, I think, are:
Is the environment variable name correct?
I think so. Unlike, say, the AWS CLI (where you know that you must set, for example, AWS_DEFAULT_REGION, because that's what Amazon's official CLI uses), for this plugin there's not a clear reference CLI tool. Thus, there's no One True envvar that I must match, so I used DATABASE_URL
We generally do not include the example query output in the docs, is there a particular reason for keeping them here?
Not really, I've deleted them. Thanks!
plugin.go
The function has some extra unnecessary spaces we can restructure it as follows
The original spacing came from gofmt
, I think it tries to align the values and thus inserts spaces. I've changed it, but my IDE fought me (it really tries to autoformat on save) :)
How are we handling the resource not found errors?
Those would return zero results, as it would happen if you ran the same query in the remote (backing) DB. This plugin doesn't call a REST API, so there are no 404 errors. The worst that can happen is that you make a query that matches no records, in which case we just return zero records (i.e. an empty table)
Do the APIs support pagination? I did not find any reference to it, but I want to make sure that we have checked that box before releasing it.
No, there's no API behind this plugin, hence no pagination support. I can't push down LIMITs either, since that's not exposed by the Steampipe SDK.
While working with the APIs did you encounter rate limit errors?
There shouldn't be any, as the remote (backing) Postgres datastore shouldn't have rate limits in place. Postgres doesn't support those kinds of limits either.
Let me know if I've forgotten any suggestions. Again, thanks for the review!
Hey @jreyesr thanks for making the changes 👍. While going through the fixes here are few more suggestions that you can work on
test.go.old
file so we can remove thatindex.md
There is this error in the index.md
can you please look into it
The description should end with a .
> description: Steampipe plugin for proxying queries to plain Postgres databases.
The og_description has an extra "
at the end please remove that
postgres/*
ListTables
instead of ListTable
go.mod
steampipe-plugin-sdk v5.6.2
@jreyesr Thanks, the changes look good to me 👍 . Will let you know if any further changes ar required.
Hello there @madhushreeray30! Just wanted to check in to see if there are any more changes that I should make to the plugin, I've kinda forgotten to follow up on this.
Thanks for your help!
Thanks @jreyesr for this new plugin. Great work 🎉 !!
The basic structure looks good so far. While using the plugin, we did come up with a few suggestions based on our best practices:
postgres.spc
postgres.spc
file to follow the format of the namecheap pluginFor instance: There are only a few formatting issues that have been resolved in this example:
docs/tables
# Table: raw
.;
. Please refer to the following query:docs/index.md
"description: Steampipe plugin for proxying queries to plain Postgres databases."
"Query any Postgres table from Steampipe with SQL! Open source CLI. No DB required."
;
.index.md
file we do not have to keep multiple examples here."``"
usage, please check that.config/postgres.spc
file.connection_string
) is not specified in the connection:Get Involved
we should include the links in-
rather than*
for instanceconfig.go
toconnection_config.go
plugin.go
README
We can update
Install the plugin with [Steampipe](https://steampipe.io)
toDownload and install the latest Postgres plugin:
Also please make sure that the Configuration section is in sync with the changes suggested for the
config/postgres.spc
file.Please include the details of authentication via environment variable using the
EXPORT
commandPlease include the following inder contribution section:
Steampipe
Postgres Plugin
go.mod
steampipe-plugin-sdk v5.6.1
andGO version 1.21
Please let us know if you have questions, happy to help 👍