Skip to content

Commit a558167

Browse files
Removed stale fields and updated unit tests
1 parent b5e5d51 commit a558167

File tree

7 files changed

+24
-362
lines changed

7 files changed

+24
-362
lines changed

linode_api4/objects/database.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -155,21 +155,17 @@ class MySQLDatabaseConfigMySQLOptions(JSONObject):
155155
innodb_lock_wait_timeout: Optional[int] = None
156156
innodb_log_buffer_size: Optional[int] = None
157157
innodb_online_alter_log_max_size: Optional[int] = None
158-
innodb_print_all_deadlocks: Optional[bool] = None
159158
innodb_read_io_threads: Optional[int] = None
160159
innodb_rollback_on_timeout: Optional[bool] = None
161160
innodb_thread_concurrency: Optional[int] = None
162161
innodb_write_io_threads: Optional[int] = None
163162
interactive_timeout: Optional[int] = None
164163
internal_tmp_mem_storage_engine: Optional[str] = None
165-
log_output: Optional[str] = None
166-
long_query_time: Optional[float] = None
167164
max_allowed_packet: Optional[int] = None
168165
max_heap_table_size: Optional[int] = None
169166
net_buffer_length: Optional[int] = None
170167
net_read_timeout: Optional[int] = None
171168
net_write_timeout: Optional[int] = None
172-
slow_query_log: Optional[bool] = None
173169
sort_buffer_size: Optional[int] = None
174170
sql_mode: Optional[str] = None
175171
sql_require_primary_key: Optional[bool] = None
@@ -186,7 +182,6 @@ class MySQLDatabaseConfigOptions(JSONObject):
186182

187183
mysql: Optional[MySQLDatabaseConfigMySQLOptions] = None
188184
binlog_retention_period: Optional[int] = None
189-
service_log: Optional[bool] = None
190185

191186

192187
@dataclass
@@ -208,7 +203,6 @@ class PostgreSQLDatabaseConfigPGOptions(JSONObject):
208203

209204
autovacuum_analyze_scale_factor: Optional[float] = None
210205
autovacuum_analyze_threshold: Optional[int] = None
211-
autovacuum_freeze_max_age: Optional[int] = None
212206
autovacuum_max_workers: Optional[int] = None
213207
autovacuum_naptime: Optional[int] = None
214208
autovacuum_vacuum_cost_delay: Optional[int] = None
@@ -223,18 +217,12 @@ class PostgreSQLDatabaseConfigPGOptions(JSONObject):
223217
default_toast_compression: Optional[str] = None
224218
idle_in_transaction_session_timeout: Optional[int] = None
225219
jit: Optional[bool] = None
226-
log_autovacuum_min_duration: Optional[int] = None
227-
log_error_verbosity: Optional[str] = None
228-
log_line_prefix: Optional[str] = None
229-
log_min_duration_statement: Optional[int] = None
230-
log_temp_files: Optional[int] = None
231220
max_files_per_process: Optional[int] = None
232221
max_locks_per_transaction: Optional[int] = None
233222
max_logical_replication_workers: Optional[int] = None
234223
max_parallel_workers: Optional[int] = None
235224
max_parallel_workers_per_gather: Optional[int] = None
236225
max_pred_locks_per_transaction: Optional[int] = None
237-
max_prepared_transactions: Optional[int] = None
238226
max_replication_slots: Optional[int] = None
239227
max_slot_wal_keep_size: Optional[int] = None
240228
max_stack_depth: Optional[int] = None
@@ -268,9 +256,7 @@ class PostgreSQLDatabaseConfigOptions(JSONObject):
268256
pg: Optional[PostgreSQLDatabaseConfigPGOptions] = None
269257
pg_stat_monitor_enable: Optional[bool] = None
270258
pglookout: Optional[PostgreSQLDatabaseConfigPGLookoutOptions] = None
271-
service_log: Optional[bool] = None
272259
shared_buffers_percentage: Optional[float] = None
273-
synchronous_replication: Optional[str] = None
274260
work_mem: Optional[int] = None
275261

276262

test/fixtures/databases_mysql_config.json

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@
9292
"requires_restart": false,
9393
"type": "integer"
9494
},
95-
"innodb_print_all_deadlocks": {
96-
"description": "When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default.",
97-
"example": true,
98-
"requires_restart": false,
99-
"type": "boolean"
100-
},
10195
"innodb_read_io_threads": {
10296
"description": "The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service.",
10397
"example": 10,
@@ -146,26 +140,6 @@
146140
"requires_restart": false,
147141
"type": "string"
148142
},
149-
"log_output": {
150-
"description": "The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE.",
151-
"enum": [
152-
"INSIGHTS",
153-
"NONE",
154-
"TABLE",
155-
"INSIGHTS,TABLE"
156-
],
157-
"example": "INSIGHTS",
158-
"requires_restart": false,
159-
"type": "string"
160-
},
161-
"long_query_time": {
162-
"description": "The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute.",
163-
"example": 10,
164-
"maximum": 3600,
165-
"minimum": 0.0,
166-
"requires_restart": false,
167-
"type": "number"
168-
},
169143
"max_allowed_packet": {
170144
"description": "Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M)",
171145
"example": 67108864,
@@ -206,12 +180,6 @@
206180
"requires_restart": false,
207181
"type": "integer"
208182
},
209-
"slow_query_log": {
210-
"description": "Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table.",
211-
"example": true,
212-
"requires_restart": false,
213-
"type": "boolean"
214-
},
215183
"sort_buffer_size": {
216184
"description": "Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K)",
217185
"example": 262144,
@@ -258,14 +226,5 @@
258226
"minimum": 600,
259227
"requires_restart": false,
260228
"type": "integer"
261-
},
262-
"service_log": {
263-
"description": "Store logs for the service so that they are available in the HTTP API and console.",
264-
"example": true,
265-
"requires_restart": false,
266-
"type": [
267-
"boolean",
268-
"null"
269-
]
270229
}
271230
}

test/fixtures/databases_mysql_instances.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"version": "8.0.26",
3333
"engine_config": {
3434
"binlog_retention_period": 600,
35-
"service_log": true,
3635
"mysql": {
3736
"connect_timeout": 10,
3837
"default_time_zone": "+03:00",
@@ -45,21 +44,17 @@
4544
"innodb_lock_wait_timeout": 50,
4645
"innodb_log_buffer_size": 16777216,
4746
"innodb_online_alter_log_max_size": 134217728,
48-
"innodb_print_all_deadlocks": true,
4947
"innodb_read_io_threads": 10,
5048
"innodb_rollback_on_timeout": true,
5149
"innodb_thread_concurrency": 10,
5250
"innodb_write_io_threads": 10,
5351
"interactive_timeout": 3600,
5452
"internal_tmp_mem_storage_engine": "TempTable",
55-
"log_output": "INSIGHTS",
56-
"long_query_time": 10,
5753
"max_allowed_packet": 67108864,
5854
"max_heap_table_size": 16777216,
5955
"net_buffer_length": 16384,
6056
"net_read_timeout": 30,
6157
"net_write_timeout": 30,
62-
"slow_query_log": true,
6358
"sort_buffer_size": 262144,
6459
"sql_mode": "ANSI,TRADITIONAL",
6560
"sql_require_primary_key": true,

test/fixtures/databases_postgresql_config.json

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414
"requires_restart": false,
1515
"type": "integer"
1616
},
17-
"autovacuum_freeze_max_age": {
18-
"description": "Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. Note that the system will launch autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. This parameter will cause the server to be restarted.",
19-
"example": 200000000,
20-
"maximum": 1500000000,
21-
"minimum": 200000000,
22-
"requires_restart": true,
23-
"type": "integer"
24-
},
2517
"autovacuum_max_workers": {
2618
"description": "Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is three. This parameter can only be set at server start.",
2719
"maximum": 20,
@@ -127,48 +119,6 @@
127119
"requires_restart": false,
128120
"type": "boolean"
129121
},
130-
"log_autovacuum_min_duration": {
131-
"description": "Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one (the default) disables logging autovacuum actions.",
132-
"maximum": 2147483647,
133-
"minimum": -1,
134-
"requires_restart": false,
135-
"type": "integer"
136-
},
137-
"log_error_verbosity": {
138-
"description": "Controls the amount of detail written in the server log for each message that is logged.",
139-
"enum": [
140-
"TERSE",
141-
"DEFAULT",
142-
"VERBOSE"
143-
],
144-
"requires_restart": false,
145-
"type": "string"
146-
},
147-
"log_line_prefix": {
148-
"description": "Choose from one of the available log formats.",
149-
"enum": [
150-
"'pid=%p,user=%u,db=%d,app=%a,client=%h '",
151-
"'pid=%p,user=%u,db=%d,app=%a,client=%h,txid=%x,qid=%Q '",
152-
"'%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h '",
153-
"'%m [%p] %q[user=%u,db=%d,app=%a] '"
154-
],
155-
"requires_restart": false,
156-
"type": "string"
157-
},
158-
"log_min_duration_statement": {
159-
"description": "Log statements that take more than this number of milliseconds to run, -1 disables",
160-
"maximum": 86400000,
161-
"minimum": -1,
162-
"requires_restart": false,
163-
"type": "integer"
164-
},
165-
"log_temp_files": {
166-
"description": "Log statements for each temporary file created larger than this number of kilobytes, -1 disables",
167-
"maximum": 2147483647,
168-
"minimum": -1,
169-
"requires_restart": false,
170-
"type": "integer"
171-
},
172122
"max_files_per_process": {
173123
"description": "PostgreSQL maximum number of files that can be open per process",
174124
"maximum": 4096,
@@ -211,13 +161,6 @@
211161
"requires_restart": false,
212162
"type": "integer"
213163
},
214-
"max_prepared_transactions": {
215-
"description": "PostgreSQL maximum prepared transactions",
216-
"maximum": 10000,
217-
"minimum": 0,
218-
"requires_restart": false,
219-
"type": "integer"
220-
},
221164
"max_replication_slots": {
222165
"description": "PostgreSQL maximum replication slots",
223166
"maximum": 64,
@@ -405,15 +348,6 @@
405348
"type": "integer"
406349
}
407350
},
408-
"service_log": {
409-
"description": "Store logs for the service so that they are available in the HTTP API and console.",
410-
"example": true,
411-
"requires_restart": false,
412-
"type": [
413-
"boolean",
414-
"null"
415-
]
416-
},
417351
"shared_buffers_percentage": {
418352
"description": "Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value.",
419353
"example": 41.5,
@@ -422,16 +356,6 @@
422356
"requires_restart": false,
423357
"type": "number"
424358
},
425-
"synchronous_replication": {
426-
"description": "Synchronous replication type. Note that the service plan also needs to support synchronous replication.",
427-
"enum": [
428-
"quorum",
429-
"off"
430-
],
431-
"example": "off",
432-
"requires_restart": false,
433-
"type": "string"
434-
},
435359
"work_mem": {
436360
"description": "Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. Default is 1MB + 0.075% of total RAM (up to 32MB).",
437361
"example": 4,

test/fixtures/databases_postgresql_instances.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"pg": {
3636
"autovacuum_analyze_scale_factor": 0.5,
3737
"autovacuum_analyze_threshold": 100,
38-
"autovacuum_freeze_max_age": 400000000,
3938
"autovacuum_max_workers": 10,
4039
"autovacuum_naptime": 100,
4140
"autovacuum_vacuum_cost_delay": 50,
@@ -50,18 +49,12 @@
5049
"default_toast_compression": "lz4",
5150
"idle_in_transaction_session_timeout": 100,
5251
"jit": true,
53-
"log_autovacuum_min_duration": 100,
54-
"log_error_verbosity": "DEFAULT",
55-
"log_line_prefix": "'pid=%p,user=%u,db=%d,app=%a,client=%h '",
56-
"log_min_duration_statement": 100,
57-
"log_temp_files": 100,
5852
"max_files_per_process": 100,
5953
"max_locks_per_transaction": 100,
6054
"max_logical_replication_workers": 32,
6155
"max_parallel_workers": 64,
6256
"max_parallel_workers_per_gather": 64,
6357
"max_pred_locks_per_transaction": 1000,
64-
"max_prepared_transactions": 5000,
6558
"max_replication_slots": 32,
6659
"max_slot_wal_keep_size": 100,
6760
"max_stack_depth": 3507152,
@@ -88,9 +81,7 @@
8881
"pglookout": {
8982
"max_failover_replication_time_lag": 1000
9083
},
91-
"service_log": false,
9284
"shared_buffers_percentage": 41.5,
93-
"synchronous_replication": "off",
9485
"work_mem": 4
9586
}
9687
}

0 commit comments

Comments
 (0)