Conversation
…or list all instances compatibility (used by Valkey databases)
…ow mysql.go and postgresql.go implement
DBAAS1-1729 update datastructures
…thods DBAAS1-1729: add valkey client methods
…ests DBAAS1-1729: Valkey integration tests
feat: TPT-4130 / DBAAS1-1729: valkey fork restore time should be visible
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Two moderate issues remain in valkey.go involving ClusterSize serialization and discarded oldest_restore_time data.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Adds end-to-end Valkey Managed Database support, including API operations, lifecycle polling, configuration handling, and tests.
Changes:
- Adds Valkey models, serialization, CRUD, lifecycle, SSL, credentials, patch, and configuration APIs.
- Extends shared engine and restore-time support.
- Adds unit, integration, and fixture coverage.
| File | Description |
|---|---|
waitfor.go |
Valkey status polling |
valkey.go |
Valkey models and API methods |
test/unit/valkey_test.go |
Valkey unit tests |
test/unit/fixtures/valkey_databases_list.json |
Valkey list fixture |
test/unit/fixtures/valkey_database_update.json |
Valkey update fixture |
test/unit/fixtures/valkey_database_unmarshal.json |
Valkey unmarshal fixture |
test/unit/fixtures/valkey_database_unmarshal_engine_config.json |
Engine configuration fixture |
test/unit/fixtures/valkey_database_ssl_get.json |
SSL response fixture |
test/unit/fixtures/valkey_database_get.json |
Database response fixture |
test/unit/fixtures/valkey_database_credentials_get.json |
Credentials fixture |
test/unit/fixtures/valkey_database_create.json |
Create response fixture |
test/unit/fixtures/valkey_database_config_get.json |
Configuration fixture |
test/unit/fixtures/database_unmarshal.json |
Shared database fixture |
test/unit/fixtures/database_unmarshal_oldest_restore_time.json |
Restore-time fixture |
test/unit/database_test.go |
Shared restore-time tests |
test/integration/valkey_test.go |
Valkey lifecycle tests |
test/integration/valkey_db_config_test.go |
Configuration catalog tests |
test/integration/fixtures/TestDatabaseValkey_EngineConfig_Get.yaml |
Integration replay fixture |
databases.go |
Shared Valkey and restore-time support |
.ci-trigger |
CI trigger marker |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…047 (DBAAS1-1729)
…cts making them value fields rather than pointer fields, DBAAS1-1729
| type DatabaseFork struct { | ||
| Source int `json:"source"` | ||
| RestoreTime *time.Time `json:"-,omitzero"` | ||
| RestoreTime *time.Time `json:"restore_time,omitzero"` |
There was a problem hiding this comment.
Can this be changed back to json:"-"? RestoreTime is unmarshaled explicitly in UnmarshalJSON, so it should be excluded from the default JSON unmarshaling.
There was a problem hiding this comment.
I'd added this as part of this commit. Users can provide an explicit restore time for the fork-to-restore path for point-in-time-recovery supporting database engines. To clarify the semantics, would reverting to - make json.Marshal to omit the field for engines like Valkey, so on the marshalling path the user reading this response may not identify what restore time was used?
There was a problem hiding this comment.
Yes, reverting to - would indeed omit this field from json.Marshal. I noticed that fork is no longer listed as a parameter in the API docs for creating MySQL, PostgreSQL, or Valkey databases. Do you know if this is intentional?
If fork is still meant to be a settable field during database creation, then I agree that changing it from - to restore_time makes sense.


📝 Description
- TPT-4130
This change set adds full Valkey database support to the Linode API client and covers it end-to-end with unit and integration tests.
It was developed and staged originally across four related PRs:
available_restore_timesThis PR adds support for
available_restore_timeson the shared Database model, Valkey database response deserialization, Valkey create/update option models, client methods for list/get/create/update/delete, SSL, credentials, patch, suspend/resume and advanced config.This follows the existing database patterns used by MySQL/PostgreSQL and ensures Valkey behaves consistently within the shared client surface.
✔️ How to Test
Here are some notes I took for doing my local development environment setup for linodego development:
linodego developer setup
What are the steps to reproduce the issue or verify the changes?
The test suite helps validate:
available_restore_timesdeserializes correctly for both Valkey and PostgreSQL response shapesHow do I run the relevant unit/integration tests?
Unit tests
Integration tests
Linodego’s integration tests can exercise the real API against a live Linode account, using the same client code that users call in production. They typically create or mutate real database resources, wait for the resource to reach the expected state, assert on the returned fields and lifecycle behavior, and then clean up so the tests validate end-to-end behavior rather than just mocked JSON parsing.
To trigger the live tests, a
LINODE_TOKENshould be set an env var,