There was an error while loading. Please reload this page.
1 parent c3b3f06 commit 62521c9Copy full SHA for 62521c9
1 file changed
pkg/cloudevents/clients/work/agent/codec/manifestbundle.go
@@ -3,6 +3,7 @@ package codec
3
import (
4
"encoding/json"
5
"fmt"
6
+
7
"github.com/bwmarrin/snowflake"
8
cloudevents "github.com/cloudevents/sdk-go/v2"
9
cloudeventstypes "github.com/cloudevents/sdk-go/v2/types"
@@ -142,9 +143,7 @@ func (c *ManifestBundleCodec) Decode(evt *cloudevents.Event) (*workv1.ManifestWo
142
143
metaObj.ResourceVersion = ""
144
// The resourceVersion in cloudevent actually sematically equals to generation, since it increments when
145
// spec changes
- if metaObj.Generation == 0 {
146
- metaObj.Generation = int64(resourceVersion)
147
- }
+ metaObj.Generation = int64(resourceVersion)
148
if metaObj.Annotations == nil {
149
metaObj.Annotations = map[string]string{}
150
}
0 commit comments