Skip to content

feat: improve config

Nikolay Samokhvalov requested to merge improve-config-comments into master

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 the global section
  • get rid of stages concept, use only jobs
  • 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 of global.dataDir - this looks weird and not intuitive)
    • also, where should it be -- in provision, and retrieval should be also part of provision?
  • 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 '/'
  • retrieval but provision – 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 and provision.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 in restore to indicate that restoration will happen immediately, without saving the dump file on disk.
  • get rid of cloning.mode -- we have only base
  • for physical-restore, fix walg storage options. It almost doesn't matter for cloud storages except for GCS
  • merge retrieval to provision
Edited by Artyom Kartasov

Merge request reports