bug: runtime error: index out of range [0] with length 0: boundsError
christiangda opened this issue · 1 comments
christiangda commented
Describe the bug
during the reconciliation of the users when I'm migration from ssosyc to this one fails with:
runtime error: index out of range [0] with length 0: boundsError[{ "path": "github.com/aws/aws-lambda-go@v1.28.0/lambda/errors.go", "line": 39, "label": "lambdaPanicResponse" },{ "path": "github.com/aws/aws-lambda-go@v1.28.0/lambda/function.go", "line": 36, "label": "(*Function).Invoke.func1" },{ "path": "runtime/panic.go", "line": 1038, "label": "gopanic" },{ "path": "runtime/panic.go", "line": 90, "label": "goPanicIndex" },{ "path": "work/idp-scim-sync/idp-scim-sync/pkg/aws/scim.go", "line": 303, "label": "(*SCIMService).GetUserByUserName" },{ "path": "work/idp-scim-sync/idp-scim-sync/internal/scim/scim.go", "line": 413, "label": "(*Provider).CreateGroupsMembers" },{ "path": "work/idp-scim-sync/idp-scim-sync/internal/core/reconciling.go", "line": 161, "label": "reconcilingGroupsMembers" },{ "path": "work/idp-scim-sync/idp-scim-sync/internal/core/actions.go", "line": 90, "label": "scimSync" },{ "path": "work/idp-scim-sync/idp-scim-sync/internal/core/sync.go", "line": 125, "label": "(*SyncService).SyncGroupsAndTheirMembers" },{ "path": "work/idp-scim-sync/idp-scim-sync/cmd/idpscim/cmd/root.go", "line": 317, "label": "syncGroups" },{ "path": "work/idp-scim-sync/idp-scim-sync/cmd/idpscim/cmd/root.go", "line": 229, "label": "sync" },{ "path": "work/idp-scim-sync/idp-scim-sync/cmd/idpscim/cmd/root.go", "line": 43, "label": "glob..func1" },{ "path": "github.com/spf13/cobra@v1.3.0/command.go", "line": 856, "label": "(*Command).execute" },{ "path": "github.com/spf13/cobra@v1.3.0/command.go", "line": 974, "label": "(*Command).ExecuteC" },{ "path": "github.com/spf13/cobra@v1.3.0/command.go", "line": 902, "label": "(*Command).Execute" },{ "path": "reflect/value.go", "line": 556, "label": "Value.call" },{ "path": "reflect/value.go", "line": 339, "label": "Value.Call" },{ "path": "github.com/aws/aws-lambda-go@v1.28.0/lambda/handler.go", "line": 124, "label": "NewHandler.func1" },{ "path": "github.com/aws/aws-lambda-go@v1.28.0/lambda/handler.go", "line": 24, "label": "lambdaHandler.Invoke" },{ "path": "github.com/aws/aws-lambda-go@v1.28.0/lambda/function.go", "line": 64, "label": "(*Function).Invoke" },{ "path": "reflect/value.go", "line": 556, "label": "Value.call" },{ "path": "reflect/value.go", "line": 339, "label": "Value.Call" },{ "path": "net/rpc/server.go", "line": 377, "label": "(*service).call" },{ "path": "runtime/asm_amd64.s", "line": 1581, "label": "goexit" }] | runtime error: index out of range [0] with length 0: boundsError [{"path":"github.com/aws/aws-lambda-go@v1.28.0/lambda/errors.go","line":39,"label":"lambdaPanicResponse"},{"path":"github.com/aws/aws-lambda-go@v1.28.0/lambda/function.go","line":36,"label":"(*Function).Invoke.func1"},{"path":"runtime/panic.go","line":1038,"label":"gopanic"},{"path":"runtime/panic.go","line":90,"label":"goPanicIndex"},{"path":"work/idp-scim-sync/idp-scim-sync/pkg/aws/scim.go","line":303,"label":"(*SCIMService).GetUserByUserName"},{"path":"work/idp-scim-sync/idp-scim-sync/internal/scim/scim.go","line":413,"label":"(*Provider).CreateGroupsMembers"},{"path":"work/idp-scim-sync/idp-scim-sync/internal/core/reconciling.go","line":161,"label":"reconcilingGroupsMembers"},{"path":"work/idp-scim-sync/idp-scim-sync/internal/core/actions.go","line":90,"label":"scimSync"},{"path":"work/idp-scim-sync/idp-scim-sync/internal/core/sync.go","line":125,"label":"(*SyncService).SyncGroupsAndTheirMembers"},{"path":"work/idp-scim-sync/idp-scim-sync/cmd/idpscim/cmd/root.go","line":317,"label":"syncGroups"},{"path":"work/idp-scim-sync/idp-scim-sync/cmd/idpscim/cmd/root.go","line":229,"label":"sync"},{"path":"work/idp-scim-sync/idp-scim-sync/cmd/idpscim/cmd/root.go","line":43,"label":"glob..func1"},{"path":"github.com/spf13/cobra@v1.3.0/command.go","line":856,"label":"(*Command).execute"},{"path":"github.com/spf13/cobra@v1.3.0/command.go","line":974,"label":"(*Command).ExecuteC"},{"path":"github.com/spf13/cobra@v1.3.0/command.go","line":902,"label":"(*Command).Execute"},{"path":"reflect/value.go","line":556,"label":"Value.call"},{"path":"reflect/value.go","line":339,"label":"Value.Call"},{"path":"github.com/aws/aws-lambda-go@v1.28.0/lambda/handler.go","line":124,"label":"NewHandler.func1"},{"path":"github.com/aws/aws-lambda-go@v1.28.0/lambda/handler.go","line":24,"label":"lambdaHandler.Invoke"},{"path":"github.com/aws/aws-lambda-go@v1.28.0/lambda/function.go","line":64,"label":"(*Function).Invoke"},{"path":"reflect/value.go","line":556,"label":"Value.call"},{"path":"reflect/value.go","line":339,"label":"Value.Call"},{"path":"net/rpc/server.go","line":377,"label":"(*service).call"},{"path":"runtime/asm_amd64.s","line":1581,"label":"goexit"}]
To Reproduce
First sync under the migration from the ssosyc to this one
Expected behavior
The same groups and users
christiangda commented
This was fixed in PR #33