-
Notifications
You must be signed in to change notification settings - Fork 3
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
Adds business services, services dependencies, custom fields and service id filters #50
base: main
Are you sure you want to change the base?
Conversation
Thank you for the contribution @sam-io and welcome to Steampipe 👍 !! Could you please take a look at the lint failure:
Additionally, since we have an SDK update, I believe it is worth checking for breaking changes that might affect the plugin's original functionality. I would recommend verifying that the old tables work consistently with the new SDK without altering the results 👍. |
Thank you @misraved I have fixed the lint issues and checked for possible breaking changes by looking through the change log and comparing the output of the old and new version of the plugin. I did not find any changes that could cause compatibility issues. |
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.
Hello @sam-io,
The changes look good to me overall. However, could you please address the following points?
- Could you update the hydrate function names to use the prefixes
get
orlist
instead ofhydrate
to maintain consistency? - Could you replace our custom function:
GetServiceDependencies
with the built-in SDK function ListTechnicalServiceDependencies?GetBusinessServiceDependencies
with ListBusinessServiceDependenciesWithContext
- Could you structure the API response based on the data returned by the API?
- Currently, all custom API calls return a structure
map[string]interface{}
. - Can we tie up the custom API calls with a Go structure to visualize the API response better?
- This way, if the response changes from the API end in the future, we can clearly identify the missing fields.
- Currently, all custom API calls return a structure
Thank you!
@@ -175,6 +180,26 @@ func tablePagerDutyIncident(_ context.Context) *plugin.Table { | |||
Description: "The teams involved in the incident's lifecycle.", | |||
Type: proto.ColumnType_JSON, | |||
}, | |||
{ | |||
Name: "service_id", |
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.
Could you please arrange the columns by column type, moving the JSON columns towards the bottom and placing the other columns towards the top?
Overview
Tables and columns
This PR introduces the following changes:
pagerduty_business_service
that returns data from the pagerduty business services api.dependencies
on thepagerduty_service
table that contains service dependencies of a service.service_id
on the 'pagerduty_incident' table that maps to theservice_ids[]
query parameter in the list incidents API.custom_fields
on the 'pagerduty_incident' table that contains custom field values for an incident.impacted_business_services
on the 'pagerduty_incident' table that contains business services that are impacted by an incident.Additional Changes
In addition to these changes the pagerduty api client is updated to the latest version.
Notes
There are some APIs that are supported by pagerduty but are not implemented by the pagerduty API client. These include:
Support for these has been included by introducing an
ExtendedPagerDutyClient
type that implements functions to call these APIs and return the results as a basicmap[string]interface{}
that is sufficient for mapping to a table.Example query results
pagerduty_business_service
Listing all business services
Results
pagerduty_service
Getting technical services along with their immediate dependencies
Results
pagerduty_incident
Listing incidents including custom field values and business services impacted by the incident
Results
Results