wttech / aemc

AEM Compose (Core & CLI)
https://wttech.blog/blog/2023/get-your-aem-together-with-aem-compose/
Apache License 2.0
45 stars 6 forks source link

Content copy improvements #235

Open krystian-panek-vmltech opened 10 months ago

krystian-panek-vmltech commented 10 months ago

[1] bug

sh aemw content copy --filter-roots=/content/foo --instance-url=http://foo:bar@x.x.x.x:4502 --instance-target-id=local_author,local_publish
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x10 pc=0x1033d3a3c]

goroutine 1 [running]:
github.com/wttech/aemc/pkg.(*InstanceManager).newFromConfig(0x1400027d500, {0x16d017709, 0x1a})
        /home/runner/work/aemc/aemc/pkg/instance_manager.go:149 +0x41c
github.com/wttech/aemc/pkg.(*InstanceManager).NewByID(...)
        /home/runner/work/aemc/aemc/pkg/instance_manager.go:236
main.determineContentTargetInstance(0x18?, 0x1400016d350?)
        /home/runner/work/aemc/aemc/cmd/aem/content.go:182 +0x98
main.(*CLI).contentCopyCmd.func1(0x1400035c900?, {0x103444e1c?, 0x3?, 0x3?})
        /home/runner/work/aemc/aemc/cmd/aem/content.go:146 +0xd0
github.com/spf13/cobra.(*Command).execute(0x1400035c900, {0x14000355080, 0x3, 0x3})
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0x7cc
github.com/spf13/cobra.(*Command).ExecuteC(0x14000328000)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x380
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
main.(*CLI).Exec(...)
        /home/runner/work/aemc/aemc/cmd/aem/cli.go:87
main.(*CLI).MustExec(0x1035f1500?)
        /home/runner/work/aemc/aemc/cmd/aem/cli.go:91 +0x24
main.main()
        /home/runner/work/aemc/aemc/cmd/aem/main.go:11 +0x24

[2] improvement

sh aemw content copy --filter-roots=/content/usa/en/system-pages/azure-pages --instance-source-url=http://admin:74s%24SHSHIn5z%26VlA@10.198.242.5:4502/

if --instance-source-xx is specified then assume regular --instance-yy as target, not source.

krystian-panek-vmltech commented 6 months ago

[1] is fixed