Skip to content

TPT-4130: Feature/dbaas valkey integration - #1047

Merged
zliang-akamai merged 35 commits into
linode:mainfrom
anmsharm1:feature/dbaas_valkey_integration
Oct 16, 2026
Merged

zliang-akamai merged 35 commits into
linode:mainfrom
anmsharm1:feature/dbaas_valkey_integration

Conversation

@anmsharm1

@anmsharm1 anmsharm1 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

📝 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:

  1. Shared database data model update for available_restore_times
  2. Core Valkey database types and serialization support
  3. Valkey client methods and shared engine/status handling
  4. Integration coverage for Valkey lifecycle and config catalog operations

This PR adds support for available_restore_times on 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.

  • The shared engine mapping and database status polling support for Valkey has also been updated.
  • Integration tests covering Valkey lifecycle management and configuration metadata have been added.

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_times deserializes correctly for both Valkey and PostgreSQL response shapes
  • Valkey database objects deserialize correctly, including nullable fields and engine config metadata
  • Valkey create/update requests serialize correctly
  • Valkey client endpoints work for database lifecycle operations
  • Valkey config catalog metadata is retrieved and validated
  • Status polling and lifecycle flows behave as expected for Valkey databases

How do I run the relevant unit/integration tests?

Unit tests

cd test
go test ./unit/... -run '^Test(UnmarshalDatabase|UnmarshalValkeyDatabase|MarshalValkey|ListDatabaseValkey|DatabaseValkey|Valkey)' -v
go test ./unit/...

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_TOKEN should be set an env var,

cd test
LINODE_TOKEN=your_token ENABLE_CLOUD_FW=false go test ./integration/... -run '^TestDatabase(_Valkey_Suite|Valkey_EngineConfig_Get)$' -v

@lgarber-akamai
lgarber-akamai requested review from a team, ezilber-akamai and psnoch-akamai and removed request for a team September 22, 2026 14:46
@anmsharm1 anmsharm1 changed the title Feature/dbaas valkey integration TPT-4130 : Feature/dbaas valkey integration Sep 22, 2026
@anmsharm1 anmsharm1 changed the title TPT-4130 : Feature/dbaas valkey integration - TPT-4130 : Feature/dbaas valkey integration Sep 25, 2026
@anmsharm1 anmsharm1 changed the title - TPT-4130 : Feature/dbaas valkey integration TPT-4130 : Feature/dbaas valkey integration Sep 25, 2026
@anmsharm1 anmsharm1 changed the title TPT-4130 : Feature/dbaas valkey integration feat: TPT-4130 : Feature/dbaas valkey integration Sep 25, 2026
@anmsharm1 anmsharm1 changed the title feat: TPT-4130 : Feature/dbaas valkey integration TPT-4130 : Feature/dbaas valkey integration Sep 25, 2026
@anmsharm1 anmsharm1 changed the title TPT-4130 : Feature/dbaas valkey integration TPT-4130: Feature/dbaas valkey integration Sep 25, 2026
@ezilber-akamai ezilber-akamai added the community-contribution contributions from the community. label Sep 25, 2026
@ezilber-akamai
ezilber-akamai requested a lite review from Copilot September 25, 2026 18:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 Medium severity

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.

Comment thread valkey.go
Comment thread valkey.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved moderate issues affect database response parsing and Valkey request serialization.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 Medium severity · 1 Low severity

Open (4)

Comment thread valkey.go Outdated
Comment thread test/unit/valkey_test.go Outdated
@zliang-akamai
zliang-akamai requested a lite review from Copilot September 25, 2026 19:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread .ci-trigger Outdated
Comment thread valkey.go
Comment thread valkey.go Outdated
Comment thread valkey.go Outdated
Comment thread databases.go

@ezilber-akamai ezilber-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the contribution!

@anmsharm1
anmsharm1 marked this pull request as ready for review October 13, 2026 15:36
@anmsharm1
anmsharm1 requested review from a team as code owners October 13, 2026 15:36
anmsharm1 and others added 25 commits October 15, 2026 11:16
…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
…cts making them value fields rather than pointer fields, DBAAS1-1729
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@anmsharm1
anmsharm1 force-pushed the feature/dbaas_valkey_integration branch from f22fe5f to da2319e Compare October 15, 2026 15:21
@zliang-akamai
zliang-akamai merged commit f5808d5 into linode:main Oct 16, 2026
10 checks passed
@zliang-akamai zliang-akamai added the new-feature for new features in the changelog. label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution contributions from the community. new-feature for new features in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants