-
Notifications
You must be signed in to change notification settings - Fork 33
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
Refactor all Get hydrates #167
Conversation
return nil, nil | ||
} | ||
|
||
func streamList(ctx context.Context, d *plugin.QueryData, item []interface{}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have this built into the SDK, similar to d.StreamListItem
.
Thanks, @misraved. Looking forward to your comments. Created the issue here turbot/steampipe-plugin-sdk#341. |
8ee95e3
to
3683a9c
Compare
@misraved I noticed I missed a few use-cases. Should be complete now 👍 |
20481ba
to
ca4a396
Compare
'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.' |
Not stale. Needs a review. |
@cbruno10 what would you like to do with this PR? |
Hey @japborst , sorry for the long delay. It's still on our radar to review, but we have some other items we're focusing on right now, and due to its scope, I don't want to rush a review. I'd like to leave the PR open and review some time in the next few weeks. |
'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.' |
Not stale. It will be reviewed shortly. |
'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.' |
'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.' |
Not stale |
Hi @japborst , sorry it's taken so long to reply to this PR! We've been deciding on what the GitHub plugin should look like, mainly around which API version should it use for its tables, and ultimately decided that we should update all tables to use the GitHub v4 GraphQL API. With this change, we will use a different Go SDK and the code structure itself will change, e.g., steampipe-plugin-github/github/table_github_organization_member.go Lines 62 to 109 in 78cff7e
The new code should in theory be lighter than it is now, as we'll be requesting the exact fields for each resource, so the number of hydrate calls should decrease overall. At this time, we most likely will not accept this PR, as I believe the GraphQL API changes will change the codebase in a significant way, but if these changes are applicable to the updated code in some way, we're happy to re-open and discuss more in this PR (or in a new one if easier). |
Hey, thanks for the reply! Using the GraphQL API makes a lot of sense. I really think you can get a big performance boost out of it, by reducing the number of calls to hydrate the data. |
@japborst Definitely, early tests are promising, so hoping we can get better performance so large queries and our mods will work smoother (rate limits are killer). |
There's a lot of duplication when hydrating the data. Likely from copy-pasting over time.
The aim of this PR is to decrease that for "get" hydrates.
Refactoring the list hydrates are a bit trickier, so I started out with just the gets. Lists can be done in a separate PR.