-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
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
- Could you please update the
postgres.spcfile to follow the format of the namecheap plugin - We should mention the config arguments however commented out and the values should be in the format of the actual values (however incorrect)
- For instance: There are only a few formatting issues that have been resolved in this example:
connection "postgres" {
plugin = "jreyesr/postgres"
# A connection string (https://pkg.go.dev/github.com/jackc/pgx/v5#hdr-Establishing_a_Connection), in the form that is
expected by the pgx package. Required.
# Can also be set with the `DATABASE_URL` environment variable.
# connection_string = "postgres://username:password@localhost:5432/database_name"
# The remote DB's schema that this plugin will expose. If you leave this unset, it'll default to `public`.
# schema = "public"
# List of tables that will be exposed from the remote DB. No dynamic tables will be created if this arg is empty or not set.
# Wildcard-based searches are supported.
# For example:
# - "*" will expose every table in the remote DB
# - "auth-*" will expose tables whose names start with "auth-"
# - "users" will only expose the specific table "users"
# You can have several items (for example, ["auth-*", "users"] will expose
# all the tables that start with "auth-", PLUS the table "users")
# Defaults to all tables
# tables_to_expose = ["*"]
}
- Is the environment variable name correct?
docs/tables
- The table name should be represented like
# Table: raw. - The formatting of the query should be updated using https://www.freeformatter.com/sql-formatter.html#before-output (2 indent spaces)
- The queries are not correctly formatted. They should end with a
;. Please refer to the following query:
select
name,
id
from
aws_s3_bucket
where
region = 'us-east-1';- We generally do not include the example query output in the docs, is there a particular reason for keeping them here?
- The example queries in the doc look a bit light. Could you please add 2 to 3 more example queries wherever possible?
docs/index.md
- The description should be updated to
"description: Steampipe plugin for proxying queries to plain Postgres databases." - The og_description should be updated to
"Query any Postgres table from Steampipe with SQL! Open source CLI. No DB required." - The formatting of the query should be updated using https://www.freeformatter.com/sql-formatter.html#before-output (2 indent spaces)
- The query is not correctly formatted. They should end with a
;. - We generally do not include the example query output in the docs, is there a particular reason for keeping them here?
- One example query is enough in the
index.mdfile we do not have to keep multiple examples here. - The documentation and install sections are overlapping with the query section, I believe there are some issues with the
"``"usage, please check that. - Also please make sure that the Configuration section is in sync with the changes suggested for the
config/postgres.spcfile. - We need a slight change in the way we include details of the environment variable, can you please change the section after the connection as follows:
Alternatively, you can also use the standard Postgres environment variables to obtain credentials only if the other argument (connection_string) is not specified in the connection:export DATABASE_URL=postgres://username:password@localhost:5432/database_name - Is the environment variable name correct?
- Under
Get Involvedwe should include the links in-rather than*for instance
- Open source: https://github.com/jreyesr/steampipe-plugin-postgres
- Community: [Join #steampipe on Slack →](https://turbot.com/community/join)
postgres- Please rename the
config.gotoconnection_config.go plugin.go- The function has some extra unnecessary spaces we can restructure it as follows
func Plugin(ctx context.Context) *plugin.Plugin { p := &plugin.Plugin{ Name: "steampipe-plugin-postgres", DefaultTransform: transform.FromGo().NullIfZero(), ConnectionConfigSchema: &plugin.ConnectionConfigSchema{ NewInstance: ConfigInstance, Schema: ConfigSchema, }, SchemaMode: plugin.SchemaModeDynamic, TableMapFunc: PluginTables, } return p }
- Please rename the
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.spcfile. - Please include the details of authentication via environment variable using the
EXPORTcommand - Please include the following inder contribution section:
`help wanted` issues:
- [Steampipe](https://github.com/turbot/steampipe/labels/help%20wanted)
- [Postgres Plugin](https://github.com/jreyesr/steampipe-plugin-postgres/labels/help%20wanted)
go.mod
-
We should recompile the plugin with
steampipe-plugin-sdk v5.6.1andGO version 1.21 -
A couple of follow-up questions:
- How are we handling the resource not found errors?
- 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.
- While working with the APIs did you encounter rate limit errors?
- Please refer to https://steampipe.io/docs/develop/plugin-release-checklist#data-ingestion for more information
Please let us know if you have questions, happy to help 👍
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels