From 999e58785239b647699b630e5d3b93b62fe52469 Mon Sep 17 00:00:00 2001 From: Bruno REBOUL Date: Tue, 23 Mar 2021 14:48:02 +0100 Subject: [PATCH] v0.4.1 (#131) * chore(deps): Bump cloud.google.com/go/pubsub from 1.9.1 to 1.10.0 (#127) Bumps [cloud.google.com/go/pubsub](https://github.com/googleapis/google-cloud-go) from 1.9.1 to 1.10.0. - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/master/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.9.1...pubsub/v1.10.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix go mod error (#132) * fix go mod error * fix: cloud build steps * fix: rces mgr quota exhausted (#134) * feat: better_firestore_retry (#135) * feat: cap cloud func name length to 63 (#142) * chore(deps): Bump cloud.google.com/go/pubsub from 1.10.0 to 1.10.1 (#141) Bumps [cloud.google.com/go/pubsub](https://github.com/googleapis/google-cloud-go) from 1.10.0 to 1.10.1. - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/master/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.10.0...pubsub/v1.10.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): Bump cloud.google.com/go from 0.78.0 to 0.79.0 (#144) Bumps [cloud.google.com/go](https://github.com/googleapis/google-cloud-go) from 0.78.0 to 0.79.0. - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/master/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/v0.78.0...v0.79.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): Bump cloud.google.com/go/logging from 1.2.0 to 1.3.0 (#139) Bumps [cloud.google.com/go/logging](https://github.com/googleapis/google-cloud-go) from 1.2.0 to 1.3.0. - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/master/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.2.0...pubsub/v1.3.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): Bump github.com/open-policy-agent/opa from 0.26.0 to 0.27.0 (#143) Bumps [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) from 0.26.0 to 0.27.0. - [Release notes](https://github.com/open-policy-agent/opa/releases) - [Changelog](https://github.com/open-policy-agent/opa/blob/master/CHANGELOG.md) - [Commits](https://github.com/open-policy-agent/opa/compare/v0.26.0...v0.27.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): Bump cloud.google.com/go/firestore from 1.4.0 to 1.5.0 (#137) Bumps [cloud.google.com/go/firestore](https://github.com/googleapis/google-cloud-go) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/master/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.4.0...pubsub/v1.5.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): Bump cloud.google.com/go/storage from 1.13.0 to 1.14.0 (#145) Bumps [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/master/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/spanner/v1.13.0...spanner/v1.14.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): Bump cloud.google.com/go/bigquery from 1.15.0 to 1.16.0 (#138) Bumps [cloud.google.com/go/bigquery](https://github.com/googleapis/google-cloud-go) from 1.15.0 to 1.16.0. - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/master/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/spanner/v1.15.0...bigquery/v1.16.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix getdoc redoontransient instead of wrning (#146) * chore(deps): Bump github.com/open-policy-agent/opa from 0.27.0 to 0.27.1 (#147) Bumps [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) from 0.27.0 to 0.27.1. - [Release notes](https://github.com/open-policy-agent/opa/releases) - [Changelog](https://github.com/open-policy-agent/opa/blob/master/CHANGELOG.md) - [Commits](https://github.com/open-policy-agent/opa/compare/v0.27.0...v0.27.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix insertid too long (#149) * feat dumpinventory deals with quota eceeded (#151) * feat wait on quotqa exceeded so quotqa recovers (#153) * feat: slo freshness dashboards (#155) * chore(deps): Bump google.golang.org/api from 0.41.0 to 0.42.0 (#154) Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.41.0 to 0.42.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.41.0...v0.42.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 20 +- go.sum | 171 ++++++-------- services/dumpinventory/core.go | 16 ++ services/getgroupsettings/core.go | 15 ++ services/listgroupmembers/core.go | 15 ++ services/listgroups/core.go | 15 ++ ...ncedeployment_deploymonitoringdashboard.go | 2 +- .../meth_instancedeployment_situate.go | 52 ++++- .../setdashboards/type_instancedeployment.go | 1 + services/stream2bq/core.go | 18 +- utilities/cai/func_getdisplayname.go | 55 ++--- .../gcb/meth_triggerdeployment_deploy.go | 29 ++- utilities/gfs/func_getdoc.go | 14 +- utilities/mon/const_dashboardslofreshness.go | 212 ++++++++++++++++++ .../mon/meth_dashboarddeployment_deploy.go | 102 ++++++--- ...h_dashboarddeployment_deploy_integ_test.go | 2 +- utilities/mon/type_dashboarddeployment.go | 1 + utilities/mon/type_dashboardparameters.go | 18 +- .../ramcli/func_makeinstancefolderpath.go | 29 +++ .../func_makeinstancefolderpath_unit_test.go | 45 ++++ ...t_configureconvertlog2feedorganizations.go | 11 +- ...oyment_configuredumpinventoryassettypes.go | 15 +- ...nt_configuregetgroupsettingsdirectories.go | 9 +- ...nt_configurelistgroupmembersdirectories.go | 9 +- ...ployment_configurelistgroupsdirectories.go | 9 +- ...deployment_configurepublish2fsinstances.go | 33 +-- .../meth_deployment_configuresetdashboards.go | 68 ++++-- ..._deployment_configuresetfeedsassettypes.go | 15 +- .../meth_deployment_configuresetlogmetrics.go | 5 +- ...yment_configuresetlogsinksorganizations.go | 11 +- ...oyment_configuresplitdumpsingleinstance.go | 7 +- ...deployment_configurestream2bqassettypes.go | 20 +- ...eployment_configureupload2gcsassettypes.go | 31 +-- utilities/solution/type_settings.go | 5 + utilities/str/func_hash.go | 27 +++ 35 files changed, 775 insertions(+), 332 deletions(-) create mode 100644 utilities/mon/const_dashboardslofreshness.go create mode 100644 utilities/ramcli/func_makeinstancefolderpath.go create mode 100644 utilities/ramcli/func_makeinstancefolderpath_unit_test.go create mode 100644 utilities/str/func_hash.go diff --git a/go.mod b/go.mod index 5a0ea909..ced3b47b 100644 --- a/go.mod +++ b/go.mod @@ -3,16 +3,16 @@ module github.com/BrunoReboul/ram go 1.13 require ( - cloud.google.com/go v0.76.0 - cloud.google.com/go/bigquery v1.15.0 - cloud.google.com/go/firestore v1.4.0 - cloud.google.com/go/logging v1.2.0 - cloud.google.com/go/pubsub v1.9.1 - cloud.google.com/go/storage v1.13.0 + cloud.google.com/go v0.79.0 + cloud.google.com/go/bigquery v1.16.0 + cloud.google.com/go/firestore v1.5.0 + cloud.google.com/go/logging v1.3.0 + cloud.google.com/go/pubsub v1.10.1 + cloud.google.com/go/storage v1.14.0 github.com/google/uuid v1.2.0 - github.com/open-policy-agent/opa v0.26.0 - golang.org/x/oauth2 v0.0.0-20210201163806-010130855d6c - google.golang.org/api v0.40.0 - google.golang.org/genproto v0.0.0-20210204154452-deb828366460 + github.com/open-policy-agent/opa v0.27.1 + golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84 + google.golang.org/api v0.42.0 + google.golang.org/genproto v0.0.0-20210312152112-fc591d9ea70f gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 4b9f4001..9cdb2a1a 100644 --- a/go.sum +++ b/go.sum @@ -4,58 +4,48 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR 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 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= 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 h1:WRz29PgAsVEyPSDHyk+0fpEkwEFyfhHn+JbksT6gIL4= 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 h1:eWRCuwubtDrCJG0oSUMgnsbD4CmPFQF2ei4OFbXvwww= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.73.0/go.mod h1:BkDh9dFvGjCitVw03TNjKbBxXNKULXXIq6orU6HrJ4Q= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.76.0 h1:Ckw+E/QYZgd/5bpI4wz4h6f+jmpvh9S9uSrKNnbicJI= -cloud.google.com/go v0.76.0/go.mod h1:r9EvIAvLrunusnetGdQ50M/gKui1x3zdGW/VELGkdpw= -cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0 h1:oqqswrt4x6b9OGBnNqdssxBl1xf0rSUNjU2BR4BZar0= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= 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 h1:xE3CPsOgttP4ACBePh79zTKALtXwn/Edhcr16R5hMWU= 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/bigquery v1.15.0 h1:I2VYl1pglPebka8//dgETxV53wT36z/KyiCNRGwka+k= -cloud.google.com/go/bigquery v1.15.0/go.mod h1:GdoR7cah/5EeVGkySZ3Gnrf+INmhG8IKQyn0SIN/fY0= +cloud.google.com/go/bigquery v1.16.0 h1:tw5uTrd3fadQPoyoz6G2ai7HlrKcHdt119DLcygAYl4= +cloud.google.com/go/bigquery v1.16.0/go.mod h1:EMXkSbFZ4jSt3X49n+sq9WRNNKy3hM0hOz1MrLO1vR4= 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/firestore v1.4.0 h1:A8eudYNUtdspdyoR6OaPoZxSFxE4qu7ctKcxvhGsUOE= -cloud.google.com/go/firestore v1.4.0/go.mod h1:NjjGEnxCS3CAKYp+vmALu20QzcqasGodQp48WxJGAYc= -cloud.google.com/go/logging v1.2.0 h1:YQgGHetngci67X1Iby1/xvYc23AB5ZTvf/S/kQBaLuY= -cloud.google.com/go/logging v1.2.0/go.mod h1:eefltkCUQrHz8MFKQk3jXusVNJAWvJzi97xCrh3yeM8= -cloud.google.com/go/pubsub v1.0.1 h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8= +cloud.google.com/go/firestore v1.5.0 h1:4qNItsmc4GP6UOZPGemmHY4ZfPofVhcaKXsYw9wm9oA= +cloud.google.com/go/firestore v1.5.0/go.mod h1:c4nNYR1qdq7eaZ+jSc5fonrQN2k3M7sWATcYTiakjEo= +cloud.google.com/go/logging v1.3.0 h1:Ncg2sBr+SUtdqSmwRJ5WwuFG8Um3p/aZmRp6EtD9kPw= +cloud.google.com/go/logging v1.3.0/go.mod h1:pA7Kcvk7H0jQMY5WV03GwzOt07Yjw9xVsQMQC5NUZQQ= 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 h1:Lpy6hKgdcl7a3WGSfJIFmxmcdjSpP6OmBEfcOv1Y680= 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/pubsub v1.9.1 h1:hXEte3a/Brd+Tl9ecEkHH3ow9wpnOTZ28lSOszYj6Cg= -cloud.google.com/go/pubsub v1.9.1/go.mod h1:7QTUeCiy+P1dVPO8hHVbZSHDfibbgm1gbKyOVYnqb8g= -cloud.google.com/go/storage v1.0.0 h1:VV2nUM3wwLLGh9lSABFgZMjInyUbJeaRSE64WuAIQ+4= +cloud.google.com/go/pubsub v1.10.1 h1:ysSVlI7vw1doId/jatBqfbbMUjFVe29oiHHc2fpSzf4= +cloud.google.com/go/pubsub v1.10.1/go.mod h1:P5XeG4KyW/T3e/DqxdTTLZGMNAW42PzRs7haJ5gdhcc= 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 h1:UDpwYIwla4jHGzZJaEJYx1tOejbgSoNqsAfHAUYe2r8= 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 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.13.0 h1:amPvhCOI+Hltp6rPu+62YdwhIrjf+34PKVAL4HwgYwk= -cloud.google.com/go/storage v1.13.0/go.mod h1:pqFyBUK3zZqMIIU5+8NaZq6/Ma3ClgUg9Hv5jfuJnvo= +cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5TU= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 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= @@ -80,11 +70,12 @@ github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6l github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= 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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bytecodealliance/wasmtime-go v0.24.0 h1:Kql93N2mT8/Jq7V9GWM6FG8MqMlLnU7x5PjfJcNUtWI= +github.com/bytecodealliance/wasmtime-go v0.24.0/go.mod h1:q320gUxqyI8yB+ZqRuaJOEnGkAnHh6WtJjMaT2CW4wI= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -106,6 +97,7 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= 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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -121,6 +113,8 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -157,13 +151,12 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt 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/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 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= 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 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= 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= @@ -171,7 +164,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU 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 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= @@ -179,19 +171,17 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l 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/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= 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 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= 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 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= 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 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +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 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -206,13 +196,12 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf 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-20201117184057-ae444373da19/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/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/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -242,7 +231,6 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= @@ -285,7 +273,6 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -311,14 +298,13 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.1 h1:b3iUnf1v+ppJiOfNX4yxxqfWKMQPZR5yoh8urCTFX88= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/open-policy-agent/opa v0.26.0 h1:FI0woFdGA73reU8OzSMzgHLFK+XeDMxKIlBpvvpRqDQ= -github.com/open-policy-agent/opa v0.26.0/go.mod h1:iGThTRECCfKQKICueOZkXUi0opN7BR3qiAnIrNHCmlI= +github.com/open-policy-agent/opa v0.27.1 h1:ECKavxdfhDDCI1J6gKDl7LI72GiiUlw0FcfECtqVUhk= +github.com/open-policy-agent/opa v0.27.1/go.mod h1:KHUrOM4lDRHSK0C0Z2Kc09tBucKEvbb4JqD4dz1FmNw= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -331,7 +317,6 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterh/liner v0.0.0-20170211195444-bf27d3ba8e1d h1:zapSxdmZYY6vJWXFKLQ+MkI+agc+HQyfrCGowDSHiKs= github.com/peterh/liner v0.0.0-20170211195444-bf27d3ba8e1d/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -340,6 +325,7 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -350,7 +336,6 @@ github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/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 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -359,14 +344,12 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d h1:GoAlyOgbOEIFdaDqxJVlbOQ1DtGmZWs/Qau0hIlk+WQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -396,12 +379,15 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf 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 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/wasmerio/go-ext-wasm v0.3.1 h1:G95XP3fE2FszQSwIU+fHPBYzD0Csmd2ef33snQXNA5Q= -github.com/wasmerio/go-ext-wasm v0.3.1/go.mod h1:VGyarTzasuS7k5KhSIGpM3tciSZlkP31Mp9VJTHMMeI= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b h1:vVRagRXf67ESqAb72hG2C/ZwI8NtJF2u2V76EsuOHGY= github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b/go.mod h1:HptNXiXVDcJjXe9SqMd0v2FsL9f8dz4GnXgltU6q/co= @@ -414,14 +400,13 @@ go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mI go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= 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 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= 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 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -458,7 +443,6 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl 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 h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= @@ -469,7 +453,6 @@ 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 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= 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 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= @@ -490,7 +473,6 @@ golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn 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 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= 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= @@ -501,55 +483,46 @@ golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLL 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 h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= 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-20200520182314-0ba52f642ac2 h1:eDrdRpKgkcCqKZQwyZRyeFZgfqt37SL7Kv3tok06cKE= 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-20200927032502-5d4f70055728/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 h1:42cLlJJdEh+ySyeUUbEQ5bsTiq8voBeTuweGVkY6Puw= 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-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 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 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= 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 h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= 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 h1:Mj83v+wSRNEar42a/MQgxk9X42TdEmrOl9i+y8WbxLo= 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-20210113160501-8b1d76fa0423/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210113205817-d3ed898aa8a3 h1:BaN3BAqnopnKjvl+15DYP6LLrbBHfbfmlFYzmFj/Q9Q= -golang.org/x/oauth2 v0.0.0-20210113205817-d3ed898aa8a3/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210201163806-010130855d6c h1:HiAZXo96zOhVhtFHchj/ojzoxCFiPrp9/j0GtS38V3g= -golang.org/x/oauth2 v0.0.0-20210201163806-010130855d6c/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 h1:duBc5zuJsmJXYOVVE/6PxejI+N3AaCqKjtsoLn1Je5Q= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 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 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= 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 h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= 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 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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= @@ -565,7 +538,6 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w 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 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= 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-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -582,33 +554,32 @@ golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7w 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 h1:nc5K6ox/4lTFbMVSL9WRR81ixkcwXThoiF6yf+R9scA= 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-20200523222454-059865788121 h1:rITEj+UZHYC927n8GT97eC3zrpzXdb/voyeOuVKS46o= 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 h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= 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 h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= -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-20210223095934-7937bea0104d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210314195730-07df6a141424 h1:+39ahH47SWi1PhMRAHfIrm8f69HRZ5K2koXH6dmO8TQ= +golang.org/x/sys v0.0.0-20210314195730-07df6a141424/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 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 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= 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 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -616,7 +587,7 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb 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-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -664,19 +635,15 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc 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-20201009032223-96877f285f7e/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= 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-20201202200335-bef1c476418a/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-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210114065538-d78b04bdf963/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 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 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= 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= @@ -691,28 +658,24 @@ google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb 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 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40= 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.28.0 h1:jMF5hhVfMkTZwHW1SDpKq5CkgWLXOb31Foaca9Zr3oM= 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 h1:TBCmTTxUrRDA1iTctnK/fIeitxIZ+TQuaf0j29fmCGo= 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.38.0 h1:vDyWk6eup8eQAidaZ31sNWIn8tZEL8qpbtGkBD4ytQo= -google.golang.org/api v0.38.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.40.0 h1:uWrpz12dpVPn7cojP82mk02XDgTJLDPc2KbVTxrWb4A= 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.42.0 h1:uqATLkpxiBrhrvFoebXUjvyzE9nQf+pVyy0Z0IHE+fc= +google.golang.org/api v0.42.0/go.mod h1:+Oj4s6ch2SEGtPjGqfUfZonBH0GjQH89gTeKKAEGZKI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 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 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= 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= @@ -737,7 +700,6 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG 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 h1:MRHtG0U6SnaUb+s+LhNE1qt1FQ1wlhqr5E4usBKC0uA= 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= @@ -750,18 +712,16 @@ google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/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-20201203001206-6486ece9c497/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201209185603-f92720507ed4/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-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210113195801-ae06605f4595/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210122163508-8081c04a3579/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210202153253-cf70463f6119 h1:m9+RjTMas6brUP8DBxSAa/WIPFy7FIhKpvk+9Ppce8E= -google.golang.org/genproto v0.0.0-20210202153253-cf70463f6119/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210203152818-3206188e46ba/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210204154452-deb828366460 h1:pvsg2TgyP8bWrYqyL10tbNHu5KypD5DWJPrCjaTkwZA= -google.golang.org/genproto v0.0.0-20210204154452-deb828366460/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-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210302174412-5ede27ff9881/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-20210312152112-fc591d9ea70f h1:YRBxgxUW6GFi+AKsn8WGA9k1SZohK+gGuEqdeT5aoNQ= +google.golang.org/genproto v0.0.0-20210312152112-fc591d9ea70f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -775,19 +735,16 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ 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 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4= 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.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= 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.34.1/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 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= @@ -801,28 +758,26 @@ google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/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.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 h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 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= diff --git a/services/dumpinventory/core.go b/services/dumpinventory/core.go index 1f0307cb..4236fe28 100644 --- a/services/dumpinventory/core.go +++ b/services/dumpinventory/core.go @@ -35,6 +35,9 @@ import ( "github.com/google/uuid" ) +// Quota ExportAssets Requests per minute +const waitSecOnQuotaExceeded = 70 + // Global structure for global variables to optimize the cloud function performances type Global struct { assetClient *asset.Client @@ -213,6 +216,19 @@ func EntryPoint(ctxEvent context.Context, PubSubMessage gps.PubSubMessage, globa operation, err := global.assetClient.ExportAssets(global.ctx, global.request) if err != nil { + if strings.Contains(strings.ToLower(err.Error()), "quota") { + log.Println(glo.Entry{ + MicroserviceName: global.microserviceName, + InstanceName: global.instanceName, + Environment: global.environment, + Severity: "WARNING", + Message: fmt.Sprintf("waiting_on_quota_exceeded"), + Description: fmt.Sprintf("ExportAssets quota is gone, wait for %d seconds then retry", waitSecOnQuotaExceeded), + TriggeringPubsubID: global.PubSubID, + }) + time.Sleep(waitSecOnQuotaExceeded * time.Second) + return err + } log.Println(glo.Entry{ MicroserviceName: global.microserviceName, InstanceName: global.instanceName, diff --git a/services/getgroupsettings/core.go b/services/getgroupsettings/core.go index b5b7ef9b..f44ed68b 100644 --- a/services/getgroupsettings/core.go +++ b/services/getgroupsettings/core.go @@ -39,6 +39,8 @@ import ( pubsubpb "google.golang.org/genproto/googleapis/pubsub/v1" ) +const waitSecOnQuotaExceeded = 70 + // Global structure for global variables to optimize the cloud function performances type Global struct { ctx context.Context @@ -256,6 +258,19 @@ func EntryPoint(ctxEvent context.Context, PubSubMessage gps.PubSubMessage, globa if !feedMessageGroup.Deleted { groupSettings, err := global.groupsSettingsService.Groups.Get(feedMessageGroup.Asset.Resource.Email).Do() if err != nil { + if strings.Contains(strings.ToLower(err.Error()), "quota") { + log.Println(glo.Entry{ + MicroserviceName: global.microserviceName, + InstanceName: global.instanceName, + Environment: global.environment, + Severity: "WARNING", + Message: fmt.Sprintf("waiting_on_quota_exceeded"), + Description: fmt.Sprintf("GetGroupSettings quota is gone, wait for %d seconds then retry", waitSecOnQuotaExceeded), + TriggeringPubsubID: global.PubSubID, + }) + time.Sleep(waitSecOnQuotaExceeded * time.Second) + return err + } log.Println(glo.Entry{ MicroserviceName: global.microserviceName, InstanceName: global.instanceName, diff --git a/services/listgroupmembers/core.go b/services/listgroupmembers/core.go index bea6fba0..acdca76f 100644 --- a/services/listgroupmembers/core.go +++ b/services/listgroupmembers/core.go @@ -40,6 +40,8 @@ import ( admin "google.golang.org/api/admin/directory/v1" ) +const waitSecOnQuotaExceeded = 70 + // Global variable to deal with GroupsListCall Pages constraint: no possible to pass variable to the function in pages() // https://pkg.go.dev/google.golang.org/api/admin/directory/v1?tab=doc#GroupsListCall.Pages var ancestors []string @@ -311,6 +313,19 @@ func EntryPoint(ctxEvent context.Context, PubSubMessage gps.PubSubMessage, globa // pages function except just the name of the callback function. Not an invocation of the function err = global.dirAdminService.Members.List(feedMessageGroup.Asset.Resource.Id).MaxResults(global.maxResultsPerPage).Pages(ctx, browseMembers) if err != nil { + if strings.Contains(strings.ToLower(err.Error()), "quota") { + log.Println(glo.Entry{ + MicroserviceName: global.microserviceName, + InstanceName: global.instanceName, + Environment: global.environment, + Severity: "WARNING", + Message: fmt.Sprintf("waiting_on_quota_exceeded"), + Description: fmt.Sprintf("ListGroupMembers quota is gone, wait for %d seconds then retry", waitSecOnQuotaExceeded), + TriggeringPubsubID: global.PubSubID, + }) + time.Sleep(waitSecOnQuotaExceeded * time.Second) + return err + } log.Println(glo.Entry{ MicroserviceName: global.microserviceName, InstanceName: global.instanceName, diff --git a/services/listgroups/core.go b/services/listgroups/core.go index 708a18c9..dfddc9e5 100644 --- a/services/listgroups/core.go +++ b/services/listgroups/core.go @@ -39,6 +39,8 @@ import ( admin "google.golang.org/api/admin/directory/v1" ) +const waitSecOnQuotaExceeded = 70 + // Global variable to deal with GroupsListCall Pages constraint: no possible to pass variable to the function in pages() // https://pkg.go.dev/google.golang.org/api/admin/directory/v1?tab=doc#GroupsListCall.Pages var ctx context.Context @@ -340,6 +342,19 @@ func EntryPoint(ctxEvent context.Context, PubSubMessage gps.PubSubMessage, globa err = queryDirectory(settings.Domain, settings.EmailPrefix, global) if err != nil { + if strings.Contains(strings.ToLower(err.Error()), "quota") { + log.Println(glo.Entry{ + MicroserviceName: global.microserviceName, + InstanceName: global.instanceName, + Environment: global.environment, + Severity: "WARNING", + Message: fmt.Sprintf("waiting_on_quota_exceeded"), + Description: fmt.Sprintf("ListGroup quota is gone, wait for %d seconds then retry", waitSecOnQuotaExceeded), + TriggeringPubsubID: global.PubSubID, + }) + time.Sleep(waitSecOnQuotaExceeded * time.Second) + return err + } log.Println(glo.Entry{ MicroserviceName: global.microserviceName, InstanceName: global.instanceName, diff --git a/services/setdashboards/meth_instancedeployment_deploymonitoringdashboard.go b/services/setdashboards/meth_instancedeployment_deploymonitoringdashboard.go index 60b0d207..60299b16 100644 --- a/services/setdashboards/meth_instancedeployment_deploymonitoringdashboard.go +++ b/services/setdashboards/meth_instancedeployment_deploymonitoringdashboard.go @@ -20,6 +20,6 @@ func (instanceDeployment *InstanceDeployment) deployMonitoringDashboard() (err e dashboardDeployment := mon.NewDashboardDeployment() dashboardDeployment.Core = instanceDeployment.Core dashboardDeployment.Settings.Instance.MON = instanceDeployment.Settings.Instance.MON - dashboardDeployment.Artifacts.Widgets = instanceDeployment.Artifacts.Widgets + dashboardDeployment.Artifacts = instanceDeployment.Artifacts return dashboardDeployment.Deploy() } diff --git a/services/setdashboards/meth_instancedeployment_situate.go b/services/setdashboards/meth_instancedeployment_situate.go index dfb70c99..cbf595f6 100644 --- a/services/setdashboards/meth_instancedeployment_situate.go +++ b/services/setdashboards/meth_instancedeployment_situate.go @@ -15,6 +15,11 @@ package setdashboards import ( + "encoding/json" + "fmt" + "math" + "strings" + "github.com/BrunoReboul/ram/utilities/mon" "google.golang.org/api/monitoring/v1" ) @@ -22,13 +27,48 @@ import ( // Situate complement settings taking in account the situation for service and instance settings func (instanceDeployment *InstanceDeployment) Situate() (err error) { instanceDeployment.Artifacts.Widgets = []*monitoring.Widget{} - for _, microserviceName := range instanceDeployment.Settings.Instance.MON.MicroServiceNameList { - for _, widgetType := range instanceDeployment.Settings.Instance.MON.WidgetTypeList { - widget, err := mon.GetGCFWidget(microserviceName, widgetType) - if err != nil { - return err + instanceDeployment.Artifacts.Tiles = []*monitoring.Tile{} + if instanceDeployment.Settings.Instance.MON.GridLayout.Columns != 0 { + for _, microserviceName := range instanceDeployment.Settings.Instance.MON.GridLayout.MicroServiceNameList { + for _, widgetType := range instanceDeployment.Settings.Instance.MON.GridLayout.WidgetTypeList { + widget, err := mon.GetGCFWidget(microserviceName, widgetType) + if err != nil { + return err + } + instanceDeployment.Artifacts.Widgets = append(instanceDeployment.Artifacts.Widgets, &widget) } - instanceDeployment.Artifacts.Widgets = append(instanceDeployment.Artifacts.Widgets, &widget) + } + } + if instanceDeployment.Settings.Instance.MON.SLOFreshnessLayout.SLO != 0 { + grouwthFactor := math.Sqrt(2) + scale := 0.01 + thresholdSeconds := scale * math.Pow(grouwthFactor, float64(instanceDeployment.Settings.Instance.MON.SLOFreshnessLayout.CutOffBucketNumber)) + var thresholdText string + if thresholdSeconds < 60 { + thresholdText = fmt.Sprintf("%g seconds", math.Round(thresholdSeconds)) + } else { + if thresholdSeconds < 60*60 { + thresholdText = fmt.Sprintf("%g minutes", math.Round(thresholdSeconds/60)) + } else { + if thresholdSeconds < 60*60*60 { + thresholdText = fmt.Sprintf("%g hours", math.Round(thresholdSeconds/60/60)) + } + } + } + slo := instanceDeployment.Settings.Instance.MON.SLOFreshnessLayout.SLO + sloText := fmt.Sprintf("%g%%", slo*100) + dashboardJSON := mon.SLOFreshnessTiles + dashboardJSON = strings.Replace(dashboardJSON, "", instanceDeployment.Settings.Instance.MON.SLOFreshnessLayout.Origin, -1) + dashboardJSON = strings.Replace(dashboardJSON, "", instanceDeployment.Settings.Instance.MON.SLOFreshnessLayout.Scope, -1) + dashboardJSON = strings.Replace(dashboardJSON, "", instanceDeployment.Settings.Instance.MON.SLOFreshnessLayout.Flow, -1) + dashboardJSON = strings.Replace(dashboardJSON, "", fmt.Sprintf("%g", slo), -1) + dashboardJSON = strings.Replace(dashboardJSON, "", fmt.Sprintf("%g", math.Floor(slo*10)/10), -1) + dashboardJSON = strings.Replace(dashboardJSON, "", fmt.Sprintf("%v", thresholdSeconds), -1) + dashboardJSON = strings.Replace(dashboardJSON, "", thresholdText, -1) + dashboardJSON = strings.Replace(dashboardJSON, "", sloText, -1) + err = json.Unmarshal([]byte(dashboardJSON), &instanceDeployment.Artifacts.Tiles) + if err != nil { + return fmt.Errorf("json.Unmarshal SLOFreshnessTiles %v", err) } } return nil diff --git a/services/setdashboards/type_instancedeployment.go b/services/setdashboards/type_instancedeployment.go index 3170b17c..088a20c2 100644 --- a/services/setdashboards/type_instancedeployment.go +++ b/services/setdashboards/type_instancedeployment.go @@ -31,6 +31,7 @@ type InstanceDeployment struct { DumpTimestamp time.Time `yaml:"dumpTimestamp"` Artifacts struct { Widgets []*monitoring.Widget + Tiles []*monitoring.Tile } Core *deploy.Core Settings struct { diff --git a/services/stream2bq/core.go b/services/stream2bq/core.go index 0ad10fe2..3b60a763 100644 --- a/services/stream2bq/core.go +++ b/services/stream2bq/core.go @@ -30,6 +30,7 @@ import ( "github.com/BrunoReboul/ram/utilities/glo" "github.com/BrunoReboul/ram/utilities/gps" "github.com/BrunoReboul/ram/utilities/solution" + "github.com/BrunoReboul/ram/utilities/str" "github.com/google/uuid" "google.golang.org/api/cloudresourcemanager/v1" @@ -467,7 +468,11 @@ func persistComplianceStatus(pubSubJSONDoc []byte, global *Global) (insertID str } global.assetInventoryOrigin = complianceStatus.AssetInventoryOrigin - insertID = fmt.Sprintf("%s%v%s%v", complianceStatus.AssetName, complianceStatus.AssetInventoryTimeStamp, complianceStatus.RuleName, complianceStatus.RuleDeploymentTimeStamp) + insertID = str.Hash(fmt.Sprintf("%s%v%s%v", + complianceStatus.AssetName, + complianceStatus.AssetInventoryTimeStamp, + complianceStatus.RuleName, + complianceStatus.RuleDeploymentTimeStamp)) savers := []*bigquery.StructSaver{ {Struct: complianceStatus, Schema: gbq.GetComplianceStatusSchema(), InsertID: insertID}, } @@ -523,7 +528,12 @@ func persistViolation(pubSubJSONDoc []byte, global *Global) (insertID string, er violationBQ.FeedMessage.Asset.Resource = string(violation.FeedMessage.Asset.Resource) violationBQ.RegoModules = string(violation.RegoModules) - insertID = fmt.Sprintf("%s%v%s%v%s", violationBQ.FeedMessage.Asset.Name, violation.FeedMessage.Window.StartTime, violation.FunctionConfig.FunctionName, violation.FunctionConfig.DeploymentTime, violation.NonCompliance.Message) + insertID = str.Hash(fmt.Sprintf("%s%v%s%v%s", + violationBQ.FeedMessage.Asset.Name, + violation.FeedMessage.Window.StartTime, + violation.FunctionConfig.FunctionName, + violation.FunctionConfig.DeploymentTime, + violation.NonCompliance.Message)) savers := []*bigquery.StructSaver{ {Struct: violationBQ, Schema: gbq.GetViolationsSchema(), InsertID: insertID}, } @@ -599,7 +609,9 @@ func persistAsset(pubSubJSONDoc []byte, global *Global) (insertID string, err er global.assetInventoryOrigin = assetFeedMessageBQ.Origin - insertID = fmt.Sprintf("%s%v", assetFeedMessageBQ.Asset.Name, assetFeedMessageBQ.Asset.Timestamp) + insertID = str.Hash(fmt.Sprintf("%s%v", + assetFeedMessageBQ.Asset.Name, + assetFeedMessageBQ.Asset.Timestamp)) savers := []*bigquery.StructSaver{ {Struct: assetFeedMessageBQ.Asset, Schema: gbq.GetAssetsSchema(), InsertID: insertID}, } diff --git a/utilities/cai/func_getdisplayname.go b/utilities/cai/func_getdisplayname.go index 7a0a969f..dc2538fa 100644 --- a/utilities/cai/func_getdisplayname.go +++ b/utilities/cai/func_getdisplayname.go @@ -16,7 +16,6 @@ package cai import ( "context" - "log" "strings" "cloud.google.com/go/firestore" @@ -81,32 +80,34 @@ func getDisplayName(ctx context.Context, } // log.Printf("name %s displayName %s", name, displayName) } else { - log.Printf("WARNING - Not found in firestore %s", documentPath) - //try resourcemamager API - switch strings.Split(name, "/")[0] { - case "organizations": - resp, err := cloudresourcemanagerService.Organizations.Get(name).Context(ctx).Do() - if err != nil { - log.Printf("WARNING - cloudresourcemanagerService.Organizations.Get %v", err) - } else { - displayName = resp.DisplayName - } - case "folders": - resp, err := cloudresourcemanagerServiceV2.Folders.Get(name).Context(ctx).Do() - if err != nil { - log.Printf("WARNING - cloudresourcemanagerServiceV2.Folders.Get %v", err) - } else { - displayName = resp.DisplayName - } - case "projects": - resp, err := cloudresourcemanagerService.Projects.Get(strings.Split(name, "/")[1]).Context(ctx).Do() - if err != nil { - log.Printf("WARNING - cloudresourcemanagerService.Projects.Get %v", err) - } else { - displayName = resp.Name - projectID = resp.ProjectId - } - } + // log.Printf("WARNING - Not found in firestore %s", documentPath) + + //Do not fallback on resourcemamager API see https://github.com/BrunoReboul/ram/issues/126 + + // switch strings.Split(name, "/")[0] { + // case "organizations": + // resp, err := cloudresourcemanagerService.Organizations.Get(name).Context(ctx).Do() + // if err != nil { + // log.Printf("WARNING - cloudresourcemanagerService.Organizations.Get %v", err) + // } else { + // displayName = resp.DisplayName + // } + // case "folders": + // resp, err := cloudresourcemanagerServiceV2.Folders.Get(name).Context(ctx).Do() + // if err != nil { + // log.Printf("WARNING - cloudresourcemanagerServiceV2.Folders.Get %v", err) + // } else { + // displayName = resp.DisplayName + // } + // case "projects": + // resp, err := cloudresourcemanagerService.Projects.Get(strings.Split(name, "/")[1]).Context(ctx).Do() + // if err != nil { + // log.Printf("WARNING - cloudresourcemanagerService.Projects.Get %v", err) + // } else { + // displayName = resp.Name + // projectID = resp.ProjectId + // } + // } } return displayName, projectID } diff --git a/utilities/gcb/meth_triggerdeployment_deploy.go b/utilities/gcb/meth_triggerdeployment_deploy.go index 24763fd7..432f56ab 100644 --- a/utilities/gcb/meth_triggerdeployment_deploy.go +++ b/utilities/gcb/meth_triggerdeployment_deploy.go @@ -209,28 +209,33 @@ func (triggerDeployment *TriggerDeployment) situate() { func (triggerDeployment *TriggerDeployment) getInstanceDeploymentBuild() *cloudbuild.Build { var steps []*cloudbuild.BuildStep - var step1, step2, step3 cloudbuild.BuildStep + var step1, step2, step3, step4 cloudbuild.BuildStep - step1.Id = "build a fresh ram cli" + step1.Id = "display go language version" step1.Name = "golang" - step1.Args = []string{"go", "build", "ram.go"} + step1.Args = []string{"go", "version"} steps = append(steps, &step1) - step2.Id = "display ram executable info" - step2.Name = "gcr.io/cloud-builders/gcloud" - step2.Entrypoint = "bash" - step2.Args = []string{"-c", "ls -al ram"} + step2.Id = "build a fresh ram cli" + step2.Name = "golang" + step2.Args = []string{"go", "build", "-mod=mod", "ram.go"} steps = append(steps, &step2) + step3.Id = "display ram executable info" + step3.Name = "gcr.io/cloud-builders/gcloud" + step3.Entrypoint = "bash" + step3.Args = []string{"-c", "ls -al ram"} + steps = append(steps, &step3) + ramDeploymentCommand := fmt.Sprintf("./ram -deploy -environment=%s -service=%s -instance=%s", triggerDeployment.Core.EnvironmentName, triggerDeployment.Core.ServiceName, triggerDeployment.Core.InstanceName) - step3.Id = fmt.Sprintf("deploy instance %s", triggerDeployment.Core.InstanceName) - step3.Name = "gcr.io/cloud-builders/gcloud" - step3.Entrypoint = "bash" - step3.Args = []string{"-c", ramDeploymentCommand} - steps = append(steps, &step3) + step4.Id = fmt.Sprintf("deploy instance %s", triggerDeployment.Core.InstanceName) + step4.Name = "gcr.io/cloud-builders/gcloud" + step4.Entrypoint = "bash" + step4.Args = []string{"-c", ramDeploymentCommand} + steps = append(steps, &step4) var build cloudbuild.Build build.Steps = steps diff --git a/utilities/gfs/func_getdoc.go b/utilities/gfs/func_getdoc.go index 187f21df..300737e8 100644 --- a/utilities/gfs/func_getdoc.go +++ b/utilities/gfs/func_getdoc.go @@ -18,6 +18,7 @@ import ( "context" "fmt" "log" + "strings" "time" "cloud.google.com/go/firestore" @@ -35,13 +36,22 @@ func GetDoc(ctx context.Context, for i = 0; i < retriesNumber; i++ { documentSnap, err = firestoreClient.Doc(documentPath).Get(ctx) if err != nil { + // Retry are for transient, not for doc not found + if strings.Contains(strings.ToLower(err.Error()), "notfound") { + log.Println(glo.Entry{ + Severity: "WARNING", + Message: "no_found_in_cache", + }) + return documentSnap, false + } log.Println(glo.Entry{ - Severity: "WARNING", - Message: "no_found_in_cache", + Severity: "CRITICAL", + Message: "redo_on_transient", Description: fmt.Sprintf("iteration %d firestoreClient.Doc(documentPath).Get(ctx) %v", i, err), }) time.Sleep(i * 100 * time.Millisecond) } else { + // Found return documentSnap, documentSnap.Exists() } } diff --git a/utilities/mon/const_dashboardslofreshness.go b/utilities/mon/const_dashboardslofreshness.go new file mode 100644 index 00000000..6b6990c0 --- /dev/null +++ b/utilities/mon/const_dashboardslofreshness.go @@ -0,0 +1,212 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the 'License'); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an 'AS IS' BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package mon + +// SLOFreshnessTiles freshness SLO dashboard JSON template +const SLOFreshnessTiles = ` +[ + { + "height": 2, + "width": 4, + "widget": { + "title": " < ", + "text": { + "content": "**Freshness**: of configurations from flow over the last 28 days should be analyzed in less than .", + "format": "MARKDOWN" + } + } + }, + { + "height": 2, + "width": 3, + "xPos": 4, + "widget": { + "title": "SLI vs SLO", + "scorecard": { + "gaugeView": { + "lowerBound": , + "upperBound": 1.0 + }, + "thresholds": [ + { + "color": "RED", + "direction": "BELOW", + "value": + } + ], + "timeSeriesQuery": { + "timeSeriesQueryLanguage": "fetch cloud_function::logging.googleapis.com/user/ram_latency_e2e\n| filter metric.microservice_name == 'stream2bq'\n| filter metric.origin == ''\n| align delta(28d)\n| every 28d\n| within 28d\n| group_by [metric.microservice_name]\n| fraction_less_than_from " + } + } + } + }, + { + "height": 2, + "width": 3, + "xPos": 7, + "widget": { + "title": "Remaining ERROR BUDGET", + "scorecard": { + "thresholds": [ + { + "color": "YELLOW", + "direction": "BELOW", + "value": 0.1 + } + ], + "timeSeriesQuery": { + "timeSeriesQueryLanguage": "fetch cloud_function::logging.googleapis.com/user/ram_latency_e2e\n| filter metric.microservice_name == 'stream2bq'\n| filter metric.origin == ''\n| align delta(28d)\n| every 28d\n| within 28d\n| group_by [metric.microservice_name]\n| fraction_less_than_from \n| neg\n| add 1\n| div 0.01\n| neg\n| add 1" + } + } + } + }, + { + "height": 2, + "width": 2, + "xPos": 10, + "widget": { + "title": "Configurations analyzed in 28 days", + "scorecard": { + "sparkChartView": { + "sparkChartType": "SPARK_LINE" + }, + "timeSeriesQuery": { + "timeSeriesQueryLanguage": "fetch cloud_function::logging.googleapis.com/user/ram_latency_e2e\n| filter metric.microservice_name == 'stream2bq'\n| filter metric.origin == ''\n| align delta(28d)\n| every 28d\n| within 28d\n| group_by [metric.microservice_name]\n| count_from" + } + } + } + }, + { + "height": 9, + "width": 3, + "xPos": 9, + "yPos": 2, + "widget": { + "title": "Last 28days heatmap", + "xyChart": { + "chartOptions": { + "mode": "COLOR" + }, + "dataSets": [ + { + "plotType": "HEATMAP", + "timeSeriesQuery": { + "timeSeriesQueryLanguage": "fetch cloud_function::logging.googleapis.com/user/ram_latency_e2e\n| filter (metric.microservice_name == 'stream2bq')\n| filter metric.origin == ''\n| align delta(28d)\n| every 28d\n| within 28d\n| group_by [metric.microservice_name]\n| graph_period 28d" + } + } + ], + "timeshiftDuration": "0s", + "yAxis": { + "label": "y1Axis", + "scale": "LINEAR" + } + } + } + }, + { + "height": 3, + "width": 9, + "yPos": 2, + "widget": { + "title": "Error budget burnrate on 7d sliding windows - Email when > 1.5", + "xyChart": { + "chartOptions": { + "mode": "COLOR" + }, + "dataSets": [ + { + "plotType": "LINE", + "timeSeriesQuery": { + "timeSeriesQueryLanguage": "fetch cloud_function::logging.googleapis.com/user/ram_latency_e2e\n|filter metric.microservice_name == 'stream2bq'\n| filter metric.origin == ''\n| align delta(1m)\n| every 1m\n| group_by [metric.microservice_name], sliding(7d)\n| fraction_less_than_from \n| neg\n| add 1\n| div 0.01\n| cast_units \"1\"" + } + } + ], + "thresholds": [ + { + "value": 1.5 + } + ], + "timeshiftDuration": "0s", + "yAxis": { + "label": "y1Axis", + "scale": "LINEAR" + } + } + } + }, + { + "height": 3, + "width": 9, + "yPos": 5, + "widget": { + "title": "Error budget burnrate on 12h sliding windows - Alert when > 3", + "xyChart": { + "chartOptions": { + "mode": "COLOR" + }, + "dataSets": [ + { + "plotType": "LINE", + "timeSeriesQuery": { + "timeSeriesQueryLanguage": "fetch cloud_function::logging.googleapis.com/user/ram_latency_e2e\n|filter metric.microservice_name == 'stream2bq'\n| filter metric.origin == ''\n| align delta(1m)\n| every 1m\n| group_by [metric.microservice_name], sliding(12h)\n| fraction_less_than_from \n| neg\n| add 1\n| div 0.01\n| cast_units \"1\"" + } + } + ], + "thresholds": [ + { + "value": 3.0 + } + ], + "timeshiftDuration": "0s", + "yAxis": { + "label": "y1Axis", + "scale": "LINEAR" + } + } + } + }, + { + "height": 3, + "width": 9, + "yPos": 8, + "widget": { + "title": "Error budget burnrate on 1h sliding windows - Alert when > 9", + "xyChart": { + "chartOptions": { + "mode": "COLOR" + }, + "dataSets": [ + { + "plotType": "LINE", + "timeSeriesQuery": { + "timeSeriesQueryLanguage": "fetch cloud_function::logging.googleapis.com/user/ram_latency_e2e\n| filter (metric.microservice_name == 'stream2bq')\n| filter metric.origin == ''\n| align delta(28d)\n| every 28d\n| within 28d\n| group_by [metric.microservice_name]\n| graph_period 28d" + } + } + ], + "thresholds": [ + { + "value": 9.0 + } + ], + "timeshiftDuration": "0s", + "yAxis": { + "label": "y1Axis", + "scale": "LINEAR" + } + } + } + } +] +` diff --git a/utilities/mon/meth_dashboarddeployment_deploy.go b/utilities/mon/meth_dashboarddeployment_deploy.go index bbab8fc2..b8653304 100644 --- a/utilities/mon/meth_dashboarddeployment_deploy.go +++ b/utilities/mon/meth_dashboarddeployment_deploy.go @@ -38,16 +38,13 @@ func (dashboardDeployment DashboardDeployment) Deploy() (err error) { } } var gridLayout monitoring.GridLayout - gridLayout.Columns = dashboardDeployment.Settings.Instance.MON.Columns - gridLayout.Widgets = dashboardDeployment.Artifacts.Widgets + var mosaicLayout monitoring.MosaicLayout var dashboard monitoring.Dashboard - dashboard.DisplayName = dashboardDeployment.Settings.Instance.MON.DisplayName - dashboard.GridLayout = &gridLayout - var dashboardName string var retreivedDashboard *monitoring.Dashboard - needToUpdateWidgets := false - needToUpdateColumns := false + needToUpdate := false + dashboard.DisplayName = dashboardDeployment.Settings.Instance.MON.DisplayName + if dashboardID != "" { dashboardName = fmt.Sprintf("projects/%s/dashboards/%s", dashboardDeployment.Core.SolutionSettings.Hosting.Stackdriver.ProjectID, @@ -56,32 +53,81 @@ func (dashboardDeployment DashboardDeployment) Deploy() (err error) { if err != nil { return err } - if !reflect.DeepEqual(dashboardDeployment.Artifacts.Widgets, retreivedDashboard.GridLayout.Widgets) { - needToUpdateWidgets = true - } - // fmt.Printf("%d / %d", dashboardDeployment.Settings.Instance.MON.Columns, retreivedDashboard.GridLayout.Columns) - if dashboardDeployment.Settings.Instance.MON.Columns != retreivedDashboard.GridLayout.Columns { - needToUpdateColumns = true + if dashboardDeployment.Core.Commands.Check { + return fmt.Errorf("%s mon dashboard NOT found for this instance", dashboardDeployment.Core.InstanceName) } } - if dashboardDeployment.Core.Commands.Check { - if dashboardID == "" { - return fmt.Errorf("%s mon dashboard NOT found for this instance", dashboardDeployment.Core.InstanceName) - } - var s string - if needToUpdateWidgets { - s = fmt.Sprintf("%shave a different array of widgets\n", s) + if dashboardDeployment.Settings.Instance.MON.GridLayout.Columns != 0 { + // Gridlayout report + gridLayout.Columns = dashboardDeployment.Settings.Instance.MON.GridLayout.Columns + gridLayout.Widgets = dashboardDeployment.Artifacts.Widgets + dashboard.GridLayout = &gridLayout + needToUpdateWidgets := false + needToUpdateColumns := false + if dashboardID != "" { + if !reflect.DeepEqual(dashboardDeployment.Artifacts.Widgets, retreivedDashboard.GridLayout.Widgets) { + needToUpdateWidgets = true + needToUpdate = true + } + if dashboardDeployment.Settings.Instance.MON.GridLayout.Columns != retreivedDashboard.GridLayout.Columns { + needToUpdateColumns = true + needToUpdate = true + } } - if needToUpdateColumns { - s = fmt.Sprintf("%scolumns\nwant %d\nhave %d\n", s, - dashboardDeployment.Settings.Instance.MON.Columns, - retreivedDashboard.GridLayout.Columns) + + if dashboardDeployment.Core.Commands.Check { + var s string + if needToUpdateWidgets { + s = fmt.Sprintf("%shave a different array of widgets\n", s) + } + if needToUpdateColumns { + s = fmt.Sprintf("%scolumns\nwant %d\nhave %d\n", s, + dashboardDeployment.Settings.Instance.MON.GridLayout.Columns, + retreivedDashboard.GridLayout.Columns) + } + if len(s) > 0 { + return fmt.Errorf("%s mon invalid dashboard configuration:\n%s", dashboardDeployment.Core.InstanceName, s) + } + return nil } - if len(s) > 0 { - return fmt.Errorf("%s mon invalid dashboard configuration:\n%s", dashboardDeployment.Core.InstanceName, s) + } else { + if dashboardDeployment.Settings.Instance.MON.SLOFreshnessLayout.SLO != 0 { + // SLO freshness mosaic report + mosaicLayout.Columns = dashboardDeployment.Settings.Instance.MON.SLOFreshnessLayout.Columns + mosaicLayout.Tiles = dashboardDeployment.Artifacts.Tiles + dashboard.MosaicLayout = &mosaicLayout + needToUpdateTiles := false + needToUpdateColumns := false + if dashboardID != "" { + if !reflect.DeepEqual(dashboardDeployment.Artifacts.Tiles, retreivedDashboard.MosaicLayout.Tiles) { + needToUpdateTiles = true + needToUpdate = true + } + if dashboardDeployment.Settings.Instance.MON.SLOFreshnessLayout.Columns != retreivedDashboard.MosaicLayout.Columns { + needToUpdateColumns = true + needToUpdate = true + } + } + if dashboardDeployment.Core.Commands.Check { + var s string + if needToUpdateTiles { + s = fmt.Sprintf("%shave a different array of tiles\n", s) + } + if needToUpdateColumns { + s = fmt.Sprintf("%scolumns\nwant %d\nhave %d\n", s, + dashboardDeployment.Settings.Instance.MON.SLOFreshnessLayout.Columns, + retreivedDashboard.MosaicLayout.Columns) + } + if len(s) > 0 { + return fmt.Errorf("%s mon invalid dashboard configuration:\n%s", dashboardDeployment.Core.InstanceName, s) + } + return nil + } + + } else { + return fmt.Errorf("unmanged dashboard type") } - return nil } if dashboardID == "" { @@ -93,7 +139,7 @@ func (dashboardDeployment DashboardDeployment) Deploy() (err error) { log.Printf("mon dashboard created '%s' %s", retreivedDashboard.DisplayName, retreivedDashboard.Name) } else { // Patch dashboard - if needToUpdateWidgets || needToUpdateColumns { + if needToUpdate { dashboard.Etag = retreivedDashboard.Etag retreivedDashboard, err = dashboardService.Patch(dashboardName, &dashboard).Context(dashboardDeployment.Core.Ctx).Do() if err != nil { diff --git a/utilities/mon/meth_dashboarddeployment_deploy_integ_test.go b/utilities/mon/meth_dashboarddeployment_deploy_integ_test.go index f6a772ee..53ca3e59 100644 --- a/utilities/mon/meth_dashboarddeployment_deploy_integ_test.go +++ b/utilities/mon/meth_dashboarddeployment_deploy_integ_test.go @@ -83,7 +83,7 @@ func TestIntegDashboardDeployment_Deploy(t *testing.T) { dashboardDeployment := NewDashboardDeployment() dashboardDeployment.Core = &core dashboardDeployment.Settings.Instance.MON.DisplayName = testDashboardDisplayName - dashboardDeployment.Settings.Instance.MON.Columns = tc.columns + dashboardDeployment.Settings.Instance.MON.GridLayout.Columns = tc.columns dashboardDeployment.Artifacts.Widgets = []*monitoring.Widget{} for _, microserviceName := range tc.microserviceNameList { for _, widgetType := range tc.widgetTypeList { diff --git a/utilities/mon/type_dashboarddeployment.go b/utilities/mon/type_dashboarddeployment.go index 68015176..5a30c0b4 100644 --- a/utilities/mon/type_dashboarddeployment.go +++ b/utilities/mon/type_dashboarddeployment.go @@ -23,6 +23,7 @@ import ( type DashboardDeployment struct { Artifacts struct { Widgets []*monitoring.Widget + Tiles []*monitoring.Tile } Core *deploy.Core Settings struct { diff --git a/utilities/mon/type_dashboardparameters.go b/utilities/mon/type_dashboardparameters.go index 254518f7..e22b0bbf 100644 --- a/utilities/mon/type_dashboardparameters.go +++ b/utilities/mon/type_dashboardparameters.go @@ -16,8 +16,18 @@ package mon // DashboardParameters structure type DashboardParameters struct { - DisplayName string - Columns int64 - MicroServiceNameList []string `yaml:"microServiceNameList"` - WidgetTypeList []string `yaml:"widgetTypeList"` + DisplayName string + GridLayout struct { + Columns int64 + MicroServiceNameList []string `yaml:"microServiceNameList,omitempty"` + WidgetTypeList []string `yaml:"widgetTypeList,omitempty"` + } `yaml:"gridLayout,omitempty"` + SLOFreshnessLayout struct { + Columns int64 + Origin string + Scope string + Flow string + SLO float64 `yaml:"slo,omitempty"` + CutOffBucketNumber int64 `yaml:"cutOffBucketNumber,omitempty"` + } `yaml:"sloFreshnessLayout,omitempty"` } diff --git a/utilities/ramcli/func_makeinstancefolderpath.go b/utilities/ramcli/func_makeinstancefolderpath.go new file mode 100644 index 00000000..60f2b6a5 --- /dev/null +++ b/utilities/ramcli/func_makeinstancefolderpath.go @@ -0,0 +1,29 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the 'License'); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an 'AS IS' BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ramcli + +import ( + "fmt" + "strings" +) + +func makeInstanceFolderPath(instancesFolderPath, instanceName string) (instanceFolderPath string) { + r := []rune(instanceName) + if len(r) > 63 { + instanceName = string(r[0:63]) + } + instanceName = strings.Replace(instanceName, "-", "_", -1) + return fmt.Sprintf("%s/%s", instancesFolderPath, instanceName) +} diff --git a/utilities/ramcli/func_makeinstancefolderpath_unit_test.go b/utilities/ramcli/func_makeinstancefolderpath_unit_test.go new file mode 100644 index 00000000..f453698b --- /dev/null +++ b/utilities/ramcli/func_makeinstancefolderpath_unit_test.go @@ -0,0 +1,45 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the 'License'); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an 'AS IS' BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ramcli + +import ( + "testing" +) + +func TestUnitMakeInstanceFolderPath(t *testing.T) { + var testCases = []struct { + name string + instancesFolderPath string + instanceName string + instanceFolderPath string + }{ + { + name: "mixture", + instancesFolderPath: "services/mysvc/instances", + instanceName: "Joli mois de Mai-Joli mois de Juin-Joli mois de Juillet-Joli mois de Aout", + instanceFolderPath: "services/mysvc/instances/Joli mois de Mai_Joli mois de Juin_Joli mois de Juillet_Joli mo", + }, + } + for _, tc := range testCases { + tc := tc // https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + instanceFolderPath := makeInstanceFolderPath(tc.instancesFolderPath, tc.instanceName) + if instanceFolderPath != tc.instanceFolderPath { + t.Errorf("Error want '%s' and got '%s'", tc.instanceFolderPath, instanceFolderPath) + } + }) + } +} diff --git a/utilities/ramcli/meth_deployment_configureconvertlog2feedorganizations.go b/utilities/ramcli/meth_deployment_configureconvertlog2feedorganizations.go index dc200240..680739e8 100644 --- a/utilities/ramcli/meth_deployment_configureconvertlog2feedorganizations.go +++ b/utilities/ramcli/meth_deployment_configureconvertlog2feedorganizations.go @@ -18,7 +18,6 @@ import ( "fmt" "log" "os" - "strings" "github.com/BrunoReboul/ram/services/convertlog2feed" "github.com/BrunoReboul/ram/utilities/ffo" @@ -55,12 +54,10 @@ func (deployment *Deployment) configureConvertlog2feedOrganizations() (err error } convertlog2feedInstance.GCI.SuperAdminEmail = deployment.Core.SolutionSettings.Monitoring.DirectoryCustomerIDs[directoryCustomerID].SuperAdminEmail - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_org%s_%s", - instancesFolderPath, - serviceName, - organizationID, - sinkNameSuffix), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_org%s_%s", + serviceName, + organizationID, + sinkNameSuffix)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } diff --git a/utilities/ramcli/meth_deployment_configuredumpinventoryassettypes.go b/utilities/ramcli/meth_deployment_configuredumpinventoryassettypes.go index bdbb6f5f..480df569 100644 --- a/utilities/ramcli/meth_deployment_configuredumpinventoryassettypes.go +++ b/utilities/ramcli/meth_deployment_configuredumpinventoryassettypes.go @@ -18,7 +18,6 @@ import ( "fmt" "log" "os" - "strings" "github.com/BrunoReboul/ram/services/dumpinventory" "github.com/BrunoReboul/ram/utilities/cai" @@ -48,7 +47,9 @@ func (deployment *Deployment) configureDumpInventoryAssetTypes() (err error) { // one and only one iam policy feed for all asset types dumpinventoryInstance.CAI.ContentType = "IAM_POLICY" dumpinventoryInstance.CAI.AssetTypes = deployment.Core.SolutionSettings.Monitoring.AssetTypes.IAMPolicies - instanceFolderPath := fmt.Sprintf("%s/%s_org%s_iam_policies", instancesFolderPath, serviceName, organizationID) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_org%s_iam_policies", + serviceName, + organizationID)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } @@ -61,12 +62,10 @@ func (deployment *Deployment) configureDumpInventoryAssetTypes() (err error) { for _, assetType := range deployment.Core.SolutionSettings.Monitoring.AssetTypes.Resources { dumpinventoryInstance.CAI.ContentType = "RESOURCE" dumpinventoryInstance.CAI.AssetTypes = []string{assetType} - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_org%s_%s", - instancesFolderPath, - serviceName, - organizationID, - cai.GetAssetShortTypeName(assetType)), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_org%s_%s", + serviceName, + organizationID, + cai.GetAssetShortTypeName(assetType))) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } diff --git a/utilities/ramcli/meth_deployment_configuregetgroupsettingsdirectories.go b/utilities/ramcli/meth_deployment_configuregetgroupsettingsdirectories.go index 1ed9c1e4..93fc65b4 100644 --- a/utilities/ramcli/meth_deployment_configuregetgroupsettingsdirectories.go +++ b/utilities/ramcli/meth_deployment_configuregetgroupsettingsdirectories.go @@ -18,7 +18,6 @@ import ( "fmt" "log" "os" - "strings" "github.com/BrunoReboul/ram/services/getgroupsettings" "github.com/BrunoReboul/ram/utilities/ffo" @@ -44,11 +43,9 @@ func (deployment *Deployment) configureGetGroupSettingsDirectories() (err error) getgroupsettingsInstance.GCI.SuperAdminEmail = directorySettings.SuperAdminEmail getgroupsettingsInstance.GCF.TriggerTopic = fmt.Sprintf("gci-groups-%s", directoryCustomerID) - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_directory_%s", - instancesFolderPath, - serviceName, - directoryCustomerID), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_directory_%s", + serviceName, + directoryCustomerID)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } diff --git a/utilities/ramcli/meth_deployment_configurelistgroupmembersdirectories.go b/utilities/ramcli/meth_deployment_configurelistgroupmembersdirectories.go index 1142c3e5..c3ab60fc 100644 --- a/utilities/ramcli/meth_deployment_configurelistgroupmembersdirectories.go +++ b/utilities/ramcli/meth_deployment_configurelistgroupmembersdirectories.go @@ -18,7 +18,6 @@ import ( "fmt" "log" "os" - "strings" "github.com/BrunoReboul/ram/services/listgroupmembers" "github.com/BrunoReboul/ram/utilities/ffo" @@ -44,11 +43,9 @@ func (deployment *Deployment) configureListGroupMembersDirectories() (err error) listgroupmembersInstance.GCI.SuperAdminEmail = directorySettings.SuperAdminEmail listgroupmembersInstance.GCF.TriggerTopic = fmt.Sprintf("gci-groups-%s", directoryCustomerID) - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_directory_%s", - instancesFolderPath, - serviceName, - directoryCustomerID), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_directory_%s", + serviceName, + directoryCustomerID)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } diff --git a/utilities/ramcli/meth_deployment_configurelistgroupsdirectories.go b/utilities/ramcli/meth_deployment_configurelistgroupsdirectories.go index cc9072c9..9cb67ddc 100644 --- a/utilities/ramcli/meth_deployment_configurelistgroupsdirectories.go +++ b/utilities/ramcli/meth_deployment_configurelistgroupsdirectories.go @@ -18,7 +18,6 @@ import ( "fmt" "log" "os" - "strings" "github.com/BrunoReboul/ram/services/listgroups" "github.com/BrunoReboul/ram/utilities/ffo" @@ -45,11 +44,9 @@ func (deployment *Deployment) configureListGroupsDirectories() (err error) { listgroupsInstance.GCI.SuperAdminEmail = directorySettings.SuperAdminEmail listgroupsInstance.SCH.Schedulers = deployment.Core.SolutionSettings.Monitoring.ListGroupsDefaultSchedulers - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_directory_%s", - instancesFolderPath, - serviceName, - directoryCustomerID), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_directory_%s", + serviceName, + directoryCustomerID)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } diff --git a/utilities/ramcli/meth_deployment_configurepublish2fsinstances.go b/utilities/ramcli/meth_deployment_configurepublish2fsinstances.go index 1fbef32a..de0b965d 100644 --- a/utilities/ramcli/meth_deployment_configurepublish2fsinstances.go +++ b/utilities/ramcli/meth_deployment_configurepublish2fsinstances.go @@ -18,7 +18,6 @@ import ( "fmt" "log" "os" - "strings" "github.com/BrunoReboul/ram/services/publish2fs" "github.com/BrunoReboul/ram/utilities/ffo" @@ -41,10 +40,8 @@ func (deployment *Deployment) configurePublish2fsInstances() (err error) { } publish2fsInstance.GCF.TriggerTopic = "cai-rces-cloudresourcemanager-Organization" - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_cloudresourcemanager_Organization", - instancesFolderPath, - serviceName), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_cloudresourcemanager_Organization", + serviceName)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } @@ -54,10 +51,8 @@ func (deployment *Deployment) configurePublish2fsInstances() (err error) { log.Printf("done %s", instanceFolderPath) publish2fsInstance.GCF.TriggerTopic = "cai-rces-cloudresourcemanager-Folder" - instanceFolderPath = strings.Replace( - fmt.Sprintf("%s/%s_cloudresourcemanager_Folder", - instancesFolderPath, - serviceName), "-", "_", -1) + instanceFolderPath = makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_cloudresourcemanager_Folder", + serviceName)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } @@ -67,10 +62,8 @@ func (deployment *Deployment) configurePublish2fsInstances() (err error) { log.Printf("done %s", instanceFolderPath) publish2fsInstance.GCF.TriggerTopic = "cai-rces-cloudresourcemanager-Project" - instanceFolderPath = strings.Replace( - fmt.Sprintf("%s/%s_cloudresourcemanager_Project", - instancesFolderPath, - serviceName), "-", "_", -1) + instanceFolderPath = makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_cloudresourcemanager_Project", + serviceName)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } @@ -80,10 +73,8 @@ func (deployment *Deployment) configurePublish2fsInstances() (err error) { log.Printf("done %s", instanceFolderPath) publish2fsInstance.GCF.TriggerTopic = "gci-groupMembers" - instanceFolderPath = strings.Replace( - fmt.Sprintf("%s/%s_gci_groupMembers", - instancesFolderPath, - serviceName), "-", "_", -1) + instanceFolderPath = makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_gci_groupMembers", + serviceName)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } @@ -94,11 +85,9 @@ func (deployment *Deployment) configurePublish2fsInstances() (err error) { for directoryCustomerID := range deployment.Core.SolutionSettings.Monitoring.DirectoryCustomerIDs { publish2fsInstance.GCF.TriggerTopic = fmt.Sprintf("gci-groups-%s", directoryCustomerID) - instanceFolderPath = strings.Replace( - fmt.Sprintf("%s/%s_gci_groups_%s", - instancesFolderPath, - serviceName, - directoryCustomerID), "-", "_", -1) + instanceFolderPath = makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_gci_groups_%s", + serviceName, + directoryCustomerID)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } diff --git a/utilities/ramcli/meth_deployment_configuresetdashboards.go b/utilities/ramcli/meth_deployment_configuresetdashboards.go index 7fe1c2ff..66c256c0 100644 --- a/utilities/ramcli/meth_deployment_configuresetdashboards.go +++ b/utilities/ramcli/meth_deployment_configuresetdashboards.go @@ -37,19 +37,54 @@ func (deployment *Deployment) configureSetDashboards() (err error) { } log.Printf("configure %s", serviceName) - var setDashboardsInstanceDeployment setdashboards.InstanceDeployment - setDashboardsInstance := setDashboardsInstanceDeployment.Settings.Instance instancesFolderPath := fmt.Sprintf("%s/%s", serviceFolderPath, solution.InstancesFolderName) if _, err := os.Stat(instancesFolderPath); os.IsNotExist(err) { os.Mkdir(instancesFolderPath, 0755) } - // var dashboards = map[string][]string{ - // "RAM core microservices": []string{"dumpinventory", "splitdump", "monitor", "stream2bq", "publish2fs", "upload2gcs"}, - // "RAM groups microservices": []string{"convertlog2feed", "listgroups", "getgroupsettings", "listgroupmembers"}, - // } - // setDashboardsInstance.MON.Columns = 4 - // setDashboardsInstance.MON.WidgetTypeList = []string{"widgetGCFActiveInstances", "widgetGCFExecutionCount", "widgetGCFExecutionTime", "widgetGCFMemoryUsage"} + var setSLOFreshnessInstanceDeployment setdashboards.InstanceDeployment + setSLOFreshnessInstance := setSLOFreshnessInstanceDeployment.Settings.Instance + setSLOFreshnessInstance.MON.SLOFreshnessLayout.Columns = 12 + for _, freshnessSLOdefiniton := range deployment.Core.SolutionSettings.Hosting.FreshnessSLODefinitions { + setSLOFreshnessInstance.MON.SLOFreshnessLayout.Origin = freshnessSLOdefiniton.Origin + switch setSLOFreshnessInstance.MON.SLOFreshnessLayout.Origin { + case "batch-export": + setSLOFreshnessInstance.MON.SLOFreshnessLayout.Scope = "GCP" + setSLOFreshnessInstance.MON.SLOFreshnessLayout.Flow = "batch" + case "real-time": + setSLOFreshnessInstance.MON.SLOFreshnessLayout.Scope = "GCP" + setSLOFreshnessInstance.MON.SLOFreshnessLayout.Flow = "real-time" + case "batch-listgroups": + setSLOFreshnessInstance.MON.SLOFreshnessLayout.Scope = "Groups" + setSLOFreshnessInstance.MON.SLOFreshnessLayout.Flow = "batch" + case "real-time-log-export": + setSLOFreshnessInstance.MON.SLOFreshnessLayout.Scope = "Groups" + setSLOFreshnessInstance.MON.SLOFreshnessLayout.Flow = "real-time" + } + setSLOFreshnessInstance.MON.SLOFreshnessLayout.SLO = freshnessSLOdefiniton.SLO + setSLOFreshnessInstance.MON.SLOFreshnessLayout.CutOffBucketNumber = freshnessSLOdefiniton.CutOffBucketNumber + setSLOFreshnessInstance.MON.DisplayName = fmt.Sprintf("SLO freshness %s %s", + setSLOFreshnessInstance.MON.SLOFreshnessLayout.Scope, + setSLOFreshnessInstance.MON.SLOFreshnessLayout.Flow) + n := strings.ToLower(strings.Replace(setSLOFreshnessInstance.MON.DisplayName, " ", "_", -1)) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_%s", + serviceName, + n)) + + if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { + os.Mkdir(instanceFolderPath, 0755) + } + if err = ffo.MarshalYAMLWrite(fmt.Sprintf("%s/%s", + instanceFolderPath, + solution.InstanceSettingsFileName), + setSLOFreshnessInstance); err != nil { + return err + } + log.Printf("done %s", instanceFolderPath) + } + + var setDashboardsInstanceDeployment setdashboards.InstanceDeployment + setDashboardsInstance := setDashboardsInstanceDeployment.Settings.Instance type dboard struct { columns int64 @@ -70,11 +105,6 @@ func (deployment *Deployment) configureSetDashboards() (err error) { dashboard.microServiceNameList = []string{"convertlog2feed", "listgroups", "getgroupsettings", "listgroupmembers"} dashboards["RAM groups microservices"] = dashboard - // dashboard.columns = 3 - // dashboard.widgetTypeList = []string{"widgetRAMe2eLatency", "widgetRAMLatency", "widgetRAMTriggerAge"} - // dashboard.microServiceNameList = []string{"stream2bq", "monitor", "upload2gcs", "publish2fs", "splitdump", "dumpinventory", "listgroupmembers", "getgroupsettings", "listgroups", "convertlog2feed"} - // dashboards["RAM latency"] = dashboard - dashboard.columns = 3 dashboard.widgetTypeList = []string{"widgetRAMe2eLatency", "widgetRAMLatency", "widgetRAMTriggerAge", "widgetSubOldestUnackedMsg", "widgetGCFActiveInstances", "widgetGCFExecutionCount", "widgetGCFExecutionTime", "widgetGCFMemoryUsage"} for _, microServiceName := range []string{"stream2bq", "monitor", "upload2gcs", "publish2fs", "splitdump", "dumpinventory", "listgroupmembers", "getgroupsettings", "listgroups", "convertlog2feed"} { @@ -84,13 +114,12 @@ func (deployment *Deployment) configureSetDashboards() (err error) { for displayName, dashboard := range dashboards { setDashboardsInstance.MON.DisplayName = displayName - setDashboardsInstance.MON.Columns = dashboard.columns - setDashboardsInstance.MON.WidgetTypeList = dashboard.widgetTypeList - setDashboardsInstance.MON.MicroServiceNameList = dashboard.microServiceNameList - instanceFolderPath := fmt.Sprintf("%s/%s_%s", - instancesFolderPath, + setDashboardsInstance.MON.GridLayout.Columns = dashboard.columns + setDashboardsInstance.MON.GridLayout.WidgetTypeList = dashboard.widgetTypeList + setDashboardsInstance.MON.GridLayout.MicroServiceNameList = dashboard.microServiceNameList + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_%s", serviceName, - strings.ToLower(strings.Replace(displayName, " ", "_", -1))) + strings.ToLower(strings.Replace(displayName, " ", "_", -1)))) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } @@ -102,5 +131,6 @@ func (deployment *Deployment) configureSetDashboards() (err error) { } log.Printf("done %s", instanceFolderPath) } + return nil } diff --git a/utilities/ramcli/meth_deployment_configuresetfeedsassettypes.go b/utilities/ramcli/meth_deployment_configuresetfeedsassettypes.go index 540d6480..71f48d50 100644 --- a/utilities/ramcli/meth_deployment_configuresetfeedsassettypes.go +++ b/utilities/ramcli/meth_deployment_configuresetfeedsassettypes.go @@ -18,7 +18,6 @@ import ( "fmt" "log" "os" - "strings" "github.com/BrunoReboul/ram/services/setfeeds" "github.com/BrunoReboul/ram/utilities/cai" @@ -47,7 +46,9 @@ func (deployment *Deployment) configureSetFeedsAssetTypes() (err error) { // one and only one iam policy feed for all asset types setfeedsInstance.CAI.ContentType = "IAM_POLICY" setfeedsInstance.CAI.AssetTypes = deployment.Core.SolutionSettings.Monitoring.AssetTypes.IAMPolicies - instanceFolderPath := fmt.Sprintf("%s/%s_org%s_iam_policies", instancesFolderPath, serviceName, organizationID) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_org%s_iam_policies", + serviceName, + organizationID)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } @@ -60,12 +61,10 @@ func (deployment *Deployment) configureSetFeedsAssetTypes() (err error) { for _, assetType := range deployment.Core.SolutionSettings.Monitoring.AssetTypes.Resources { setfeedsInstance.CAI.ContentType = "RESOURCE" setfeedsInstance.CAI.AssetTypes = []string{assetType} - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_org%s_%s", - instancesFolderPath, - serviceName, - organizationID, - cai.GetAssetShortTypeName(assetType)), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_org%s_%s", + serviceName, + organizationID, + cai.GetAssetShortTypeName(assetType))) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } diff --git a/utilities/ramcli/meth_deployment_configuresetlogmetrics.go b/utilities/ramcli/meth_deployment_configuresetlogmetrics.go index 9c96ed96..123f671a 100644 --- a/utilities/ramcli/meth_deployment_configuresetlogmetrics.go +++ b/utilities/ramcli/meth_deployment_configuresetlogmetrics.go @@ -168,10 +168,9 @@ func (deployment *Deployment) configureSetLogMetrics() (err error) { } for _, logMetric := range logMetricList { - instanceFolderPath := fmt.Sprintf("%s/%s_%s", - instancesFolderPath, + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_%s", serviceName, - strings.ToLower(strings.Replace(logMetric.GLO.MetricID, " ", "_", -1))) + strings.ToLower(logMetric.GLO.MetricID))) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } diff --git a/utilities/ramcli/meth_deployment_configuresetlogsinksorganizations.go b/utilities/ramcli/meth_deployment_configuresetlogsinksorganizations.go index 82169222..d396d950 100644 --- a/utilities/ramcli/meth_deployment_configuresetlogsinksorganizations.go +++ b/utilities/ramcli/meth_deployment_configuresetlogsinksorganizations.go @@ -18,7 +18,6 @@ import ( "fmt" "log" "os" - "strings" "github.com/BrunoReboul/ram/services/setlogsinks" "github.com/BrunoReboul/ram/utilities/ffo" @@ -50,12 +49,10 @@ func (deployment *Deployment) configureLogSinksOrganizations() (err error) { setlogsinksInstance.LSK.Filter = filter setlogsinksInstance.LSK.TopicName = fmt.Sprintf("log-org%s-%s", organizationID, sinkNameSuffix) - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_org%s_%s", - instancesFolderPath, - serviceName, - organizationID, - sinkNameSuffix), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_org%s_%s", + serviceName, + organizationID, + sinkNameSuffix)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } diff --git a/utilities/ramcli/meth_deployment_configuresplitdumpsingleinstance.go b/utilities/ramcli/meth_deployment_configuresplitdumpsingleinstance.go index f52d4513..d211b5b2 100644 --- a/utilities/ramcli/meth_deployment_configuresplitdumpsingleinstance.go +++ b/utilities/ramcli/meth_deployment_configuresplitdumpsingleinstance.go @@ -18,7 +18,6 @@ import ( "fmt" "log" "os" - "strings" "github.com/BrunoReboul/ram/services/splitdump" "github.com/BrunoReboul/ram/utilities/ffo" @@ -44,10 +43,8 @@ func (deployment *Deployment) configureSplitDumpSingleInstance() (err error) { splitdumpInstance.SplitThresholdLineNumber = 1000 splitdumpInstance.ScannerBufferSizeKiloBytes = 128 - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_single_instance", - instancesFolderPath, - serviceName), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_single_instance", + serviceName)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } diff --git a/utilities/ramcli/meth_deployment_configurestream2bqassettypes.go b/utilities/ramcli/meth_deployment_configurestream2bqassettypes.go index 350ba9a4..acd2488d 100644 --- a/utilities/ramcli/meth_deployment_configurestream2bqassettypes.go +++ b/utilities/ramcli/meth_deployment_configurestream2bqassettypes.go @@ -18,7 +18,6 @@ import ( "fmt" "log" "os" - "strings" "github.com/BrunoReboul/ram/services/stream2bq" "github.com/BrunoReboul/ram/utilities/cai" @@ -45,10 +44,9 @@ func (deployment *Deployment) configureStream2bqAssetTypes() (err error) { for _, tableName := range []string{"violations", "complianceStatus"} { stream2bqInstance.Bigquery.TableName = tableName stream2bqInstance.GCF.TriggerTopic = fmt.Sprintf("ram-%s", tableName) - instanceFolderPath := fmt.Sprintf("%s/%s_%s", - instancesFolderPath, + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_%s", serviceName, - tableName) + tableName)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } @@ -63,11 +61,9 @@ func (deployment *Deployment) configureStream2bqAssetTypes() (err error) { stream2bqInstance.Bigquery.TableName = "assets" assetShortName := cai.GetAssetShortTypeName(assetType) stream2bqInstance.GCF.TriggerTopic = fmt.Sprintf("cai-rces-%s", assetShortName) - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_rces_%s", - instancesFolderPath, - serviceName, - cai.GetAssetShortTypeName(assetType)), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_rces_%s", + serviceName, + cai.GetAssetShortTypeName(assetType))) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } @@ -79,10 +75,8 @@ func (deployment *Deployment) configureStream2bqAssetTypes() (err error) { // iam policies related assets stream2bqInstance.Bigquery.TableName = "assets" stream2bqInstance.GCF.TriggerTopic = deployment.Core.SolutionSettings.Hosting.Pubsub.TopicNames.IAMPolicies - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_iam_assets", - instancesFolderPath, - serviceName), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_iam_assets", + serviceName)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } diff --git a/utilities/ramcli/meth_deployment_configureupload2gcsassettypes.go b/utilities/ramcli/meth_deployment_configureupload2gcsassettypes.go index 9fc7b19d..df49e0d5 100644 --- a/utilities/ramcli/meth_deployment_configureupload2gcsassettypes.go +++ b/utilities/ramcli/meth_deployment_configureupload2gcsassettypes.go @@ -18,7 +18,6 @@ import ( "fmt" "log" "os" - "strings" "github.com/BrunoReboul/ram/services/upload2gcs" "github.com/BrunoReboul/ram/utilities/cai" @@ -45,11 +44,9 @@ func (deployment *Deployment) configureUpload2gcsMetadataTypes() (err error) { for _, assetType := range deployment.Core.SolutionSettings.Monitoring.AssetTypes.Resources { assetShortName := cai.GetAssetShortTypeName(assetType) upload2gcsInstance.GCF.TriggerTopic = fmt.Sprintf("cai-rces-%s", assetShortName) - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_rces_%s", - instancesFolderPath, - serviceName, - cai.GetAssetShortTypeName(assetType)), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_rces_%s", + serviceName, + cai.GetAssetShortTypeName(assetType))) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } @@ -61,10 +58,8 @@ func (deployment *Deployment) configureUpload2gcsMetadataTypes() (err error) { // iam policy upload2gcsInstance.GCF.TriggerTopic = deployment.Core.SolutionSettings.Hosting.Pubsub.TopicNames.IAMPolicies - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_iam_policies", - instancesFolderPath, - serviceName), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_iam_policies", + serviceName)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } @@ -76,11 +71,9 @@ func (deployment *Deployment) configureUpload2gcsMetadataTypes() (err error) { // groups by directory for directoryCustomerID := range deployment.Core.SolutionSettings.Monitoring.DirectoryCustomerIDs { upload2gcsInstance.GCF.TriggerTopic = fmt.Sprintf("gci-groups-%s", directoryCustomerID) - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_%s", - instancesFolderPath, - serviceName, - upload2gcsInstance.GCF.TriggerTopic), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_%s", + serviceName, + upload2gcsInstance.GCF.TriggerTopic)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } @@ -95,11 +88,9 @@ func (deployment *Deployment) configureUpload2gcsMetadataTypes() (err error) { for _, topicName := range []string{deployment.Core.SolutionSettings.Hosting.Pubsub.TopicNames.GCIGroupMembers, deployment.Core.SolutionSettings.Hosting.Pubsub.TopicNames.GCIGroupSettings} { upload2gcsInstance.GCF.TriggerTopic = topicName - instanceFolderPath := strings.Replace( - fmt.Sprintf("%s/%s_%s", - instancesFolderPath, - serviceName, - topicName), "-", "_", -1) + instanceFolderPath := makeInstanceFolderPath(instancesFolderPath, fmt.Sprintf("%s_%s", + serviceName, + topicName)) if _, err := os.Stat(instanceFolderPath); os.IsNotExist(err) { os.Mkdir(instanceFolderPath, 0755) } diff --git a/utilities/solution/type_settings.go b/utilities/solution/type_settings.go index 2f4e4629..262cb488 100644 --- a/utilities/solution/type_settings.go +++ b/utilities/solution/type_settings.go @@ -78,6 +78,11 @@ type Settings struct { Assets string `valid:"isNotZeroValue"` } `yaml:"collectionIDs"` } + FreshnessSLODefinitions []struct { + Origin string + SLO float64 + CutOffBucketNumber int64 `yaml:"cutOffBucketNumber"` + } `yaml:"freshnessSLODefinitions"` } Monitoring struct { OrganizationIDs []string `yaml:"organizationIDs"` diff --git a/utilities/str/func_hash.go b/utilities/str/func_hash.go new file mode 100644 index 00000000..97bfecc6 --- /dev/null +++ b/utilities/str/func_hash.go @@ -0,0 +1,27 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the 'License'); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an 'AS IS' BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package str + +import ( + "crypto/sha1" + "encoding/base64" +) + +// Hash used sha1 to hash a string to a shorter one +func Hash(s string) string { + hasher := sha1.New() + hasher.Write([]byte(s)) + return base64.URLEncoding.EncodeToString(hasher.Sum(nil)) +}