atlasdb icon indicating copy to clipboard operation
atlasdb copied to clipboard

[PDS-265616] Handle runtime config in migration CLI

Open mdaudali opened this issue 3 years ago • 1 comments

General

Before this PR: Runtime config was not supported by the migration command in the AtlasDB CLI. As services migrate over to specifying servers and replicationFactor in the runtime config, this causes the CLI to not work without manual intervention (copying from runtime to install config temporarily)

After this PR:

==COMMIT_MSG== AtlasDB CLI Migrate command supports optional -frc / --fromRuntimeConfig and -mrc / --migrateRuntimeConfig for specifying the runtime config file path for the initial and target KVSs. The optional --inline-runtime-config command allows for specifying the runtime config as a string for the initial KVS, and the optional --runtime-config-root command allows for specifying the config root within the file. ==COMMIT_MSG==

Priority: P2

Concerns / possible downsides (what feedback would you like?): N/A Is documentation needed?: Yes, added, and will update other docs outside this repo

Compatibility

Does this PR create any API breaks (e.g. at the Java or HTTP layers) - if so, do we have compatibility?: No Does this PR change the persisted format of any data - if so, do we have forward and backward compatibility?: No The code in this PR may be part of a blue-green deploy. Can upgrades from previous versions safely coexist? (Consider restarts of blue or green nodes.): N/A Does this PR rely on statements being true about other products at a deployment - if so, do we have correct product dependencies on these products (or other ways of verifying that these statements are true)?: N/A Does this PR need a schema migration? No

Testing and Correctness

What, if any, assumptions are made about the current state of the world? If they change over time, how will we find out?: None What was existing testing like? What have you done to improve it?: Added more comprehensive tests to show the order of precedence for runtime config sources, and that sweep remains disabled.

If this PR contains complex concurrent or asynchronous code, is it correct? The onus is on the PR writer to demonstrate this.: N/A If this PR involves acquiring locks or other shared resources, how do we ensure that these are always released?: N/A

Execution

How would I tell this PR works in production? (Metrics, logs, etc.): Operators do not complain Has the safety of all log arguments been decided correctly?: N/A Will this change significantly affect our spending on metrics or logs?: N/A How would I tell that this PR does not work in production? (monitors, etc.): Operators will complain If this PR does not work as expected, how do I fix that state? Would rollback be straightforward?: Don't use the new parameters / use an older version of the CLI If the above plan is more complex than “recall and rollback”, please tag the support PoC here (if it is the end of the week, tag both the current and next PoC): N/A

Scale

Would this PR be expected to pose a risk at scale? Think of the shopping product at our largest stack.: N/A Would this PR be expected to perform a large number of database calls, and/or expensive database calls (e.g., row range scans, concurrent CAS)?: N/A Would this PR ever, with time and scale, become the wrong thing to do - and if so, how would we know that we need to do something differently?: N/A

Development Process

Where should we start reviewing?: P2 priority

If this PR is in excess of 500 lines excluding versions lock-files, why does it not make sense to split it?: N/A

Please tag any other people who should be aware of this PR: N/A

mdaudali avatar Aug 11 '22 14:08 mdaudali

Generate changelog in changelog/@unreleased

Type See change types. Select one:

  • [ ] Feature
  • [x] Improvement
  • [ ] Fix
  • [ ] Break
  • [ ] Deprecation
  • [ ] Manual task
  • [ ] Migration

Description AtlasDB CLI Migrate command supports optional -frc / --fromRuntimeConfig and -mrc / --migrateRuntimeConfig for specifying the runtime config file path for the initial and target KVSs. The optional --inline-runtime-config command allows for specifying the runtime config as a string for the initial KVS, and the optional --runtime-config-root command allows for specifying the config root within the file.

Check the box to generate changelog(s)

  • [x] Generate changelog entry

changelog-app[bot] avatar Aug 11 '22 14:08 changelog-app[bot]