You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to generate the SNS controller, I was getting the following failure:
```
[jaypipes@thelio code-generator]$ make build-controller SERVICE=sns
building ack-generate ... ok.
==== building sns-controller ====
Copying common custom resource definitions into sns
Building Kubernetes API objects for sns
Generating deepcopy code for sns
Generating custom resource definitions for sns
Building service controller for sns
Error: template: /home/jaypipes/go/src/github.com/aws-controllers-k8s/code-generator/templates/pkg/resource/delta.go.tpl:34:3: executing "/home/jaypipes/go/src/github.com/aws-controllers-k8s/code-generator/templates/pkg/resource/delta.go.tpl" at <GoCodeCompare .CRD "delta" "a.ko" "b.ko" 1>: error calling GoCodeCompare: runtime error: invalid memory address or nil pointer dereference
make: *** [Makefile:41: build-controller] Error 1
```
This failure turned out to be due to attribute-based API fields that do not have a `type: XXX` generator.yaml configuration option specified (as they do in the sqs-controller's generator.yaml) would end up getting a `pkg/model.Field` object created that had a `nil` ShapeRef. This caused problems in certain Go code generator functions (such as `pkg/generate/code.CompareResource`) that rely on `Field.ShapeRef` being non-nil.
Signed-off-by: Jay Pipes <[email protected]>
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
0 commit comments