Title
feat(export): phased progress banner and summary for namespace export
Proposed Target Output (example)
What users should see (stderr / logrus; illustrative):
$ crane export -e ./out --namespace shop
crane export
namespace: shop
export-dir: ./out
[1/5] Discovery … ok (preferred API lists refreshed)
[2/5] Listing namespace resources … 38 API types with ≥1 object
(use --debug to list each type)
[3/5] Related cluster-scoped RBAC/SCC … 4 resources → resources/shop/_cluster/
[4/5] Related CRDs … 1 fetched, 0 skipped
[5/5] Writing YAML … 412 files written
Summary
-------
resources: ./out/resources/shop/ (+ _cluster/)
failures: ./out/failures/shop/ (3 list/write issues recorded)
duration: 1m 04s
Done.
Description
Context
Users running crane export see no opening line, no clear sense of progress, and duplicated-looking waves of messages (“adding resource” then “Writing objects”). Failures appear as warnings without a final rollup. The target UX is: numbered phases, aggregate counts, and a Summary with paths, failure counts, and duration.
User outcome
After this issue, a typical run shows:
- First lines:
crane export, namespace, export-dir.
- Phases such as: Discovery → Listing → Related cluster RBAC/SCC → Related CRDs → Writing YAML (wording can match implementation).
- Final Summary: resource root path (
resources/<ns>/, _cluster/ note), failures/ path if used, count of recorded issues, duration, clear “Done.”
Scope
- Implement phased output using foundation from Issue 1 (or inline if Issue 1 is split).
- Phase lines include aggregate numbers (e.g. “38 API types with ≥1 object”) instead of listing each type at Info.
- Mid-run warnings remain visible or roll into summary; Summary must state how many list/write issues were recorded when
failures/ is populated.
Acceptance criteria
Title
feat(export): phased progress banner and summary for namespace exportProposed Target Output (example)
What users should see (stderr / logrus; illustrative):
Description
Context
Users running
crane exportsee no opening line, no clear sense of progress, and duplicated-looking waves of messages (“adding resource” then “Writing objects”). Failures appear as warnings without a final rollup. The target UX is: numbered phases, aggregate counts, and a Summary with paths, failure counts, and duration.User outcome
After this issue, a typical run shows:
crane export, namespace, export-dir.resources/<ns>/,_cluster/note),failures/path if used, count of recorded issues, duration, clear “Done.”Scope
failures/is populated.Acceptance criteria
--debug, retain or improve detailed per-type logs for support.