Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Add Database Log table to query database logs for a workspace. #23

Merged
merged 5 commits into from
Aug 19, 2022

Conversation

sidr0cker
Copy link
Contributor

Example query results

Results
Add example SQL query results here (please include the input queries as well)

@sidr0cker sidr0cker self-assigned this Aug 9, 2022
@sidr0cker sidr0cker marked this pull request as ready for review August 12, 2022 07:21
@sidr0cker sidr0cker requested review from cbruno10 and LalitLab August 12, 2022 07:36
Copy link

@LalitLab LalitLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siddharthaturbot if we could replace Db with DB in the functions name.
Otherwise, PR looks good

steampipecloud/table_steampipecloud_db_log.go Outdated Show resolved Hide resolved
@@ -30,6 +30,7 @@ func Plugin(ctx context.Context) *plugin.Plugin {
"steampipecloud_workspace_connection": tableSteampipeCloudWorkspaceConnection(ctx),
"steampipecloud_workspace_mod": tableSteampipeCloudWorkspaceMod(ctx),
"steampipecloud_workspace_mod_variable": tableSteampipeCloudWorkspaceModVariable(ctx),
"steampipecloud_workspace_db_log": tableSteampipeCloudWorkspaceDbLog(ctx),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"steampipecloud_workspace_db_log": tableSteampipeCloudWorkspaceDbLog(ctx),
"steampipecloud_workspace_db_log": tableSteampipeCloudWorkspaceDBLog(ctx),

steampipecloud/table_steampipecloud_db_log.go Outdated Show resolved Hide resolved
steampipecloud/table_steampipecloud_db_log.go Outdated Show resolved Hide resolved
steampipecloud/table_steampipecloud_db_log.go Outdated Show resolved Hide resolved
steampipecloud/table_steampipecloud_db_log.go Outdated Show resolved Hide resolved
steampipecloud/table_steampipecloud_db_log.go Outdated Show resolved Hide resolved
steampipecloud/table_steampipecloud_db_log.go Outdated Show resolved Hide resolved
Copy link

@LalitLab LalitLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@cbruno10 cbruno10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siddharthaturbot Please see review questions, thanks!

@@ -110,7 +110,7 @@ func listOrganizations(ctx context.Context, d *plugin.QueryData, h *plugin.Hydra
// execute list call
pagesLeft := true

var resp openapi.ListActorOrgsResponse
var resp openapi.ListUserOrgsResponse
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siddharthaturbot Is this change related to the table that this PR is adding? If not, can you please describe why we're making this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ListActorOrgsResponse is not used by the SDK anymore. Its necessary to add it in the PR or it wont compile.

@@ -312,7 +308,6 @@ func getUserWorkspaceMod(ctx context.Context, d *plugin.QueryData, h *plugin.Hyd
response, err := plugin.RetryHydrate(ctx, d, h, getDetails, &plugin.RetryConfig{ShouldRetryError: shouldRetryError})

workspaceMod := response.(openapi.WorkspaceMod)
workspaceMod.Workspace = &openapi.Workspace{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change related to the table we're adding?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, Workspace is not part of the struct anymore.

@cbruno10 cbruno10 merged commit 6df7e81 into main Aug 19, 2022
@cbruno10 cbruno10 deleted the dblog-table branch August 19, 2022 15:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants