From baa2d19ee9d513e66240a2334e96940f48ebc1ff Mon Sep 17 00:00:00 2001 From: Ahmed Abdalla Date: Tue, 7 Sep 2021 12:27:52 +0200 Subject: [PATCH 1/2] Add a sample field to expose roundtripping failures Signed-off-by: Ahmed Abdalla --- docs/eventing-api.md | 20 +++++++++++++++++++ pkg/apis/eventing/v1/trigger_types.go | 2 ++ pkg/apis/eventing/v1/zz_generated.deepcopy.go | 9 +++++++++ 3 files changed, 31 insertions(+) diff --git a/docs/eventing-api.md b/docs/eventing-api.md index 1e2cb9cfe3f..c263aa64c96 100644 --- a/docs/eventing-api.md +++ b/docs/eventing-api.md @@ -1603,6 +1603,16 @@ DeliverySpec

Delivery contains the delivery spec for this specific trigger.

+ + +tags
+ +[]string + + + + + @@ -1837,6 +1847,16 @@ DeliverySpec

Delivery contains the delivery spec for this specific trigger.

+ + +tags
+ +[]string + + + + +

TriggerStatus diff --git a/pkg/apis/eventing/v1/trigger_types.go b/pkg/apis/eventing/v1/trigger_types.go index d7b876c868e..3f65b36b5eb 100644 --- a/pkg/apis/eventing/v1/trigger_types.go +++ b/pkg/apis/eventing/v1/trigger_types.go @@ -90,6 +90,8 @@ type TriggerSpec struct { // Delivery contains the delivery spec for this specific trigger. // +optional Delivery *eventingduckv1.DeliverySpec `json:"delivery,omitempty"` + + Tags *[]string `json:"tags,omitempty"` } type TriggerFilter struct { diff --git a/pkg/apis/eventing/v1/zz_generated.deepcopy.go b/pkg/apis/eventing/v1/zz_generated.deepcopy.go index 908b4e354a8..31a78cf82e6 100644 --- a/pkg/apis/eventing/v1/zz_generated.deepcopy.go +++ b/pkg/apis/eventing/v1/zz_generated.deepcopy.go @@ -252,6 +252,15 @@ func (in *TriggerSpec) DeepCopyInto(out *TriggerSpec) { *out = new(apisduckv1.DeliverySpec) (*in).DeepCopyInto(*out) } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = new([]string) + if **in != nil { + in, out := *in, *out + *out = make([]string, len(*in)) + copy(*out, *in) + } + } return } From 4366a5640d1c74e060f2d74b46f537ad873cbfb7 Mon Sep 17 00:00:00 2001 From: Ahmed Abdalla Date: Tue, 7 Sep 2021 13:17:28 +0200 Subject: [PATCH 2/2] workaround to show the diff Signed-off-by: Ahmed Abdalla --- vendor/github.com/google/go-cmp/cmp/options.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vendor/github.com/google/go-cmp/cmp/options.go b/vendor/github.com/google/go-cmp/cmp/options.go index e57b9eb5392..e08dd974b56 100644 --- a/vendor/github.com/google/go-cmp/cmp/options.go +++ b/vendor/github.com/google/go-cmp/cmp/options.go @@ -241,7 +241,8 @@ func (validator) apply(s *state, vx, vy reflect.Value) { } name = fmt.Sprintf("%q.(%v)", pkgPath, t.String()) // e.g., "path/to/package".(struct { a int }) } - panic(fmt.Sprintf("cannot handle unexported field at %#v:\n\t%v\n%s", s.curPath, name, help)) + fmt.Sprintf("%s%s",help, name) + return } panic("not reachable")