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

Add table gcp_cloud_run_service Closes #479 #497

Merged
merged 3 commits into from
Oct 4, 2023
Merged

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Oct 3, 2023

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results
> select * from gcp_cloud_run_service
+-------+---------------+----------------+-------------+---------------------------+-------------+-----------------------+----------------------------------------------------------------------------------------------+-------------+------------+---------------------+--->
| name  | client        | client_version | description | create_time               | delete_time | creator               | etag                                                                                         | expire_time | generation | ingress             | se>
+-------+---------------+----------------+-------------+---------------------------+-------------+-----------------------+----------------------------------------------------------------------------------------------+-------------+------------+---------------------+--->
| hello | cloud-console |                |             | 2023-09-04T16:43:16+05:30 | <null>      | [email protected] | "CIDb76gGEOiEfg/cHJvamVjdHMvcGFya2VyLWFhYS9sb2NhdGlvbnMvdXMtY2VudHJhbDEvc2VydmljZXMvaGVsbG8" | <null>      | 2          | INGRESS_TRAFFIC_ALL | ht>
+-------+---------------+----------------+-------------+---------------------------+-------------+-----------------------+----------------------------------------------------------------------------------------------+-------------+------------+---------------------+--->

Time: 3.3s. Rows fetched: 1. Hydrate calls: 1.
> select * from gcp_cloud_run_service where name = 'hello' and location = 'us-central1'
+-------+---------------+----------------+-------------+---------------------------+-------------+-----------------------+----------------------------------------------------------------------------------------------+-------------+------------+---------------------+--->
| name  | client        | client_version | description | create_time               | delete_time | creator               | etag                                                                                         | expire_time | generation | ingress             | se>
+-------+---------------+----------------+-------------+---------------------------+-------------+-----------------------+----------------------------------------------------------------------------------------------+-------------+------------+---------------------+--->
| hello | cloud-console |                |             | 2023-09-04T16:43:16+05:30 | <null>      | [email protected] | "CIDb76gGEOiEfg/cHJvamVjdHMvcGFya2VyLWFhYS9sb2NhdGlvbnMvdXMtY2VudHJhbDEvc2VydmljZXMvaGVsbG8" | <null>      | 2          | INGRESS_TRAFFIC_ALL | ht>
+-------+---------------+----------------+-------------+---------------------------+-------------+-----------------------+----------------------------------------------------------------------------------------------+-------------+------------+---------------------+--->

@ParthaI ParthaI self-assigned this Oct 3, 2023
@ParthaI ParthaI requested a review from misraved October 3, 2023 11:10
@ParthaI ParthaI linked an issue Oct 3, 2023 that may be closed by this pull request
Copy link
Contributor

@madhushreeray30 madhushreeray30 left a comment

Choose a reason for hiding this comment

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

@ParthaI Please have a look at the comments, thanks!

Copy link
Contributor

@madhushreeray30 madhushreeray30 Oct 4, 2023

Choose a reason for hiding this comment

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

We have missed out on adding some columns -

  • TerminalCondition
  • Traffic
  • TrafficStatuses

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@madhushreeray30 , I had added traffic_statuses column earlier, rest of missing column I added in.

Comment on lines 28 to 31
{
Name: "location",
Require: plugin.Optional,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{
Name: "location",
Require: plugin.Optional,
},
{
Name: "location",
Require: plugin.Optional,
},

Name: "name",
Description: "The fully qualified name of this Service.",
Type: proto.ColumnType_STRING,
Transform: transform.FromField("Name").Transform(lastPathElement),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Transform: transform.FromField("Name").Transform(lastPathElement),
Transform: transform.FromField("Name").Transform(lastPathElement),

Comment on lines 246 to 248
if region != "" && region != location{
return nil, nil
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if region != "" && region != location{
return nil, nil
}
if region != "" && region != location {
return nil, nil
}

t ->> 'Type' as type
from
gcp_cloud_run_service,
jsonb_array_elements(traffic) as t;
Copy link
Contributor

Choose a reason for hiding this comment

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

Column traffic needs to be added

Copy link
Contributor

@misraved misraved left a comment

Choose a reason for hiding this comment

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

@ParthaI please take a look at the review comments. Thanks!!

@@ -0,0 +1,135 @@
# Table: gcp_cloud_run_service
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Table: gcp_cloud_run_service
# Table: gcp_cloud_run_service

from
gcp_cloud_run_service;
```

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

reconciling;
```

### List services that are created in the last 30 days
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### List services that are created in the last 30 days
### List services created in the last 30 days

@@ -23,7 +24,7 @@ import (
"google.golang.org/api/logging/v2"
"google.golang.org/api/monitoring/v3"
"google.golang.org/api/pubsub/v1"
"cloud.google.com/go/redis/apiv1"
"google.golang.org/api/run/v2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the removal of this package break any other service?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has been shifted to top automatically after prettifying the code. Nothing is breaking the package name is correct.

Name: "name",
Description: "The fully qualified name of this Service.",
Type: proto.ColumnType_STRING,
Transform: transform.FromField("Name").Transform(lastPathElement),
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please fix the formatting?

@ParthaI ParthaI changed the title Add table gcp_cloudrun_service Closes #479 Add table gcp_cloud_run_service Closes #479 Oct 4, 2023
@madhushreeray30 madhushreeray30 merged commit a759191 into main Oct 4, 2023
@madhushreeray30 madhushreeray30 deleted the issue-479 branch October 4, 2023 11:47
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

Successfully merging this pull request may close these issues.

Add table gcp_cloudrun_service
3 participants