feat(identifiers): verify batch projections
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a023c0-a0a3-7c03-b395-5a0d2757214d
This commit is contained in:
parent
e6cc18bf18
commit
055c6971ab
11 changed files with 2964 additions and 9 deletions
|
|
@ -318,6 +318,13 @@ def main(argv: list[str] | None = None) -> int:
|
|||
)
|
||||
p_id_batch.add_argument("--plan", required=True)
|
||||
p_id_batch.add_argument("--repo", action="append", required=True, dest="repos")
|
||||
p_id_batch.add_argument(
|
||||
"--projection-api-base",
|
||||
action="append",
|
||||
default=[],
|
||||
dest="projection_api_bases",
|
||||
help="Require current UUID=200 and derived UUID=404 on this projection",
|
||||
)
|
||||
p_id_batch.add_argument("--output", default=None)
|
||||
p_id_batch.add_argument("--force", action="store_true")
|
||||
p_id_batch_verify = identifier_sub.add_parser(
|
||||
|
|
@ -772,7 +779,11 @@ def main(argv: list[str] | None = None) -> int:
|
|||
plan = json.loads(Path(args.plan).read_text(encoding="utf-8"))
|
||||
if not isinstance(plan, dict):
|
||||
raise TypeError("migration plan must be a JSON object")
|
||||
result = plan_identifier_migration_batch(plan, repo_slugs=args.repos)
|
||||
result = plan_identifier_migration_batch(
|
||||
plan,
|
||||
repo_slugs=args.repos,
|
||||
projection_api_bases=args.projection_api_bases,
|
||||
)
|
||||
except (OSError, TypeError, ValueError, json.JSONDecodeError) as exc:
|
||||
print(json.dumps({"ok": False, "error": str(exc)}, indent=2))
|
||||
return 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue