Summary
When running crane export as a namespace-admin, the export correctly attempts to
collect ClusterRoles but filters them all out (0 of N matched). However, clusterroles.yaml
is not written to the failures/ directory, even though a generic
"Failed to collect cluster-scoped resources" error is logged.
Expected behavior
failures/<namespace>/clusterroles.yaml should be written whenever crane attempts
to export ClusterRoles and fails or finds 0 matching resources, so callers can
distinguish between "not attempted" and "attempted but nothing matched/accessible".
Actual behavior
The failures/ directory contains entries for other resource types but is missing
clusterroles.yaml. The log shows:
- "Filtering for kind ClusterRole (299 found)"
- "After filtering 0 remained out of 299"
- "Failed to collect cluster-scoped resources; check the failures/ directory for details"
But no clusterroles.yaml is produced in failures/.
Impact
MTA-853 (split apply test) fails at the verification step because it relies on
clusterroles.yaml being present in failures/ to confirm that the namespace-admin
export correctly could not export cluster-scoped resources.
Repo
migtools/crane
Summary
When running
crane exportas a namespace-admin, the export correctly attempts tocollect ClusterRoles but filters them all out (0 of N matched). However,
clusterroles.yamlis not written to the
failures/directory, even though a generic"Failed to collect cluster-scoped resources" error is logged.
Expected behavior
failures/<namespace>/clusterroles.yamlshould be written whenever crane attemptsto export ClusterRoles and fails or finds 0 matching resources, so callers can
distinguish between "not attempted" and "attempted but nothing matched/accessible".
Actual behavior
The failures/ directory contains entries for other resource types but is missing
clusterroles.yaml. The log shows:But no clusterroles.yaml is produced in failures/.
Impact
MTA-853 (split apply test) fails at the verification step because it relies on
clusterroles.yamlbeing present in failures/ to confirm that the namespace-adminexport correctly could not export cluster-scoped resources.
Repo
migtools/crane