Closed DolceTriade closed 1 year ago
panic: interface conversion: interface {} is nil, not []interface {} goroutine 1 [running]: github.com/adobe/rules_gitops/resolver/pkg.(*imageTagTransformer).updateContainers(0xc0000dde00, 0xc0003884b0?, {0x96bcc1?, 0xe?}) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:115 +0x23b github.com/adobe/rules_gitops/resolver/pkg.(*imageTagTransformer).findAndReplaceTag(0x8edec0?, 0xc0003883f0?) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:101 +0x1ba github.com/adobe/rules_gitops/resolver/pkg.(*imageTagTransformer).findContainers(0x8edec0?, 0xc0003883f0?) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:157 +0x105 github.com/adobe/rules_gitops/resolver/pkg.(*imageTagTransformer).findAndReplaceTag(0x8edec0?, 0xc0003883c0?) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:109 +0x1f4 github.com/adobe/rules_gitops/resolver/pkg.(*imageTagTransformer).findContainers(0x8edec0?, 0xc0003883c0?) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:157 +0x105 github.com/adobe/rules_gitops/resolver/pkg.(*imageTagTransformer).findAndReplaceTag(0x8edec0?, 0xc000388390?) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:109 +0x1f4 github.com/adobe/rules_gitops/resolver/pkg.(*imageTagTransformer).findContainers(0x8edec0?, 0xc000388390?) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:157 +0x105 github.com/adobe/rules_gitops/resolver/pkg.(*imageTagTransformer).findAndReplaceTag(0x8edec0?, 0xc000388360?) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:109 +0x1f4 github.com/adobe/rules_gitops/resolver/pkg.(*imageTagTransformer).findContainers(0x8edec0?, 0xc000388360?) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:157 +0x105 github.com/adobe/rules_gitops/resolver/pkg.(*imageTagTransformer).findAndReplaceTag(0x8edec0?, 0xc0003882d0?) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:109 +0x1f4 github.com/adobe/rules_gitops/resolver/pkg.(*imageTagTransformer).findContainers(0x8edec0?, 0xc0003882d0?) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:157 +0x105 github.com/adobe/rules_gitops/resolver/pkg.(*imageTagTransformer).findAndReplaceTag(0xc0000a8008?, 0xc0000dde28?) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:109 +0x1f4 github.com/adobe/rules_gitops/resolver/pkg.ResolveImages({0xa24800?, 0xc0000a8000?}, {0xa24840, 0xc0000a8008}, 0x5?) external/com_adobe_rules_gitops/resolver/pkg/resolver.go:43 +0x1f1 main.main() external/com_adobe_rules_gitops/resolver/resolver.go:68 +0x305
Replace this line with your answer.
Add an empty initContainers: to your yaml file:
initContainers:
Something like this...
imagePullSecrets: - name: image-pull-secret initContainers: containers: - name: git-gc imagePullPolicy: Always
Linux
bazel info release
INFO: Invocation ID: 19ee5aac-88ff-4179-bced-c34b03442851 release 6.0.0- (@non-git)
WORKSPACE
# Adobe K8s GitOps http_archive( name = "com_adobe_rules_gitops", sha256 = "6e8a2273b8ec19c7bd64904ea819f1e6cca7eee000d6197393e943f8c219949a", strip_prefix = "rules_gitops-0.17.0", urls = ["https://github.com/adobe/rules_gitops/archive/refs/tags/v0.17.0.tar.gz"], )
No
Seems like we just need a nil check in resolver.go
Description of the problem / feature request:
Feature requests: what underlying problem are you trying to solve with this feature?
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Add an empty
initContainers:
to your yaml file:Something like this...
What operating system are you running Bazel on?
Linux
What's the output of
bazel info release
?Snippet of the
WORKSPACE
file that includes rules_gitops rules.Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
Seems like we just need a nil check in resolver.go