Skip to content

Setting Groups for a copy/import of projects fails #135

@sizurita

Description

@sizurita

when trying to copy or import a project, setting the permissions for the group fails even when giving
--member type=group,name=pronghorn_admin,access=owner
--member type=accout,name=admin@pronghorn,access=owner
both output below.

% ipctl copy project 'Infoblox DDI Golden Asset' --to local --from dtcc --replace --member type=group,name=pronghorn_admin,access=owner --verbose
2025-04-30T16:29:50Z INF ipctl v0.10.0 (4f7e23a)
2025-04-30T16:29:50Z INF connection timeout is 1000000000000 second(s)
2025-04-30T16:29:50Z INF Creating new http client
2025-04-30T16:29:50Z INF attempting to copy Infoblox DDI Golden Asset (type of project) from dtcc to local
2025-04-30T16:29:50Z INF Creating new http client
2025-04-30T16:29:50Z INF GET https://dtcc-poc-iap01.trial.itential.io:443/automation-studio/projects?limit=100
2025-04-30T16:29:50Z INF HTTP response is 200 OK
2025-04-30T16:29:50Z INF Found 7 project(s)
2025-04-30T16:29:50Z INF GET https://dtcc-poc-iap01.trial.itential.io:443/automation-studio/projects/67b79a651359a3d6dc3e749c/export
2025-04-30T16:29:52Z INF HTTP response is 200 OK
2025-04-30T16:29:52Z INF Successfully exported project
2025-04-30T16:29:52Z INF Creating new http client
2025-04-30T16:29:52Z INF GET https://127.0.0.1:3446/automation-studio/projects?limit=100
2025-04-30T16:29:52Z INF HTTP response is 200 OK
2025-04-30T16:29:52Z INF Found 6 project(s)
2025-04-30T16:29:52Z INF POST https://127.0.0.1:3446/automation-studio/projects/import
2025-04-30T16:29:54Z INF HTTP response is 200 OK
2025-04-30T16:29:54Z INF Successfully imported project
2025-04-30T16:29:54Z INF Creating new http client
2025-04-30T16:29:54Z INF GET https://127.0.0.1:3446/user/settings
2025-04-30T16:29:54Z INF HTTP response is 200 OK
2025-04-30T16:29:54Z INF GET https://127.0.0.1:3446/authorization/groups
2025-04-30T16:29:54Z INF HTTP response is 200 OK
2025-04-30T16:29:54Z INF Found 1 group(s)
panic: interface conversion: interface {} is *services.Project, not services.Project

goroutine 1 [running]:
github.com/itential/ipctl/internal/runners.(*ProjectRunner).Copy(0x1400043f0e0, {{0x140006a2870, 0x1, 0x9}, {0x100eb2000, 0x140004ac9f0}, {0x100eb2720, 0x1400000cb10}, {0x0, 0x0}, ...})
/home/runner/work/ipctl/ipctl/internal/runners/projects.go:224 +0x840
github.com/itential/ipctl/internal/handlers.NewCommand.func1(0x140004a7d00?, {0x140006a2870?, 0x4?, 0x100c9869d?})
/home/runner/work/ipctl/ipctl/internal/handlers/runner.go:135 +0xbc
github.com/spf13/cobra.(*Command).execute(0x140004c6908, {0x140006a2750, 0x9, 0x9})
/home/runner/work/ipctl/ipctl/vendor/github.com/spf13/cobra/command.go:989 +0x818
github.com/spf13/cobra.(*Command).ExecuteC(0x1400033c608)
/home/runner/work/ipctl/ipctl/vendor/github.com/spf13/cobra/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/work/ipctl/ipctl/vendor/github.com/spf13/cobra/command.go:1041
github.com/itential/ipctl/cmd.Execute()
/home/runner/work/ipctl/ipctl/cmd/root.go:133 +0x20c
main.main()
/home/runner/work/ipctl/ipctl/main.go:15 +0x1c

Here is a different example using account rather than group:
% ipctl copy project 'Infoblox DDI Golden Asset' --to local --from dtcc --replace --member type=accout,name=admin@pronghorn,access=owner --verbose
2025-04-30T16:27:16Z INF ipctl v0.10.0 (4f7e23a)
2025-04-30T16:27:16Z INF connection timeout is 1000000000000 second(s)
2025-04-30T16:27:16Z INF Creating new http client
2025-04-30T16:27:16Z INF attempting to copy Infoblox DDI Golden Asset (type of project) from dtcc to local
2025-04-30T16:27:16Z INF Creating new http client
2025-04-30T16:27:16Z INF GET https://dtcc-poc-iap01.trial.itential.io:443/automation-studio/projects?limit=100
2025-04-30T16:27:16Z INF HTTP response is 200 OK
2025-04-30T16:27:16Z INF Found 7 project(s)
2025-04-30T16:27:16Z INF GET https://dtcc-poc-iap01.trial.itential.io:443/automation-studio/projects/67b79a651359a3d6dc3e749c/export
2025-04-30T16:27:17Z INF HTTP response is 200 OK
2025-04-30T16:27:17Z INF Successfully exported project
2025-04-30T16:27:17Z INF Creating new http client
2025-04-30T16:27:17Z INF GET https://127.0.0.1:3446/automation-studio/projects?limit=100
2025-04-30T16:27:17Z INF HTTP response is 200 OK
2025-04-30T16:27:17Z INF Found 5 project(s)
2025-04-30T16:27:17Z INF POST https://127.0.0.1:3446/automation-studio/projects/import
2025-04-30T16:27:19Z INF HTTP response is 200 OK
2025-04-30T16:27:19Z INF Successfully imported project
2025-04-30T16:27:19Z INF Creating new http client
2025-04-30T16:27:19Z INF GET https://127.0.0.1:3446/user/settings
2025-04-30T16:27:19Z INF HTTP response is 200 OK
2025-04-30T16:27:19Z INF GET https://127.0.0.1:3446/authorization/groups
2025-04-30T16:27:19Z INF HTTP response is 200 OK
2025-04-30T16:27:19Z INF Found 1 group(s)
Error: group does not exist

2025-04-30T16:27:19Z FTL error="group does not exist"

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions