Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial suggestions for plugin release #1

Open
madhushreeray30 opened this issue Aug 25, 2023 · 0 comments
Open

Initial suggestions for plugin release #1

madhushreeray30 opened this issue Aug 25, 2023 · 0 comments

Comments

@madhushreeray30
Copy link

Thanks @lyda for this new plugin. Great work 🎉 !!

I think this plugin is a WIP hence I would like to give some recommendations on the structure built so far. This would help in faster development and ensure we follow our best practices:
The following suggestions are to make the plugin build process easier and faster.
Some of the suggestions may not be directly from your code but related to general norms practiced across Steampipe.

  • Is the plugin name correct? Any reference source you have taken suggestion from?

  • oapigen.spc

    • Could you please update the oapigen.spc file to follow the format of the namecheap plugin
    • We should mention the authentication parameters however commented out and the values should be in the format of the actual values (however incorrect)
    • We also add details to set these parameters via the environment variable
  • oapigen*

    • The basic structure of the table is quite different than what we follow, any specific reason why we deviated?
    • Since this plugin is a WIP and you only have the first table we would like to give some suggestions on the naming convention:
      • The name of the table functions should include the plugin name in it and it should be in singular form, for example, tableOpenAPIGenDocument
      • We should have a table name and a table description as used in the namecheap plugin
      • Table names should be singular for example oapigen_document
      • Each column should have a description that should be a meaningful sentence that illuminates the purpose of the column. It should end with a . period. For example The name of the document.
      • We should add the standard steampipe column > title that should be a transform of the name column or the id column if the name is not present
    • The naming of the list and hydrate functions should be as follows:
      • list function > listDocuments
      • hydrate function > getDocument
    • There should be a logger error message for each error encountered like connection_error or api_error pointing to the respective tables and functions
      For instance >
     plugin.Logger(ctx).Error("oapigen_document.listDocuments", "api_error", err)
    

mod.go

  • We should recompile the plugin with Steampipe plugin SDK v5.5.0

utils.go, service.go and connection_config.go

  • Do we have a provision for all the authentication types?
  • Why do we not have a provision for authentication using environment variables?

docs/tables*

  • One suggestion would be to include important columns in the query output rather than * this improves visibility and makes the query output clean.
  • Please provide dummy values in the where clause of queries rather than something like YOUR_DOCUMENT_ID

docs/index.md

  • It is incomplete, I guess it is still WIP.
  • For reference, we can follow the namecheap plugin
  • Please make sure the configuration details are in sync with the updated oapigen.spc file

README.md

  • It is incomplete, I guess it is still WIP.

  • For reference, we can follow the namecheap plugin

  • Please make sure the configuration details are in sync with the updated oapigen.spc file

  • 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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant