Skip to content

Add initial Cloud Build connection table #755

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cbruno10
Copy link
Contributor

@cbruno10 cbruno10 commented May 16, 2025

Remaining work/questions:

  • Should the Cloud Build location resource being a table, that other tables, like connection, use as a parent hydrate?
  • Review transformations on Steampipe and GCP standard columns
  • Example queries need review and expansion

@cbruno10 cbruno10 requested a review from Copilot May 16, 2025 20:41
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new Cloud Build v2 connection table along with required dependency updates to support it. Key changes include updating go.mod dependency versions (including adding cloudbuild v1.22.2), implementing the connection table with listing and hydrate functions, and adding documentation for the new table.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
go.mod Updated dependency versions and added cloudbuild module
gcp/table_gcp_cloudbuildv2_connection.go Added table implementation, list, get, and transform functions for Cloud Build v2 connections
gcp/service.go Added CloudBuildV2Service function to create and cache the service
gcp/plugin.go Registered the new table in the plugin
docs/tables/gcp_cloudbuildv2_connection.md Added documentation and example queries for the new table


func listGcpCloudbuildv2Locations(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) {
// have we already created and cached the locations?
locationCacheKey := "CloudBuildV2"
Copy link
Preview

Copilot AI May 16, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider defining cache key values as constants at a shared location to improve maintainability and avoid potential duplication or typos in the future.

Suggested change
locationCacheKey := "CloudBuildV2"

Copilot uses AI. Check for mistakes.

plugin.Logger(ctx).Trace("getCloudBuildV2Service")

// have we already created and cached the service?
serviceCacheKey := "CloudBuildV2Service"
Copy link
Preview

Copilot AI May 16, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider defining cache key constants in a common file or section to ensure consistency and ease potential future updates.

Copilot uses AI. Check for mistakes.

Copy link

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.

@github-actions github-actions bot added the stale No recent activity has been detected on this issue/PR and it will be closed label Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale No recent activity has been detected on this issue/PR and it will be closed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant