Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
aca1b8d
DBAAS1-1729: Adjust databases.go to support available_restore_times f…
anmsharm1 Sep 10, 2026
a1c1810
DBAAS1-1729: Trigger CI
anmsharm1 Sep 11, 2026
82f5149
DBAAS1-1729: Trigger CI
anmsharm1 Sep 11, 2026
80d0cc5
DBAAS1-1729: Rerun CI
anmsharm1 Sep 11, 2026
71a70b7
DBAAS1-1729: Satisfy restore time lint rule
anmsharm1 Sep 11, 2026
c690249
DBAAS1-1729: Rerun CI, add test file
anmsharm1 Sep 11, 2026
ab3e1db
DBAAS1-1729: preserve nil restore times
anmsharm1 Sep 17, 2026
30d035b
DBAAS1-1729: Add Valkey database engine type
anmsharm1 Sep 18, 2026
f812ab4
DBAAS1-1729: Add Valkey unit test fixtures
anmsharm1 Sep 18, 2026
3c2985b
Implement valkey.go rest methods and add test coverage, parallel to h…
anmsharm1 Sep 14, 2026
a4ea259
DBAAS1-1729: valkey integration test module
anmsharm1 Sep 15, 2026
babcd9a
DBAAS1-1729: Wait for Valkey database readiness
anmsharm1 Sep 17, 2026
0b29d7a
DBAAS1-1729: refresh Valkey integration fixture
anmsharm1 Sep 17, 2026
98aad56
Merge pull request #1 from anmsharm1/DBAAS1-1729_update_datastructures
anmsharm1 Sep 18, 2026
aa9b1df
Merge pull request #3 from anmsharm1/DBAAS1-1729_add_valkey_client_me…
anmsharm1 Sep 18, 2026
169496e
Merge pull request #4 from anmsharm1/DBAAS1-1729_valkey_integration_t…
anmsharm1 Sep 18, 2026
11bf5dc
feat: Valkey support, TPT-4130 / DBAAS1-1729: valkey fork restore
anmsharm1 Sep 21, 2026
82ffe6d
Merge pull request #6 from anmsharm1/DBAAS1-1729_restore_time_valkey
anmsharm1 Sep 25, 2026
2de564e
chore: empty commit to retrigger CI
anmsharm1 Sep 25, 2026
76b0c2d
chore: trigger CI
anmsharm1 Sep 25, 2026
e52942c
TPT-4130 : Address code-review feedback for PR#1047 (DBAAS1-1729)
anmsharm1 Sep 28, 2026
23a4511
TPT-4130 : consistent pointer styling, non-deprecated styling PR#1047…
anmsharm1 Sep 28, 2026
3f59686
TPT-4130 : address code-review feedback for serializaton updates PR#1…
anmsharm1 Sep 28, 2026
93d55d5
TPT-4130: address code-review feedback for Valkey advance config stru…
anmsharm1 Sep 29, 2026
b299078
TPT-4130: address code-review feedback for Valkey advance config stru…
anmsharm1 Sep 29, 2026
10710fd
Merge branch 'main' into feature/dbaas_valkey_integration
anmsharm1 Oct 13, 2026
4c7df8a
Initialize AvailableRestoreTimes to nil in databases.go and valkey.go
zliang-akamai Oct 13, 2026
caf26b8
golangci-lint fmt
zliang-akamai Oct 13, 2026
86afa7d
tests snanitization for valkey tests
anmsharm1 Oct 14, 2026
e9d2cf2
Merge branch 'main' into feature/dbaas_valkey_integration
anmsharm1 Oct 14, 2026
5af092b
address code-review feedback on field nullability for UsedDiskSizeGB …
anmsharm1 Oct 14, 2026
59a4380
address code-review feedback for config struct name
anmsharm1 Oct 14, 2026
ea34928
gofmt changes for valkey.go
anmsharm1 Oct 14, 2026
da2319e
make backup_hour, backup_minute align with integer or null values, ad…
anmsharm1 Oct 15, 2026
0cf5062
Merge branch 'main' into feature/dbaas_valkey_integration
zliang-akamai Oct 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions databases.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const (
const (
DatabaseEngineTypeMySQL DatabaseEngineType = "mysql"
DatabaseEngineTypePostgres DatabaseEngineType = "postgresql"
DatabaseEngineTypeValkey DatabaseEngineType = "valkey"
)

const (
Expand Down Expand Up @@ -83,12 +84,13 @@ type Database struct {
// Members has dynamic keys so it is a map
Members map[string]DatabaseMemberType `json:"members"`

Encrypted bool `json:"encrypted"`
AllowList []string `json:"allow_list"`
InstanceURI string `json:"instance_uri"`
Created *time.Time `json:"-"`
Updated *time.Time `json:"-"`
OldestRestoreTime *time.Time `json:"-"`
Encrypted bool `json:"encrypted"`
AllowList []string `json:"allow_list"`
InstanceURI string `json:"instance_uri"`
Created *time.Time `json:"-"`
Updated *time.Time `json:"-"`
OldestRestoreTime *time.Time `json:"-"`
AvailableRestoreTimes []time.Time `json:"-"`

PrivateNetwork *DatabasePrivateNetwork `json:"private_network,omitzero"`
}
Expand Down Expand Up @@ -144,6 +146,7 @@ type DatabaseType struct {
type DatabaseTypeEngineMap struct {
MySQL []DatabaseTypeEngine `json:"mysql"`
PostgreSQL []DatabaseTypeEngine `json:"postgresql"`
Valkey []DatabaseTypeEngine `json:"valkey"`
}

// DatabaseTypeEngine Sizes and Prices
Expand All @@ -161,7 +164,7 @@ type ClusterPrice struct {
// DatabaseFork describes the source and restore time for the fork for forked DBs
type DatabaseFork struct {
Source int `json:"source"`
RestoreTime *time.Time `json:"-,omitzero"`
RestoreTime *time.Time `json:"restore_time,omitzero"`
}

func (d *Database) UnmarshalJSON(b []byte) error {
Expand All @@ -170,9 +173,10 @@ func (d *Database) UnmarshalJSON(b []byte) error {
p := struct {
*Mask

Created *parseabletime.ParseableTime `json:"created"`
Updated *parseabletime.ParseableTime `json:"updated"`
OldestRestoreTime *parseabletime.ParseableTime `json:"oldest_restore_time"`
Created *parseabletime.ParseableTime `json:"created"`
Updated *parseabletime.ParseableTime `json:"updated"`
OldestRestoreTime *parseabletime.ParseableTime `json:"oldest_restore_time"`
AvailableRestoreTimes []parseabletime.ParseableTime `json:"available_restore_times"`
}{
Mask: (*Mask)(d),
}
Expand All @@ -185,6 +189,14 @@ func (d *Database) UnmarshalJSON(b []byte) error {
d.Updated = (*time.Time)(p.Updated)
d.OldestRestoreTime = (*time.Time)(p.OldestRestoreTime)

d.AvailableRestoreTimes = nil
if p.AvailableRestoreTimes != nil {
d.AvailableRestoreTimes = make([]time.Time, len(p.AvailableRestoreTimes))
for i, t := range p.AvailableRestoreTimes {
d.AvailableRestoreTimes[i] = time.Time(t)
}
}

return nil
}

Expand Down
114 changes: 114 additions & 0 deletions test/integration/fixtures/TestDatabaseValkey_EngineConfig_Get.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
version: 1
interactions:
- request:
body: ""
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/databases/valkey/config
method: GET
response:
body: '{"backup_hour": {"description": "The hour of day (in UTC) when backup for
the service is started. New backup is only started if previous backup has already
completed.", "example": 3, "maximum": 23, "minimum": 0, "requires_restart":
false, "type": ["integer", "null"]}, "backup_minute": {"description": "The minute
of an hour when backup for the service is started. New backup is only started
if previous backup has already completed.", "example": 30, "maximum": 59, "minimum":
0, "requires_restart": false, "type": ["integer", "null"]}, "frequent_snapshots":
{"default": true, "description": "When enabled, Valkey will create frequent
local RDB snapshots. When disabled, Valkey will only take RDB snapshots when
a backup is created, based on the backup schedule. This setting is ignored when
`valkey_persistence` is set to `off`.", "requires_restart": false, "type": "boolean"},
"valkey_acl_channels_default": {"description": "Determines default pub/sub channels''
ACL for new users if ACL is not supplied. When this option is not defined, all_channels
is assumed to keep backward compatibility. This option doesn''t affect Valkey
configuration acl-pubsub-default.", "enum": ["allchannels", "resetchannels"],
"requires_restart": false, "type": "string"}, "valkey_active_expire_effort":
{"default": 1, "description": "Valkey reclaims expired keys both when accessed
and in the background. The background process scans for expired keys to free
memory. Increasing the active-expire-effort setting (default 1, max 10) uses
more CPU to reclaim expired keys faster, reducing memory usage but potentially
increasing latency.", "maximum": 10, "minimum": 1, "requires_restart": false,
"type": "integer"}, "valkey_activedefrag": {"default": false, "description":
"Enable active memory defragmentation. When enabled, Valkey relocates objects
off sparsely-used memory pages to reduce fragmentation and return memory to
the operating system. Defragmentation runs on the main thread and consumes CPU,
so it may increase latency under load.", "requires_restart": false, "type":
"boolean"}, "valkey_lfu_decay_time": {"default": 1, "description": "LFU maxmemory-policy
counter decay time in minutes", "maximum": 120, "minimum": 1, "requires_restart":
false, "type": "integer"}, "valkey_lfu_log_factor": {"default": 10, "description":
"Counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory-policies",
"maximum": 100, "minimum": 0, "requires_restart": false, "type": "integer"},
"valkey_maxmemory_policy": {"default": "noeviction", "description": "Valkey
maxmemory-policy", "enum": ["noeviction", "allkeys-lru", "volatile-lru", "allkeys-random",
"volatile-random", "volatile-ttl", "volatile-lfu", "allkeys-lfu"], "requires_restart":
false, "type": ["string", "null"]}, "valkey_number_of_databases": {"description":
"Set number of Valkey databases. Changing this will cause a restart of the Valkey
service.", "example": 16, "maximum": 128, "minimum": 1, "requires_restart":
true, "type": "integer"}, "valkey_persistence": {"description": "When persistence
is ''rdb'', Valkey does RDB dumps each 10 minutes if any key is changed. Also
RDB dumps are done according to backup schedule for backup purposes. When persistence
is ''off'', no RDB dumps and backups are done, so data can be lost at any moment
if service is restarted for any reason, or if service is powered off. Also service
can''t be forked.", "enum": ["off", "rdb"], "requires_restart": true, "type":
"string"}, "valkey_pubsub_client_output_buffer_limit": {"description": "Set
output buffer limit for pub / sub clients in MB. The value is the hard limit,
the soft limit is 1/4 of the hard limit. When setting the limit, be mindful
of the available memory in the selected service plan.", "example": 64, "maximum":
262144, "minimum": 32, "requires_restart": false, "type": "integer"}, "valkey_timeout":
{"default": 300, "description": "Valkey idle connection timeout in seconds",
"maximum": 2073600, "minimum": 0, "requires_restart": false, "type": "integer"}}'
headers:
Access-Control-Allow-Credentials:
- "true"
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Access-Control-Expose-Headers:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Connection:
- keep-alive
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Expires:
- Mon, 14 Sep 2026 19:36:45 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
- Authorization, X-Filter
- Accept-Encoding
X-Accepted-Oauth-Scopes:
- '*'
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- databases:read_write ips:read_write linodes:read_write lke:read_write nodebalancers:read_write
vpc:read_write
X-Ratelimit-Limit:
- "1840"
X-Xss-Protection:
- 1; mode=block
status: 200 OK
code: 200
duration: ""
Loading