feat: improve config
Description
Make config
- Reorder the blocks
- Comment each param (except the
retrieval
section, it's on TODO), improve existing comments - Split the example config to separate configs, corresponding to concrete use cases: logical dump/restore, RDS, physical, WAL-G.
TODO for the next iteration:
-
"physical generic" is empty now, needs to be done soon -
retrieval
is not reviewed/improved yet -- also to be done in the next iteration. -
also see separate TODO for the code refactoring below. -
proofread all the texts
Checklist
-
the MR description has been reviewed -
this MR contains text changes and they have been reviewed OR there are no texts changes -
this MR contains GUI/CLI changes and they have been reviewed OR there are no GUI/CLI changes -
this MR contains API changes, specifications reflect those changes and they have been reviewed OR there are no API changes
Additional TODO (follow up items, not for this MR)
- reduce the number of config sections
- move
debug
inside theglobal
section - get rid of
stages
concept, use onlyjobs
-
global.dataDir
:- rename to
mountPoint
or smth like this. The idea is to avoid duplicating part of of the path (now,provision.pgDataSubdir
is suffix ofglobal.dataDir
- this looks weird and not intuitive) - also, where should it be -- in
provision
, andretrieval
should be also part ofprovision
?
- rename to
-
provision.pgDataSubdir
- get rid of leading slashes. When concatenating, add slash automatically. Otherwise, it looks weird -- it starts with
/
, so it looks like absolute path - so, default value becomes an empty string, not
'/'
- get rid of leading slashes. When concatenating, add slash automatically. Otherwise, it looks weird -- it starts with
-
retrieval
butprovision
– a noun vs a verb. Not really consistent - idea: always use double-quoted values in the example configs?
- do we need
provision.pgMgmtUsername
at all? - hide
provision.mode
- it has only one option, we don't need to show it. - explicitly use the worh "clone" in
provision.mountDir
-- to emphasize that this option deals with clones. -
provision.snapshotFilterSuffix
is a "negative" filter but it's not clear from the name. Use the word "exclude" -
global.dockerImage
andprovision.dockerImage
:- we need just one. Two -- too much. And by default, it should be an extended image from us.
- and there is one more
dockerImage
, the 3rd, in logical retrieval jobs description -- It's too much.
- for
logical-dump
job, use "imediate" word inrestore
to indicate that restoration will happen immediately, without saving the dump file on disk. - get rid of
cloning.mode
-- we have onlybase
- for
physical-restore
, fixwalg
storage options. It almost doesn't matter for cloud storages except for GCS - merge
retrieval
toprovision
Edited by Artyom Kartasov