mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-23 16:10:37 +00:00
Allow passing initial timeline id into zenith CLI commands
This commit is contained in:
committed by
Kirill Bulatov
parent
4d0f7fd1e4
commit
c7569dce47
@@ -869,12 +869,16 @@ class ZenithCli:
|
||||
res.stdout.strip().split("\n")))
|
||||
return branches_cli
|
||||
|
||||
def init(self, config_toml: str) -> 'subprocess.CompletedProcess[str]':
|
||||
def init(self,
|
||||
config_toml: str,
|
||||
initial_timeline_id: Optional[uuid.UUID] = None) -> 'subprocess.CompletedProcess[str]':
|
||||
with tempfile.NamedTemporaryFile(mode='w+') as tmp:
|
||||
tmp.write(config_toml)
|
||||
tmp.flush()
|
||||
|
||||
cmd = ['init', f'--config={tmp.name}']
|
||||
if initial_timeline_id:
|
||||
cmd.extend(['--timeline-id', initial_timeline_id.hex])
|
||||
append_pageserver_param_overrides(cmd,
|
||||
self.env.pageserver.remote_storage,
|
||||
self.env.pageserver.config_override)
|
||||
|
||||
Reference in New Issue
Block a user