panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x183bad3]
goroutine 1 [running]:
github.com/SAP/crossplane-provider-cloudfoundry/cmd/exporter/cf/spacerole.convertSpaceRoleResource({0x21587a8, 0xc0003d2b00}, 0xc000690840, 0xc0024815c0, {0x21480b0, 0xc000518b70}, 0x0)
/home/gergely/kubermatic/sap-ora-mcp/github-migration/crossplane-provider-cloudfoundry-clifford-upgrade/cmd/exporter/cf/spacerole/convert.go:23 +0x73
github.com/SAP/crossplane-provider-cloudfoundry/cmd/exporter/cf/spacerole.spaceRole.Export-range1({0x1a402e0?, 0xc000919770?}, 0xc000a91878?)
/home/gergely/kubermatic/sap-ora-mcp/github-migration/crossplane-provider-cloudfoundry-clifford-upgrade/cmd/exporter/cf/spacerole/spacerole.go:47 +0x5c
github.com/SAP/xp-clifford/mkcontainer.(*typedContainer[...].func1()
/nix/store/39x7yrmrxdws2866fbmav3zhwy01fkis-go-1.24.10/share/go/src/maps/iter.go:15 +0x82
github.com/SAP/crossplane-provider-cloudfoundry/cmd/exporter/cf/spacerole.spaceRole.Export({}, {0x21587a8, 0xc0003d2b00}, 0xc000690840, {0x21480b0, 0xc000518b70}, 0x0)
/home/gergely/kubermatic/sap-ora-mcp/github-migration/crossplane-provider-cloudfoundry-clifford-upgrade/cmd/exporter/cf/spacerole/spacerole.go:46 +0x237
main.exportCmd({0x21587a8, 0xc0003d2b00}, {0x21480b0, 0xc000518b70})
/home/gergely/kubermatic/sap-ora-mcp/github-migration/crossplane-provider-cloudfoundry-clifford-upgrade/cmd/exporter/export.go:33 +0x351
github.com/SAP/xp-clifford/cli/export.(*exportSubCommand).GetRun.func1({0x21587a8, 0xc0003d2b00})
/home/gergely/go/pkg/mod/github.com/!s!a!p/xp-clifford@v0.0.0-20260312105548-6c739d63b4f1/cli/export/subcommand.go:75 +0x2a3
github.com/SAP/xp-clifford/cli.makeCobraRun.func1(0xc0002eaf08?, {0x1c4ed25?, 0x4?, 0x1c4eb6d?})
/home/gergely/go/pkg/mod/github.com/!s!a!p/xp-clifford@v0.0.0-20260312105548-6c739d63b4f1/cli/subcommand.go:19 +0x42
github.com/spf13/cobra.(*Command).execute(0xc0002eaf08, {0x3064ce0, 0x0, 0x0})
/home/gergely/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1019 +0xa91
github.com/spf13/cobra.(*Command).ExecuteC(0xc0002eac08)
/home/gergely/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1148 +0x46f
github.com/spf13/cobra.(*Command).Execute(...)
/home/gergely/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1071
github.com/SAP/xp-clifford/cli.Execute()
/home/gergely/go/pkg/mod/github.com/!s!a!p/xp-clifford@v0.0.0-20260312105548-6c739d63b4f1/cli/cli.go:26 +0x3c
main.main()
/home/gergely/kubermatic/sap-ora-mcp/github-migration/crossplane-provider-cloudfoundry-clifford-upgrade/cmd/exporter/main.go:68 +0x43d
exit status 2
Describe the bug
When orgroles + spaceroles are exported, sometimes we get the following error:
Tested with Provider Version
@main