google / google/safetext

`reflect.Set: value of type string is not assignable to type types.UID`

Open
#3 1 comment 0 reactions 1 assignee Claimed by @0xmilkmix View on GitHub
Dominant language
Go
Stars
151
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Full error:

```
deploymentcontroller_test.go:249: failed to render template: template: inject:1:0: executing "inject" at : error calling ApplyInjectionDetection: reflect.Set: value of type string is not assignable to type types.UID
```

We are passing a struct as `args` that is ~4 levels of embedding to k8s metav1.ObjectMeta which has a UID set. https://github.com/istio/istio/blob/e3bd7d40ae6fe376c69ee93662a17c717d6d534a/pilot/pkg/config/kube/gateway/deploymentcontroller.go#L368

Our template references this UID: https://github.com/istio/istio/blob/e3bd7d40ae6fe376c69ee93662a17c717d6d534a/manifests/charts/istio-control/istio-discovery/files/kube-gateway.yaml#L20. Even if I remove this reference, however, we get the same error.

Oddly, if I try to make a simpler reproducer I cannot.

I will try to get some more info/a simpler reproduction but thought I would open the issue with what I know for now.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.