diff --git a/cloudevents-server/config.go b/cloudevents-server/config.go deleted file mode 100644 index 59b0745..0000000 --- a/cloudevents-server/config.go +++ /dev/null @@ -1,52 +0,0 @@ -package main - -import ( - "context" - "encoding/json" - "fmt" - "log" - "os" - "path/filepath" - - "gopkg.in/yaml.v3" - - "github.com/PingCAP-QE/ee-apps/cloudevents-server/ent" -) - -type config struct { - Store struct { - Driver string `yaml:"driver,omitempty" json:"driver,omitempty"` - DSN string `yaml:"dsn,omitempty" json:"dsn,omitempty"` - } `yaml:"store,omitempty" json:"store,omitempty"` -} - -func (c *config) LoadFromFile(file string) error { - content, err := os.ReadFile(file) - if err != nil { - return fmt.Errorf("Failed to read file: %w", err) - } - - ext := filepath.Ext(file) - switch ext { - case ".yaml", ".yml": - return yaml.Unmarshal(content, c) - case ".json": - return json.Unmarshal(content, c) - default: - return fmt.Errorf("unsupported file format: %s", ext) - } -} - -func newStoreClient(ctx context.Context, cfg config) (*ent.Client, error) { - db, err := ent.Open(cfg.Store.Driver, cfg.Store.DSN) - if err != nil { - return nil, fmt.Errorf("failed opening connection to %s: %w", cfg.Store.Driver, err) - } - - // Run the auto migration tool. - if err := db.Schema.Create(ctx); err != nil { - log.Fatalf("failed creating schema resources: %v", err) - } - - return db, nil -} diff --git a/cloudevents-server/configs/example-config-sqlite3.yaml b/cloudevents-server/configs/example-config-sqlite3.yaml index 3b2e28f..d84cceb 100644 --- a/cloudevents-server/configs/example-config-sqlite3.yaml +++ b/cloudevents-server/configs/example-config-sqlite3.yaml @@ -1,3 +1,7 @@ store: driver: sqlite3 dsn: file:ent?mode=memory&cache=shared&_fk=1 +lark: + app_id: cli_12345678 + app_secret: s123456789 + receiver: abc@test.com diff --git a/cloudevents-server/configs/example-config.yaml b/cloudevents-server/configs/example-config.yaml index b6c63a9..d89ff62 100644 --- a/cloudevents-server/configs/example-config.yaml +++ b/cloudevents-server/configs/example-config.yaml @@ -1,3 +1,7 @@ store: driver: mysql dsn: user:password@tcp(localhost:3306)/debug?parseTime=true +lark: + app_id: cli_12345678 + app_secret: s123456789 + receiver: abc@test.com diff --git a/cloudevents-server/go.mod b/cloudevents-server/go.mod index 351c02e..8f11fbd 100644 --- a/cloudevents-server/go.mod +++ b/cloudevents-server/go.mod @@ -7,47 +7,110 @@ require ( github.com/cloudevents/sdk-go/v2 v2.14.0 github.com/gin-gonic/gin v1.9.1 github.com/go-sql-driver/mysql v1.7.1 + github.com/larksuite/oapi-sdk-go/v3 v3.0.34 github.com/mattn/go-sqlite3 v1.14.18 github.com/rs/zerolog v1.31.0 + github.com/tektoncd/pipeline v0.37.2 gopkg.in/yaml.v3 v3.0.1 ) require ( ariga.io/atlas v0.14.1-0.20230918065911-83ad451a4935 // indirect + contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect + contrib.go.opencensus.io/exporter/prometheus v0.4.0 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/agext/levenshtein v1.2.1 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/blendle/zapdriver v1.3.1 // indirect github.com/bytedance/sonic v1.9.1 // indirect + github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/emicklei/go-restful v2.15.0+incompatible // indirect + github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect + github.com/go-kit/log v0.1.0 // indirect + github.com/go-logfmt/logfmt v0.5.0 // indirect + github.com/go-logr/logr v1.2.2 // indirect github.com/go-openapi/inflect v0.19.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.5 // indirect + github.com/go-openapi/swag v0.19.15 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.14.0 // indirect github.com/goccy/go-json v0.10.2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-containerregistry v0.8.1-0.20220216220642-00c59d91847c // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl/v2 v2.13.0 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kelseyhightower/envconfig v1.4.0 // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/leodido/go-urn v1.2.4 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/prometheus/client_golang v1.11.1 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/prometheus/statsd_exporter v0.21.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect github.com/zclconf/go-cty v1.8.0 // indirect - go.uber.org/atomic v1.4.0 // indirect - go.uber.org/multierr v1.1.0 // indirect - go.uber.org/zap v1.10.0 // indirect + go.opencensus.io v0.24.0 // indirect + go.uber.org/atomic v1.9.0 // indirect + go.uber.org/multierr v1.7.0 // indirect + go.uber.org/zap v1.19.1 // indirect golang.org/x/arch v0.3.0 // indirect golang.org/x/crypto v0.9.0 // indirect golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.10.0 // indirect + golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect + golang.org/x/sync v0.1.0 // indirect golang.org/x/sys v0.12.0 // indirect + golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect + golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/api v0.70.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20220303160752-862486edd9cc // indirect + google.golang.org/grpc v1.44.0 // indirect google.golang.org/protobuf v1.30.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + k8s.io/api v0.23.5 // indirect + k8s.io/apimachinery v0.23.5 // indirect + k8s.io/client-go v0.23.5 // indirect + k8s.io/klog/v2 v2.60.1-0.20220317184644-43cc75f9ae89 // indirect + k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf // indirect + k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect + knative.dev/pkg v0.0.0-20220329144915-0a1ec2e0d46c // indirect + sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/cloudevents-server/go.sum b/cloudevents-server/go.sum index 6ed12e3..3916954 100644 --- a/cloudevents-server/go.sum +++ b/cloudevents-server/go.sum @@ -1,33 +1,187 @@ ariga.io/atlas v0.14.1-0.20230918065911-83ad451a4935 h1:JnYs/y8RJ3+MiIUp+3RgyyeO48VHLAZimqiaZYnMKk8= ariga.io/atlas v0.14.1-0.20230918065911-83ad451a4935/go.mod h1:isZrlzJ5cpoCoKFoY9knZug7Lq4pP1cm8g3XciLZ0Pw= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h1:LblfooH1lKOpp1hIhukktmSAxFkqMPFk9KR6iZ0MJNI= +contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= +contrib.go.opencensus.io/exporter/prometheus v0.4.0 h1:0QfIkj9z/iVZgK31D9H9ohjjIDApI2GOPScCKwxedbs= +contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= entgo.io/ent v0.12.5 h1:KREM5E4CSoej4zeGa88Ou/gfturAnpUv0mzAjch1sj4= entgo.io/ent v0.12.5/go.mod h1:Y3JVAjtlIk8xVZYSn3t3mf8xlZIn5SAOXZQxD6kKI+Q= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE= +github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudevents/sdk-go/v2 v2.14.0 h1:Nrob4FwVgi5L4tV9lhjzZcjYqFVyJzsA56CwPaPfv6s= github.com/cloudevents/sdk-go/v2 v2.14.0/go.mod h1:xDmKfzNjM8gBvjaF8ijFjM1VYOVUEeUfapHMUX1T5To= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.15.0+incompatible h1:8KpYO/Xl/ZudZs5RNOEhWMBY4hmzlZhhRd9cu+jrZP4= +github.com/emicklei/go-restful v2.15.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= +github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.2 h1:ahHml/yUpnlb96Rp8HCvtYVPY8ZYpxq3g7UYchIYwbs= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -38,38 +192,166 @@ github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-containerregistry v0.8.1-0.20220216220642-00c59d91847c h1:ymH0IHidsatbqLxYzY3oKW/qYv7m/qBXFXKSbKmRSuM= +github.com/google/go-containerregistry v0.8.1-0.20220216220642-00c59d91847c/go.mod h1:MMbnwuvLeZJRPqhTs8jDWc8xGlOs5YCGx1TSc/qdExk= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc= github.com/hashicorp/hcl/v2 v2.13.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= +github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/larksuite/oapi-sdk-go/v3 v3.0.34 h1:RavwHz6lqe7ypXjcwUfaSUJYIof3R3nVyK8HKWF7wZE= +github.com/larksuite/oapi-sdk-go/v3 v3.0.34/go.mod h1:F4MLXkfdc/7WAJPLy4lJ0R6VqCxKgqWYS1uYY84p3SI= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -77,30 +359,93 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI= github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1 h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= +github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -108,6 +453,8 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/tektoncd/pipeline v0.37.2 h1:JIp410ktvJPkprPqK0sgUGpRlZosy2B0C1jbUTwWd9c= +github.com/tektoncd/pipeline v0.37.2/go.mod h1:ZZOSGj1vCeK/xONQGcxBs+m17NzCXNNOqglCDhOPwjY= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= @@ -116,50 +463,538 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 h1:M73Iuj3xbbb9Uk1DYhzydthsj6oOd6l9bpuFcNoUvTs= +golang.org/x/time v0.0.0-20220224211638-0e9765cccd65/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.8.1-0.20230428195545-5283a0178901 h1:0wxTF6pSjIIhNt7mo9GvjDfzyCOiWhmICgtO/Ah948s= +golang.org/x/tools v0.8.1-0.20230428195545-5283a0178901/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0 h1:67zQnAE0T2rB0A3CwLSas0K+SbVzSxP+zTLkQLexeiw= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220303160752-862486edd9cc h1:fb/ViRpv3ln/LvbqZtTpoOd1YQDNH12gaGZreoSFovE= +google.golang.org/genproto v0.0.0-20220303160752-862486edd9cc/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.23.5 h1:zno3LUiMubxD/V1Zw3ijyKO3wxrhbUF1Ck+VjBvfaoA= +k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= +k8s.io/apimachinery v0.23.5 h1:Va7dwhp8wgkUPWsEXk6XglXWU4IKYLKNlv8VkX7SDM0= +k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= +k8s.io/client-go v0.23.5 h1:zUXHmEuqx0RY4+CsnkOn5l0GU+skkRXKGJrhmE2SLd8= +k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.60.1-0.20220317184644-43cc75f9ae89 h1:bUNlsw5yb353zbKMj8srOr6V2Ajhz1VkTKonP1L8r2o= +k8s.io/klog/v2 v2.60.1-0.20220317184644-43cc75f9ae89/go.mod h1:N3kgBtsFxMb4nQ0eBDgbHEt/dtxBuTkSFQ+7K5OUoz4= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf h1:M9XBsiMslw2lb2ZzglC0TOkBPK5NQi0/noUrdnoFwUg= +k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +knative.dev/pkg v0.0.0-20220329144915-0a1ec2e0d46c h1:PLzCwnuPt+bjwiyYrRrsbmiBWR8a5cIwKtTd3LK1TqU= +knative.dev/pkg v0.0.0-20220329144915-0a1ec2e0d46c/go.mod h1:0A5D5tOLettuVoi5x+0SLGRfrvVemXXtLH247WupPJk= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/cloudevents-server/main.go b/cloudevents-server/main.go index 9679c2c..217106d 100644 --- a/cloudevents-server/main.go +++ b/cloudevents-server/main.go @@ -1,7 +1,6 @@ package main import ( - "context" "flag" "net/http" @@ -10,7 +9,7 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "github.com/PingCAP-QE/ee-apps/cloudevents-server/ent" + "github.com/PingCAP-QE/ee-apps/cloudevents-server/pkg/config" "github.com/PingCAP-QE/ee-apps/cloudevents-server/pkg/events" ) @@ -27,15 +26,10 @@ func main() { flag.Parse() // Load cfg. - var cfg config + cfg := new(config.Config) if err := cfg.LoadFromFile(configFile); err != nil { log.Fatal().Err(err).Msg("load config failed!") } - dbClient, dbErr := newStoreClient(context.Background(), cfg) - if dbErr != nil { - log.Fatal().Err(dbErr).Msg("connect database failed!") - } - defer dbClient.Close() gin.SetMode(ginMode) switch ginMode { @@ -51,17 +45,18 @@ func main() { r := gin.Default() _ = r.SetTrustedProxies(nil) - setRouters(r, dbClient) + setRouters(r, cfg) + log.Info().Str("address", serveAddr).Msg("server started.") if err := http.ListenAndServe(serveAddr, r); err != nil { log.Fatal().Err(err).Send() } } -func setRouters(r gin.IRoutes, dbClient *ent.Client) { +func setRouters(r gin.IRoutes, cfg *config.Config) { r.GET("/", indexHandler) r.GET("/healthz", healthzHandler) - r.POST("/events", eventsHandler(dbClient)) + r.POST("/events", eventsHandler(cfg)) } func indexHandler(c *gin.Context) { @@ -72,19 +67,20 @@ func healthzHandler(c *gin.Context) { c.String(http.StatusOK, "OK") } -func eventsHandler(store *ent.Client) gin.HandlerFunc { +func eventsHandler(cfg *config.Config) gin.HandlerFunc { p, err := cloudevents.NewHTTP() if err != nil { - log.Fatal(). - Err(err). - Msg("Failed to create protocol") + log.Fatal().Err(err).Msg("Failed to create protocol") + } + + handler, err := events.NewEventsHandler(cfg) + if err != nil { + log.Fatal().Err(err).Msg("failed to create cloudevents handler") } - h, err := cloudevents.NewHTTPReceiveHandler(nil, p, events.NewEventsHandler(store)) + h, err := cloudevents.NewHTTPReceiveHandler(nil, p, handler.Handle) if err != nil { - log.Fatal(). - Err(err). - Msg("failed to create handler") + log.Fatal().Err(err).Msg("failed to create handler") } return func(c *gin.Context) { diff --git a/cloudevents-server/pkg/config/config.go b/cloudevents-server/pkg/config/config.go new file mode 100644 index 0000000..37a0036 --- /dev/null +++ b/cloudevents-server/pkg/config/config.go @@ -0,0 +1,44 @@ +package config + +import ( + "encoding/json" + "fmt" + "os" + "path/filepath" + + "gopkg.in/yaml.v3" +) + +type Store struct { + Driver string `yaml:"driver,omitempty" json:"driver,omitempty"` + DSN string `yaml:"dsn,omitempty" json:"dsn,omitempty"` +} + +type Lark struct { + AppID string `yaml:"app_id,omitempty" json:"app_id,omitempty"` + AppSecret string `yaml:"app_secret,omitempty" json:"app_secret,omitempty"` + // TODO: how to get the receiver? + Receiver string `yaml:"receiver,omitempty" json:"receiver,omitempty"` +} + +type Config struct { + Store Store `yaml:"store,omitempty" json:"store,omitempty"` + Lark Lark `yaml:"lark,omitempty" json:"lark,omitempty"` +} + +func (c *Config) LoadFromFile(file string) error { + content, err := os.ReadFile(file) + if err != nil { + return fmt.Errorf("Failed to read file: %w", err) + } + + ext := filepath.Ext(file) + switch ext { + case ".yaml", ".yml": + return yaml.Unmarshal(content, c) + case ".json": + return json.Unmarshal(content, c) + default: + return fmt.Errorf("unsupported file format: %s", ext) + } +} diff --git a/cloudevents-server/pkg/events/custom/tekton/handler.go b/cloudevents-server/pkg/events/custom/tekton/handler.go new file mode 100644 index 0000000..7a8c3f9 --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/handler.go @@ -0,0 +1,75 @@ +package tekton + +import ( + "context" + "net/http" + + "github.com/PingCAP-QE/ee-apps/cloudevents-server/pkg/config" + cloudevents "github.com/cloudevents/sdk-go/v2" + lark "github.com/larksuite/oapi-sdk-go/v3" + "github.com/rs/zerolog/log" + tektoncloudevent "github.com/tektoncd/pipeline/pkg/reconciler/events/cloudevent" +) + +type Handler struct { + LarkClient *lark.Client + RunDetailBaseURL string + Receiver string +} + +func NewHandler(cfg config.Lark) (*Handler, error) { + return &Handler{ + LarkClient: newLarkClient(cfg), + Receiver: cfg.Receiver, + RunDetailBaseURL: "https://do.pigncap.net/tekton", + }, nil +} + +func (h *Handler) SupportEventTypes() []string { + return []string{ + string(tektoncloudevent.PipelineRunFailedEventV1), + string(tektoncloudevent.PipelineRunRunningEventV1), + string(tektoncloudevent.PipelineRunStartedEventV1), + string(tektoncloudevent.PipelineRunSuccessfulEventV1), + string(tektoncloudevent.PipelineRunUnknownEventV1), + string(tektoncloudevent.RunFailedEventV1), + string(tektoncloudevent.RunRunningEventV1), + string(tektoncloudevent.RunStartedEventV1), + string(tektoncloudevent.RunSuccessfulEventV1), + string(tektoncloudevent.TaskRunFailedEventV1), + string(tektoncloudevent.TaskRunRunningEventV1), + string(tektoncloudevent.TaskRunStartedEventV1), + string(tektoncloudevent.TaskRunSuccessfulEventV1), + string(tektoncloudevent.TaskRunUnknownEventV1), + } +} + +func (h *Handler) Handle(event cloudevents.Event) cloudevents.Result { + data := new(tektoncloudevent.TektonCloudEventData) + if err := event.DataAs(&data); err != nil { + return cloudevents.NewHTTPResult(http.StatusBadRequest, err.Error()) + } + + createMsgReq, err := newLarkMessage(h.Receiver, event, h.RunDetailBaseURL) + if err != nil { + log.Error().Err(err).Msg("compose lark message failed") + return cloudevents.NewHTTPResult(http.StatusInternalServerError, "compose lark message failed: %v", err) + } + + resp, err := h.LarkClient.Im.Message.Create(context.Background(), createMsgReq) + if err != nil { + log.Error().Err(err).Msg("send lark message failed") + return cloudevents.NewHTTPResult(http.StatusInternalServerError, "send lark message failed: %v", err) + } + + if resp.Success() { + log.Info(). + Str("request-id", resp.RequestId()). + Str("message-id", *resp.Data.MessageId). + Msg("send lark message successfully.") + return cloudevents.ResultACK + } + + log.Error().Err(resp).Msg("send lark message failed!") + return cloudevents.NewHTTPResult(http.StatusInternalServerError, "send lark message failed!") +} diff --git a/cloudevents-server/pkg/events/custom/tekton/handler_test.go b/cloudevents-server/pkg/events/custom/tekton/handler_test.go new file mode 100644 index 0000000..9e91bff --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/handler_test.go @@ -0,0 +1,86 @@ +package tekton + +import ( + "encoding/json" + "reflect" + "testing" + + cloudevents "github.com/cloudevents/sdk-go/v2" + lark "github.com/larksuite/oapi-sdk-go/v3" + tektoncloudevent "github.com/tektoncd/pipeline/pkg/reconciler/events/cloudevent" + + _ "embed" +) + +// test events. +var ( + //go:embed testdata/event-pipelinerun.failed.json + pipelineRunFailedEventBytes []byte + //go:embed testdata/event-pipelinerun.running.json + pipelineRunRunningEventBytes []byte + //go:embed testdata/event-pipelinerun.started.json + pipelineRunStartedEventBytes []byte + //go:embed testdata/event-pipelinerun.successful.json + pipelineRunSuccessfulEventBytes []byte + //go:embed testdata/event-pipelinerun.unknown.json + pipelineRunUnknownEventBytes []byte + + //go:embed testdata/event-taskrun.failed.json + taskRunFailedEventBytes []byte + //go:embed testdata/event-taskrun.running.json + taskRunRunningEventBytes []byte + //go:embed testdata/event-taskrun.started.json + taskRunStartedEventBytes []byte + //go:embed testdata/event-taskrun.successful.json + taskRunSuccessfulEventBytes []byte + //go:embed testdata/event-taskrun.unknown.json + taskRunUnknownEventBytes []byte +) + +const ( + larkAppID = "" + larkAppSecret = "" + receiver = "@xxx.com" + baseURL = "https://chagne.me.com/" +) + +func TestHandler_Handle(t *testing.T) { + type fields struct { + LarkClient *lark.Client + } + type args struct { + } + tests := []struct { + name tektoncloudevent.TektonEventType + eventJSON []byte + want cloudevents.Result + }{ + {name: tektoncloudevent.PipelineRunFailedEventV1, eventJSON: pipelineRunFailedEventBytes, want: cloudevents.ResultACK}, + {name: tektoncloudevent.PipelineRunRunningEventV1, eventJSON: pipelineRunRunningEventBytes, want: cloudevents.ResultACK}, + {name: tektoncloudevent.PipelineRunStartedEventV1, eventJSON: pipelineRunStartedEventBytes, want: cloudevents.ResultACK}, + {name: tektoncloudevent.PipelineRunSuccessfulEventV1, eventJSON: pipelineRunSuccessfulEventBytes, want: cloudevents.ResultACK}, + {name: tektoncloudevent.TaskRunFailedEventV1, eventJSON: taskRunFailedEventBytes, want: cloudevents.ResultACK}, + {name: tektoncloudevent.TaskRunRunningEventV1, eventJSON: taskRunRunningEventBytes, want: cloudevents.ResultACK}, + {name: tektoncloudevent.TaskRunStartedEventV1, eventJSON: taskRunStartedEventBytes, want: cloudevents.ResultACK}, + {name: tektoncloudevent.TaskRunSuccessfulEventV1, eventJSON: taskRunSuccessfulEventBytes, want: cloudevents.ResultACK}, + {name: tektoncloudevent.TaskRunUnknownEventV1, eventJSON: taskRunUnknownEventBytes, want: cloudevents.ResultACK}, + } + + h := &Handler{ + LarkClient: lark.NewClient(larkAppID, larkAppSecret, lark.WithLogReqAtDebug(true), lark.WithEnableTokenCache(true)), + RunDetailBaseURL: baseURL, + } + for _, tt := range tests { + t.Run(string(tt.name), func(t *testing.T) { + e := cloudevents.NewEvent() + if err := json.Unmarshal(tt.eventJSON, &e); err != nil { + t.Error(err) + return + } + + if got := h.Handle(e); !reflect.DeepEqual(got, tt.want) { + t.Errorf("Handler.Handle() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/cloudevents-server/pkg/events/custom/tekton/lark.go b/cloudevents-server/pkg/events/custom/tekton/lark.go new file mode 100644 index 0000000..1947f6d --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/lark.go @@ -0,0 +1,89 @@ +package tekton + +import ( + "fmt" + "strings" + + cloudevents "github.com/cloudevents/sdk-go/v2" + lark "github.com/larksuite/oapi-sdk-go/v3" + larkcard "github.com/larksuite/oapi-sdk-go/v3/card" + larkim "github.com/larksuite/oapi-sdk-go/v3/service/im/v1" + tektoncloudevent "github.com/tektoncd/pipeline/pkg/reconciler/events/cloudevent" + + "github.com/PingCAP-QE/ee-apps/cloudevents-server/pkg/config" +) + +func newLarkClient(cfg config.Lark) *lark.Client { + return lark.NewClient(cfg.AppID, cfg.AppSecret, lark.WithLogReqAtDebug(true), lark.WithEnableTokenCache(true)) +} + +func newLarkMessage(receiveEmail string, event cloudevents.Event, detailBaseUrl string) (*larkim.CreateMessageReq, error) { + messageCard := newLarkCard(event.Type(), event.Subject(), event.Source(), detailBaseUrl) + messageRawStr, err := messageCard.String() + if err != nil { + return nil, err + } + + req := larkim.NewCreateMessageReqBuilder(). + ReceiveIdType(larkim.ReceiveIdTypeEmail). + Body( + larkim.NewCreateMessageReqBodyBuilder(). + MsgType(larkim.MsgTypeInteractive). + ReceiveId(receiveEmail). + Content(messageRawStr). + Build(), + ). + Build() + + return req, nil +} + +func newLarkCard(etype, subject, source, baseURL string) *larkcard.MessageCard { + title := newLarkTitle(etype, subject) + header := larkcard.NewMessageCardHeader(). + Template(larkCardHeaderTemplates[tektoncloudevent.TektonEventType(etype)]). + Title(larkcard.NewMessageCardPlainText().Content(title)) + + detailLinkAction := larkcard.NewMessageCardAction().Actions([]larkcard.MessageCardActionElement{ + larkcard.NewMessageCardEmbedButton(). + Type(larkcard.MessageCardButtonTypeDefault). + Text(larkcard.NewMessageCardPlainText().Content("View")). + Url(newDetailURL(etype, source, baseURL)), + }) + + return larkcard.NewMessageCard(). + Config(larkcard.NewMessageCardConfig().WideScreenMode(true)). + Header(header). + Elements([]larkcard.MessageCardElement{ + detailLinkAction, + }) +} + +func newLarkTitle(etype, subject string) string { + typeWords := strings.Split(etype, ".") + var runType, runState string + if len(typeWords) >= 5 { + runType = typeWords[3] + runState = typeWords[4] + } + + return fmt.Sprintf("%s [%s] %s is %s ", larkCardHeaderEmojis[tektoncloudevent.TektonEventType(etype)], runType, subject, runState) +} + +// /#/namespaces//s/ +// source: /apis///namespaces/// +// https://tekton.abc.com/tekton/apis/tekton.dev/v1beta1/namespaces/ee-cd/pipelineruns/auto-compose-multi-arch-image-run-g5hqv +// +// "source": "/apis///namespaces/ee-cd//build-package-tikv-tikv-linux-9bn55-build-binaries", +func newDetailURL(etype, source, baseURL string) string { + words := strings.Split(source, "/") + runName := words[len(words)-1] + runType := words[len(words)-2] + runNamespace := words[len(words)-3] + + if runType == "" { + runType = strings.Split(etype, ".")[3] + "s" + } + + return fmt.Sprintf("%s/#/namespaces/%s/%s/%s", baseURL, runNamespace, runType, runName) +} diff --git a/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.failed.json b/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.failed.json new file mode 100644 index 0000000..e2d2dc7 --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.failed.json @@ -0,0 +1,1108 @@ +{ + "specversion": "1.0", + "id": "96d36eac-c627-46cb-8579-344516ddd298", + "source": "/apis///namespaces/ee-cd//build-package-tikv-tikv-linux-9bn55", + "type": "dev.tekton.event.pipelinerun.failed.v1", + "subject": "build-package-tikv-tikv-linux-9bn55", + "datacontenttype": "application/json", + "time": "2023-12-07T06:33:29.91767758Z", + "data": { + "pipelineRun": { + "metadata": { + "name": "build-package-tikv-tikv-linux-9bn55", + "generateName": "build-package-tikv-tikv-linux-", + "namespace": "ee-cd", + "uid": "e4821549-eddb-4c78-a686-519c6f173a06", + "resourceVersion": "2432973114", + "generation": 1, + "creationTimestamp": "2023-12-07T06:28:37Z", + "labels": { + "kustomize.toolkit.fluxcd.io/name": "tekton-configs", + "kustomize.toolkit.fluxcd.io/namespace": "apps", + "tekton.dev/pipeline": "pingcap-build-package", + "triggers.tekton.dev/eventlistener": "trigger-groups-listener", + "triggers.tekton.dev/trigger": "tag-create-tikv-tikv", + "triggers.tekton.dev/triggers-eventid": "266f823d-5a57-4dae-9cf2-729580ed94fe" + }, + "annotations": { + "results.tekton.dev/record": "ee-cd/results/266f823d-5a57-4dae-9cf2-729580ed94fe/records/e4821549-eddb-4c78-a686-519c6f173a06", + "results.tekton.dev/result": "ee-cd/results/266f823d-5a57-4dae-9cf2-729580ed94fe", + "tekton.dev/git-repo": "https://github.com/tikv/tikv.git", + "tekton.dev/git-revision": "v6.5.6", + "tekton.dev/git-status": "true", + "tekton.dev/status-target-url": "https://tekton.abc.com/#/namespaces/{{ .Namespace }}/pipelineruns/{{ .Name }}" + }, + "managedFields": [ + { + "manager": "eventlistenersink", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:28:37Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + ".": {}, + "f:tekton.dev/git-repo": {}, + "f:tekton.dev/git-revision": {}, + "f:tekton.dev/git-status": {}, + "f:tekton.dev/status-target-url": {} + }, + "f:generateName": {}, + "f:labels": { + ".": {}, + "f:triggers.tekton.dev/eventlistener": {}, + "f:triggers.tekton.dev/trigger": {}, + "f:triggers.tekton.dev/triggers-eventid": {} + } + }, + "f:spec": { + ".": {}, + "f:params": {}, + "f:pipelineRef": { + ".": {}, + "f:name": {} + }, + "f:taskRunSpecs": {}, + "f:timeouts": { + ".": {}, + "f:pipeline": {} + }, + "f:workspaces": {} + } + } + }, + { + "manager": "watcher", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:28:37Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + "f:results.tekton.dev/record": {}, + "f:results.tekton.dev/result": {} + } + } + } + }, + { + "manager": "Go-http-client", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:30:22Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:labels": { + "f:kustomize.toolkit.fluxcd.io/name": {}, + "f:kustomize.toolkit.fluxcd.io/namespace": {}, + "f:tekton.dev/pipeline": {} + } + }, + "f:status": { + ".": {}, + "f:conditions": {}, + "f:pipelineSpec": { + ".": {}, + "f:params": {}, + "f:tasks": {}, + "f:workspaces": {} + }, + "f:startTime": {}, + "f:taskRuns": { + ".": {}, + "f:build-package-tikv-tikv-linux-9bn55-build-binaries": { + ".": {}, + "f:pipelineTaskName": {}, + "f:status": { + ".": {}, + "f:conditions": {}, + "f:podName": {}, + "f:startTime": {}, + "f:steps": {}, + "f:taskSpec": { + ".": {}, + "f:description": {}, + "f:params": {}, + "f:results": {}, + "f:steps": {}, + "f:workspaces": {} + } + } + }, + "f:build-package-tikv-tikv-linux-9bn55-checkout": { + ".": {}, + "f:pipelineTaskName": {}, + "f:status": { + ".": {}, + "f:completionTime": {}, + "f:conditions": {}, + "f:podName": {}, + "f:startTime": {}, + "f:steps": {}, + "f:taskResults": {}, + "f:taskSpec": { + ".": {}, + "f:description": {}, + "f:params": {}, + "f:results": {}, + "f:steps": {}, + "f:workspaces": {} + } + } + }, + "f:build-package-tikv-tikv-linux-9bn55-get-release-ver": { + ".": {}, + "f:pipelineTaskName": {}, + "f:status": { + ".": {}, + "f:completionTime": {}, + "f:conditions": {}, + "f:podName": {}, + "f:startTime": {}, + "f:steps": {}, + "f:taskResults": {}, + "f:taskSpec": { + ".": {}, + "f:results": {}, + "f:steps": {}, + "f:workspaces": {} + } + } + } + } + } + } + } + ] + }, + "spec": { + "pipelineRef": { + "name": "pingcap-build-package" + }, + "params": [ + { + "name": "git-url", + "value": "https://github.com/tikv/tikv.git" + }, + { + "name": "git-revision", + "value": "v6.5.6" + }, + { + "name": "git-ref", + "value": "v6.5.6" + }, + { + "name": "component", + "value": "tikv" + }, + { + "name": "os", + "value": "linux" + }, + { + "name": "arch", + "value": "amd64" + }, + { + "name": "binary-builder-iamge", + "value": "ghcr.io/pingcap-qe/cd/builders/tikv:v20231116-e1c4b43" + } + ], + "serviceAccountName": "default", + "timeouts": { + "pipeline": "2h0m0s" + }, + "podTemplate": { + "nodeSelector": { + "enable-ci": "true" + }, + "tolerations": [ + { + "key": "dedicated", + "operator": "Equal", + "value": "test-infra", + "effect": "NoSchedule" + } + ] + }, + "workspaces": [ + { + "name": "dockerconfig", + "secret": { + "secretName": "hub-pingcap-net-ee" + } + }, + { + "name": "source", + "volumeClaimTemplate": { + "metadata": { + "creationTimestamp": null + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "50Gi" + } + }, + "storageClassName": "ceph-block" + }, + "status": {} + } + }, + { + "name": "git-basic-auth", + "secret": { + "secretName": "git-credentials-basic" + } + } + ], + "taskRunSpecs": [ + { + "pipelineTaskName": "build-binaries", + "taskPodTemplate": { + "nodeSelector": { + "kubernetes.io/arch": "amd64" + } + } + }, + { + "pipelineTaskName": "build-images", + "taskPodTemplate": { + "nodeSelector": { + "kubernetes.io/arch": "amd64" + } + } + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "False", + "lastTransitionTime": "2023-12-07T06:33:29Z", + "reason": "Failed", + "message": "Tasks Completed: 3 (Failed: 1, Cancelled 0), Skipped: 1" + } + ], + "startTime": "2023-12-07T06:28:37Z", + "completionTime": "2023-12-07T06:33:29Z", + "taskRuns": { + "build-package-tikv-tikv-linux-9bn55-build-binaries": { + "pipelineTaskName": "build-binaries", + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "False", + "lastTransitionTime": "2023-12-07T06:33:29Z", + "reason": "Failed", + "message": "\"step-build\" exited with code 1 (image: \"ghcr.io/pingcap-qe/cd/builders/tikv@sha256:a6cda05e45e34c8409c6c04b953e317a7ec5e63c1224dc5101d38293964e5463\"); for logs run: kubectl -n ee-cd logs build-package-tikv-tikv-linux-9bn55-build-binaries-pod -c step-build\n" + } + ], + "podName": "build-package-tikv-tikv-linux-9bn55-build-binaries-pod", + "startTime": "2023-12-07T06:30:15Z", + "completionTime": "2023-12-07T06:33:29Z", + "steps": [ + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "startedAt": "2023-12-07T06:30:25Z", + "finishedAt": "2023-12-07T06:30:27Z", + "containerID": "containerd://c15662e5fb7e6b14629ee9b7d47d878c171af259e0422d8e14dc76181ee121ce" + }, + "name": "generate-build-script", + "container": "step-generate-build-script", + "imageID": "ghcr.io/pingcap-qe/cd/utils/release@sha256:a3819b92f2c78836bbe2f734e5ece968ed966717f735531d10fafad8d1f0ff89" + }, + { + "terminated": { + "exitCode": 1, + "reason": "Error", + "startedAt": "2023-12-07T06:33:27Z", + "finishedAt": "2023-12-07T06:33:27Z", + "containerID": "containerd://e0f4269f20acca1d9d25b67bd4148cd4d18af54d65d1e7b97e70788d7774de7c" + }, + "name": "build", + "container": "step-build", + "imageID": "ghcr.io/pingcap-qe/cd/builders/tikv@sha256:a6cda05e45e34c8409c6c04b953e317a7ec5e63c1224dc5101d38293964e5463" + }, + { + "terminated": { + "exitCode": 1, + "reason": "Error", + "startedAt": "2023-12-07T06:33:27Z", + "finishedAt": "2023-12-07T06:33:27Z", + "containerID": "containerd://d661b3cd78be75248e52de53e36b865c40cd37e8348924f429f5c824624ac0b5" + }, + "name": "publish", + "container": "step-publish", + "imageID": "ghcr.io/pingcap-qe/cd/utils/release@sha256:a3819b92f2c78836bbe2f734e5ece968ed966717f735531d10fafad8d1f0ff89" + } + ], + "taskSpec": { + "params": [ + { + "name": "component", + "type": "string" + }, + { + "name": "os", + "type": "string", + "default": "linux" + }, + { + "name": "arch", + "type": "string", + "default": "amd64" + }, + { + "name": "version", + "type": "string", + "description": "the version to releasing." + }, + { + "name": "profile", + "type": "string", + "description": "supports: 'release' or 'debug'.\n", + "default": "release" + }, + { + "name": "git-ref", + "type": "string" + }, + { + "name": "git-sha", + "type": "string" + }, + { + "name": "builder-image", + "type": "string", + "default": "ghcr.io/pingcap-qe/cd/utils/release:5d33328" + }, + { + "name": "release-dir", + "type": "string", + "default": "build" + }, + { + "name": "push", + "type": "string", + "default": "false" + }, + { + "name": "mac-builder-resource", + "type": "string", + "default": "" + } + ], + "description": "Build binaries for the component.", + "steps": [ + { + "name": "generate-build-script", + "image": "ghcr.io/pingcap-qe/cd/utils/release:5d33328", + "resources": {}, + "script": "git clone --depth=1 --branch=main https://github.com/PingCAP-QE/artifacts.git /workspace/artifacts\n\ngit_ref=\"v6.5.6\"\ngit_sha=\"v6.5.6\"\nif [ \"$git_sha\" == \"$git_ref\" ]; then\n git_sha=\"\"\nfi\n\nout_script=\"/workspace/build-package-artifacts.sh\"\n/workspace/artifacts/packages/scripts/gen-package-artifacts-with-config.sh \\\n tikv \\\n linux \\\n amd64 \\\n v6.5.6 \\\n release \\\n $git_ref \\\n \"$git_sha\" \\\n /workspace/artifacts/packages/packages.yaml.tmpl \\\n \"$out_script\"\n\nif [ -f \"$out_script\" ]; then\n cat \"$out_script\"\nfi\n" + }, + { + "name": "build", + "image": "ghcr.io/pingcap-qe/cd/builders/tikv:v20231116-e1c4b43", + "workingDir": "$(workspaces.source.path)", + "resources": {}, + "script": "/workspace/build-package-artifacts.sh -b -a -w \"build\"\n" + }, + { + "name": "publish", + "image": "ghcr.io/pingcap-qe/cd/utils/release:5d33328", + "workingDir": "$(workspaces.source.path)", + "resources": {}, + "script": "script=\"/workspace/build-package-artifacts.sh\"\nif [ ! -f \"$script\" ]; then\n echo \"No build script, skip build.\"\n exit 0\nfi\n\noras version\n\"$script\" -p -w \"build\"\n" + } + ], + "workspaces": [ + { + "name": "source" + }, + { + "name": "dockerconfig", + "description": "Includes a docker `config.json`", + "mountPath": "/root/.docker", + "optional": true + }, + { + "name": "ssh-directory", + "description": "ssh credential for remote building on mac.", + "optional": true + } + ], + "results": [ + { + "name": "package-artifacts", + "type": "string", + "description": "The package artifacts" + } + ] + } + } + }, + "build-package-tikv-tikv-linux-9bn55-checkout": { + "pipelineTaskName": "checkout", + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "True", + "lastTransitionTime": "2023-12-07T06:29:31Z", + "reason": "Succeeded", + "message": "All Steps have completed executing" + } + ], + "podName": "build-package-tikv-tikv-linux-9bn55-checkout-pod", + "startTime": "2023-12-07T06:28:37Z", + "completionTime": "2023-12-07T06:29:31Z", + "steps": [ + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "message": "[{\"key\":\"commit\",\"value\":\"08a6a0f6d6180c01a33b9b3973111d69533269eb\",\"type\":1},{\"key\":\"committer-date\",\"value\":\"1701747528\",\"type\":1},{\"key\":\"url\",\"value\":\"https://github.com/tikv/tikv.git\",\"type\":1}]", + "startedAt": "2023-12-07T06:28:44Z", + "finishedAt": "2023-12-07T06:29:10Z", + "containerID": "containerd://917da65b1b60f27a33c87304448ce90a4cd79a3d3490f8f991bcf1e20d5a6432" + }, + "name": "clone", + "container": "step-clone", + "imageID": "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:c0b0ed1cd81090ce8eecf60b936e9345089d9dfdb6ebdd2fd7b4a0341ef4f2b9" + } + ], + "taskResults": [ + { + "name": "commit", + "type": "string", + "value": "08a6a0f6d6180c01a33b9b3973111d69533269eb" + }, + { + "name": "committer-date", + "type": "string", + "value": "1701747528" + }, + { + "name": "url", + "type": "string", + "value": "https://github.com/tikv/tikv.git" + } + ], + "taskSpec": { + "params": [ + { + "name": "url", + "type": "string", + "description": "Repository URL to clone from." + }, + { + "name": "revision", + "type": "string", + "description": "Revision to checkout. (branch, tag, sha, ref, etc...)", + "default": "" + }, + { + "name": "refspec", + "type": "string", + "description": "Refspec to fetch before checking out revision.", + "default": "" + }, + { + "name": "submodules", + "type": "string", + "description": "Initialize and fetch git submodules.", + "default": "true" + }, + { + "name": "depth", + "type": "string", + "description": "Perform a shallow clone, fetching only the most recent N commits.", + "default": "1" + }, + { + "name": "sslVerify", + "type": "string", + "description": "Set the `http.sslVerify` global git config. Setting this to `false` is not advised unless you are sure that you trust your git remote.", + "default": "true" + }, + { + "name": "crtFileName", + "type": "string", + "description": "file name of mounted crt using ssl-ca-directory workspace. default value is ca-bundle.crt.", + "default": "ca-bundle.crt" + }, + { + "name": "subdirectory", + "type": "string", + "description": "Subdirectory inside the `output` Workspace to clone the repo into.", + "default": "" + }, + { + "name": "sparseCheckoutDirectories", + "type": "string", + "description": "Define the directory patterns to match or exclude when performing a sparse checkout.", + "default": "" + }, + { + "name": "deleteExisting", + "type": "string", + "description": "Clean out the contents of the destination directory if it already exists before cloning.", + "default": "true" + }, + { + "name": "httpProxy", + "type": "string", + "description": "HTTP proxy server for non-SSL requests.", + "default": "" + }, + { + "name": "httpsProxy", + "type": "string", + "description": "HTTPS proxy server for SSL requests.", + "default": "" + }, + { + "name": "noProxy", + "type": "string", + "description": "Opt out of proxying HTTP/HTTPS requests.", + "default": "" + }, + { + "name": "verbose", + "type": "string", + "description": "Log the commands that are executed during `git-clone`'s operation.", + "default": "true" + }, + { + "name": "gitInitImage", + "type": "string", + "description": "The image providing the git-init binary that this Task runs.", + "default": "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.29.0" + }, + { + "name": "userHome", + "type": "string", + "description": "Absolute path to the user's home directory. Set this explicitly if you are running the image as a non-root user or have overridden\nthe gitInitImage param with an image containing custom user configuration.\n", + "default": "/tekton/home" + } + ], + "description": "These Tasks are Git tasks to work with repositories used by other tasks in your Pipeline.\nThe git-clone Task will clone a repo from the provided url into the output Workspace. By default the repo will be cloned into the root of your Workspace. You can clone into a subdirectory by setting this Task's subdirectory param. This Task also supports sparse checkouts. To perform a sparse checkout, pass a list of comma separated directory patterns to this Task's sparseCheckoutDirectories param.", + "steps": [ + { + "name": "clone", + "image": "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.29.0", + "env": [ + { + "name": "HOME", + "value": "/tekton/home" + }, + { + "name": "PARAM_URL", + "value": "https://github.com/tikv/tikv.git" + }, + { + "name": "PARAM_REVISION", + "value": "v6.5.6" + }, + { + "name": "PARAM_REFSPEC", + "value": "+refs/heads/*:refs/remotes/origin/*" + }, + { + "name": "PARAM_SUBMODULES", + "value": "true" + }, + { + "name": "PARAM_DEPTH", + "value": "0" + }, + { + "name": "PARAM_SSL_VERIFY", + "value": "true" + }, + { + "name": "PARAM_CRT_FILENAME", + "value": "ca-bundle.crt" + }, + { + "name": "PARAM_SUBDIRECTORY" + }, + { + "name": "PARAM_DELETE_EXISTING", + "value": "true" + }, + { + "name": "PARAM_HTTP_PROXY" + }, + { + "name": "PARAM_HTTPS_PROXY" + }, + { + "name": "PARAM_NO_PROXY" + }, + { + "name": "PARAM_VERBOSE", + "value": "true" + }, + { + "name": "PARAM_SPARSE_CHECKOUT_DIRECTORIES" + }, + { + "name": "PARAM_USER_HOME", + "value": "/tekton/home" + }, + { + "name": "WORKSPACE_OUTPUT_PATH", + "value": "$(workspaces.output.path)" + }, + { + "name": "WORKSPACE_SSH_DIRECTORY_BOUND", + "value": "$(workspaces.ssh-directory.bound)" + }, + { + "name": "WORKSPACE_SSH_DIRECTORY_PATH", + "value": "$(workspaces.ssh-directory.path)" + }, + { + "name": "WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND", + "value": "$(workspaces.basic-auth.bound)" + }, + { + "name": "WORKSPACE_BASIC_AUTH_DIRECTORY_PATH", + "value": "$(workspaces.basic-auth.path)" + }, + { + "name": "WORKSPACE_SSL_CA_DIRECTORY_BOUND", + "value": "$(workspaces.ssl-ca-directory.bound)" + }, + { + "name": "WORKSPACE_SSL_CA_DIRECTORY_PATH", + "value": "$(workspaces.ssl-ca-directory.path)" + }, + { + "name": "GIT_SSH_COMMAND", + "value": "ssh -o StrictHostKeyChecking=accept-new" + } + ], + "resources": {}, + "script": "#!/usr/bin/env sh\nset -eu\n\nif [ \"${PARAM_VERBOSE}\" = \"true\" ] ; then\n set -x\nfi\n\nif [ \"${WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND}\" = \"true\" ] ; then\n cp \"${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.git-credentials\" \"${PARAM_USER_HOME}/.git-credentials\"\n cp \"${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.gitconfig\" \"${PARAM_USER_HOME}/.gitconfig\"\n chmod 400 \"${PARAM_USER_HOME}/.git-credentials\"\n chmod 400 \"${PARAM_USER_HOME}/.gitconfig\"\nfi\n\nif [ \"${WORKSPACE_SSH_DIRECTORY_BOUND}\" = \"true\" ] ; then\n cp -R \"${WORKSPACE_SSH_DIRECTORY_PATH}\" \"${PARAM_USER_HOME}\"/.ssh\n chmod 700 \"${PARAM_USER_HOME}\"/.ssh\n chmod -R 400 \"${PARAM_USER_HOME}\"/.ssh/*\nfi\n\nif [ \"${WORKSPACE_SSL_CA_DIRECTORY_BOUND}\" = \"true\" ] ; then\n export GIT_SSL_CAPATH=\"${WORKSPACE_SSL_CA_DIRECTORY_PATH}\"\n if [ \"${PARAM_CRT_FILENAME}\" != \"\" ] ; then\n export GIT_SSL_CAINFO=\"${WORKSPACE_SSL_CA_DIRECTORY_PATH}/${PARAM_CRT_FILENAME}\"\n fi\nfi\nCHECKOUT_DIR=\"${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}\"\n\ncleandir() {\n # Delete any existing contents of the repo directory if it exists.\n #\n # We don't just \"rm -rf ${CHECKOUT_DIR}\" because ${CHECKOUT_DIR} might be \"/\"\n # or the root of a mounted volume.\n if [ -d \"${CHECKOUT_DIR}\" ] ; then\n # Delete non-hidden files and directories\n rm -rf \"${CHECKOUT_DIR:?}\"/*\n # Delete files and directories starting with . but excluding ..\n rm -rf \"${CHECKOUT_DIR}\"/.[!.]*\n # Delete files and directories starting with .. plus any other character\n rm -rf \"${CHECKOUT_DIR}\"/..?*\n fi\n}\n\nif [ \"${PARAM_DELETE_EXISTING}\" = \"true\" ] ; then\n cleandir || true\nfi\n\ntest -z \"${PARAM_HTTP_PROXY}\" || export HTTP_PROXY=\"${PARAM_HTTP_PROXY}\"\ntest -z \"${PARAM_HTTPS_PROXY}\" || export HTTPS_PROXY=\"${PARAM_HTTPS_PROXY}\"\ntest -z \"${PARAM_NO_PROXY}\" || export NO_PROXY=\"${PARAM_NO_PROXY}\"\n\ngit config --global --add safe.directory \"${WORKSPACE_OUTPUT_PATH}\"\n/ko-app/git-init \\\n -url=\"${PARAM_URL}\" \\\n -revision=\"${PARAM_REVISION}\" \\\n -refspec=\"${PARAM_REFSPEC}\" \\\n -path=\"${CHECKOUT_DIR}\" \\\n -sslVerify=\"${PARAM_SSL_VERIFY}\" \\\n -submodules=\"${PARAM_SUBMODULES}\" \\\n -depth=\"${PARAM_DEPTH}\" \\\n -sparseCheckoutDirectories=\"${PARAM_SPARSE_CHECKOUT_DIRECTORIES}\"\ncd \"${CHECKOUT_DIR}\"\nRESULT_SHA=\"$(git rev-parse HEAD)\"\nEXIT_CODE=\"$?\"\nif [ \"${EXIT_CODE}\" != 0 ] ; then\n exit \"${EXIT_CODE}\"\nfi\nRESULT_COMMITTER_DATE=\"$(git log -1 --pretty=%ct)\"\nprintf \"%s\" \"${RESULT_COMMITTER_DATE}\" \u003e \"/tekton/results/committer-date\"\nprintf \"%s\" \"${RESULT_SHA}\" \u003e \"/tekton/results/commit\"\nprintf \"%s\" \"${PARAM_URL}\" \u003e \"/tekton/results/url\"\n" + } + ], + "workspaces": [ + { + "name": "output", + "description": "The git repo will be cloned onto the volume backing this Workspace." + }, + { + "name": "ssh-directory", + "description": "A .ssh directory with private key, known_hosts, config, etc. Copied to\nthe user's home before git commands are executed. Used to authenticate\nwith the git remote when performing the clone. Binding a Secret to this\nWorkspace is strongly recommended over other volume types.\n", + "optional": true + }, + { + "name": "basic-auth", + "description": "A Workspace containing a .gitconfig and .git-credentials file. These\nwill be copied to the user's home before any git commands are run. Any\nother files in this Workspace are ignored. It is strongly recommended\nto use ssh-directory over basic-auth whenever possible and to bind a\nSecret to this Workspace over other volume types.\n", + "optional": true + }, + { + "name": "ssl-ca-directory", + "description": "A workspace containing CA certificates, this will be used by Git to\nverify the peer with when fetching or pushing over HTTPS.\n", + "optional": true + } + ], + "results": [ + { + "name": "commit", + "type": "string", + "description": "The precise commit SHA that was fetched by this Task." + }, + { + "name": "url", + "type": "string", + "description": "The precise URL that was fetched by this Task." + }, + { + "name": "committer-date", + "type": "string", + "description": "The epoch timestamp of the commit that was fetched by this Task." + } + ] + } + } + }, + "build-package-tikv-tikv-linux-9bn55-get-release-ver": { + "pipelineTaskName": "get-release-ver", + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "True", + "lastTransitionTime": "2023-12-07T06:30:10Z", + "reason": "Succeeded", + "message": "All Steps have completed executing" + } + ], + "podName": "build-package-tikv-tikv-linux-9bn55-get-release-ver-pod", + "startTime": "2023-12-07T06:29:33Z", + "completionTime": "2023-12-07T06:30:10Z", + "steps": [ + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "message": "[{\"key\":\"version\",\"value\":\"v6.5.6\",\"type\":1}]", + "startedAt": "2023-12-07T06:29:58Z", + "finishedAt": "2023-12-07T06:30:00Z", + "containerID": "containerd://27ad6e4d9dd05d5dedc77d017cf1df3eb51871fcf86b495b4cf4039634b047b8" + }, + "name": "git-describe", + "container": "step-git-describe", + "imageID": "docker.io/alpine/git@sha256:1134fdfca49677f3c33445ede74cd64b55f524ad3cb215fa464492ad281eafc0" + } + ], + "taskResults": [ + { + "name": "version", + "type": "string", + "value": "v6.5.6" + } + ], + "taskSpec": { + "steps": [ + { + "name": "git-describe", + "image": "alpine/git:2.40.1", + "workingDir": "$(workspaces.source.path)", + "resources": {}, + "script": "RESULT_VERSION=\"$(git describe --tags --always --dirty)\"\nprintf \"%s\" \"${RESULT_VERSION}\" \u003e /tekton/results/version\n" + } + ], + "workspaces": [ + { + "name": "source" + } + ], + "results": [ + { + "name": "version", + "type": "string", + "description": "The release version of the git repo" + } + ] + } + } + } + }, + "pipelineSpec": { + "tasks": [ + { + "name": "checkout", + "taskRef": { + "name": "git-clone", + "kind": "Task" + }, + "params": [ + { + "name": "url", + "value": "https://github.com/tikv/tikv.git" + }, + { + "name": "revision", + "value": "v6.5.6" + }, + { + "name": "depth", + "value": "0" + }, + { + "name": "refspec", + "value": "+refs/heads/*:refs/remotes/origin/*" + } + ], + "workspaces": [ + { + "name": "output", + "workspace": "source" + }, + { + "name": "basic-auth", + "workspace": "git-basic-auth" + } + ] + }, + { + "name": "get-release-ver", + "taskSpec": { + "spec": null, + "metadata": {}, + "steps": [ + { + "name": "git-describe", + "image": "alpine/git:2.40.1", + "workingDir": "$(workspaces.source.path)", + "resources": {}, + "script": "RESULT_VERSION=\"$(git describe --tags --always --dirty)\"\nprintf \"%s\" \"${RESULT_VERSION}\" \u003e $(results.version.path)\n" + } + ], + "workspaces": [ + { + "name": "source" + } + ], + "results": [ + { + "name": "version", + "type": "string", + "description": "The release version of the git repo" + } + ] + }, + "runAfter": [ + "checkout" + ], + "workspaces": [ + { + "name": "source", + "workspace": "source" + } + ] + }, + { + "name": "build-binaries", + "taskRef": { + "name": "pingcap-build-binaries", + "kind": "Task" + }, + "params": [ + { + "name": "os", + "value": "linux" + }, + { + "name": "arch", + "value": "amd64" + }, + { + "name": "profile", + "value": "release" + }, + { + "name": "component", + "value": "tikv" + }, + { + "name": "version", + "value": "$(tasks.get-release-ver.results.version)" + }, + { + "name": "git-ref", + "value": "v6.5.6" + }, + { + "name": "git-sha", + "value": "v6.5.6" + }, + { + "name": "builder-image", + "value": "ghcr.io/pingcap-qe/cd/builders/tikv:v20231116-e1c4b43" + }, + { + "name": "release-dir", + "value": "build" + }, + { + "name": "push", + "value": "true" + } + ], + "workspaces": [ + { + "name": "source", + "workspace": "source" + }, + { + "name": "dockerconfig", + "workspace": "dockerconfig" + } + ] + }, + { + "name": "build-images", + "taskRef": { + "name": "pingcap-build-images", + "kind": "Task" + }, + "when": [ + { + "input": "linux", + "operator": "in", + "values": [ + "linux" + ] + }, + { + "input": "true", + "operator": "in", + "values": [ + "true" + ] + } + ], + "runAfter": [ + "build-binaries" + ], + "params": [ + { + "name": "os", + "value": "linux" + }, + { + "name": "arch", + "value": "amd64" + }, + { + "name": "profile", + "value": "release" + }, + { + "name": "component", + "value": "tikv" + }, + { + "name": "version", + "value": "$(tasks.get-release-ver.results.version)" + }, + { + "name": "git-ref", + "value": "v6.5.6" + }, + { + "name": "git-sha", + "value": "v6.5.6" + }, + { + "name": "release-dir", + "value": "build" + }, + { + "name": "build", + "value": "false" + } + ], + "workspaces": [ + { + "name": "source", + "workspace": "source" + }, + { + "name": "dockerconfig", + "workspace": "dockerconfig" + } + ] + } + ], + "params": [ + { + "name": "git-url", + "type": "string" + }, + { + "name": "git-ref", + "type": "string", + "default": "master" + }, + { + "name": "git-revision", + "type": "string", + "default": "master" + }, + { + "name": "component", + "type": "string", + "description": "compoent name, supports:\n- tidb\n- tikv\n- pd\n- tiflash\n- tiflow\n- advanced-statefulset\n\nMay be it is an idea to judge it by git-url, but it maybe \nnot a generic way for forked repositories with custom names.\n" + }, + { + "name": "os", + "type": "string", + "default": "linux" + }, + { + "name": "arch", + "type": "string", + "default": "amd64" + }, + { + "name": "profile", + "type": "string", + "default": "release" + }, + { + "name": "binary-builder-iamge", + "type": "string", + "description": "The image used to build binaries.", + "default": "ghcr.io/pingcap-qe/cd/utils/release:5d33328" + }, + { + "name": "push", + "type": "string", + "default": "true" + } + ], + "workspaces": [ + { + "name": "source", + "description": "The workspace where the git repo will be cloned." + }, + { + "name": "dockerconfig", + "description": "Includes a docker `config.json`" + }, + { + "name": "git-basic-auth", + "description": "secret containing a .gitconfig and .git-credentials file.", + "optional": true + }, + { + "name": "mac-ssh-credentials", + "description": "secret contains ssh private key in `id_rsa` key for login mac", + "optional": true + } + ] + }, + "skippedTasks": [ + { + "name": "build-images", + "reason": "PipelineRun was stopping", + "whenExpressions": [ + { + "input": "linux", + "operator": "in", + "values": [ + "linux" + ] + }, + { + "input": "true", + "operator": "in", + "values": [ + "true" + ] + } + ] + } + ] + } + } + } +} diff --git a/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.running.json b/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.running.json new file mode 100644 index 0000000..16fd516 --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.running.json @@ -0,0 +1,162 @@ +{ + "specversion": "1.0", + "id": "e9f57040-d618-4969-98d8-37064d3c8e51", + "source": "/apis///namespaces/ee-cd//auto-compose-multi-arch-image-run-xb7sr", + "type": "dev.tekton.event.pipelinerun.running.v1", + "subject": "auto-compose-multi-arch-image-run-xb7sr", + "datacontenttype": "application/json", + "time": "2023-12-07T06:20:50.796032455Z", + "data": { + "pipelineRun": { + "metadata": { + "name": "auto-compose-multi-arch-image-run-xb7sr", + "generateName": "auto-compose-multi-arch-image-run-", + "namespace": "ee-cd", + "uid": "1b0e81f9-ccfa-445e-a455-6c12f13646ee", + "resourceVersion": "2432924503", + "generation": 1, + "creationTimestamp": "2023-12-07T06:20:50Z", + "labels": { + "kustomize.toolkit.fluxcd.io/name": "tekton-configs", + "kustomize.toolkit.fluxcd.io/namespace": "apps", + "tekton.dev/pipeline": "auto-compose-multi-arch-image", + "triggers.tekton.dev/eventlistener": "trigger-groups-listener", + "triggers.tekton.dev/trigger": "image-push-on-harbor", + "triggers.tekton.dev/triggers-eventid": "9929c12f-2bd1-42af-b62d-5cfced04364f" + }, + "managedFields": [ + { + "manager": "eventlistenersink", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:20:50Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:generateName": {}, + "f:labels": { + ".": {}, + "f:triggers.tekton.dev/eventlistener": {}, + "f:triggers.tekton.dev/trigger": {}, + "f:triggers.tekton.dev/triggers-eventid": {} + } + }, + "f:spec": { + ".": {}, + "f:params": {}, + "f:pipelineRef": { + ".": {}, + "f:name": {} + }, + "f:workspaces": {} + } + } + } + ] + }, + "spec": { + "pipelineRef": { + "name": "auto-compose-multi-arch-image" + }, + "params": [ + { + "name": "image_url", + "value": "hub.pingcap.net/pingcap/tidb/images/tidb-server:master-83f9209-release_linux_amd64" + }, + { + "name": "tag", + "value": "master-83f9209-release_linux_amd64" + } + ], + "serviceAccountName": "default", + "timeout": "1h0m0s", + "podTemplate": { + "nodeSelector": { + "enable-ci": "true" + }, + "tolerations": [ + { + "key": "dedicated", + "operator": "Equal", + "value": "test-infra", + "effect": "NoSchedule" + } + ] + }, + "workspaces": [ + { + "name": "dockerconfig", + "secret": { + "secretName": "hub-pingcap-net-ee" + } + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "Unknown", + "lastTransitionTime": "2023-12-07T06:20:50Z", + "reason": "Running", + "message": "Tasks Completed: 0 (Failed: 0, Cancelled 0), Incomplete: 1, Skipped: 0" + } + ], + "startTime": "2023-12-07T06:20:50Z", + "taskRuns": { + "auto-compose-multi-arch-image-run-xb7sr-collect-and-push": { + "pipelineTaskName": "collect-and-push", + "status": { + "podName": "" + } + } + }, + "pipelineSpec": { + "tasks": [ + { + "name": "collect-and-push", + "taskRef": { + "name": "multi-arch-image-collect", + "kind": "Task" + }, + "params": [ + { + "name": "image_url", + "value": "hub.pingcap.net/pingcap/tidb/images/tidb-server:master-83f9209-release_linux_amd64" + }, + { + "name": "release_tag_suffix", + "value": "release" + } + ], + "workspaces": [ + { + "name": "dockerconfig", + "workspace": "dockerconfig" + } + ] + } + ], + "params": [ + { + "name": "image_url", + "type": "string", + "description": "The image full url for pull" + }, + { + "name": "tag", + "type": "string", + "description": "The pushed image tag" + } + ], + "workspaces": [ + { + "name": "dockerconfig", + "description": "Includes a docker `config.json`" + } + ] + } + } + } + } +} diff --git a/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.started.json b/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.started.json new file mode 100644 index 0000000..2489f09 --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.started.json @@ -0,0 +1,144 @@ +{ + "specversion": "1.0", + "id": "24d8e932-f66d-4e15-8910-ee52a90e1fb9", + "source": "/apis///namespaces/ee-cd//auto-compose-multi-arch-image-run-xb7sr", + "type": "dev.tekton.event.pipelinerun.started.v1", + "subject": "auto-compose-multi-arch-image-run-xb7sr", + "datacontenttype": "application/json", + "time": "2023-12-07T06:20:50.835767131Z", + "data": { + "pipelineRun": { + "metadata": { + "name": "auto-compose-multi-arch-image-run-xb7sr", + "generateName": "auto-compose-multi-arch-image-run-", + "namespace": "ee-cd", + "uid": "1b0e81f9-ccfa-445e-a455-6c12f13646ee", + "resourceVersion": "2432924510", + "generation": 1, + "creationTimestamp": "2023-12-07T06:20:50Z", + "labels": { + "kustomize.toolkit.fluxcd.io/name": "tekton-configs", + "kustomize.toolkit.fluxcd.io/namespace": "apps", + "tekton.dev/pipeline": "auto-compose-multi-arch-image", + "triggers.tekton.dev/eventlistener": "trigger-groups-listener", + "triggers.tekton.dev/trigger": "image-push-on-harbor", + "triggers.tekton.dev/triggers-eventid": "9929c12f-2bd1-42af-b62d-5cfced04364f" + }, + "annotations": { + "results.tekton.dev/record": "ee-cd/results/9929c12f-2bd1-42af-b62d-5cfced04364f/records/1b0e81f9-ccfa-445e-a455-6c12f13646ee", + "results.tekton.dev/result": "ee-cd/results/9929c12f-2bd1-42af-b62d-5cfced04364f" + }, + "managedFields": [ + { + "manager": "Go-http-client", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:20:50Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:labels": { + "f:kustomize.toolkit.fluxcd.io/name": {}, + "f:kustomize.toolkit.fluxcd.io/namespace": {}, + "f:tekton.dev/pipeline": {} + } + } + } + }, + { + "manager": "eventlistenersink", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:20:50Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:generateName": {}, + "f:labels": { + ".": {}, + "f:triggers.tekton.dev/eventlistener": {}, + "f:triggers.tekton.dev/trigger": {}, + "f:triggers.tekton.dev/triggers-eventid": {} + } + }, + "f:spec": { + ".": {}, + "f:params": {}, + "f:pipelineRef": { + ".": {}, + "f:name": {} + }, + "f:workspaces": {} + } + } + }, + { + "manager": "watcher", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:20:50Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + ".": {}, + "f:results.tekton.dev/record": {}, + "f:results.tekton.dev/result": {} + } + } + } + } + ] + }, + "spec": { + "pipelineRef": { + "name": "auto-compose-multi-arch-image" + }, + "params": [ + { + "name": "image_url", + "value": "hub.pingcap.net/pingcap/tidb/images/tidb-server:master-83f9209-release_linux_amd64" + }, + { + "name": "tag", + "value": "master-83f9209-release_linux_amd64" + } + ], + "serviceAccountName": "default", + "timeout": "1h0m0s", + "podTemplate": { + "nodeSelector": { + "enable-ci": "true" + }, + "tolerations": [ + { + "key": "dedicated", + "operator": "Equal", + "value": "test-infra", + "effect": "NoSchedule" + } + ] + }, + "workspaces": [ + { + "name": "dockerconfig", + "secret": { + "secretName": "hub-pingcap-net-ee" + } + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "Unknown", + "lastTransitionTime": "2023-12-07T06:20:50Z", + "reason": "Started" + } + ], + "startTime": "2023-12-07T06:20:50Z" + } + } + } +} diff --git a/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.successful.json b/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.successful.json new file mode 100644 index 0000000..f031a1f --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.successful.json @@ -0,0 +1,1332 @@ +{ + "specversion": "1.0", + "id": "f813f928-adea-4653-a523-dee1a81dab7e", + "source": "/apis///namespaces/ee-cd//build-package-pingcap-tidb-darwin-g9k4f", + "type": "dev.tekton.event.pipelinerun.successful.v1", + "subject": "build-package-pingcap-tidb-darwin-g9k4f", + "datacontenttype": "application/json", + "time": "2023-12-07T06:30:55.539307083Z", + "data": { + "pipelineRun": { + "metadata": { + "name": "build-package-pingcap-tidb-darwin-g9k4f", + "generateName": "build-package-pingcap-tidb-darwin-", + "namespace": "ee-cd", + "uid": "c011780a-1947-4262-9b1f-4cc9fc78428b", + "resourceVersion": "2432962226", + "generation": 1, + "creationTimestamp": "2023-12-07T06:25:27Z", + "labels": { + "kustomize.toolkit.fluxcd.io/name": "tekton-configs", + "kustomize.toolkit.fluxcd.io/namespace": "apps", + "tekton.dev/pipeline": "pingcap-build-package-darwin", + "triggers.tekton.dev/eventlistener": "trigger-groups-listener", + "triggers.tekton.dev/trigger": "git-push-pingcap-tidb", + "triggers.tekton.dev/triggers-eventid": "225a7ca4-9355-4dd4-8efc-55f26d155954" + }, + "annotations": { + "results.tekton.dev/record": "ee-cd/results/225a7ca4-9355-4dd4-8efc-55f26d155954/records/c011780a-1947-4262-9b1f-4cc9fc78428b", + "results.tekton.dev/result": "ee-cd/results/225a7ca4-9355-4dd4-8efc-55f26d155954", + "tekton.dev/git-repo": "https://github.com/pingcap/tidb.git", + "tekton.dev/git-revision": "be62f754fb4182a544b52b2f58a5f867136e7695", + "tekton.dev/git-status": "true", + "tekton.dev/status-target-url": "https://tekton.abc.com/#/namespaces/{{ .Namespace }}/pipelineruns/{{ .Name }}" + }, + "managedFields": [ + { + "manager": "eventlistenersink", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:25:27Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + ".": {}, + "f:tekton.dev/git-repo": {}, + "f:tekton.dev/git-revision": {}, + "f:tekton.dev/git-status": {}, + "f:tekton.dev/status-target-url": {} + }, + "f:generateName": {}, + "f:labels": { + ".": {}, + "f:triggers.tekton.dev/eventlistener": {}, + "f:triggers.tekton.dev/trigger": {}, + "f:triggers.tekton.dev/triggers-eventid": {} + } + }, + "f:spec": { + ".": {}, + "f:params": {}, + "f:pipelineRef": { + ".": {}, + "f:name": {} + }, + "f:taskRunSpecs": {}, + "f:timeouts": { + ".": {}, + "f:pipeline": {} + }, + "f:workspaces": {} + } + } + }, + { + "manager": "watcher", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:25:31Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + "f:results.tekton.dev/record": {}, + "f:results.tekton.dev/result": {} + } + } + } + }, + { + "manager": "Go-http-client", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:30:25Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:labels": { + "f:kustomize.toolkit.fluxcd.io/name": {}, + "f:kustomize.toolkit.fluxcd.io/namespace": {}, + "f:tekton.dev/pipeline": {} + } + }, + "f:status": { + ".": {}, + "f:conditions": {}, + "f:pipelineSpec": { + ".": {}, + "f:finally": {}, + "f:params": {}, + "f:tasks": {}, + "f:workspaces": {} + }, + "f:startTime": {}, + "f:taskRuns": { + ".": {}, + "f:build-package-pingcap-tidb-darwin-g9k4f-acquire-mac-machine": { + ".": {}, + "f:pipelineTaskName": {}, + "f:status": { + ".": {}, + "f:completionTime": {}, + "f:conditions": {}, + "f:podName": {}, + "f:startTime": {}, + "f:steps": {}, + "f:taskResults": {}, + "f:taskSpec": { + ".": {}, + "f:description": {}, + "f:params": {}, + "f:results": {}, + "f:steps": {} + } + } + }, + "f:build-package-pingcap-tidb-darwin-g9k4f-build-binaries": { + ".": {}, + "f:pipelineTaskName": {}, + "f:status": { + ".": {}, + "f:completionTime": {}, + "f:conditions": {}, + "f:podName": {}, + "f:startTime": {}, + "f:steps": {}, + "f:taskSpec": { + ".": {}, + "f:description": {}, + "f:params": {}, + "f:results": {}, + "f:steps": {}, + "f:workspaces": {} + } + } + }, + "f:build-package-pingcap-tidb-darwin-g9k4f-checkout": { + ".": {}, + "f:pipelineTaskName": {}, + "f:status": { + ".": {}, + "f:completionTime": {}, + "f:conditions": {}, + "f:podName": {}, + "f:startTime": {}, + "f:steps": {}, + "f:taskResults": {}, + "f:taskSpec": { + ".": {}, + "f:description": {}, + "f:params": {}, + "f:results": {}, + "f:steps": {}, + "f:workspaces": {} + } + } + }, + "f:build-package-pingcap-tidb-darwin-g9k4f-get-release-ver": { + ".": {}, + "f:pipelineTaskName": {}, + "f:status": { + ".": {}, + "f:completionTime": {}, + "f:conditions": {}, + "f:podName": {}, + "f:startTime": {}, + "f:steps": {}, + "f:taskResults": {}, + "f:taskSpec": { + ".": {}, + "f:results": {}, + "f:steps": {}, + "f:workspaces": {} + } + } + }, + "f:build-package-pingcap-tidb-darwin-g9k4f-release-mac-machine": { + ".": {}, + "f:pipelineTaskName": {}, + "f:status": { + ".": {}, + "f:conditions": {}, + "f:podName": {}, + "f:startTime": {}, + "f:steps": {}, + "f:taskSpec": { + ".": {}, + "f:description": {}, + "f:params": {}, + "f:steps": {} + } + } + } + } + } + } + } + ] + }, + "spec": { + "pipelineRef": { + "name": "pingcap-build-package-darwin" + }, + "params": [ + { + "name": "git-url", + "value": "https://github.com/pingcap/tidb.git" + }, + { + "name": "git-revision", + "value": "be62f754fb4182a544b52b2f58a5f867136e7695" + }, + { + "name": "git-ref", + "value": "master" + }, + { + "name": "component", + "value": "tidb" + }, + { + "name": "arch", + "value": "arm64" + }, + { + "name": "binary-builder-iamge", + "value": "ghcr.io/pingcap-qe/cd/builders/tidb:v20231115-e1c4b43-go1.21" + } + ], + "serviceAccountName": "default", + "timeouts": { + "pipeline": "1h0m0s" + }, + "podTemplate": { + "nodeSelector": { + "enable-ci": "true" + }, + "tolerations": [ + { + "key": "dedicated", + "operator": "Equal", + "value": "test-infra", + "effect": "NoSchedule" + } + ] + }, + "workspaces": [ + { + "name": "dockerconfig", + "secret": { + "secretName": "hub-pingcap-net-ee" + } + }, + { + "name": "mac-ssh-credentials", + "secret": { + "secretName": "mac-ssh-credentials" + } + }, + { + "name": "source", + "volumeClaimTemplate": { + "metadata": { + "creationTimestamp": null + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "10Gi" + } + }, + "storageClassName": "ceph-block" + }, + "status": {} + } + }, + { + "name": "git-basic-auth", + "secret": { + "secretName": "git-credentials-basic" + } + } + ], + "taskRunSpecs": [ + { + "pipelineTaskName": "acquire-mac-machine", + "taskPodTemplate": { + "nodeSelector": { + "kubernetes.io/arch": "amd64" + } + } + }, + { + "pipelineTaskName": "release-mac-machine", + "taskPodTemplate": { + "nodeSelector": { + "kubernetes.io/arch": "amd64" + } + } + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "True", + "lastTransitionTime": "2023-12-07T06:30:55Z", + "reason": "Succeeded", + "message": "Tasks Completed: 5 (Failed: 0, Cancelled 0), Skipped: 0" + } + ], + "startTime": "2023-12-07T06:25:29Z", + "completionTime": "2023-12-07T06:30:55Z", + "taskRuns": { + "build-package-pingcap-tidb-darwin-g9k4f-acquire-mac-machine": { + "pipelineTaskName": "acquire-mac-machine", + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "True", + "lastTransitionTime": "2023-12-07T06:25:48Z", + "reason": "Succeeded", + "message": "All Steps have completed executing" + } + ], + "podName": "build-package-pingcap-tidb-darwin-g9k4f-acquire-mac-machine-pod", + "startTime": "2023-12-07T06:25:30Z", + "completionTime": "2023-12-07T06:25:48Z", + "steps": [ + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "message": "[{\"key\":\"leased-resource\",\"value\":\"darwin-arm64-1\",\"type\":1}]", + "startedAt": "2023-12-07T06:25:37Z", + "finishedAt": "2023-12-07T06:25:37Z", + "containerID": "containerd://6f5e41e495555c20c2ae80194100a4d1cf032e5dbf7c9c42cffa07d3884994fa" + }, + "name": "boskosctl-acquire", + "container": "step-boskosctl-acquire", + "imageID": "gcr.io/k8s-staging-boskos/boskosctl@sha256:a7fc984732c5dd0b4e0fe0a92e2730fa4b6bddecd0f6f6c7c6b5501abe4ab105" + }, + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "message": "[{\"key\":\"leased-resource\",\"value\":\"darwin-arm64-1\",\"type\":1}]", + "startedAt": "2023-12-07T06:25:37Z", + "finishedAt": "2023-12-07T06:25:38Z", + "containerID": "containerd://a4c26a35381fc513541f6d9e7be2fbe6a26b79fdaad80c59a80c12ec0af7b566" + }, + "name": "create-heartbeat-pod-yaml", + "container": "step-create-heartbeat-pod-yaml", + "imageID": "docker.io/lachlanevenson/k8s-kubectl@sha256:3a5e22a406a109f4f26ec06b5f1f6a66ae0cd0e185bc28499eb7b7a3bbf1fe09" + } + ], + "taskResults": [ + { + "name": "leased-resource", + "type": "string", + "value": "darwin-arm64-1" + } + ], + "taskSpec": { + "params": [ + { + "name": "server-url", + "type": "string", + "description": "The URL of the running boskos server", + "default": "http://boskos.test-pods.svc.cluster.local" + }, + { + "name": "type", + "type": "string", + "description": "The type of resource to request. Resource types are specified in the resource\nConfigMap provided to the Boskos server.\n", + "default": "gke-project" + }, + { + "name": "owner-name", + "type": "string", + "description": "A string that identifies the owner of the leased resource to request." + } + ], + "description": "Acquire a project using Boskos.\n\nThe boskos-acquire Task will request a resource of the specified type from the\nserver-url. If successful, it will start a pod that will run the boskosctl heartbeat\ncommand. When you are done with the resource, release it with boskos-release.\n", + "steps": [ + { + "name": "boskosctl-acquire", + "image": "gcr.io/k8s-staging-boskos/boskosctl@sha256:a7fc984732c5dd0b4e0fe0a92e2730fa4b6bddecd0f6f6c7c6b5501abe4ab105", + "resources": {}, + "script": "RESOURCE=$(boskosctl acquire \\\n --server-url=http://boskos.apps.svc \\\n --owner-name=build-package-pingcap-tidb-darwin-g9k4f \\\n --type=mac-machine-arm64 \\\n --state=free \\\n --target-state=busy)\necho $RESOURCE \u003e /workspace/full-resource-output.json\necho $RESOURCE | jq -rj \".name\" \u003e /tekton/results/leased-resource\n" + }, + { + "name": "create-heartbeat-pod-yaml", + "image": "docker.io/lachlanevenson/k8s-kubectl@sha256:3a5e22a406a109f4f26ec06b5f1f6a66ae0cd0e185bc28499eb7b7a3bbf1fe09", + "resources": {}, + "script": "FULL_RESOURCE_OUTPUT=$(cat /workspace/full-resource-output.json)\nLEASED_RESOURCE=$(cat /tekton/results/leased-resource)\ncat \u003c\u003cEOF | kubectl apply -f -\napiVersion: v1\nkind: Pod\nmetadata:\n name: boskos-heartbeat-$LEASED_RESOURCE\nspec:\n nodeSelector:\n kubernetes.io/arch: amd64\n containers:\n - name: heartbeat\n image: gcr.io/k8s-staging-boskos/boskosctl@sha256:a7fc984732c5dd0b4e0fe0a92e2730fa4b6bddecd0f6f6c7c6b5501abe4ab105\n args:\n - heartbeat\n - --server-url=http://boskos.apps.svc\n - --owner-name=build-package-pingcap-tidb-darwin-g9k4f\n - --resource=$FULL_RESOURCE_OUTPUT\n - --period=5m\nEOF\n" + } + ], + "results": [ + { + "name": "leased-resource", + "type": "string", + "description": "The name of the leased resource" + } + ] + } + } + }, + "build-package-pingcap-tidb-darwin-g9k4f-build-binaries": { + "pipelineTaskName": "build-binaries", + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "True", + "lastTransitionTime": "2023-12-07T06:30:11Z", + "reason": "Succeeded", + "message": "All Steps have completed executing" + } + ], + "podName": "build-package-pingcap-tidb-darwin-g9k4f-build-binaries-pod", + "startTime": "2023-12-07T06:27:03Z", + "completionTime": "2023-12-07T06:30:11Z", + "steps": [ + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "startedAt": "2023-12-07T06:27:27Z", + "finishedAt": "2023-12-07T06:27:28Z", + "containerID": "containerd://ad6ad060e2d1b42c1a5f816e0271a3968d0385dace38e2646aad53ebf5a37d66" + }, + "name": "generate-build-script", + "container": "step-generate-build-script", + "imageID": "ghcr.io/pingcap-qe/cd/utils/release@sha256:a3819b92f2c78836bbe2f734e5ece968ed966717f735531d10fafad8d1f0ff89" + }, + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "startedAt": "2023-12-07T06:27:29Z", + "finishedAt": "2023-12-07T06:27:29Z", + "containerID": "containerd://c14124c747a4208193c984497cf771d954a2b993be2bbd24ed1072a589affd1e" + }, + "name": "prepare-remote-builder", + "container": "step-prepare-remote-builder", + "imageID": "ghcr.io/pingcap-qe/cd/utils/release@sha256:a3819b92f2c78836bbe2f734e5ece968ed966717f735531d10fafad8d1f0ff89" + }, + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "startedAt": "2023-12-07T06:27:29Z", + "finishedAt": "2023-12-07T06:30:00Z", + "containerID": "containerd://eeca8cdb857f192620ddf7b3d14c2e62cdad760b345a901f9b9c9169d4322f87" + }, + "name": "build", + "container": "step-build", + "imageID": "ghcr.io/pingcap-qe/cd/builders/tidb@sha256:328d64b5c5ec48676c32d0a5ce5fed43007cee076181e41fd22760c7c321dc17" + }, + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "startedAt": "2023-12-07T06:30:00Z", + "finishedAt": "2023-12-07T06:30:09Z", + "containerID": "containerd://f4651e41a3c59f67e4b6ff3f477f4aecab3606a7ac9de1ab042d259bcdd197a9" + }, + "name": "publish", + "container": "step-publish", + "imageID": "ghcr.io/pingcap-qe/cd/utils/release@sha256:a3819b92f2c78836bbe2f734e5ece968ed966717f735531d10fafad8d1f0ff89" + } + ], + "taskSpec": { + "params": [ + { + "name": "component", + "type": "string" + }, + { + "name": "os", + "type": "string", + "default": "linux" + }, + { + "name": "arch", + "type": "string", + "default": "amd64" + }, + { + "name": "version", + "type": "string", + "description": "the version to releasing." + }, + { + "name": "profile", + "type": "string", + "description": "supports: 'release' or 'debug'.\n", + "default": "release" + }, + { + "name": "git-ref", + "type": "string" + }, + { + "name": "git-sha", + "type": "string" + }, + { + "name": "builder-image", + "type": "string", + "default": "ghcr.io/pingcap-qe/cd/utils/release:5d33328" + }, + { + "name": "release-dir", + "type": "string", + "default": "build" + }, + { + "name": "push", + "type": "string", + "default": "false" + }, + { + "name": "mac-builder-resource", + "type": "string" + } + ], + "description": "Build binaries for the component.", + "steps": [ + { + "name": "generate-build-script", + "image": "ghcr.io/pingcap-qe/cd/utils/release:5d33328", + "resources": {}, + "script": "git clone --depth=1 --branch=main https://github.com/PingCAP-QE/artifacts.git /workspace/artifacts\n\ngit_ref=\"master\"\ngit_sha=\"be62f754fb4182a544b52b2f58a5f867136e7695\"\nif [ \"$git_sha\" == \"$git_ref\" ]; then\n git_sha=\"\"\nfi\n\nout_script=\"/workspace/build-package-artifacts.sh\"\n/workspace/artifacts/packages/scripts/gen-package-artifacts-with-config.sh \\\n tidb \\\n darwin \\\n arm64 \\\n v7.6.0-alpha-391-gbe62f754fb \\\n release \\\n $git_ref \\\n \"$git_sha\" \\\n /workspace/artifacts/packages/packages.yaml.tmpl \\\n \"$out_script\"\n\nif [ -f \"$out_script\" ]; then\n cat \"$out_script\"\nfi\n" + }, + { + "name": "prepare-remote-builder", + "image": "ghcr.io/pingcap-qe/cd/utils/release:5d33328", + "env": [ + { + "name": "WORKSPACE_SSH_DIRECTORY_BOUND", + "value": "$(workspaces.ssh-directory.bound)" + }, + { + "name": "WORKSPACE_SSH_DIRECTORY_PATH", + "value": "$(workspaces.ssh-directory.path)" + }, + { + "name": "REMOTE_BUILDER_INFO_DIR", + "value": "/workspace/remote-builder" + } + ], + "resources": {}, + "script": "#!/usr/bin/env bash\nset -exo pipefail\n\nif [ \"${WORKSPACE_SSH_DIRECTORY_BOUND}\" != \"true\" ] ; then\n exit 0\nfi\n\nif [ \"darwin\" != \"darwin\" ]; then\n exit 0\nfi\n\n\nif [ ! -f \"${WORKSPACE_SSH_DIRECTORY_PATH}/hosts.yaml\" ]; then\n echo \"No ~/.ssh/hosts.yaml found, we need it to get the address and other insecret configurations.\"\n exit 1\nfi\n\nwhich yq || (echo \"No yq tool found, I need it!\"; exit 1)\nmkdir -p \"$REMOTE_BUILDER_INFO_DIR\"\n\n######### checks and sets #########\nyq '.[\"darwin-arm64-1\"].host' \"${WORKSPACE_SSH_DIRECTORY_PATH}/hosts.yaml\" \u003e \"$REMOTE_BUILDER_INFO_DIR/ssh_host\"\nyq '.[\"darwin-arm64-1\"].config.workspace_dir' \"${WORKSPACE_SSH_DIRECTORY_PATH}/hosts.yaml\" \u003e \"$REMOTE_BUILDER_INFO_DIR/ssh_workspace\"\n# TODO: do more pre-check or pre-set.\n" + }, + { + "name": "build", + "image": "ghcr.io/pingcap-qe/cd/builders/tidb:v20231115-e1c4b43-go1.21", + "workingDir": "$(workspaces.source.path)", + "env": [ + { + "name": "WORKSPACE_SSH_DIRECTORY_BOUND", + "value": "$(workspaces.ssh-directory.bound)" + }, + { + "name": "WORKSPACE_SSH_DIRECTORY_PATH", + "value": "$(workspaces.ssh-directory.path)" + }, + { + "name": "MAC_MACHINE_RES_ID", + "value": "(params.mac-builder-resource)" + }, + { + "name": "REMOTE_BUILDER_INFO_DIR", + "value": "/workspace/remote-builder" + } + ], + "resources": {}, + "script": "#!/usr/bin/env bash\nset -exo pipefail\n\nscript=\"/workspace/build-package-artifacts.sh\"\nif [ ! -f \"$script\" ]; then\n echo \"No build script, skip build.\"\n exit 0\nfi\n\n##### Build mac targets in tekton task (k8s pod) ####\n# 1. Set ssh credentials\nif [ \"${WORKSPACE_SSH_DIRECTORY_BOUND}\" != \"true\" ] ; then\n echo \"❌: No ssh credential volume mounted, it's required!\"\n exit 1\nfi\ncp -R \"${WORKSPACE_SSH_DIRECTORY_PATH}\" ~/.ssh\nchmod 700 ~/.ssh\nchmod -R 400 ~/.ssh/*\nusername=$(cat ~/.ssh/username)\nhost=$(cat \"$REMOTE_BUILDER_INFO_DIR/ssh_host\")\nssh-keyscan -H $host \u003e\u003e ~/.ssh/known_hosts\nworkspace_base_dir=$(cat \"$REMOTE_BUILDER_INFO_DIR/ssh_workspace\")\n\n# 2. login to the remote builder with ssh and then execute the shell.\n# TODO: we need some pre-check scripts: such as get git version...\n\n# 2.1 create a randon workspace dir in the remote host:\nremote_workspace_dir=\"${workspace_base_dir}/$(uuidgen)\"\nssh ${username}@${host} \"mkdir -p '$remote_workspace_dir'\"\n\n# 2.2 copy the build shell to the remote host by ssh.\nscp \"\"$script\"\" ${username}@${host}:\"$remote_workspace_dir/\"\n\n# 2.3 copy source codes from workspace `source` to the remote host by ssh.\nscp -r $(workspaces.source.path) ${username}@${host}:\"$remote_workspace_dir/\"\nremote_workspace_source_path=\"$remote_workspace_dir/$(basename $(workspaces.source.path))\"\n\n# 2.4 run the shell on the mac host by ssh.\n# 2.4.1 optional get go builder in PATH env var, got the go version(x.y) from the current container with `go version`.\ngo_bin_path=\"\"\nif go version; then\n go_bin_path=\"/usr/local/$(go version | cut -d ' ' -f 3 | cut -d '.' -f -2)/bin\"\nfi\n\n# run remote build\nssh $username@$host -t \"bash -lc '\n PATH=${go_bin_path}:\\$PATH;\n cd \"$remote_workspace_source_path\";\n ${remote_workspace_dir}/build-package-artifacts.sh -b -a -w build\n'\"\n\n# 2.5 copy the artifacts from the mac hosts to the workspace `source`, we need delivery them internal firstly.\nscp -r ${username}@${host}:\"$remote_workspace_source_path/build\" ./\n\n# 3. clean the workspace dir(it will be a random name) on the ssh mac host.\nssh ${username}@${host} \"rm -rf '$remote_workspace_dir'\"\n" + }, + { + "name": "publish", + "image": "ghcr.io/pingcap-qe/cd/utils/release:5d33328", + "workingDir": "$(workspaces.source.path)", + "resources": {}, + "script": "script=\"/workspace/build-package-artifacts.sh\"\nif [ ! -f \"$script\" ]; then\n echo \"No build script, skip build.\"\n exit 0\nfi\n\noras version\n\"$script\" -p -w \"build\"\n" + } + ], + "workspaces": [ + { + "name": "source" + }, + { + "name": "dockerconfig", + "description": "Includes a docker `config.json`", + "mountPath": "/root/.docker", + "optional": true + }, + { + "name": "ssh-directory", + "description": "ssh credential for remote building on mac." + } + ], + "results": [ + { + "name": "package-artifacts", + "type": "string", + "description": "The package artifacts" + } + ] + } + } + }, + "build-package-pingcap-tidb-darwin-g9k4f-checkout": { + "pipelineTaskName": "checkout", + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "True", + "lastTransitionTime": "2023-12-07T06:26:29Z", + "reason": "Succeeded", + "message": "All Steps have completed executing" + } + ], + "podName": "build-package-pingcap-tidb-darwin-g9k4f-checkout-pod", + "startTime": "2023-12-07T06:25:30Z", + "completionTime": "2023-12-07T06:26:29Z", + "steps": [ + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "message": "[{\"key\":\"commit\",\"value\":\"be62f754fb4182a544b52b2f58a5f867136e7695\",\"type\":1},{\"key\":\"committer-date\",\"value\":\"1701930321\",\"type\":1},{\"key\":\"url\",\"value\":\"https://github.com/pingcap/tidb.git\",\"type\":1}]", + "startedAt": "2023-12-07T06:25:39Z", + "finishedAt": "2023-12-07T06:26:29Z", + "containerID": "containerd://0f3de6986b7ffc1ebc3c1a4c09bb3eb08f78c9b65b62787367bfecf41934a59e" + }, + "name": "clone", + "container": "step-clone", + "imageID": "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:c0b0ed1cd81090ce8eecf60b936e9345089d9dfdb6ebdd2fd7b4a0341ef4f2b9" + } + ], + "taskResults": [ + { + "name": "commit", + "type": "string", + "value": "be62f754fb4182a544b52b2f58a5f867136e7695" + }, + { + "name": "committer-date", + "type": "string", + "value": "1701930321" + }, + { + "name": "url", + "type": "string", + "value": "https://github.com/pingcap/tidb.git" + } + ], + "taskSpec": { + "params": [ + { + "name": "url", + "type": "string", + "description": "Repository URL to clone from." + }, + { + "name": "revision", + "type": "string", + "description": "Revision to checkout. (branch, tag, sha, ref, etc...)", + "default": "" + }, + { + "name": "refspec", + "type": "string", + "description": "Refspec to fetch before checking out revision.", + "default": "" + }, + { + "name": "submodules", + "type": "string", + "description": "Initialize and fetch git submodules.", + "default": "true" + }, + { + "name": "depth", + "type": "string", + "description": "Perform a shallow clone, fetching only the most recent N commits.", + "default": "1" + }, + { + "name": "sslVerify", + "type": "string", + "description": "Set the `http.sslVerify` global git config. Setting this to `false` is not advised unless you are sure that you trust your git remote.", + "default": "true" + }, + { + "name": "crtFileName", + "type": "string", + "description": "file name of mounted crt using ssl-ca-directory workspace. default value is ca-bundle.crt.", + "default": "ca-bundle.crt" + }, + { + "name": "subdirectory", + "type": "string", + "description": "Subdirectory inside the `output` Workspace to clone the repo into.", + "default": "" + }, + { + "name": "sparseCheckoutDirectories", + "type": "string", + "description": "Define the directory patterns to match or exclude when performing a sparse checkout.", + "default": "" + }, + { + "name": "deleteExisting", + "type": "string", + "description": "Clean out the contents of the destination directory if it already exists before cloning.", + "default": "true" + }, + { + "name": "httpProxy", + "type": "string", + "description": "HTTP proxy server for non-SSL requests.", + "default": "" + }, + { + "name": "httpsProxy", + "type": "string", + "description": "HTTPS proxy server for SSL requests.", + "default": "" + }, + { + "name": "noProxy", + "type": "string", + "description": "Opt out of proxying HTTP/HTTPS requests.", + "default": "" + }, + { + "name": "verbose", + "type": "string", + "description": "Log the commands that are executed during `git-clone`'s operation.", + "default": "true" + }, + { + "name": "gitInitImage", + "type": "string", + "description": "The image providing the git-init binary that this Task runs.", + "default": "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.29.0" + }, + { + "name": "userHome", + "type": "string", + "description": "Absolute path to the user's home directory. Set this explicitly if you are running the image as a non-root user or have overridden\nthe gitInitImage param with an image containing custom user configuration.\n", + "default": "/tekton/home" + } + ], + "description": "These Tasks are Git tasks to work with repositories used by other tasks in your Pipeline.\nThe git-clone Task will clone a repo from the provided url into the output Workspace. By default the repo will be cloned into the root of your Workspace. You can clone into a subdirectory by setting this Task's subdirectory param. This Task also supports sparse checkouts. To perform a sparse checkout, pass a list of comma separated directory patterns to this Task's sparseCheckoutDirectories param.", + "steps": [ + { + "name": "clone", + "image": "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.29.0", + "env": [ + { + "name": "HOME", + "value": "/tekton/home" + }, + { + "name": "PARAM_URL", + "value": "https://github.com/pingcap/tidb.git" + }, + { + "name": "PARAM_REVISION", + "value": "be62f754fb4182a544b52b2f58a5f867136e7695" + }, + { + "name": "PARAM_REFSPEC", + "value": "+refs/heads/*:refs/remotes/origin/*" + }, + { + "name": "PARAM_SUBMODULES", + "value": "true" + }, + { + "name": "PARAM_DEPTH", + "value": "0" + }, + { + "name": "PARAM_SSL_VERIFY", + "value": "true" + }, + { + "name": "PARAM_CRT_FILENAME", + "value": "ca-bundle.crt" + }, + { + "name": "PARAM_SUBDIRECTORY" + }, + { + "name": "PARAM_DELETE_EXISTING", + "value": "true" + }, + { + "name": "PARAM_HTTP_PROXY" + }, + { + "name": "PARAM_HTTPS_PROXY" + }, + { + "name": "PARAM_NO_PROXY" + }, + { + "name": "PARAM_VERBOSE", + "value": "true" + }, + { + "name": "PARAM_SPARSE_CHECKOUT_DIRECTORIES" + }, + { + "name": "PARAM_USER_HOME", + "value": "/tekton/home" + }, + { + "name": "WORKSPACE_OUTPUT_PATH", + "value": "$(workspaces.output.path)" + }, + { + "name": "WORKSPACE_SSH_DIRECTORY_BOUND", + "value": "$(workspaces.ssh-directory.bound)" + }, + { + "name": "WORKSPACE_SSH_DIRECTORY_PATH", + "value": "$(workspaces.ssh-directory.path)" + }, + { + "name": "WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND", + "value": "$(workspaces.basic-auth.bound)" + }, + { + "name": "WORKSPACE_BASIC_AUTH_DIRECTORY_PATH", + "value": "$(workspaces.basic-auth.path)" + }, + { + "name": "WORKSPACE_SSL_CA_DIRECTORY_BOUND", + "value": "$(workspaces.ssl-ca-directory.bound)" + }, + { + "name": "WORKSPACE_SSL_CA_DIRECTORY_PATH", + "value": "$(workspaces.ssl-ca-directory.path)" + }, + { + "name": "GIT_SSH_COMMAND", + "value": "ssh -o StrictHostKeyChecking=accept-new" + } + ], + "resources": {}, + "script": "#!/usr/bin/env sh\nset -eu\n\nif [ \"${PARAM_VERBOSE}\" = \"true\" ] ; then\n set -x\nfi\n\nif [ \"${WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND}\" = \"true\" ] ; then\n cp \"${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.git-credentials\" \"${PARAM_USER_HOME}/.git-credentials\"\n cp \"${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.gitconfig\" \"${PARAM_USER_HOME}/.gitconfig\"\n chmod 400 \"${PARAM_USER_HOME}/.git-credentials\"\n chmod 400 \"${PARAM_USER_HOME}/.gitconfig\"\nfi\n\nif [ \"${WORKSPACE_SSH_DIRECTORY_BOUND}\" = \"true\" ] ; then\n cp -R \"${WORKSPACE_SSH_DIRECTORY_PATH}\" \"${PARAM_USER_HOME}\"/.ssh\n chmod 700 \"${PARAM_USER_HOME}\"/.ssh\n chmod -R 400 \"${PARAM_USER_HOME}\"/.ssh/*\nfi\n\nif [ \"${WORKSPACE_SSL_CA_DIRECTORY_BOUND}\" = \"true\" ] ; then\n export GIT_SSL_CAPATH=\"${WORKSPACE_SSL_CA_DIRECTORY_PATH}\"\n if [ \"${PARAM_CRT_FILENAME}\" != \"\" ] ; then\n export GIT_SSL_CAINFO=\"${WORKSPACE_SSL_CA_DIRECTORY_PATH}/${PARAM_CRT_FILENAME}\"\n fi\nfi\nCHECKOUT_DIR=\"${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}\"\n\ncleandir() {\n # Delete any existing contents of the repo directory if it exists.\n #\n # We don't just \"rm -rf ${CHECKOUT_DIR}\" because ${CHECKOUT_DIR} might be \"/\"\n # or the root of a mounted volume.\n if [ -d \"${CHECKOUT_DIR}\" ] ; then\n # Delete non-hidden files and directories\n rm -rf \"${CHECKOUT_DIR:?}\"/*\n # Delete files and directories starting with . but excluding ..\n rm -rf \"${CHECKOUT_DIR}\"/.[!.]*\n # Delete files and directories starting with .. plus any other character\n rm -rf \"${CHECKOUT_DIR}\"/..?*\n fi\n}\n\nif [ \"${PARAM_DELETE_EXISTING}\" = \"true\" ] ; then\n cleandir || true\nfi\n\ntest -z \"${PARAM_HTTP_PROXY}\" || export HTTP_PROXY=\"${PARAM_HTTP_PROXY}\"\ntest -z \"${PARAM_HTTPS_PROXY}\" || export HTTPS_PROXY=\"${PARAM_HTTPS_PROXY}\"\ntest -z \"${PARAM_NO_PROXY}\" || export NO_PROXY=\"${PARAM_NO_PROXY}\"\n\ngit config --global --add safe.directory \"${WORKSPACE_OUTPUT_PATH}\"\n/ko-app/git-init \\\n -url=\"${PARAM_URL}\" \\\n -revision=\"${PARAM_REVISION}\" \\\n -refspec=\"${PARAM_REFSPEC}\" \\\n -path=\"${CHECKOUT_DIR}\" \\\n -sslVerify=\"${PARAM_SSL_VERIFY}\" \\\n -submodules=\"${PARAM_SUBMODULES}\" \\\n -depth=\"${PARAM_DEPTH}\" \\\n -sparseCheckoutDirectories=\"${PARAM_SPARSE_CHECKOUT_DIRECTORIES}\"\ncd \"${CHECKOUT_DIR}\"\nRESULT_SHA=\"$(git rev-parse HEAD)\"\nEXIT_CODE=\"$?\"\nif [ \"${EXIT_CODE}\" != 0 ] ; then\n exit \"${EXIT_CODE}\"\nfi\nRESULT_COMMITTER_DATE=\"$(git log -1 --pretty=%ct)\"\nprintf \"%s\" \"${RESULT_COMMITTER_DATE}\" \u003e \"/tekton/results/committer-date\"\nprintf \"%s\" \"${RESULT_SHA}\" \u003e \"/tekton/results/commit\"\nprintf \"%s\" \"${PARAM_URL}\" \u003e \"/tekton/results/url\"\n" + } + ], + "workspaces": [ + { + "name": "output", + "description": "The git repo will be cloned onto the volume backing this Workspace." + }, + { + "name": "ssh-directory", + "description": "A .ssh directory with private key, known_hosts, config, etc. Copied to\nthe user's home before git commands are executed. Used to authenticate\nwith the git remote when performing the clone. Binding a Secret to this\nWorkspace is strongly recommended over other volume types.\n", + "optional": true + }, + { + "name": "basic-auth", + "description": "A Workspace containing a .gitconfig and .git-credentials file. These\nwill be copied to the user's home before any git commands are run. Any\nother files in this Workspace are ignored. It is strongly recommended\nto use ssh-directory over basic-auth whenever possible and to bind a\nSecret to this Workspace over other volume types.\n", + "optional": true + }, + { + "name": "ssl-ca-directory", + "description": "A workspace containing CA certificates, this will be used by Git to\nverify the peer with when fetching or pushing over HTTPS.\n", + "optional": true + } + ], + "results": [ + { + "name": "commit", + "type": "string", + "description": "The precise commit SHA that was fetched by this Task." + }, + { + "name": "url", + "type": "string", + "description": "The precise URL that was fetched by this Task." + }, + { + "name": "committer-date", + "type": "string", + "description": "The epoch timestamp of the commit that was fetched by this Task." + } + ] + } + } + }, + "build-package-pingcap-tidb-darwin-g9k4f-get-release-ver": { + "pipelineTaskName": "get-release-ver", + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "True", + "lastTransitionTime": "2023-12-07T06:27:03Z", + "reason": "Succeeded", + "message": "All Steps have completed executing" + } + ], + "podName": "build-package-pingcap-tidb-darwin-g9k4f-get-release-ver-pod", + "startTime": "2023-12-07T06:26:29Z", + "completionTime": "2023-12-07T06:27:03Z", + "steps": [ + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "message": "[{\"key\":\"version\",\"value\":\"v7.6.0-alpha-391-gbe62f754fb\",\"type\":1}]", + "startedAt": "2023-12-07T06:26:58Z", + "finishedAt": "2023-12-07T06:27:02Z", + "containerID": "containerd://1cff6503e23d0b2eb85c1bd4e75187d2d2d4051c7a5d9927befd5ba4e9e104dd" + }, + "name": "git-describe", + "container": "step-git-describe", + "imageID": "docker.io/alpine/git@sha256:9a2947ae3651a9db60411eabb254fab595ee7fbd37817020ff7e43f0f2c463e3" + } + ], + "taskResults": [ + { + "name": "version", + "type": "string", + "value": "v7.6.0-alpha-391-gbe62f754fb" + } + ], + "taskSpec": { + "steps": [ + { + "name": "git-describe", + "image": "alpine/git:2.40.1", + "workingDir": "$(workspaces.source.path)", + "resources": {}, + "script": "RESULT_VERSION=\"$(git describe --tags --always --dirty)\"\nprintf \"%s\" \"${RESULT_VERSION}\" \u003e /tekton/results/version\n" + } + ], + "workspaces": [ + { + "name": "source" + } + ], + "results": [ + { + "name": "version", + "type": "string", + "description": "The release version of the git repo" + } + ] + } + } + }, + "build-package-pingcap-tidb-darwin-g9k4f-release-mac-machine": { + "pipelineTaskName": "release-mac-machine", + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "True", + "lastTransitionTime": "2023-12-07T06:30:55Z", + "reason": "Succeeded", + "message": "All Steps have completed executing" + } + ], + "podName": "build-package-pingcap-tidb-darwin-g9k4f-release-mac-machine-pod", + "startTime": "2023-12-07T06:30:15Z", + "completionTime": "2023-12-07T06:30:55Z", + "steps": [ + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "startedAt": "2023-12-07T06:30:21Z", + "finishedAt": "2023-12-07T06:30:21Z", + "containerID": "containerd://0bb42aa6888600eecd12d92b55a9747154c00767b1d9de7a8bf2f63700d59195" + }, + "name": "boskosctl-release", + "container": "step-boskosctl-release", + "imageID": "gcr.io/k8s-staging-boskos/boskosctl@sha256:a7fc984732c5dd0b4e0fe0a92e2730fa4b6bddecd0f6f6c7c6b5501abe4ab105" + }, + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "startedAt": "2023-12-07T06:30:21Z", + "finishedAt": "2023-12-07T06:30:52Z", + "containerID": "containerd://6a8fb4eddc6359844724bf1ee548d9fa5a21053f0fe095737e0c8a1a73902712" + }, + "name": "stop-boskosctl-heartbeat", + "container": "step-stop-boskosctl-heartbeat", + "imageID": "docker.io/lachlanevenson/k8s-kubectl@sha256:3a5e22a406a109f4f26ec06b5f1f6a66ae0cd0e185bc28499eb7b7a3bbf1fe09" + } + ], + "taskSpec": { + "params": [ + { + "name": "server-url", + "type": "string", + "description": "The URL of the running boskos server", + "default": "http://boskos.test-pods.svc.cluster.local" + }, + { + "name": "leased-resource", + "type": "string", + "description": "A string that identifies the leased resource to release." + }, + { + "name": "owner-name", + "type": "string", + "description": "A string that identifies the owner of the leased resource to request." + } + ], + "description": "Release a project acquired using Boskos.\n\nThe boskos-release Task will release the specified resource from the boskos instance\nat server-url. It also assumes the resource was obtained via boskos-acquire and so\nterminates the heartbeat pod that was created by that Task to keep the resource obtained.\nIt will mark the resource as dirty so that the boskos Janitor will clean it (by deleting\nany state created).\n", + "steps": [ + { + "name": "boskosctl-release", + "image": "gcr.io/k8s-staging-boskos/boskosctl@sha256:a7fc984732c5dd0b4e0fe0a92e2730fa4b6bddecd0f6f6c7c6b5501abe4ab105", + "args": [ + "release", + "--server-url=http://boskos.apps.svc", + "--owner-name=build-package-pingcap-tidb-darwin-g9k4f", + "--name=darwin-arm64-1", + "--target-state=dirty" + ], + "resources": {} + }, + { + "name": "stop-boskosctl-heartbeat", + "image": "docker.io/lachlanevenson/k8s-kubectl@sha256:3a5e22a406a109f4f26ec06b5f1f6a66ae0cd0e185bc28499eb7b7a3bbf1fe09", + "args": [ + "delete", + "pod", + "boskos-heartbeat-darwin-arm64-1" + ], + "resources": {} + } + ] + } + } + } + }, + "pipelineSpec": { + "tasks": [ + { + "name": "checkout", + "taskRef": { + "name": "git-clone", + "kind": "Task" + }, + "retries": 3, + "params": [ + { + "name": "url", + "value": "https://github.com/pingcap/tidb.git" + }, + { + "name": "revision", + "value": "be62f754fb4182a544b52b2f58a5f867136e7695" + }, + { + "name": "depth", + "value": "0" + }, + { + "name": "refspec", + "value": "+refs/heads/*:refs/remotes/origin/*" + } + ], + "workspaces": [ + { + "name": "output", + "workspace": "source" + }, + { + "name": "basic-auth", + "workspace": "git-basic-auth" + } + ] + }, + { + "name": "get-release-ver", + "taskSpec": { + "spec": null, + "metadata": {}, + "steps": [ + { + "name": "git-describe", + "image": "alpine/git:2.40.1", + "workingDir": "$(workspaces.source.path)", + "resources": {}, + "script": "RESULT_VERSION=\"$(git describe --tags --always --dirty)\"\nprintf \"%s\" \"${RESULT_VERSION}\" \u003e $(results.version.path)\n" + } + ], + "workspaces": [ + { + "name": "source" + } + ], + "results": [ + { + "name": "version", + "type": "string", + "description": "The release version of the git repo" + } + ] + }, + "runAfter": [ + "checkout" + ], + "workspaces": [ + { + "name": "source", + "workspace": "source" + } + ] + }, + { + "name": "acquire-mac-machine", + "taskRef": { + "name": "boskos-acquire", + "kind": "Task" + }, + "retries": 5, + "params": [ + { + "name": "server-url", + "value": "http://boskos.apps.svc" + }, + { + "name": "type", + "value": "mac-machine-arm64" + }, + { + "name": "owner-name", + "value": "build-package-pingcap-tidb-darwin-g9k4f" + } + ] + }, + { + "name": "build-binaries", + "taskRef": { + "name": "pingcap-build-binaries-darwin", + "kind": "Task" + }, + "params": [ + { + "name": "os", + "value": "darwin" + }, + { + "name": "arch", + "value": "arm64" + }, + { + "name": "profile", + "value": "release" + }, + { + "name": "component", + "value": "tidb" + }, + { + "name": "version", + "value": "$(tasks.get-release-ver.results.version)" + }, + { + "name": "git-ref", + "value": "master" + }, + { + "name": "git-sha", + "value": "be62f754fb4182a544b52b2f58a5f867136e7695" + }, + { + "name": "builder-image", + "value": "ghcr.io/pingcap-qe/cd/builders/tidb:v20231115-e1c4b43-go1.21" + }, + { + "name": "release-dir", + "value": "build" + }, + { + "name": "push", + "value": "true" + }, + { + "name": "mac-builder-resource", + "value": "$(tasks.acquire-mac-machine.results.leased-resource)" + } + ], + "workspaces": [ + { + "name": "source", + "workspace": "source" + }, + { + "name": "dockerconfig", + "workspace": "dockerconfig" + }, + { + "name": "ssh-directory", + "workspace": "mac-ssh-credentials" + } + ] + } + ], + "params": [ + { + "name": "git-url", + "type": "string" + }, + { + "name": "git-ref", + "type": "string", + "default": "master" + }, + { + "name": "git-revision", + "type": "string", + "default": "master" + }, + { + "name": "component", + "type": "string", + "description": "compoent name, supports:\n- tidb\n- tikv\n- pd\n- tiflash\n- tiflow\n- advanced-statefulset\n\nMay be it is an idea to judge it by git-url, but it maybe \nnot a generic way for forked repositories with custom names.\n" + }, + { + "name": "arch", + "type": "string", + "default": "amd64" + }, + { + "name": "profile", + "type": "string", + "default": "release" + }, + { + "name": "binary-builder-iamge", + "type": "string", + "description": "The image used to build binaries.", + "default": "ghcr.io/pingcap-qe/cd/utils/release:5d33328" + }, + { + "name": "push", + "type": "string", + "default": "true" + } + ], + "workspaces": [ + { + "name": "source", + "description": "The workspace where the git repo will be cloned." + }, + { + "name": "dockerconfig", + "description": "Includes a docker `config.json`" + }, + { + "name": "git-basic-auth", + "description": "secret containing a .gitconfig and .git-credentials file.", + "optional": true + }, + { + "name": "mac-ssh-credentials", + "description": "secret contains ssh private key in `id_rsa` key for login mac" + } + ], + "finally": [ + { + "name": "release-mac-machine", + "taskRef": { + "name": "boskos-release", + "kind": "Task" + }, + "params": [ + { + "name": "server-url", + "value": "http://boskos.apps.svc" + }, + { + "name": "leased-resource", + "value": "$(tasks.acquire-mac-machine.results.leased-resource)" + }, + { + "name": "owner-name", + "value": "build-package-pingcap-tidb-darwin-g9k4f" + } + ] + } + ] + } + } + } + } +} diff --git a/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.unknown.json b/cloudevents-server/pkg/events/custom/tekton/testdata/event-pipelinerun.unknown.json new file mode 100644 index 0000000..e69de29 diff --git a/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.failed.json b/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.failed.json new file mode 100644 index 0000000..3a4a83a --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.failed.json @@ -0,0 +1,373 @@ +{ + "specversion": "1.0", + "id": "7c799f3b-af55-4006-8ac6-b63b15d7ec18", + "source": "/apis///namespaces/ee-cd//build-package-tikv-tikv-linux-9bn55-build-binaries", + "type": "dev.tekton.event.taskrun.failed.v1", + "subject": "build-package-tikv-tikv-linux-9bn55-build-binaries", + "datacontenttype": "application/json", + "time": "2023-12-07T06:33:29.885017352Z", + "data": { + "taskRun": { + "metadata": { + "name": "build-package-tikv-tikv-linux-9bn55-build-binaries", + "namespace": "ee-cd", + "uid": "3e51f558-f6c4-4edb-9500-d6565d372649", + "resourceVersion": "2432973111", + "generation": 1, + "creationTimestamp": "2023-12-07T06:30:14Z", + "labels": { + "app.kubernetes.io/managed-by": "tekton-pipelines", + "app.kubernetes.io/version": "0.1", + "kustomize.toolkit.fluxcd.io/name": "tekton-configs", + "kustomize.toolkit.fluxcd.io/namespace": "apps", + "tekton.dev/memberOf": "tasks", + "tekton.dev/pipeline": "pingcap-build-package", + "tekton.dev/pipelineRun": "build-package-tikv-tikv-linux-9bn55", + "tekton.dev/pipelineTask": "build-binaries", + "tekton.dev/task": "pingcap-build-binaries", + "triggers.tekton.dev/eventlistener": "trigger-groups-listener", + "triggers.tekton.dev/trigger": "tag-create-tikv-tikv", + "triggers.tekton.dev/triggers-eventid": "266f823d-5a57-4dae-9cf2-729580ed94fe" + }, + "annotations": { + "pipeline.tekton.dev/release": "19940f2", + "results.tekton.dev/record": "ee-cd/results/266f823d-5a57-4dae-9cf2-729580ed94fe/records/e4821549-eddb-4c78-a686-519c6f173a06", + "results.tekton.dev/result": "ee-cd/results/266f823d-5a57-4dae-9cf2-729580ed94fe", + "tekton.dev/git-repo": "https://github.com/tikv/tikv.git", + "tekton.dev/git-revision": "v6.5.6", + "tekton.dev/git-status": "true", + "tekton.dev/platforms": "linux/amd64", + "tekton.dev/status-target-url": "https://tekton.abc.com/#/namespaces/{{ .Namespace }}/pipelineruns/{{ .Name }}" + }, + "ownerReferences": [ + { + "apiVersion": "tekton.dev/v1beta1", + "kind": "PipelineRun", + "name": "build-package-tikv-tikv-linux-9bn55", + "uid": "e4821549-eddb-4c78-a686-519c6f173a06", + "controller": true, + "blockOwnerDeletion": true + } + ], + "managedFields": [ + { + "manager": "Go-http-client", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:30:22Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + ".": {}, + "f:pipeline.tekton.dev/release": {}, + "f:results.tekton.dev/record": {}, + "f:results.tekton.dev/result": {}, + "f:tekton.dev/git-repo": {}, + "f:tekton.dev/git-revision": {}, + "f:tekton.dev/git-status": {}, + "f:tekton.dev/platforms": {}, + "f:tekton.dev/status-target-url": {} + }, + "f:labels": { + ".": {}, + "f:app.kubernetes.io/version": {}, + "f:kustomize.toolkit.fluxcd.io/name": {}, + "f:kustomize.toolkit.fluxcd.io/namespace": {}, + "f:tekton.dev/memberOf": {}, + "f:tekton.dev/pipeline": {}, + "f:tekton.dev/pipelineRun": {}, + "f:tekton.dev/pipelineTask": {}, + "f:tekton.dev/task": {}, + "f:triggers.tekton.dev/eventlistener": {}, + "f:triggers.tekton.dev/trigger": {}, + "f:triggers.tekton.dev/triggers-eventid": {} + }, + "f:ownerReferences": { + ".": {}, + "k:{\"uid\":\"e4821549-eddb-4c78-a686-519c6f173a06\"}": { + ".": {}, + "f:apiVersion": {}, + "f:blockOwnerDeletion": {}, + "f:controller": {}, + "f:kind": {}, + "f:name": {}, + "f:uid": {} + } + } + }, + "f:spec": { + ".": {}, + "f:params": {}, + "f:podTemplate": { + ".": {}, + "f:nodeSelector": { + ".": {}, + "f:kubernetes.io/arch": {} + } + }, + "f:resources": {}, + "f:serviceAccountName": {}, + "f:taskRef": { + ".": {}, + "f:kind": {}, + "f:name": {} + }, + "f:timeout": {}, + "f:workspaces": {} + }, + "f:status": { + ".": {}, + "f:conditions": {}, + "f:podName": {}, + "f:startTime": {}, + "f:steps": {}, + "f:taskSpec": { + ".": {}, + "f:description": {}, + "f:params": {}, + "f:results": {}, + "f:steps": {}, + "f:workspaces": {} + } + } + } + } + ] + }, + "spec": { + "params": [ + { + "name": "os", + "value": "linux" + }, + { + "name": "arch", + "value": "amd64" + }, + { + "name": "profile", + "value": "release" + }, + { + "name": "component", + "value": "tikv" + }, + { + "name": "version", + "value": "v6.5.6" + }, + { + "name": "git-ref", + "value": "v6.5.6" + }, + { + "name": "git-sha", + "value": "v6.5.6" + }, + { + "name": "builder-image", + "value": "ghcr.io/pingcap-qe/cd/builders/tikv:v20231116-e1c4b43" + }, + { + "name": "release-dir", + "value": "build" + }, + { + "name": "push", + "value": "true" + } + ], + "resources": {}, + "serviceAccountName": "default", + "taskRef": { + "name": "pingcap-build-binaries", + "kind": "Task" + }, + "timeout": "1h58m22.827501242s", + "podTemplate": { + "nodeSelector": { + "kubernetes.io/arch": "amd64" + }, + "tolerations": [ + { + "key": "dedicated", + "operator": "Equal", + "value": "test-infra", + "effect": "NoSchedule" + } + ] + }, + "workspaces": [ + { + "name": "source", + "persistentVolumeClaim": { + "claimName": "pvc-78509dfaf5" + } + }, + { + "name": "dockerconfig", + "secret": { + "secretName": "hub-pingcap-net-ee" + } + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "False", + "lastTransitionTime": "2023-12-07T06:33:29Z", + "reason": "Failed", + "message": "\"step-build\" exited with code 1 (image: \"ghcr.io/pingcap-qe/cd/builders/tikv@sha256:a6cda05e45e34c8409c6c04b953e317a7ec5e63c1224dc5101d38293964e5463\"); for logs run: kubectl -n ee-cd logs build-package-tikv-tikv-linux-9bn55-build-binaries-pod -c step-build\n" + } + ], + "podName": "build-package-tikv-tikv-linux-9bn55-build-binaries-pod", + "startTime": "2023-12-07T06:30:15Z", + "completionTime": "2023-12-07T06:33:29Z", + "steps": [ + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "startedAt": "2023-12-07T06:30:25Z", + "finishedAt": "2023-12-07T06:30:27Z", + "containerID": "containerd://c15662e5fb7e6b14629ee9b7d47d878c171af259e0422d8e14dc76181ee121ce" + }, + "name": "generate-build-script", + "container": "step-generate-build-script", + "imageID": "ghcr.io/pingcap-qe/cd/utils/release@sha256:a3819b92f2c78836bbe2f734e5ece968ed966717f735531d10fafad8d1f0ff89" + }, + { + "terminated": { + "exitCode": 1, + "reason": "Error", + "startedAt": "2023-12-07T06:33:27Z", + "finishedAt": "2023-12-07T06:33:27Z", + "containerID": "containerd://e0f4269f20acca1d9d25b67bd4148cd4d18af54d65d1e7b97e70788d7774de7c" + }, + "name": "build", + "container": "step-build", + "imageID": "ghcr.io/pingcap-qe/cd/builders/tikv@sha256:a6cda05e45e34c8409c6c04b953e317a7ec5e63c1224dc5101d38293964e5463" + }, + { + "terminated": { + "exitCode": 1, + "reason": "Error", + "startedAt": "2023-12-07T06:33:27Z", + "finishedAt": "2023-12-07T06:33:27Z", + "containerID": "containerd://d661b3cd78be75248e52de53e36b865c40cd37e8348924f429f5c824624ac0b5" + }, + "name": "publish", + "container": "step-publish", + "imageID": "ghcr.io/pingcap-qe/cd/utils/release@sha256:a3819b92f2c78836bbe2f734e5ece968ed966717f735531d10fafad8d1f0ff89" + } + ], + "taskSpec": { + "params": [ + { + "name": "component", + "type": "string" + }, + { + "name": "os", + "type": "string", + "default": "linux" + }, + { + "name": "arch", + "type": "string", + "default": "amd64" + }, + { + "name": "version", + "type": "string", + "description": "the version to releasing." + }, + { + "name": "profile", + "type": "string", + "description": "supports: 'release' or 'debug'.\n", + "default": "release" + }, + { + "name": "git-ref", + "type": "string" + }, + { + "name": "git-sha", + "type": "string" + }, + { + "name": "builder-image", + "type": "string", + "default": "ghcr.io/pingcap-qe/cd/utils/release:5d33328" + }, + { + "name": "release-dir", + "type": "string", + "default": "build" + }, + { + "name": "push", + "type": "string", + "default": "false" + }, + { + "name": "mac-builder-resource", + "type": "string", + "default": "" + } + ], + "description": "Build binaries for the component.", + "steps": [ + { + "name": "generate-build-script", + "image": "ghcr.io/pingcap-qe/cd/utils/release:5d33328", + "resources": {}, + "script": "git clone --depth=1 --branch=main https://github.com/PingCAP-QE/artifacts.git /workspace/artifacts\n\ngit_ref=\"v6.5.6\"\ngit_sha=\"v6.5.6\"\nif [ \"$git_sha\" == \"$git_ref\" ]; then\n git_sha=\"\"\nfi\n\nout_script=\"/workspace/build-package-artifacts.sh\"\n/workspace/artifacts/packages/scripts/gen-package-artifacts-with-config.sh \\\n tikv \\\n linux \\\n amd64 \\\n v6.5.6 \\\n release \\\n $git_ref \\\n \"$git_sha\" \\\n /workspace/artifacts/packages/packages.yaml.tmpl \\\n \"$out_script\"\n\nif [ -f \"$out_script\" ]; then\n cat \"$out_script\"\nfi\n" + }, + { + "name": "build", + "image": "ghcr.io/pingcap-qe/cd/builders/tikv:v20231116-e1c4b43", + "workingDir": "$(workspaces.source.path)", + "resources": {}, + "script": "/workspace/build-package-artifacts.sh -b -a -w \"build\"\n" + }, + { + "name": "publish", + "image": "ghcr.io/pingcap-qe/cd/utils/release:5d33328", + "workingDir": "$(workspaces.source.path)", + "resources": {}, + "script": "script=\"/workspace/build-package-artifacts.sh\"\nif [ ! -f \"$script\" ]; then\n echo \"No build script, skip build.\"\n exit 0\nfi\n\noras version\n\"$script\" -p -w \"build\"\n" + } + ], + "workspaces": [ + { + "name": "source" + }, + { + "name": "dockerconfig", + "description": "Includes a docker `config.json`", + "mountPath": "/root/.docker", + "optional": true + }, + { + "name": "ssh-directory", + "description": "ssh credential for remote building on mac.", + "optional": true + } + ], + "results": [ + { + "name": "package-artifacts", + "type": "string", + "description": "The package artifacts" + } + ] + } + } + } + } +} diff --git a/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.running.json b/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.running.json new file mode 100644 index 0000000..a546f67 --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.running.json @@ -0,0 +1,324 @@ +{ + "specversion": "1.0", + "id": "cbde4606-4eb1-4ece-bf7c-7b268ffa31b8", + "source": "/apis///namespaces/ee-cd//build-package-pingcap-tidb-linux-2hwws-build-images-6tm9r", + "type": "dev.tekton.event.taskrun.running.v1", + "subject": "build-package-pingcap-tidb-linux-2hwws-build-images-6tm9r", + "datacontenttype": "application/json", + "time": "2023-12-07T06:20:22.758579506Z", + "data": { + "taskRun": { + "metadata": { + "name": "build-package-pingcap-tidb-linux-2hwws-build-images-6tm9r", + "generateName": "build-package-pingcap-tidb-linux-2hwws-build-images-", + "namespace": "ee-cd", + "uid": "2ef9fbb5-3290-4dac-9e09-e80e2ae38534", + "resourceVersion": "2432922519", + "generation": 1, + "creationTimestamp": "2023-12-07T06:20:01Z", + "labels": { + "app.kubernetes.io/managed-by": "tekton-pipelines", + "app.kubernetes.io/version": "0.1", + "kustomize.toolkit.fluxcd.io/name": "tekton-configs", + "kustomize.toolkit.fluxcd.io/namespace": "apps", + "tekton.dev/task": "pingcap-build-images" + }, + "annotations": { + "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"tekton.dev/v1beta1\",\"kind\":\"TaskRun\",\"metadata\":{\"annotations\":{},\"generateName\":\"build-package-pingcap-tidb-linux-2hwws-build-images-\",\"namespace\":\"ee-cd\"},\"spec\":{\"params\":[{\"name\":\"os\",\"value\":\"linux\"},{\"name\":\"arch\",\"value\":\"amd64\"},{\"name\":\"profile\",\"value\":\"release\"},{\"name\":\"component\",\"value\":\"tidb\"},{\"name\":\"version\",\"value\":\"v7.6.0-alpha-390-g83f9209925\"},{\"name\":\"git-ref\",\"value\":\"master\"},{\"name\":\"git-sha\",\"value\":\"83f9209925f9183975c3dd2818853ef734f07ce5\"},{\"name\":\"release-dir\",\"value\":\"build\"},{\"name\":\"build\",\"value\":\"false\"}],\"podTemplate\":{\"nodeSelector\":{\"kubernetes.io/arch\":\"amd64\"},\"tolerations\":[{\"effect\":\"NoSchedule\",\"key\":\"dedicated\",\"operator\":\"Equal\",\"value\":\"test-infra\"}]},\"resources\":{},\"serviceAccountName\":\"default\",\"taskRef\":{\"kind\":\"Task\",\"name\":\"pingcap-build-images\"},\"timeout\":\"52m57.744671218s\",\"workspaces\":[{\"name\":\"source\",\"persistentVolumeClaim\":{\"claimName\":\"pvc-3d98a2b3bb\"}},{\"name\":\"dockerconfig\",\"secret\":{\"secretName\":\"hub-pingcap-net-ee\"}}]}}\n", + "pipeline.tekton.dev/release": "19940f2", + "results.tekton.dev/record": "ee-cd/results/2ef9fbb5-3290-4dac-9e09-e80e2ae38534/records/2ef9fbb5-3290-4dac-9e09-e80e2ae38534", + "results.tekton.dev/result": "ee-cd/results/2ef9fbb5-3290-4dac-9e09-e80e2ae38534", + "tekton.dev/platforms": "linux/amd64" + }, + "managedFields": [ + { + "manager": "Go-http-client", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:20:01Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + "f:pipeline.tekton.dev/release": {}, + "f:tekton.dev/platforms": {} + }, + "f:labels": { + "f:app.kubernetes.io/version": {}, + "f:kustomize.toolkit.fluxcd.io/name": {}, + "f:kustomize.toolkit.fluxcd.io/namespace": {}, + "f:tekton.dev/task": {} + } + }, + "f:status": { + ".": {}, + "f:conditions": {}, + "f:podName": {}, + "f:startTime": {}, + "f:steps": {}, + "f:taskSpec": { + ".": {}, + "f:description": {}, + "f:params": {}, + "f:results": {}, + "f:steps": {}, + "f:workspaces": {} + } + } + } + }, + { + "manager": "kubectl", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:20:01Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + ".": {}, + "f:kubectl.kubernetes.io/last-applied-configuration": {} + }, + "f:generateName": {} + }, + "f:spec": { + ".": {}, + "f:params": {}, + "f:podTemplate": { + ".": {}, + "f:nodeSelector": { + ".": {}, + "f:kubernetes.io/arch": {} + }, + "f:tolerations": {} + }, + "f:resources": {}, + "f:serviceAccountName": {}, + "f:taskRef": { + ".": {}, + "f:kind": {}, + "f:name": {} + }, + "f:timeout": {}, + "f:workspaces": {} + } + } + }, + { + "manager": "watcher", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:20:01Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + "f:results.tekton.dev/record": {}, + "f:results.tekton.dev/result": {} + } + } + } + } + ] + }, + "spec": { + "params": [ + { + "name": "os", + "value": "linux" + }, + { + "name": "arch", + "value": "amd64" + }, + { + "name": "profile", + "value": "release" + }, + { + "name": "component", + "value": "tidb" + }, + { + "name": "version", + "value": "v7.6.0-alpha-390-g83f9209925" + }, + { + "name": "git-ref", + "value": "master" + }, + { + "name": "git-sha", + "value": "83f9209925f9183975c3dd2818853ef734f07ce5" + }, + { + "name": "release-dir", + "value": "build" + }, + { + "name": "build", + "value": "false" + } + ], + "resources": {}, + "serviceAccountName": "default", + "taskRef": { + "name": "pingcap-build-images", + "kind": "Task" + }, + "timeout": "52m57.744671218s", + "podTemplate": { + "nodeSelector": { + "kubernetes.io/arch": "amd64" + }, + "tolerations": [ + { + "key": "dedicated", + "operator": "Equal", + "value": "test-infra", + "effect": "NoSchedule" + } + ] + }, + "workspaces": [ + { + "name": "source", + "persistentVolumeClaim": { + "claimName": "pvc-3d98a2b3bb" + } + }, + { + "name": "dockerconfig", + "secret": { + "secretName": "hub-pingcap-net-ee" + } + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "Unknown", + "lastTransitionTime": "2023-12-07T06:20:22Z", + "reason": "Running", + "message": "Not all Steps in the Task have finished executing" + } + ], + "podName": "build-package-pingcap-tidb-linux-2hwws-build-images-6tm9r-pod", + "startTime": "2023-12-07T06:20:01Z", + "steps": [ + { + "running": { + "startedAt": "2023-12-07T06:20:22Z" + }, + "name": "generate", + "container": "step-generate", + "imageID": "ghcr.io/pingcap-qe/cd/utils/release@sha256:a3819b92f2c78836bbe2f734e5ece968ed966717f735531d10fafad8d1f0ff89" + }, + { + "running": { + "startedAt": "2023-12-07T06:20:22Z" + }, + "name": "build-and-publish", + "container": "step-build-and-publish", + "imageID": "gcr.io/kaniko-project/executor@sha256:b6a520e10252cfbb1898cac88d05f4c7c838cf615d1a588ec63a0d415db6c4c0" + } + ], + "taskSpec": { + "params": [ + { + "name": "component", + "type": "string" + }, + { + "name": "os", + "type": "string", + "default": "linux" + }, + { + "name": "arch", + "type": "string", + "default": "amd64" + }, + { + "name": "version", + "type": "string", + "description": "the version to releasing." + }, + { + "name": "profile", + "type": "string", + "description": "supports: 'release' or 'debug'.\n", + "default": "release" + }, + { + "name": "git-ref", + "type": "string" + }, + { + "name": "git-sha", + "type": "string" + }, + { + "name": "release-dir", + "type": "string", + "default": "build" + }, + { + "name": "build", + "type": "string", + "description": "Does it need to build the binaries before packing the images?", + "default": "false" + } + ], + "description": "This task builds images for pingcap components.", + "steps": [ + { + "name": "generate", + "image": "ghcr.io/pingcap-qe/cd/utils/release:5d33328", + "resources": {}, + "script": "git clone --depth=1 --branch=main https://github.com/PingCAP-QE/artifacts.git /workspace/artifacts\n\ngit_ref=\"master\"\ngit_sha=\"83f9209925f9183975c3dd2818853ef734f07ce5\"\nif [ \"$git_sha\" == \"$git_ref\" ]; then\n git_sha=\"\"\nfi\n\nout_script=\"/workspace/build-package-images.sh\"\n/workspace/artifacts/packages/scripts/gen-package-images-with-config.sh \\\n tidb \\\n linux \\\n amd64 \\\n v7.6.0-alpha-390-g83f9209925 \\\n release \\\n $git_ref \\\n \"$git_sha\" \\\n /workspace/artifacts/packages/packages.yaml.tmpl \\\n \"$out_script\"\n\nif [ -f \"$out_script\" ]; then\n cat \"$out_script\"\nfi\n" + }, + { + "name": "build-and-publish", + "image": "gcr.io/kaniko-project/executor:debug", + "workingDir": "$(workspaces.source.path)", + "env": [ + { + "name": "KANIKO_EXECUTOR", + "value": "/kaniko/executor" + } + ], + "resources": {}, + "script": "script=\"/workspace/build-package-images.sh\"\nif [ ! -f \"$script\" ]; then\n echo \"No build script, skip build.\"\n exit 0\nfi\n\n\"$script\" \"build\" \"$(params.tag)\" ${KANIKO_EXECUTOR} \"false\"\n" + } + ], + "workspaces": [ + { + "name": "source" + }, + { + "name": "dockerconfig", + "description": "Includes a docker `config.json`", + "mountPath": "/kaniko/.docker", + "optional": true + } + ], + "results": [ + { + "name": "IMAGE_DIGEST", + "type": "string", + "description": "Digest of the image just built." + }, + { + "name": "IMAGE_URL", + "type": "string", + "description": "URL of the image just built." + } + ] + } + } + } + } +} diff --git a/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.started.json b/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.started.json new file mode 100644 index 0000000..9467c9a --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.started.json @@ -0,0 +1,153 @@ +{ + "specversion": "1.0", + "id": "cc78582f-c4c6-4710-a821-2c4b5ea81b3d", + "source": "/apis///namespaces/ee-cd//build-package-pingcap-tidb-linux-2hwws-build-images-6tm9r", + "type": "dev.tekton.event.taskrun.started.v1", + "subject": "build-package-pingcap-tidb-linux-2hwws-build-images-6tm9r", + "datacontenttype": "application/json", + "time": "2023-12-07T06:20:01.518567259Z", + "data": { + "taskRun": { + "metadata": { + "name": "build-package-pingcap-tidb-linux-2hwws-build-images-6tm9r", + "generateName": "build-package-pingcap-tidb-linux-2hwws-build-images-", + "namespace": "ee-cd", + "uid": "2ef9fbb5-3290-4dac-9e09-e80e2ae38534", + "resourceVersion": "2432921823", + "generation": 1, + "creationTimestamp": "2023-12-07T06:20:01Z", + "labels": { + "app.kubernetes.io/managed-by": "tekton-pipelines" + }, + "annotations": { + "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"tekton.dev/v1beta1\",\"kind\":\"TaskRun\",\"metadata\":{\"annotations\":{},\"generateName\":\"build-package-pingcap-tidb-linux-2hwws-build-images-\",\"namespace\":\"ee-cd\"},\"spec\":{\"params\":[{\"name\":\"os\",\"value\":\"linux\"},{\"name\":\"arch\",\"value\":\"amd64\"},{\"name\":\"profile\",\"value\":\"release\"},{\"name\":\"component\",\"value\":\"tidb\"},{\"name\":\"version\",\"value\":\"v7.6.0-alpha-390-g83f9209925\"},{\"name\":\"git-ref\",\"value\":\"master\"},{\"name\":\"git-sha\",\"value\":\"83f9209925f9183975c3dd2818853ef734f07ce5\"},{\"name\":\"release-dir\",\"value\":\"build\"},{\"name\":\"build\",\"value\":\"false\"}],\"podTemplate\":{\"nodeSelector\":{\"kubernetes.io/arch\":\"amd64\"},\"tolerations\":[{\"effect\":\"NoSchedule\",\"key\":\"dedicated\",\"operator\":\"Equal\",\"value\":\"test-infra\"}]},\"resources\":{},\"serviceAccountName\":\"default\",\"taskRef\":{\"kind\":\"Task\",\"name\":\"pingcap-build-images\"},\"timeout\":\"52m57.744671218s\",\"workspaces\":[{\"name\":\"source\",\"persistentVolumeClaim\":{\"claimName\":\"pvc-3d98a2b3bb\"}},{\"name\":\"dockerconfig\",\"secret\":{\"secretName\":\"hub-pingcap-net-ee\"}}]}}\n" + }, + "managedFields": [ + { + "manager": "kubectl", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:20:01Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + ".": {}, + "f:kubectl.kubernetes.io/last-applied-configuration": {} + }, + "f:generateName": {} + }, + "f:spec": { + ".": {}, + "f:params": {}, + "f:podTemplate": { + ".": {}, + "f:nodeSelector": { + ".": {}, + "f:kubernetes.io/arch": {} + }, + "f:tolerations": {} + }, + "f:resources": {}, + "f:serviceAccountName": {}, + "f:taskRef": { + ".": {}, + "f:kind": {}, + "f:name": {} + }, + "f:timeout": {}, + "f:workspaces": {} + } + } + } + ] + }, + "spec": { + "params": [ + { + "name": "os", + "value": "linux" + }, + { + "name": "arch", + "value": "amd64" + }, + { + "name": "profile", + "value": "release" + }, + { + "name": "component", + "value": "tidb" + }, + { + "name": "version", + "value": "v7.6.0-alpha-390-g83f9209925" + }, + { + "name": "git-ref", + "value": "master" + }, + { + "name": "git-sha", + "value": "83f9209925f9183975c3dd2818853ef734f07ce5" + }, + { + "name": "release-dir", + "value": "build" + }, + { + "name": "build", + "value": "false" + } + ], + "resources": {}, + "serviceAccountName": "default", + "taskRef": { + "name": "pingcap-build-images", + "kind": "Task" + }, + "timeout": "52m57.744671218s", + "podTemplate": { + "nodeSelector": { + "kubernetes.io/arch": "amd64" + }, + "tolerations": [ + { + "key": "dedicated", + "operator": "Equal", + "value": "test-infra", + "effect": "NoSchedule" + } + ] + }, + "workspaces": [ + { + "name": "source", + "persistentVolumeClaim": { + "claimName": "pvc-3d98a2b3bb" + } + }, + { + "name": "dockerconfig", + "secret": { + "secretName": "hub-pingcap-net-ee" + } + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "Unknown", + "lastTransitionTime": "2023-12-07T06:20:01Z", + "reason": "Started" + } + ], + "podName": "", + "startTime": "2023-12-07T06:20:01Z" + } + } + } +} diff --git a/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.successful.json b/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.successful.json new file mode 100644 index 0000000..df1d3d3 --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.successful.json @@ -0,0 +1,267 @@ +{ + "specversion": "1.0", + "id": "cb27f20d-666e-4262-92c3-e8a85fc36ec0", + "source": "/apis///namespaces/ee-cd//auto-compose-multi-arch-image-run-zc8jc-collect-and-push", + "type": "dev.tekton.event.taskrun.successful.v1", + "subject": "auto-compose-multi-arch-image-run-zc8jc-collect-and-push", + "datacontenttype": "application/json", + "time": "2023-12-07T06:34:54.328703526Z", + "data": { + "taskRun": { + "metadata": { + "name": "auto-compose-multi-arch-image-run-zc8jc-collect-and-push", + "namespace": "ee-cd", + "uid": "c11bdd84-9f8b-4043-a934-82886c40fe01", + "resourceVersion": "2432973329", + "generation": 1, + "creationTimestamp": "2023-12-07T06:33:25Z", + "labels": { + "app.kubernetes.io/managed-by": "tekton-pipelines", + "kustomize.toolkit.fluxcd.io/name": "tekton-configs", + "kustomize.toolkit.fluxcd.io/namespace": "apps", + "tekton.dev/memberOf": "tasks", + "tekton.dev/pipeline": "auto-compose-multi-arch-image", + "tekton.dev/pipelineRun": "auto-compose-multi-arch-image-run-zc8jc", + "tekton.dev/pipelineTask": "collect-and-push", + "tekton.dev/task": "multi-arch-image-collect", + "triggers.tekton.dev/eventlistener": "trigger-groups-listener", + "triggers.tekton.dev/trigger": "image-push-on-harbor", + "triggers.tekton.dev/triggers-eventid": "8d56c7dc-5523-49a8-9c86-6ea43d355528" + }, + "annotations": { + "pipeline.tekton.dev/release": "19940f2", + "results.tekton.dev/record": "ee-cd/results/8d56c7dc-5523-49a8-9c86-6ea43d355528/records/c11bdd84-9f8b-4043-a934-82886c40fe01", + "results.tekton.dev/result": "ee-cd/results/8d56c7dc-5523-49a8-9c86-6ea43d355528" + }, + "ownerReferences": [ + { + "apiVersion": "tekton.dev/v1beta1", + "kind": "PipelineRun", + "name": "auto-compose-multi-arch-image-run-zc8jc", + "uid": "efd38cad-80cf-4a7c-b96b-268252881c9a", + "controller": true, + "blockOwnerDeletion": true + } + ], + "managedFields": [ + { + "manager": "Go-http-client", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:33:25Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + ".": {}, + "f:pipeline.tekton.dev/release": {} + }, + "f:labels": { + ".": {}, + "f:kustomize.toolkit.fluxcd.io/name": {}, + "f:kustomize.toolkit.fluxcd.io/namespace": {}, + "f:tekton.dev/memberOf": {}, + "f:tekton.dev/pipeline": {}, + "f:tekton.dev/pipelineRun": {}, + "f:tekton.dev/pipelineTask": {}, + "f:tekton.dev/task": {}, + "f:triggers.tekton.dev/eventlistener": {}, + "f:triggers.tekton.dev/trigger": {}, + "f:triggers.tekton.dev/triggers-eventid": {} + }, + "f:ownerReferences": { + ".": {}, + "k:{\"uid\":\"efd38cad-80cf-4a7c-b96b-268252881c9a\"}": { + ".": {}, + "f:apiVersion": {}, + "f:blockOwnerDeletion": {}, + "f:controller": {}, + "f:kind": {}, + "f:name": {}, + "f:uid": {} + } + } + }, + "f:spec": { + ".": {}, + "f:params": {}, + "f:podTemplate": { + ".": {}, + "f:nodeSelector": { + ".": {}, + "f:enable-ci": {} + }, + "f:tolerations": {} + }, + "f:resources": {}, + "f:serviceAccountName": {}, + "f:taskRef": { + ".": {}, + "f:kind": {}, + "f:name": {} + }, + "f:timeout": {}, + "f:workspaces": {} + }, + "f:status": { + ".": {}, + "f:conditions": {}, + "f:podName": {}, + "f:startTime": {}, + "f:steps": {}, + "f:taskSpec": { + ".": {}, + "f:description": {}, + "f:params": {}, + "f:results": {}, + "f:steps": {}, + "f:workspaces": {} + } + } + } + }, + { + "manager": "watcher", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:33:25Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + "f:results.tekton.dev/record": {}, + "f:results.tekton.dev/result": {} + } + } + } + } + ] + }, + "spec": { + "params": [ + { + "name": "image_url", + "value": "hub.pingcap.net/pingcap/tidb/images/tidb-lightning:master-be62f75-release_linux_arm64" + }, + { + "name": "release_tag_suffix", + "value": "release" + } + ], + "resources": {}, + "serviceAccountName": "default", + "taskRef": { + "name": "multi-arch-image-collect", + "kind": "Task" + }, + "timeout": "59m59.988451875s", + "podTemplate": { + "nodeSelector": { + "enable-ci": "true" + }, + "tolerations": [ + { + "key": "dedicated", + "operator": "Equal", + "value": "test-infra", + "effect": "NoSchedule" + } + ] + }, + "workspaces": [ + { + "name": "dockerconfig", + "secret": { + "secretName": "hub-pingcap-net-ee" + } + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "True", + "lastTransitionTime": "2023-12-07T06:34:54Z", + "reason": "Succeeded", + "message": "All Steps have completed executing" + } + ], + "podName": "auto-compose-multi-arch-image-run-zc8jc-collect-and-push-pod", + "startTime": "2023-12-07T06:33:25Z", + "completionTime": "2023-12-07T06:34:54Z", + "steps": [ + { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "message": "[{\"key\":\"repo\",\"value\":\"\",\"type\":1},{\"key\":\"tags\",\"value\":\"\",\"type\":1}]", + "startedAt": "2023-12-07T06:33:29Z", + "finishedAt": "2023-12-07T06:34:53Z", + "containerID": "containerd://95ca9c8dbaf07e02b9b756f1ee2bd14fa5096bb94ae3a648b7ce50f2e33bb8e3" + }, + "name": "prepare-manifest", + "container": "step-prepare-manifest", + "imageID": "ghcr.io/pingcap-qe/cd/utils/release@sha256:55c3127c8f14affb633b97365457c86e69f260da52c6698d25c8955b26a06b4d" + } + ], + "taskResults": [ + { + "name": "repo", + "type": "string", + "value": "" + }, + { + "name": "tags", + "type": "string", + "value": "" + } + ], + "taskSpec": { + "params": [ + { + "name": "image_url", + "type": "string", + "description": "The full url of the pushed image, contain the tag part.\nIt will parse the repo from it.\n" + }, + { + "name": "release_tag_suffix", + "type": "string", + "default": "release" + } + ], + "description": "The working flow:\n1. list the tags for the repo.\n2. filter the single arch tags.\n3. get the digest of the tags.\n4. the tags should follow the standard format:\n - master-00595b4-release_linux_amd64 =\u003e master-00595b4-release =\u003e master-00595b4 =\u003e master\n - master-00595b4-release-linux-arm64 =\u003e master-00595b4-release =\u003e master-00595b4 =\u003e master\n - master-00595b4-release_arm64 =\u003e master-00595b4-release =\u003e master-00595b4 =\u003e master\n - master-00595b4-release-arm64 =\u003e master-00595b4-release =\u003e master-00595b4 =\u003e master\n", + "steps": [ + { + "name": "prepare-manifest", + "image": "ghcr.io/pingcap-qe/cd/utils/release:bcb089f", + "workingDir": "/workspace", + "resources": {}, + "script": "#! /usr/bin/env bash\n\nset -exo pipefail\n\n:\u003e /tekton/results/repo\n:\u003e /tekton/results/tags\n:\u003e manifest.yaml\n\n# steps:\n# 1. check the pushed tag, if not existed, step will fail.\noras repo tags hub.pingcap.net/pingcap/tidb/images/tidb-lightning:master-be62f75-release_linux_arm64\n\n# 2. compute the mult-arch tags and digests\npushed_repo=\"$(echo hub.pingcap.net/pingcap/tidb/images/tidb-lightning:master-be62f75-release_linux_arm64 | cut -d ':' -f 1)\"\npushed_tag=\"$(echo hub.pingcap.net/pingcap/tidb/images/tidb-lightning:master-be62f75-release_linux_arm64 | cut -d ':' -f 2)\"\ntag=$(\\\n echo \"$pushed_tag\" | \\\n sed -E 's/[-_](amd64|arm64)$//g' | \\\n sed -E 's/[-_]linux$//g' \\\n)\n\n# repo\nyq -i \".image = \\\"$pushed_repo\\\"\" manifest.yaml\n\n# tags\ntags=\"$tag\"\ntags=\"$tags $(echo $tag | sed -E 's/[-_]release$//g')\"\n# for tags\nfor t in $tags; do\n yq -i \".tags += [\\\"$t\\\"]\" manifest.yaml\ndone\n\n# digest map\nfor t in `oras repo tags $pushed_repo | grep -E \"${tag}[-_].*[-_](amd64|arm64)$\"`; do\n manifest-tool inspect --raw \"${pushed_repo}:$t\" \u003e manifest.json\n platform=`jq -r '.os + \"/\" + .architecture' manifest.json`\n digest=`jq -r '.digest' manifest.json`\n echo \"add for: ${platform} =\u003e ${digest}\"\n\n os=\"$(echo \"$platform\" | awk -F/ '{print $1}')\"\n architecture=\"${platform#*/}\"\n yq -i '.manifests += [{}]' manifest.yaml\n yq -i \".manifests[-1].image = \\\"${pushed_repo}@${digest}\\\"\" manifest.yaml\n yq -i \".manifests[-1].platform.os = \\\"$os\\\"\" manifest.yaml\n yq -i \".manifests[-1].platform.architecture = \\\"$architecture\\\"\" manifest.yaml\ndone\n\nif yq -e '.manifests |length \u003e 1' manifest.yaml \u003e/dev/null 2\u003e\u00261; then\n printf \"%s\" \"$pushed_repo\" \u003e /tekton/results/repo\n printf \"%s\" \"$tags\" \u003e /tekton/results/tags\n cat manifest.yaml\n manifest-tool push from-spec manifest.yaml\nelse\n echo \"🤷 no more than one arch tags found. Skip push oci manifest tags\"\n exit 0\nfi\n" + } + ], + "workspaces": [ + { + "name": "dockerconfig", + "description": "Includes a docker `config.json`", + "mountPath": "/root/.docker", + "optional": true + } + ], + "results": [ + { + "name": "repo", + "type": "string", + "description": "image repo" + }, + { + "name": "tags", + "type": "string", + "description": "tags pushed" + } + ] + } + } + } + } +} diff --git a/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.unknown.json b/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.unknown.json new file mode 100644 index 0000000..fee0e87 --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/testdata/event-taskrun.unknown.json @@ -0,0 +1,252 @@ +{ + "specversion": "1.0", + "id": "7bfbbea3-ae3a-4316-8554-caba12ea43df", + "source": "/apis///namespaces/ee-cd//build-package-pingcap-tidb-linux-2hwws-build-images-6tm9r", + "type": "dev.tekton.event.taskrun.unknown.v1", + "subject": "build-package-pingcap-tidb-linux-2hwws-build-images-6tm9r", + "datacontenttype": "application/json", + "time": "2023-12-07T06:20:01.555743624Z", + "data": { + "taskRun": { + "metadata": { + "name": "build-package-pingcap-tidb-linux-2hwws-build-images-6tm9r", + "generateName": "build-package-pingcap-tidb-linux-2hwws-build-images-", + "namespace": "ee-cd", + "uid": "2ef9fbb5-3290-4dac-9e09-e80e2ae38534", + "resourceVersion": "2432921823", + "generation": 1, + "creationTimestamp": "2023-12-07T06:20:01Z", + "labels": { + "app.kubernetes.io/managed-by": "tekton-pipelines", + "app.kubernetes.io/version": "0.1", + "kustomize.toolkit.fluxcd.io/name": "tekton-configs", + "kustomize.toolkit.fluxcd.io/namespace": "apps", + "tekton.dev/task": "pingcap-build-images" + }, + "annotations": { + "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"tekton.dev/v1beta1\",\"kind\":\"TaskRun\",\"metadata\":{\"annotations\":{},\"generateName\":\"build-package-pingcap-tidb-linux-2hwws-build-images-\",\"namespace\":\"ee-cd\"},\"spec\":{\"params\":[{\"name\":\"os\",\"value\":\"linux\"},{\"name\":\"arch\",\"value\":\"amd64\"},{\"name\":\"profile\",\"value\":\"release\"},{\"name\":\"component\",\"value\":\"tidb\"},{\"name\":\"version\",\"value\":\"v7.6.0-alpha-390-g83f9209925\"},{\"name\":\"git-ref\",\"value\":\"master\"},{\"name\":\"git-sha\",\"value\":\"83f9209925f9183975c3dd2818853ef734f07ce5\"},{\"name\":\"release-dir\",\"value\":\"build\"},{\"name\":\"build\",\"value\":\"false\"}],\"podTemplate\":{\"nodeSelector\":{\"kubernetes.io/arch\":\"amd64\"},\"tolerations\":[{\"effect\":\"NoSchedule\",\"key\":\"dedicated\",\"operator\":\"Equal\",\"value\":\"test-infra\"}]},\"resources\":{},\"serviceAccountName\":\"default\",\"taskRef\":{\"kind\":\"Task\",\"name\":\"pingcap-build-images\"},\"timeout\":\"52m57.744671218s\",\"workspaces\":[{\"name\":\"source\",\"persistentVolumeClaim\":{\"claimName\":\"pvc-3d98a2b3bb\"}},{\"name\":\"dockerconfig\",\"secret\":{\"secretName\":\"hub-pingcap-net-ee\"}}]}}\n", + "tekton.dev/platforms": "linux/amd64" + }, + "managedFields": [ + { + "manager": "kubectl", + "operation": "Update", + "apiVersion": "tekton.dev/v1beta1", + "time": "2023-12-07T06:20:01Z", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:metadata": { + "f:annotations": { + ".": {}, + "f:kubectl.kubernetes.io/last-applied-configuration": {} + }, + "f:generateName": {} + }, + "f:spec": { + ".": {}, + "f:params": {}, + "f:podTemplate": { + ".": {}, + "f:nodeSelector": { + ".": {}, + "f:kubernetes.io/arch": {} + }, + "f:tolerations": {} + }, + "f:resources": {}, + "f:serviceAccountName": {}, + "f:taskRef": { + ".": {}, + "f:kind": {}, + "f:name": {} + }, + "f:timeout": {}, + "f:workspaces": {} + } + } + } + ] + }, + "spec": { + "params": [ + { + "name": "os", + "value": "linux" + }, + { + "name": "arch", + "value": "amd64" + }, + { + "name": "profile", + "value": "release" + }, + { + "name": "component", + "value": "tidb" + }, + { + "name": "version", + "value": "v7.6.0-alpha-390-g83f9209925" + }, + { + "name": "git-ref", + "value": "master" + }, + { + "name": "git-sha", + "value": "83f9209925f9183975c3dd2818853ef734f07ce5" + }, + { + "name": "release-dir", + "value": "build" + }, + { + "name": "build", + "value": "false" + } + ], + "resources": {}, + "serviceAccountName": "default", + "taskRef": { + "name": "pingcap-build-images", + "kind": "Task" + }, + "timeout": "52m57.744671218s", + "podTemplate": { + "nodeSelector": { + "kubernetes.io/arch": "amd64" + }, + "tolerations": [ + { + "key": "dedicated", + "operator": "Equal", + "value": "test-infra", + "effect": "NoSchedule" + } + ] + }, + "workspaces": [ + { + "name": "source", + "persistentVolumeClaim": { + "claimName": "pvc-3d98a2b3bb" + } + }, + { + "name": "dockerconfig", + "secret": { + "secretName": "hub-pingcap-net-ee" + } + } + ] + }, + "status": { + "conditions": [ + { + "type": "Succeeded", + "status": "Unknown", + "lastTransitionTime": "2023-12-07T06:20:01Z", + "reason": "Pending", + "message": "Pending" + } + ], + "podName": "build-package-pingcap-tidb-linux-2hwws-build-images-6tm9r-pod", + "startTime": "2023-12-07T06:20:01Z", + "taskSpec": { + "params": [ + { + "name": "component", + "type": "string" + }, + { + "name": "os", + "type": "string", + "default": "linux" + }, + { + "name": "arch", + "type": "string", + "default": "amd64" + }, + { + "name": "version", + "type": "string", + "description": "the version to releasing." + }, + { + "name": "profile", + "type": "string", + "description": "supports: 'release' or 'debug'.\n", + "default": "release" + }, + { + "name": "git-ref", + "type": "string" + }, + { + "name": "git-sha", + "type": "string" + }, + { + "name": "release-dir", + "type": "string", + "default": "build" + }, + { + "name": "build", + "type": "string", + "description": "Does it need to build the binaries before packing the images?", + "default": "false" + } + ], + "description": "This task builds images for pingcap components.", + "steps": [ + { + "name": "generate", + "image": "ghcr.io/pingcap-qe/cd/utils/release:5d33328", + "resources": {}, + "script": "git clone --depth=1 --branch=main https://github.com/PingCAP-QE/artifacts.git /workspace/artifacts\n\ngit_ref=\"master\"\ngit_sha=\"83f9209925f9183975c3dd2818853ef734f07ce5\"\nif [ \"$git_sha\" == \"$git_ref\" ]; then\n git_sha=\"\"\nfi\n\nout_script=\"/workspace/build-package-images.sh\"\n/workspace/artifacts/packages/scripts/gen-package-images-with-config.sh \\\n tidb \\\n linux \\\n amd64 \\\n v7.6.0-alpha-390-g83f9209925 \\\n release \\\n $git_ref \\\n \"$git_sha\" \\\n /workspace/artifacts/packages/packages.yaml.tmpl \\\n \"$out_script\"\n\nif [ -f \"$out_script\" ]; then\n cat \"$out_script\"\nfi\n" + }, + { + "name": "build-and-publish", + "image": "gcr.io/kaniko-project/executor:debug", + "workingDir": "$(workspaces.source.path)", + "env": [ + { + "name": "KANIKO_EXECUTOR", + "value": "/kaniko/executor" + } + ], + "resources": {}, + "script": "script=\"/workspace/build-package-images.sh\"\nif [ ! -f \"$script\" ]; then\n echo \"No build script, skip build.\"\n exit 0\nfi\n\n\"$script\" \"build\" \"$(params.tag)\" ${KANIKO_EXECUTOR} \"false\"\n" + } + ], + "workspaces": [ + { + "name": "source" + }, + { + "name": "dockerconfig", + "description": "Includes a docker `config.json`", + "mountPath": "/kaniko/.docker", + "optional": true + } + ], + "results": [ + { + "name": "IMAGE_DIGEST", + "type": "string", + "description": "Digest of the image just built." + }, + { + "name": "IMAGE_URL", + "type": "string", + "description": "URL of the image just built." + } + ] + } + } + } + } +} diff --git a/cloudevents-server/pkg/events/custom/tekton/types.go b/cloudevents-server/pkg/events/custom/tekton/types.go new file mode 100644 index 0000000..3d78fc8 --- /dev/null +++ b/cloudevents-server/pkg/events/custom/tekton/types.go @@ -0,0 +1,40 @@ +package tekton + +import ( + larkcard "github.com/larksuite/oapi-sdk-go/v3/card" + tektoncloudevent "github.com/tektoncd/pipeline/pkg/reconciler/events/cloudevent" +) + +var larkCardHeaderTemplates = map[tektoncloudevent.TektonEventType]string{ + tektoncloudevent.PipelineRunFailedEventV1: larkcard.TemplateRed, + tektoncloudevent.PipelineRunRunningEventV1: larkcard.TemplateBlue, + tektoncloudevent.PipelineRunStartedEventV1: larkcard.TemplateYellow, + tektoncloudevent.PipelineRunSuccessfulEventV1: larkcard.TemplateGreen, + tektoncloudevent.PipelineRunUnknownEventV1: larkcard.TemplateGrey, + tektoncloudevent.RunFailedEventV1: larkcard.TemplateRed, + tektoncloudevent.RunRunningEventV1: larkcard.TemplateBlue, + tektoncloudevent.RunStartedEventV1: larkcard.TemplateYellow, + tektoncloudevent.RunSuccessfulEventV1: larkcard.TemplateGreen, + tektoncloudevent.TaskRunFailedEventV1: larkcard.TemplateRed, + tektoncloudevent.TaskRunRunningEventV1: larkcard.TemplateBlue, + tektoncloudevent.TaskRunStartedEventV1: larkcard.TemplateYellow, + tektoncloudevent.TaskRunSuccessfulEventV1: larkcard.TemplateGreen, + tektoncloudevent.TaskRunUnknownEventV1: larkcard.TemplateGrey, +} + +var larkCardHeaderEmojis = map[tektoncloudevent.TektonEventType]string{ + tektoncloudevent.PipelineRunFailedEventV1: "❌", + tektoncloudevent.TaskRunFailedEventV1: "❌", + tektoncloudevent.RunFailedEventV1: "❌", + tektoncloudevent.PipelineRunRunningEventV1: "🚧", + tektoncloudevent.TaskRunRunningEventV1: "🚧", + tektoncloudevent.RunRunningEventV1: "🚧", + tektoncloudevent.PipelineRunStartedEventV1: "🚀", + tektoncloudevent.TaskRunStartedEventV1: "🚀", + tektoncloudevent.RunStartedEventV1: "🚀", + tektoncloudevent.PipelineRunSuccessfulEventV1: "✅", + tektoncloudevent.TaskRunSuccessfulEventV1: "✅", + tektoncloudevent.RunSuccessfulEventV1: "✅", + tektoncloudevent.PipelineRunUnknownEventV1: "⌛️", + tektoncloudevent.TaskRunUnknownEventV1: "⌛️", +} diff --git a/cloudevents-server/pkg/events/custom/testcaserun/testcaserun.go b/cloudevents-server/pkg/events/custom/testcaserun/handler.go similarity index 85% rename from cloudevents-server/pkg/events/custom/testcaserun/testcaserun.go rename to cloudevents-server/pkg/events/custom/testcaserun/handler.go index 72d7158..097f700 100644 --- a/cloudevents-server/pkg/events/custom/testcaserun/testcaserun.go +++ b/cloudevents-server/pkg/events/custom/testcaserun/handler.go @@ -7,6 +7,7 @@ import ( "time" "github.com/PingCAP-QE/ee-apps/cloudevents-server/ent" + "github.com/PingCAP-QE/ee-apps/cloudevents-server/pkg/config" cloudevents "github.com/cloudevents/sdk-go/v2" "github.com/cloudevents/sdk-go/v2/types" ) @@ -15,6 +16,19 @@ type Handler struct { Storage *ent.ProblemCaseRunClient } +func NewHandler(cfg config.Store) (*Handler, error) { + dbClient, err := newStoreClient(cfg) + if err != nil { + return nil, err + } + + return &Handler{Storage: dbClient.ProblemCaseRun}, nil +} + +func (h *Handler) SupportEventTypes() []string { + return []string{EventTypeTestCaseRunReport} +} + // Handle for test case run events func (h *Handler) Handle(event cloudevents.Event) cloudevents.Result { caseData := make(map[string]ProblemCasesFromBazel) diff --git a/cloudevents-server/pkg/events/custom/testcaserun/store.go b/cloudevents-server/pkg/events/custom/testcaserun/store.go new file mode 100644 index 0000000..c6ecc7a --- /dev/null +++ b/cloudevents-server/pkg/events/custom/testcaserun/store.go @@ -0,0 +1,24 @@ +package testcaserun + +import ( + "context" + "fmt" + "log" + + "github.com/PingCAP-QE/ee-apps/cloudevents-server/ent" + "github.com/PingCAP-QE/ee-apps/cloudevents-server/pkg/config" +) + +func newStoreClient(cfg config.Store) (*ent.Client, error) { + db, err := ent.Open(cfg.Driver, cfg.DSN) + if err != nil { + return nil, fmt.Errorf("failed opening connection to %s: %w", cfg.Driver, err) + } + + // Run the auto migration tool. + if err := db.Schema.Create(context.Background()); err != nil { + log.Fatalf("failed creating schema resources: %v", err) + } + + return db, nil +} diff --git a/cloudevents-server/pkg/events/custom/testcaserun/types.go b/cloudevents-server/pkg/events/custom/testcaserun/types.go index 4c6b5ad..8b6b5f4 100644 --- a/cloudevents-server/pkg/events/custom/testcaserun/types.go +++ b/cloudevents-server/pkg/events/custom/testcaserun/types.go @@ -1,6 +1,8 @@ package testcaserun const ( + EventTypeTestCaseRunReport = "test-case-run-report" + reasonNotFinished = "not_finished" reasonUnknown = "unknown" ) diff --git a/cloudevents-server/pkg/events/handlers.go b/cloudevents-server/pkg/events/handlers.go index a85700b..092c1e2 100644 --- a/cloudevents-server/pkg/events/handlers.go +++ b/cloudevents-server/pkg/events/handlers.go @@ -6,42 +6,81 @@ import ( cloudevents "github.com/cloudevents/sdk-go/v2" "github.com/rs/zerolog/log" - "github.com/PingCAP-QE/ee-apps/cloudevents-server/ent" - "github.com/PingCAP-QE/ee-apps/cloudevents-server/pkg/events/custom" + "github.com/PingCAP-QE/ee-apps/cloudevents-server/pkg/config" + "github.com/PingCAP-QE/ee-apps/cloudevents-server/pkg/events/custom/tekton" "github.com/PingCAP-QE/ee-apps/cloudevents-server/pkg/events/custom/testcaserun" ) -type eventHandler func(event cloudevents.Event) cloudevents.Result +type EventHandler interface { + // Valid fn signatures are: + // * func() + // * func() protocol.Result + // * func(context.Context) + // * func(context.Context) protocol.Result + // * func(event.Event) + // * func(event.Event) transport.Result + // * func(context.Context, event.Event) + // * func(context.Context, event.Event) protocol.Result + // * func(event.Event) *event.Event + // * func(event.Event) (*event.Event, protocol.Result) + // * func(context.Context, event.Event) *event.Event + // * func(context.Context, event.Event) (*event.Event, protocol.Result) + Handle(event cloudevents.Event) cloudevents.Result + SupportEventTypes() []string +} -// receiver creates a receiverFn wrapper class that is used by the client to -// validate and invoke the provided function. -// Valid fn signatures are: -// * func() -// * func() protocol.Result -// * func(context.Context) -// * func(context.Context) protocol.Result -// * func(event.Event) -// * func(event.Event) transport.Result -// * func(context.Context, event.Event) -// * func(context.Context, event.Event) protocol.Result -// * func(event.Event) *event.Event -// * func(event.Event) (*event.Event, protocol.Result) -// * func(context.Context, event.Event) *event.Event -// * func(context.Context, event.Event) (*event.Event, protocol.Result) -func NewEventsHandler(store *ent.Client) eventHandler { - caserunHandler := &testcaserun.Handler{Storage: store.ProblemCaseRun} - - handleMap := map[string]eventHandler{ - custom.EventTypeTestCaseRunReport: caserunHandler.Handle, +type handlerImpl struct { + handleMap map[string]EventHandler +} + +func (h *handlerImpl) SupportEventTypes() []string { + var ret []string + for t, _ := range h.handleMap { + ret = append(ret, t) + } + + return ret +} + +func (h *handlerImpl) Handle(event cloudevents.Event) cloudevents.Result { + eh, ok := h.handleMap[event.Type()] + if ok { + return eh.Handle(event) + } + + log.Error().Str("type", event.Type()).Msg("none handlers registered") + return cloudevents.NewHTTPResult(http.StatusNotFound, "none handlers registered for event type: %s, ignore it.", event.Type()) +} + +func (h *handlerImpl) addChildHandlers(handlers ...EventHandler) *handlerImpl { + if h.handleMap == nil { + h.handleMap = make(map[string]EventHandler) } - return func(event cloudevents.Event) cloudevents.Result { - log.Debug().Any("event", event).Msg("received event") - eh, ok := handleMap[event.Type()] - if ok { - return eh(event) + for _, e := range handlers { + for _, eventType := range e.SupportEventTypes() { + h.handleMap[eventType] = e } + } - return cloudevents.NewHTTPResult(http.StatusNotFound, "none handlers registered for event type: %s, ignore it.", event.Type()) + return h +} + +// receiver creates a receiverFn wrapper class that is used by the client to +// validate and invoke the provided function. +func NewEventsHandler(cfg *config.Config) (EventHandler, error) { + caseRunHandler, err := testcaserun.NewHandler(cfg.Store) + if err != nil { + return nil, err + } + + tektonHandler, err := tekton.NewHandler(cfg.Lark) + if err != nil { + return nil, err } + + ret := new(handlerImpl) + ret.addChildHandlers(caseRunHandler, tektonHandler) + + return ret, nil }