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

feat: add gcp_redis_cluster table and improve gcp_redis_instance #679

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

Conversation

pdecat
Copy link
Contributor

@pdecat pdecat commented Oct 30, 2024

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results
> select
  name,
  create_time,
  location,
  size_gb,
  precise_size_gb,
  psc_connections[0] ->> 'address' as address
from
  gcp_redis_cluster;

+----------------------------------+---------------------------+--------------+---------+-----------------+-----------+
| name                             | create_time               | location     | size_gb | precise_size_gb | address   |
+----------------------------------+---------------------------+--------------+---------+-----------------+-----------+
| test-pdecat-memory-redis-cluster | 2024-10-29T16:44:06+01:00 | europe-west9 | 2       | 1.4             | 10.0.0.15 |
+----------------------------------+---------------------------+--------------+---------+-----------------+-----------+

> select
  name,
  create_time,
  location,
  psc_connections[0] ->> 'address' as address
from
  gcp_redis_cluster
where
  authorization_mode != 1;
+----------------------------------+---------------------------+--------------+-----------+
| name                             | create_time               | location     | address   |
+----------------------------------+---------------------------+--------------+-----------+
| test-pdecat-memory-redis-cluster | 2024-10-29T16:44:06+01:00 | europe-west9 | 10.0.0.15 |
+----------------------------------+---------------------------+--------------+-----------+
> select
  name,
  create_time,
  location,
  psc_connections[0] ->> 'address' as address
from
  gcp_redis_cluster
where
  create_time >= current_timestamp - interval '7 days';
+----------------------------------+---------------------------+--------------+-----------+
| name                             | create_time               | location     | address   |
+----------------------------------+---------------------------+--------------+-----------+
| test-pdecat-memory-redis-cluster | 2024-10-29T16:44:06+01:00 | europe-west9 | 10.0.0.15 |
+----------------------------------+---------------------------+--------------+-----------+
> select
  name,
  create_time,
  location,
  node_type,
  size_gb,
  replica_count,
  shard_count
from
  gcp_redis_cluster
where
  name = 'test-pdecat-memory-redis-cluster'
  and location = 'europe-west9';

+----------------------------------+---------------------------+--------------+-----------+---------+---------------+-------------+
| name                             | create_time               | location     | node_type | size_gb | replica_count | shard_count |
+----------------------------------+---------------------------+--------------+-----------+---------+---------------+-------------+
| test-pdecat-memory-redis-cluster | 2024-10-29T16:44:06+01:00 | europe-west9 | 1         | 2       | 0             | 1           |
+----------------------------------+---------------------------+--------------+-----------+---------+---------------+-------------+
> select
  name,
  create_time,
  location,
  psc_connections[0] ->> 'address' as address
from
  gcp_redis_cluster
where
  transit_encryption_mode != 2;
+----------------------------------+---------------------------+--------------+-----------+
| name                             | create_time               | location     | address   |
+----------------------------------+---------------------------+--------------+-----------+
| test-pdecat-memory-redis-cluster | 2024-10-29T16:44:06+01:00 | europe-west9 | 10.0.0.15 |
+----------------------------------+---------------------------+--------------+-----------+

cloud.google.com/go/storage v1.38.0 // indirect
cloud.google.com/go v0.115.0 // indirect
cloud.google.com/go/iam v1.1.12 // indirect
cloud.google.com/go/redis v1.16.5
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updating this package is required to get the following fields of Redis Clusters:

  • NodeType
  • PersistenceConfig
  • RedisConfigs
  • PreciseSizeGb
  • ZoneDistributionConfig
  • DeletionProtectionEnabled

googleapis/google-cloud-go@d5150d3#diff-95ecadd2969eaca0ed1ad11a0f58b28001694a2a8db14aef83934bada5f17e68R1039

Type: proto.ColumnType_JSON,
},
// FIXME: this is missing from the Go SDK
// https://github.com/googleapis/google-cloud-go/issues/11061
Copy link
Contributor Author

Choose a reason for hiding this comment

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

One of the maintainers already reported this issue internally.

@pdecat
Copy link
Contributor Author

pdecat commented Oct 30, 2024

FWIW, I've planned to add Memorystore for Memcached next, and Memorystore for Valkey as soon as it is available in the Go SDK.

@pdecat pdecat changed the title feat: add gcp_redis_cluster table feat: add gcp_redis_cluster table and improve gcp_redis_instance Oct 30, 2024
@misraved misraved self-requested a review October 30, 2024 17:05
@misraved misraved added the hacktoberfest-accepted This pull request has been accepted for Hacktoberfest label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted This pull request has been accepted for Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants