From 0886e68f247bc47be993959bfc7a5ea35418d21f Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 9 Apr 2019 13:26:25 -0700 Subject: [PATCH 001/191] Initial Release --- flytestdlib/.gitignore | 113 +++ flytestdlib/.golangci.yml | 25 + flytestdlib/.travis.yml | 20 + flytestdlib/CODE_OF_CONDUCT.md | 2 + flytestdlib/Gopkg.lock | 516 ++++++++++++++ flytestdlib/Gopkg.toml | 72 ++ flytestdlib/LICENSE | 202 ++++++ flytestdlib/Makefile | 24 + flytestdlib/NOTICE | 21 + flytestdlib/README.rst | 35 + flytestdlib/atomic/atomic.go | 129 ++++ flytestdlib/atomic/atomic_test.go | 61 ++ flytestdlib/atomic/non_blocking_lock.go | 23 + flytestdlib/atomic/non_blocking_lock_test.go | 15 + .../lyft/golang_test_targets/Makefile | 31 + .../lyft/golang_test_targets/Readme.rst | 31 + .../lyft/golang_test_targets/goimports | 3 + flytestdlib/boilerplate/update.cfg | 2 + flytestdlib/cli/pflags/api/generator.go | 277 ++++++++ flytestdlib/cli/pflags/api/generator_test.go | 56 ++ flytestdlib/cli/pflags/api/pflag_provider.go | 90 +++ flytestdlib/cli/pflags/api/sample.go | 53 ++ flytestdlib/cli/pflags/api/tag.go | 66 ++ flytestdlib/cli/pflags/api/templates.go | 175 +++++ .../cli/pflags/api/testdata/testtype.go | 36 + .../cli/pflags/api/testdata/testtype_test.go | 520 ++++++++++++++ flytestdlib/cli/pflags/api/types.go | 36 + flytestdlib/cli/pflags/api/utils.go | 32 + flytestdlib/cli/pflags/cmd/root.go | 71 ++ flytestdlib/cli/pflags/cmd/version.go | 17 + flytestdlib/cli/pflags/main.go | 15 + flytestdlib/cli/pflags/readme.rst | 24 + flytestdlib/config/accessor.go | 61 ++ flytestdlib/config/accessor_test.go | 91 +++ flytestdlib/config/config_cmd.go | 113 +++ flytestdlib/config/config_cmd_test.go | 64 ++ flytestdlib/config/duration.go | 47 ++ flytestdlib/config/duration_test.go | 66 ++ flytestdlib/config/errors.go | 37 + flytestdlib/config/errors_test.go | 31 + flytestdlib/config/files/finder.go | 83 +++ flytestdlib/config/files/finder_test.go | 28 + .../config/files/testdata/config-1.yaml | 9 + .../config/files/testdata/config-2.yaml | 2 + .../config/files/testdata/other-group-1.yaml | 9 + .../config/files/testdata/other-group-2.yaml | 2 + flytestdlib/config/port.go | 56 ++ flytestdlib/config/port_test.go | 81 +++ flytestdlib/config/section.go | 230 +++++++ flytestdlib/config/section_test.go | 119 ++++ flytestdlib/config/testdata/config.yaml | 11 + flytestdlib/config/tests/accessor_test.go | 641 +++++++++++++++++ flytestdlib/config/tests/config_cmd_test.go | 92 +++ .../config/tests/testdata/array_configs.yaml | 7 + .../config/tests/testdata/bad_config.yaml | 13 + flytestdlib/config/tests/testdata/config.yaml | 11 + .../config/tests/testdata/nested_config.yaml | 11 + flytestdlib/config/tests/types_test.go | 66 ++ flytestdlib/config/url.go | 36 + flytestdlib/config/url_test.go | 59 ++ flytestdlib/config/utils.go | 69 ++ flytestdlib/config/utils_test.go | 39 ++ flytestdlib/config/viper/collection.go | 175 +++++ flytestdlib/config/viper/viper.go | 357 ++++++++++ flytestdlib/contextutils/context.go | 140 ++++ flytestdlib/contextutils/context_test.go | 113 +++ flytestdlib/internal/utils/parsers.go | 20 + flytestdlib/internal/utils/parsers_test.go | 25 + flytestdlib/ioutils/bytes.go | 21 + flytestdlib/ioutils/bytes_test.go | 17 + flytestdlib/ioutils/timed_readers.go | 17 + flytestdlib/ioutils/timed_readers_test.go | 20 + flytestdlib/logger/config.go | 81 +++ flytestdlib/logger/config_flags.go | 21 + flytestdlib/logger/config_flags_test.go | 190 ++++++ flytestdlib/logger/config_test.go | 20 + flytestdlib/logger/logger.go | 337 +++++++++ flytestdlib/logger/logger_test.go | 643 ++++++++++++++++++ flytestdlib/pbhash/pbhash.go | 58 ++ flytestdlib/pbhash/pbhash_test.go | 145 ++++ flytestdlib/profutils/server.go | 116 ++++ flytestdlib/profutils/server_test.go | 103 +++ flytestdlib/promutils/labeled/counter.go | 65 ++ flytestdlib/promutils/labeled/counter_test.go | 31 + flytestdlib/promutils/labeled/keys.go | 47 ++ flytestdlib/promutils/labeled/keys_test.go | 24 + .../promutils/labeled/metric_option.go | 15 + .../promutils/labeled/metric_option_test.go | 13 + flytestdlib/promutils/labeled/stopwatch.go | 87 +++ .../promutils/labeled/stopwatch_test.go | 47 ++ .../promutils/labeled/timer_wrapper.go | 20 + .../promutils/labeled/timer_wrapper_test.go | 28 + flytestdlib/promutils/scope.go | 434 ++++++++++++ flytestdlib/promutils/scope_test.go | 151 ++++ flytestdlib/promutils/workqueue.go | 82 +++ flytestdlib/promutils/workqueue_test.go | 42 ++ flytestdlib/sets/generic_set.go | 195 ++++++ flytestdlib/sets/generic_set_test.go | 116 ++++ flytestdlib/storage/cached_rawstore.go | 123 ++++ flytestdlib/storage/cached_rawstore_test.go | 182 +++++ flytestdlib/storage/config.go | 85 +++ flytestdlib/storage/config_flags.go | 28 + flytestdlib/storage/config_flags_test.go | 344 ++++++++++ flytestdlib/storage/config_test.go | 45 ++ flytestdlib/storage/copy_impl.go | 60 ++ flytestdlib/storage/copy_impl_test.go | 82 +++ flytestdlib/storage/localstore.go | 48 ++ flytestdlib/storage/localstore_test.go | 66 ++ flytestdlib/storage/mem_store.go | 74 ++ flytestdlib/storage/mem_store_test.go | 78 +++ flytestdlib/storage/protobuf_store.go | 85 +++ flytestdlib/storage/protobuf_store_test.go | 41 ++ flytestdlib/storage/rawstores.go | 40 ++ flytestdlib/storage/s3store.go | 102 +++ flytestdlib/storage/s3stsore_test.go | 26 + flytestdlib/storage/storage.go | 95 +++ flytestdlib/storage/storage_test.go | 52 ++ flytestdlib/storage/stow_store.go | 174 +++++ flytestdlib/storage/stow_store_test.go | 133 ++++ flytestdlib/storage/testdata/config.yaml | 14 + flytestdlib/storage/url_path.go | 44 ++ flytestdlib/storage/url_path_test.go | 15 + flytestdlib/storage/utils.go | 34 + flytestdlib/tests/config_test.go | 78 +++ flytestdlib/tests/testdata/combined.yaml | 19 + flytestdlib/utils/auto_refresh_cache.go | 99 +++ flytestdlib/utils/auto_refresh_cache_test.go | 108 +++ .../utils/auto_refresh_example_test.go | 88 +++ flytestdlib/utils/rate_limiter.go | 35 + flytestdlib/utils/rate_limiter_test.go | 39 ++ flytestdlib/utils/sequencer.go | 39 ++ flytestdlib/utils/sequencer_test.go | 54 ++ flytestdlib/version/version.go | 29 + flytestdlib/version/version_test.go | 29 + flytestdlib/yamlutils/yaml_json.go | 17 + 135 files changed, 11697 insertions(+) create mode 100644 flytestdlib/.gitignore create mode 100644 flytestdlib/.golangci.yml create mode 100644 flytestdlib/.travis.yml create mode 100644 flytestdlib/CODE_OF_CONDUCT.md create mode 100644 flytestdlib/Gopkg.lock create mode 100644 flytestdlib/Gopkg.toml create mode 100644 flytestdlib/LICENSE create mode 100644 flytestdlib/Makefile create mode 100644 flytestdlib/NOTICE create mode 100644 flytestdlib/README.rst create mode 100644 flytestdlib/atomic/atomic.go create mode 100644 flytestdlib/atomic/atomic_test.go create mode 100644 flytestdlib/atomic/non_blocking_lock.go create mode 100644 flytestdlib/atomic/non_blocking_lock_test.go create mode 100644 flytestdlib/boilerplate/lyft/golang_test_targets/Makefile create mode 100644 flytestdlib/boilerplate/lyft/golang_test_targets/Readme.rst create mode 100755 flytestdlib/boilerplate/lyft/golang_test_targets/goimports create mode 100644 flytestdlib/boilerplate/update.cfg create mode 100644 flytestdlib/cli/pflags/api/generator.go create mode 100644 flytestdlib/cli/pflags/api/generator_test.go create mode 100644 flytestdlib/cli/pflags/api/pflag_provider.go create mode 100644 flytestdlib/cli/pflags/api/sample.go create mode 100644 flytestdlib/cli/pflags/api/tag.go create mode 100644 flytestdlib/cli/pflags/api/templates.go create mode 100755 flytestdlib/cli/pflags/api/testdata/testtype.go create mode 100755 flytestdlib/cli/pflags/api/testdata/testtype_test.go create mode 100644 flytestdlib/cli/pflags/api/types.go create mode 100644 flytestdlib/cli/pflags/api/utils.go create mode 100644 flytestdlib/cli/pflags/cmd/root.go create mode 100644 flytestdlib/cli/pflags/cmd/version.go create mode 100644 flytestdlib/cli/pflags/main.go create mode 100644 flytestdlib/cli/pflags/readme.rst create mode 100644 flytestdlib/config/accessor.go create mode 100644 flytestdlib/config/accessor_test.go create mode 100644 flytestdlib/config/config_cmd.go create mode 100644 flytestdlib/config/config_cmd_test.go create mode 100644 flytestdlib/config/duration.go create mode 100644 flytestdlib/config/duration_test.go create mode 100644 flytestdlib/config/errors.go create mode 100644 flytestdlib/config/errors_test.go create mode 100644 flytestdlib/config/files/finder.go create mode 100644 flytestdlib/config/files/finder_test.go create mode 100644 flytestdlib/config/files/testdata/config-1.yaml create mode 100755 flytestdlib/config/files/testdata/config-2.yaml create mode 100644 flytestdlib/config/files/testdata/other-group-1.yaml create mode 100755 flytestdlib/config/files/testdata/other-group-2.yaml create mode 100644 flytestdlib/config/port.go create mode 100644 flytestdlib/config/port_test.go create mode 100644 flytestdlib/config/section.go create mode 100644 flytestdlib/config/section_test.go create mode 100755 flytestdlib/config/testdata/config.yaml create mode 100644 flytestdlib/config/tests/accessor_test.go create mode 100644 flytestdlib/config/tests/config_cmd_test.go create mode 100644 flytestdlib/config/tests/testdata/array_configs.yaml create mode 100644 flytestdlib/config/tests/testdata/bad_config.yaml create mode 100755 flytestdlib/config/tests/testdata/config.yaml create mode 100755 flytestdlib/config/tests/testdata/nested_config.yaml create mode 100644 flytestdlib/config/tests/types_test.go create mode 100644 flytestdlib/config/url.go create mode 100644 flytestdlib/config/url_test.go create mode 100644 flytestdlib/config/utils.go create mode 100644 flytestdlib/config/utils_test.go create mode 100644 flytestdlib/config/viper/collection.go create mode 100644 flytestdlib/config/viper/viper.go create mode 100644 flytestdlib/contextutils/context.go create mode 100644 flytestdlib/contextutils/context_test.go create mode 100644 flytestdlib/internal/utils/parsers.go create mode 100644 flytestdlib/internal/utils/parsers_test.go create mode 100644 flytestdlib/ioutils/bytes.go create mode 100644 flytestdlib/ioutils/bytes_test.go create mode 100644 flytestdlib/ioutils/timed_readers.go create mode 100644 flytestdlib/ioutils/timed_readers_test.go create mode 100644 flytestdlib/logger/config.go create mode 100755 flytestdlib/logger/config_flags.go create mode 100755 flytestdlib/logger/config_flags_test.go create mode 100644 flytestdlib/logger/config_test.go create mode 100644 flytestdlib/logger/logger.go create mode 100644 flytestdlib/logger/logger_test.go create mode 100644 flytestdlib/pbhash/pbhash.go create mode 100644 flytestdlib/pbhash/pbhash_test.go create mode 100644 flytestdlib/profutils/server.go create mode 100644 flytestdlib/profutils/server_test.go create mode 100644 flytestdlib/promutils/labeled/counter.go create mode 100644 flytestdlib/promutils/labeled/counter_test.go create mode 100644 flytestdlib/promutils/labeled/keys.go create mode 100644 flytestdlib/promutils/labeled/keys_test.go create mode 100644 flytestdlib/promutils/labeled/metric_option.go create mode 100644 flytestdlib/promutils/labeled/metric_option_test.go create mode 100644 flytestdlib/promutils/labeled/stopwatch.go create mode 100644 flytestdlib/promutils/labeled/stopwatch_test.go create mode 100644 flytestdlib/promutils/labeled/timer_wrapper.go create mode 100644 flytestdlib/promutils/labeled/timer_wrapper_test.go create mode 100644 flytestdlib/promutils/scope.go create mode 100644 flytestdlib/promutils/scope_test.go create mode 100644 flytestdlib/promutils/workqueue.go create mode 100644 flytestdlib/promutils/workqueue_test.go create mode 100644 flytestdlib/sets/generic_set.go create mode 100644 flytestdlib/sets/generic_set_test.go create mode 100644 flytestdlib/storage/cached_rawstore.go create mode 100644 flytestdlib/storage/cached_rawstore_test.go create mode 100644 flytestdlib/storage/config.go create mode 100755 flytestdlib/storage/config_flags.go create mode 100755 flytestdlib/storage/config_flags_test.go create mode 100644 flytestdlib/storage/config_test.go create mode 100644 flytestdlib/storage/copy_impl.go create mode 100644 flytestdlib/storage/copy_impl_test.go create mode 100644 flytestdlib/storage/localstore.go create mode 100644 flytestdlib/storage/localstore_test.go create mode 100644 flytestdlib/storage/mem_store.go create mode 100644 flytestdlib/storage/mem_store_test.go create mode 100644 flytestdlib/storage/protobuf_store.go create mode 100644 flytestdlib/storage/protobuf_store_test.go create mode 100644 flytestdlib/storage/rawstores.go create mode 100644 flytestdlib/storage/s3store.go create mode 100644 flytestdlib/storage/s3stsore_test.go create mode 100644 flytestdlib/storage/storage.go create mode 100644 flytestdlib/storage/storage_test.go create mode 100644 flytestdlib/storage/stow_store.go create mode 100644 flytestdlib/storage/stow_store_test.go create mode 100755 flytestdlib/storage/testdata/config.yaml create mode 100644 flytestdlib/storage/url_path.go create mode 100644 flytestdlib/storage/url_path_test.go create mode 100644 flytestdlib/storage/utils.go create mode 100644 flytestdlib/tests/config_test.go create mode 100755 flytestdlib/tests/testdata/combined.yaml create mode 100644 flytestdlib/utils/auto_refresh_cache.go create mode 100644 flytestdlib/utils/auto_refresh_cache_test.go create mode 100644 flytestdlib/utils/auto_refresh_example_test.go create mode 100644 flytestdlib/utils/rate_limiter.go create mode 100644 flytestdlib/utils/rate_limiter_test.go create mode 100644 flytestdlib/utils/sequencer.go create mode 100644 flytestdlib/utils/sequencer_test.go create mode 100644 flytestdlib/version/version.go create mode 100644 flytestdlib/version/version_test.go create mode 100644 flytestdlib/yamlutils/yaml_json.go diff --git a/flytestdlib/.gitignore b/flytestdlib/.gitignore new file mode 100644 index 0000000000..00820a03e4 --- /dev/null +++ b/flytestdlib/.gitignore @@ -0,0 +1,113 @@ + +# Temporary Build Files +tmp/_output +tmp/_test + + +# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode + +### Emacs ### +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile +projectile-bookmarks.eld + +# directory configuration +.dir-locals.el + +# saveplace +places + +# url cache +url/cache/ + +# cedet +ede-projects.el + +# smex +smex-items + +# company-statistics +company-statistics-cache.el + +# anaconda-mode +anaconda-mode/ + +### Go ### +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib +vendor/ + +# Test binary, build with 'go test -c' +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +### Vim ### +# swap +.sw[a-p] +.*.sw[a-p] +# session +Session.vim +# temporary +.netrwhist +# auto-generated tag files +tags + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history + +### GoLand ### +.idea/* + + +# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode diff --git a/flytestdlib/.golangci.yml b/flytestdlib/.golangci.yml new file mode 100644 index 0000000000..dbfea73e09 --- /dev/null +++ b/flytestdlib/.golangci.yml @@ -0,0 +1,25 @@ +run: + skip-dirs: + - pkg/client + +linters: + disable-all: true + enable: + - deadcode + - errcheck + - gas + - goconst + - goimports + - golint + - gosimple + - govet + - ineffassign + - misspell + - nakedret + - staticcheck + - structcheck + - typecheck + - unconvert + - unparam + - unused + - varcheck diff --git a/flytestdlib/.travis.yml b/flytestdlib/.travis.yml new file mode 100644 index 0000000000..91723384da --- /dev/null +++ b/flytestdlib/.travis.yml @@ -0,0 +1,20 @@ +sudo: required +language: go +go: + - "1.10" +services: + - docker +jobs: + include: + - stage: test + name: unit tests + install: make install + script: make test_unit + - stage: test + name: benchmark tests + install: make install + script: make test_benchmark + - stage: test + install: make install + name: lint + script: make lint diff --git a/flytestdlib/CODE_OF_CONDUCT.md b/flytestdlib/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..4c3a38cc48 --- /dev/null +++ b/flytestdlib/CODE_OF_CONDUCT.md @@ -0,0 +1,2 @@ +This project is governed by [Lyft's code of conduct](https://github.com/lyft/code-of-conduct). +All contributors and participants agree to abide by its terms. diff --git a/flytestdlib/Gopkg.lock b/flytestdlib/Gopkg.lock new file mode 100644 index 0000000000..a56ebd2dba --- /dev/null +++ b/flytestdlib/Gopkg.lock @@ -0,0 +1,516 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + digest = "1:7fbdc0ca5fc0b0bb66b81ec2fdca82fbe64416742267f11aceb8ed56e6ca3121" + name = "github.com/aws/aws-sdk-go" + packages = [ + "aws", + "aws/awserr", + "aws/awsutil", + "aws/client", + "aws/client/metadata", + "aws/corehandlers", + "aws/credentials", + "aws/credentials/ec2rolecreds", + "aws/credentials/endpointcreds", + "aws/credentials/processcreds", + "aws/credentials/stscreds", + "aws/csm", + "aws/defaults", + "aws/ec2metadata", + "aws/endpoints", + "aws/request", + "aws/session", + "aws/signer/v4", + "internal/ini", + "internal/s3err", + "internal/sdkio", + "internal/sdkrand", + "internal/sdkuri", + "internal/shareddefaults", + "private/protocol", + "private/protocol/eventstream", + "private/protocol/eventstream/eventstreamapi", + "private/protocol/query", + "private/protocol/query/queryutil", + "private/protocol/rest", + "private/protocol/restxml", + "private/protocol/xml/xmlutil", + "service/s3", + "service/sts", + ] + pruneopts = "UT" + revision = "81f3829f5a9d041041bdf56e55926691309d7699" + version = "v1.16.26" + +[[projects]] + branch = "master" + digest = "1:a6609679ca468a89b711934f16b346e99f6ec344eadd2f7b00b1156785dd1236" + name = "github.com/benlaurie/objecthash" + packages = ["go/objecthash"] + pruneopts = "UT" + revision = "d1e3d6079fc16f8f542183fb5b2fdc11d9f00866" + +[[projects]] + branch = "master" + digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d" + name = "github.com/beorn7/perks" + packages = ["quantile"] + pruneopts = "UT" + revision = "3a771d992973f24aa725d07868b467d1ddfceafb" + +[[projects]] + digest = "1:998cf998358a303ac2430c386ba3fd3398477d6013153d3c6e11432765cc9ae6" + name = "github.com/cespare/xxhash" + packages = ["."] + pruneopts = "UT" + revision = "3b82fb7d186719faeedd0c2864f868c74fbf79a1" + version = "v2.0.0" + +[[projects]] + digest = "1:04179a5bcbecdb18f06cca42e3808ae8560f86ad7fe470fde21206008f0c5e26" + name = "github.com/coocood/freecache" + packages = ["."] + pruneopts = "UT" + revision = "f3233c8095b26cd0dea0b136b931708c05defa08" + version = "v1.0.1" + +[[projects]] + digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" + name = "github.com/davecgh/go-spew" + packages = ["spew"] + pruneopts = "UT" + revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" + version = "v1.1.1" + +[[projects]] + branch = "master" + digest = "1:dc8bf44b7198605c83a4f2bb36a92c4d9f71eab2e8cf8094ce31b0297dd8ea89" + name = "github.com/ernesto-jimenez/gogen" + packages = [ + "gogenutil", + "imports", + ] + pruneopts = "UT" + revision = "d7d4131e6607813977e78297a6060f360f056a97" + +[[projects]] + digest = "1:865079840386857c809b72ce300be7580cb50d3d3129ce11bf9aa6ca2bc1934a" + name = "github.com/fatih/color" + packages = ["."] + pruneopts = "UT" + revision = "5b77d2a35fb0ede96d138fc9a99f5c9b6aef11b4" + version = "v1.7.0" + +[[projects]] + digest = "1:060e2ff7ee3e51b4a0fadf46308033bfe3b8030af6a8078ec26916e2e9b2fdc3" + name = "github.com/fatih/structtag" + packages = ["."] + pruneopts = "UT" + revision = "76ae1d6d2117609598c7d4e8f3e938145f204e8f" + version = "v1.0.0" + +[[projects]] + branch = "master" + digest = "1:b9414457752702c53f6afd3838da3d89b9513ada40cdbe9603bdf54b1ceb5014" + name = "github.com/fsnotify/fsnotify" + packages = ["."] + pruneopts = "UT" + revision = "ccc981bf80385c528a65fbfdd49bf2d8da22aa23" + +[[projects]] + digest = "1:2cd7915ab26ede7d95b8749e6b1f933f1c6d5398030684e6505940a10f31cfda" + name = "github.com/ghodss/yaml" + packages = ["."] + pruneopts = "UT" + revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" + version = "v1.0.0" + +[[projects]] + branch = "master" + digest = "1:1ba1d79f2810270045c328ae5d674321db34e3aae468eb4233883b473c5c0467" + name = "github.com/golang/glog" + packages = ["."] + pruneopts = "UT" + revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998" + +[[projects]] + digest = "1:9d6dc4d6de69b330d0de86494d6db90c09848c003d5db748f40c925f865c8534" + name = "github.com/golang/protobuf" + packages = [ + "jsonpb", + "proto", + "ptypes", + "ptypes/any", + "ptypes/duration", + "ptypes/struct", + "ptypes/timestamp", + ] + pruneopts = "UT" + revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" + version = "v1.2.0" + +[[projects]] + digest = "1:3dab0e385faed192353d2150f6a041f4607f04a0e885f4a5a824eee6b676b4b9" + name = "github.com/graymeta/stow" + packages = [ + ".", + "local", + "s3", + ] + pruneopts = "UT" + revision = "77c84b1dd69c41b74fe0a94ca8ee257d85947327" + +[[projects]] + digest = "1:c0d19ab64b32ce9fe5cf4ddceba78d5bc9807f0016db6b1183599da3dcc24d10" + name = "github.com/hashicorp/hcl" + packages = [ + ".", + "hcl/ast", + "hcl/parser", + "hcl/printer", + "hcl/scanner", + "hcl/strconv", + "hcl/token", + "json/parser", + "json/scanner", + "json/token", + ] + pruneopts = "UT" + revision = "8cb6e5b959231cc1119e43259c4a608f9c51a241" + version = "v1.0.0" + +[[projects]] + digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be" + name = "github.com/inconshreveable/mousetrap" + packages = ["."] + pruneopts = "UT" + revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" + version = "v1.0" + +[[projects]] + digest = "1:bb81097a5b62634f3e9fec1014657855610c82d19b9a40c17612e32651e35dca" + name = "github.com/jmespath/go-jmespath" + packages = ["."] + pruneopts = "UT" + revision = "c2b33e84" + +[[projects]] + digest = "1:0a69a1c0db3591fcefb47f115b224592c8dfa4368b7ba9fae509d5e16cdc95c8" + name = "github.com/konsorten/go-windows-terminal-sequences" + packages = ["."] + pruneopts = "UT" + revision = "5c8c8bd35d3832f5d134ae1e1e375b69a4d25242" + version = "v1.0.1" + +[[projects]] + digest = "1:53e8c5c79716437e601696140e8b1801aae4204f4ec54a504333702a49572c4f" + name = "github.com/magiconair/properties" + packages = [ + ".", + "assert", + ] + pruneopts = "UT" + revision = "c2353362d570a7bfa228149c62842019201cfb71" + version = "v1.8.0" + +[[projects]] + digest = "1:c658e84ad3916da105a761660dcaeb01e63416c8ec7bc62256a9b411a05fcd67" + name = "github.com/mattn/go-colorable" + packages = ["."] + pruneopts = "UT" + revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072" + version = "v0.0.9" + +[[projects]] + digest = "1:0981502f9816113c9c8c4ac301583841855c8cf4da8c72f696b3ebedf6d0e4e5" + name = "github.com/mattn/go-isatty" + packages = ["."] + pruneopts = "UT" + revision = "6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c" + version = "v0.0.4" + +[[projects]] + digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" + name = "github.com/matttproud/golang_protobuf_extensions" + packages = ["pbutil"] + pruneopts = "UT" + revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" + version = "v1.0.1" + +[[projects]] + digest = "1:53bc4cd4914cd7cd52139990d5170d6dc99067ae31c56530621b18b35fc30318" + name = "github.com/mitchellh/mapstructure" + packages = ["."] + pruneopts = "UT" + revision = "3536a929edddb9a5b34bd6861dc4a9647cb459fe" + version = "v1.1.2" + +[[projects]] + digest = "1:95741de3af260a92cc5c7f3f3061e85273f5a81b5db20d4bd68da74bd521675e" + name = "github.com/pelletier/go-toml" + packages = ["."] + pruneopts = "UT" + revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194" + version = "v1.2.0" + +[[projects]] + digest = "1:cf31692c14422fa27c83a05292eb5cbe0fb2775972e8f1f8446a71549bd8980b" + name = "github.com/pkg/errors" + packages = ["."] + pruneopts = "UT" + revision = "ba968bfe8b2f7e042a574c888954fccecfa385b4" + version = "v0.8.1" + +[[projects]] + digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" + name = "github.com/pmezard/go-difflib" + packages = ["difflib"] + pruneopts = "UT" + revision = "792786c7400a136282c1664665ae0a8db921c6c2" + version = "v1.0.0" + +[[projects]] + digest = "1:93a746f1060a8acbcf69344862b2ceced80f854170e1caae089b2834c5fbf7f4" + name = "github.com/prometheus/client_golang" + packages = [ + "prometheus", + "prometheus/internal", + "prometheus/promhttp", + ] + pruneopts = "UT" + revision = "505eaef017263e299324067d40ca2c48f6a2cf50" + version = "v0.9.2" + +[[projects]] + branch = "master" + digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4" + name = "github.com/prometheus/client_model" + packages = ["go"] + pruneopts = "UT" + revision = "fd36f4220a901265f90734c3183c5f0c91daa0b8" + +[[projects]] + digest = "1:35cf6bdf68db765988baa9c4f10cc5d7dda1126a54bd62e252dbcd0b1fc8da90" + name = "github.com/prometheus/common" + packages = [ + "expfmt", + "internal/bitbucket.org/ww/goautoneg", + "model", + ] + pruneopts = "UT" + revision = "cfeb6f9992ffa54aaa4f2170ade4067ee478b250" + version = "v0.2.0" + +[[projects]] + branch = "master" + digest = "1:5833c61ebbd625a6bad8e5a1ada2b3e13710cf3272046953a2c8915340fe60a3" + name = "github.com/prometheus/procfs" + packages = [ + ".", + "internal/util", + "nfs", + "xfs", + ] + pruneopts = "UT" + revision = "316cf8ccfec56d206735d46333ca162eb374da8b" + +[[projects]] + digest = "1:87c2e02fb01c27060ccc5ba7c5a407cc91147726f8f40b70cceeedbc52b1f3a8" + name = "github.com/sirupsen/logrus" + packages = ["."] + pruneopts = "UT" + revision = "e1e72e9de974bd926e5c56f83753fba2df402ce5" + version = "v1.3.0" + +[[projects]] + digest = "1:3e39bafd6c2f4bf3c76c3bfd16a2e09e016510ad5db90dc02b88e2f565d6d595" + name = "github.com/spf13/afero" + packages = [ + ".", + "mem", + ] + pruneopts = "UT" + revision = "f4711e4db9e9a1d3887343acb72b2bbfc2f686f5" + version = "v1.2.1" + +[[projects]] + digest = "1:08d65904057412fc0270fc4812a1c90c594186819243160dc779a402d4b6d0bc" + name = "github.com/spf13/cast" + packages = ["."] + pruneopts = "UT" + revision = "8c9545af88b134710ab1cd196795e7f2388358d7" + version = "v1.3.0" + +[[projects]] + digest = "1:645cabccbb4fa8aab25a956cbcbdf6a6845ca736b2c64e197ca7cbb9d210b939" + name = "github.com/spf13/cobra" + packages = ["."] + pruneopts = "UT" + revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385" + version = "v0.0.3" + +[[projects]] + digest = "1:68ea4e23713989dc20b1bded5d9da2c5f9be14ff9885beef481848edd18c26cb" + name = "github.com/spf13/jwalterweatherman" + packages = ["."] + pruneopts = "UT" + revision = "4a4406e478ca629068e7768fc33f3f044173c0a6" + version = "v1.0.0" + +[[projects]] + digest = "1:c1b1102241e7f645bc8e0c22ae352e8f0dc6484b6cb4d132fa9f24174e0119e2" + name = "github.com/spf13/pflag" + packages = ["."] + pruneopts = "UT" + revision = "298182f68c66c05229eb03ac171abe6e309ee79a" + version = "v1.0.3" + +[[projects]] + digest = "1:2532daa308722c7b65f4566e634dac2ddfaa0a398a17d8418e96ef2af3939e37" + name = "github.com/spf13/viper" + packages = ["."] + pruneopts = "UT" + revision = "ae103d7e593e371c69e832d5eb3347e2b80cbbc9" + +[[projects]] + digest = "1:972c2427413d41a1e06ca4897e8528e5a1622894050e2f527b38ddf0f343f759" + name = "github.com/stretchr/testify" + packages = ["assert"] + pruneopts = "UT" + revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" + version = "v1.3.0" + +[[projects]] + branch = "master" + digest = "1:fde12c4da6237363bf36b81b59aa36a43d28061167ec4acb0d41fc49464e28b9" + name = "golang.org/x/crypto" + packages = ["ssh/terminal"] + pruneopts = "UT" + revision = "b01c7a72566457eb1420261cdafef86638fc3861" + +[[projects]] + branch = "master" + digest = "1:7941e2f16c0833b438cbef7fccfe4f8346f9f7876b42b29717a75d7e8c4800cb" + name = "golang.org/x/sys" + packages = [ + "unix", + "windows", + ] + pruneopts = "UT" + revision = "aca44879d5644da7c5b8ec6a1115e9b6ea6c40d9" + +[[projects]] + digest = "1:8029e9743749d4be5bc9f7d42ea1659471767860f0cdc34d37c3111bd308a295" + name = "golang.org/x/text" + packages = [ + "internal/gen", + "internal/triegen", + "internal/ucd", + "transform", + "unicode/cldr", + "unicode/norm", + ] + pruneopts = "UT" + revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" + version = "v0.3.0" + +[[projects]] + branch = "master" + digest = "1:9fdc2b55e8e0fafe4b41884091e51e77344f7dc511c5acedcfd98200003bff90" + name = "golang.org/x/time" + packages = ["rate"] + pruneopts = "UT" + revision = "85acf8d2951cb2a3bde7632f9ff273ef0379bcbd" + +[[projects]] + branch = "master" + digest = "1:86d002f2c67e364e097c5047f517ab38cdef342c3c20be53974c1bfd5b191d30" + name = "golang.org/x/tools" + packages = [ + "go/ast/astutil", + "go/gcexportdata", + "go/internal/cgo", + "go/internal/gcimporter", + "go/internal/packagesdriver", + "go/packages", + "go/types/typeutil", + "imports", + "internal/fastwalk", + "internal/gopathwalk", + "internal/module", + "internal/semver", + ] + pruneopts = "UT" + revision = "58ecf64b2ccd4e014267d2ea143d23c617ee7e4c" + +[[projects]] + digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96" + name = "gopkg.in/yaml.v2" + packages = ["."] + pruneopts = "UT" + revision = "51d6538a90f86fe93ac480b35f37b2be17fef232" + version = "v2.2.2" + +[[projects]] + digest = "1:5922c4db083d03579c576df514f096003f422b602aeb30028aedd892b69a4876" + name = "k8s.io/apimachinery" + packages = [ + "pkg/util/clock", + "pkg/util/rand", + "pkg/util/runtime", + "pkg/util/wait", + ] + pruneopts = "UT" + revision = "103fd098999dc9c0c88536f5c9ad2e5da39373ae" + version = "kubernetes-1.11.2" + +[[projects]] + digest = "1:8d66fef1249b9b2105840377af3bab078604d3c298058f563685e88d2a9e6ad3" + name = "k8s.io/client-go" + packages = ["util/workqueue"] + pruneopts = "UT" + revision = "1f13a808da65775f22cbf47862c4e5898d8f4ca1" + version = "kubernetes-1.11.2" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + input-imports = [ + "github.com/aws/aws-sdk-go/aws/awserr", + "github.com/aws/aws-sdk-go/service/s3", + "github.com/benlaurie/objecthash/go/objecthash", + "github.com/coocood/freecache", + "github.com/ernesto-jimenez/gogen/gogenutil", + "github.com/ernesto-jimenez/gogen/imports", + "github.com/fatih/color", + "github.com/fatih/structtag", + "github.com/fsnotify/fsnotify", + "github.com/ghodss/yaml", + "github.com/golang/protobuf/jsonpb", + "github.com/golang/protobuf/proto", + "github.com/golang/protobuf/ptypes", + "github.com/golang/protobuf/ptypes/duration", + "github.com/golang/protobuf/ptypes/timestamp", + "github.com/graymeta/stow", + "github.com/graymeta/stow/local", + "github.com/graymeta/stow/s3", + "github.com/magiconair/properties/assert", + "github.com/mitchellh/mapstructure", + "github.com/pkg/errors", + "github.com/prometheus/client_golang/prometheus", + "github.com/prometheus/client_golang/prometheus/promhttp", + "github.com/sirupsen/logrus", + "github.com/spf13/cobra", + "github.com/spf13/pflag", + "github.com/spf13/viper", + "github.com/stretchr/testify/assert", + "golang.org/x/time/rate", + "golang.org/x/tools/imports", + "k8s.io/apimachinery/pkg/util/rand", + "k8s.io/apimachinery/pkg/util/wait", + "k8s.io/client-go/util/workqueue", + ] + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/flytestdlib/Gopkg.toml b/flytestdlib/Gopkg.toml new file mode 100644 index 0000000000..3d6cf08f6f --- /dev/null +++ b/flytestdlib/Gopkg.toml @@ -0,0 +1,72 @@ +[[constraint]] + name = "github.com/aws/aws-sdk-go" + version = "1.15.0" + +[[constraint]] + name = "github.com/coocood/freecache" + version = "1.0.1" + +[[constraint]] + branch = "master" + name = "github.com/ernesto-jimenez/gogen" + +[[constraint]] + name = "github.com/fatih/color" + version = "1.7.0" + +[[constraint]] + name = "github.com/fatih/structtag" + version = "1.0.0" + +[[constraint]] + branch = "master" + name = "github.com/fsnotify/fsnotify" + +[[constraint]] + name = "github.com/golang/protobuf" + version = "1.1.0" + +[[constraint]] + name = "github.com/mitchellh/mapstructure" + version = "1.1.2" + +[[constraint]] + name = "github.com/pkg/errors" + version = "0.8.0" + +[[constraint]] + name = "github.com/prometheus/client_golang" + version = "^0.9.0" + +[[constraint]] + name = "github.com/spf13/cobra" + version = "0.0.3" + +[[constraint]] + name = "github.com/spf13/pflag" + version = "1.0.1" + +[[constraint]] + name = "github.com/spf13/viper" + # Viper only fixed symlink config watching after this SHA. move to a proper semVer when one is available. + revision = "ae103d7e593e371c69e832d5eb3347e2b80cbbc9" + +[[constraint]] + branch = "master" + name = "golang.org/x/time" + +[[constraint]] + name = "k8s.io/apimachinery" + version = "kubernetes-1.11.2" + +[[constraint]] + name = "k8s.io/client-go" + version = "kubernetes-1.11.2" + +[[constraint]] + name = "github.com/graymeta/stow" + revision = "77c84b1dd69c41b74fe0a94ca8ee257d85947327" + +[prune] + go-tests = true + unused-packages = true diff --git a/flytestdlib/LICENSE b/flytestdlib/LICENSE new file mode 100644 index 0000000000..bed437514f --- /dev/null +++ b/flytestdlib/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Lyft, Inc. + + 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. diff --git a/flytestdlib/Makefile b/flytestdlib/Makefile new file mode 100644 index 0000000000..623663f5f1 --- /dev/null +++ b/flytestdlib/Makefile @@ -0,0 +1,24 @@ +export REPOSITORY=flytestdlib +include boilerplate/lyft/golang_test_targets/Makefile + +# Generate golden files. Add test packages that generate golden files here. +golden: + go test ./cli/pflags/api -update + go test ./config -update + go test ./storage -update + go test ./tests -update + + +generate: + @echo "************************ go generate **********************************" + go generate ./... + +# This is the only target that should be overriden by the project. Get your binary into ${GOREPO}/bin +.PHONY: compile +compile: + mkdir -p ./bin + go build -o pflags ./cli/pflags/main.go && mv ./pflags ./bin + +gen-config: + which pflags || (go get github.com/lyft/flytestdlib/cli/pflags) + @go generate ./... diff --git a/flytestdlib/NOTICE b/flytestdlib/NOTICE new file mode 100644 index 0000000000..9316928ad6 --- /dev/null +++ b/flytestdlib/NOTICE @@ -0,0 +1,21 @@ +flytestdlib +Copyright 2019-2020 Lyft Inc. + +This product includes software developed at Lyft Inc. + +Notices for file(s): + promutils/workqueue.go contains work from https://github.com/kubernetes/kubernetes/ + under the Apache2 license. + +/* +Copyright 2016 The Kubernetes Authors. +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. +*/ diff --git a/flytestdlib/README.rst b/flytestdlib/README.rst new file mode 100644 index 0000000000..f78785fa3d --- /dev/null +++ b/flytestdlib/README.rst @@ -0,0 +1,35 @@ +K8s Standard Library +===================== +Shared components we found ourselves building time and time again, so we collected them in one place! + +This library consists of: + - config + + Enables strongly typed config throughout your application. Offers a way to represent config in go structs. takes care of parsing, validating and watching for changes on config. + + - cli/pflags + + Tool to generate a pflags for all fields in a given struct. + - storage + + Abstract storage library that uses stow behind the scenes to connect to s3/azure/gcs but also offers configurable factory, in-memory storage (for testing) as well as native protobuf support. + - contextutils + + Wrapper around golang's context to set/get known keys. + - logger + + Wrapper around logrus that's configurable, taggable and context-aware. + - profutils + + Starts an http server that serves /metrics (exposes prometheus metrics), /healthcheck and /version endpoints. + - promutils + + Exposes a Scope instance that's a more convenient way to construct prometheus metrics and scope them per component. + - atomic + + Wrapper around sync.atomic library to offer AtomicInt32 and other convenient types. + - sets + + Offers strongly types and convenient interface sets. + - utils + - version diff --git a/flytestdlib/atomic/atomic.go b/flytestdlib/atomic/atomic.go new file mode 100644 index 0000000000..26d04ab721 --- /dev/null +++ b/flytestdlib/atomic/atomic.go @@ -0,0 +1,129 @@ +package atomic + +import "sync/atomic" + +// This file contains some simplified atomics primitives that Golang default library does not offer +// like, Boolean + +// Takes in a uint32 and converts to bool by checking whether the last bit is set to 1 +func toBool(n uint32) bool { + return n&1 == 1 +} + +// Takes in a bool and returns a uint32 representation +func toInt(b bool) uint32 { + if b { + return 1 + } + return 0 +} + +// Bool is an atomic Boolean. +// It stores the bool as a uint32 internally. This is to use the uint32 atomic functions available in golang +type Bool struct{ v uint32 } + +// NewBool creates a Bool. +func NewBool(initial bool) Bool { + return Bool{v: toInt(initial)} +} + +// Load atomically loads the Boolean. +func (b *Bool) Load() bool { + return toBool(atomic.LoadUint32(&b.v)) +} + +// CAS is an atomic compare-and-swap. +func (b *Bool) CompareAndSwap(old, new bool) bool { + return atomic.CompareAndSwapUint32(&b.v, toInt(old), toInt(new)) +} + +// Store atomically stores the passed value. +func (b *Bool) Store(new bool) { + atomic.StoreUint32(&b.v, toInt(new)) +} + +// Swap sets the given value and returns the previous value. +func (b *Bool) Swap(new bool) bool { + return toBool(atomic.SwapUint32(&b.v, toInt(new))) +} + +// Toggle atomically negates the Boolean and returns the previous value. +func (b *Bool) Toggle() bool { + return toBool(atomic.AddUint32(&b.v, 1) - 1) +} + +type Uint32 struct { + v uint32 +} + +// Returns a loaded uint32 value +func (u *Uint32) Load() uint32 { + return atomic.LoadUint32(&u.v) +} + +// CAS is an atomic compare-and-swap. +func (u *Uint32) CompareAndSwap(old, new uint32) bool { + return atomic.CompareAndSwapUint32(&u.v, old, new) +} + +// Add a delta to the number +func (u *Uint32) Add(delta uint32) uint32 { + return atomic.AddUint32(&u.v, delta) +} + +// Increment the value +func (u *Uint32) Inc() uint32 { + return atomic.AddUint32(&u.v, 1) +} + +// Set the value +func (u *Uint32) Store(v uint32) { + atomic.StoreUint32(&u.v, v) +} + +func NewUint32(v uint32) Uint32 { + return Uint32{v: v} +} + +type Int32 struct { + v int32 +} + +// Returns a loaded uint32 value +func (i *Int32) Load() int32 { + return atomic.LoadInt32(&i.v) +} + +// CAS is an atomic compare-and-swap. +func (i *Int32) CompareAndSwap(old, new int32) bool { + return atomic.CompareAndSwapInt32(&i.v, old, new) +} + +// Add a delta to the number +func (i *Int32) Add(delta int32) int32 { + return atomic.AddInt32(&i.v, delta) +} + +// Subtract a delta from the number +func (i *Int32) Sub(delta int32) int32 { + return atomic.AddInt32(&i.v, -delta) +} + +// Increment the value +func (i *Int32) Inc() int32 { + return atomic.AddInt32(&i.v, 1) +} + +// Decrement the value +func (i *Int32) Dec() int32 { + return atomic.AddInt32(&i.v, -1) +} + +// Set the value +func (i *Int32) Store(v int32) { + atomic.StoreInt32(&i.v, v) +} + +func NewInt32(v int32) Int32 { + return Int32{v: v} +} diff --git a/flytestdlib/atomic/atomic_test.go b/flytestdlib/atomic/atomic_test.go new file mode 100644 index 0000000000..c441a88993 --- /dev/null +++ b/flytestdlib/atomic/atomic_test.go @@ -0,0 +1,61 @@ +package atomic + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestBool(t *testing.T) { + atom := NewBool(false) + assert.False(t, atom.Toggle(), "Expected swap to return False.") + assert.True(t, atom.Load(), "Unexpected state after swap. Expected True") + + assert.True(t, atom.CompareAndSwap(true, true), "CAS should swap when old matches") + assert.True(t, atom.Load(), "previous swap should have no effect") + assert.True(t, atom.CompareAndSwap(true, false), "CAS should swap when old matches") + assert.False(t, atom.Load(), "Post swap the value should be true") + assert.False(t, atom.CompareAndSwap(true, false), "CAS should fail on old mismatch") + assert.False(t, atom.Load(), "CAS should not have modified the value") + + atom.Store(false) + assert.False(t, atom.Load(), "Unexpected state after store.") + + prev := atom.Swap(false) + assert.False(t, prev, "Expected Swap to return previous value.") + + prev = atom.Swap(true) + assert.False(t, prev, "Expected Swap to return previous value.") +} + +func TestInt32(t *testing.T) { + atom := NewInt32(2) + assert.False(t, atom.CompareAndSwap(3, 4), "Expected swap to return False.") + assert.Equal(t, int32(2), atom.Load(), "Unexpected state after swap. Expected True") + + assert.True(t, atom.CompareAndSwap(2, 2), "CAS should swap when old matches") + assert.Equal(t, int32(2), atom.Load(), "previous swap should have no effect") + assert.True(t, atom.CompareAndSwap(2, 4), "CAS should swap when old matches") + assert.Equal(t, int32(4), atom.Load(), "Post swap the value should be true") + assert.False(t, atom.CompareAndSwap(2, 3), "CAS should fail on old mismatch") + assert.Equal(t, int32(4), atom.Load(), "CAS should not have modified the value") + + atom.Store(5) + assert.Equal(t, int32(5), atom.Load(), "Unexpected state after store.") +} + +func TestUint32(t *testing.T) { + atom := NewUint32(2) + assert.False(t, atom.CompareAndSwap(3, 4), "Expected swap to return False.") + assert.Equal(t, uint32(2), atom.Load(), "Unexpected state after swap. Expected True") + + assert.True(t, atom.CompareAndSwap(2, 2), "CAS should swap when old matches") + assert.Equal(t, uint32(2), atom.Load(), "previous swap should have no effect") + assert.True(t, atom.CompareAndSwap(2, 4), "CAS should swap when old matches") + assert.Equal(t, uint32(4), atom.Load(), "Post swap the value should be true") + assert.False(t, atom.CompareAndSwap(2, 3), "CAS should fail on old mismatch") + assert.Equal(t, uint32(4), atom.Load(), "CAS should not have modified the value") + + atom.Store(5) + assert.Equal(t, uint32(5), atom.Load(), "Unexpected state after store.") +} diff --git a/flytestdlib/atomic/non_blocking_lock.go b/flytestdlib/atomic/non_blocking_lock.go new file mode 100644 index 0000000000..449841a960 --- /dev/null +++ b/flytestdlib/atomic/non_blocking_lock.go @@ -0,0 +1,23 @@ +package atomic + +// Lock that provides TryLock method instead of blocking lock +type NonBlockingLock interface { + TryLock() bool + Release() +} + +func NewNonBlockingLock() NonBlockingLock { + return &nonBlockingLock{lock: NewBool(false)} +} + +type nonBlockingLock struct { + lock Bool +} + +func (n *nonBlockingLock) TryLock() bool { + return n.lock.CompareAndSwap(false, true) +} + +func (n *nonBlockingLock) Release() { + n.lock.Store(false) +} diff --git a/flytestdlib/atomic/non_blocking_lock_test.go b/flytestdlib/atomic/non_blocking_lock_test.go new file mode 100644 index 0000000000..ddd0a2123d --- /dev/null +++ b/flytestdlib/atomic/non_blocking_lock_test.go @@ -0,0 +1,15 @@ +package atomic + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestNewNonBlockingLock(t *testing.T) { + lock := NewNonBlockingLock() + assert.True(t, lock.TryLock(), "Unexpected lock acquire failure") + assert.False(t, lock.TryLock(), "already-acquired lock acquired again") + lock.Release() + assert.True(t, lock.TryLock(), "Unexpected lock acquire failure") +} diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile new file mode 100644 index 0000000000..1c6f893521 --- /dev/null +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile @@ -0,0 +1,31 @@ +.PHONY: lint +lint: #lints the package for common code smells + which golangci-lint || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $$GOPATH/bin v1.10 + golangci-lint run + +# If code is failing goimports linter, this will fix. +# skips 'vendor' +.PHONY: goimports +goimports: + @boilerplate/lyft/golang_test_targets/goimports + +.PHONY: install +install: #download dependencies (including test deps) for the package + which dep || (curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh) + dep ensure + +.PHONY: test_unit +test_unit: + go test -cover ./... -race + +.PHONY: test_benchmark +test_benchmark: + go test -bench . ./... + +.PHONY: test_unit_cover +test_unit_cover: + go test ./... -coverprofile /tmp/cover.out -covermode=count; go tool cover -func /tmp/cover.out + +.PHONY: test_unit_visual +test_unit_visual: + go test ./... -coverprofile /tmp/cover.out -covermode=count; go tool cover -html=/tmp/cover.out diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Readme.rst b/flytestdlib/boilerplate/lyft/golang_test_targets/Readme.rst new file mode 100644 index 0000000000..acc5744f59 --- /dev/null +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/Readme.rst @@ -0,0 +1,31 @@ +Golang Test Targets +~~~~~~~~~~~~~~~~~~~ + +Provides an ``install`` make target that uses ``dep`` install golang dependencies. + +Provides a ``lint`` make target that uses golangci to lint your code. + +Provides a ``test_unit`` target for unit tests. + +Provides a ``test_unit_cover`` target for analysing coverage of unit tests, which will output the coverage of each function and total statement coverage. + +Provides a ``test_unit_visual`` target for visualizing coverage of unit tests through an interactive html code heat map. + +Provides a ``test_benchmark`` target for benchmark tests. + +**To Enable:** + +Add ``lyft/golang_test_targets`` to your ``boilerplate/update.cfg`` file. + +Make sure you're using ``dep`` for dependency management. + +Provide a ``.golangci`` configuration (the lint target requires it). + +Add ``include boilerplate/lyft/golang_test_targets/Makefile`` in your main ``Makefile`` _after_ your REPOSITORY environment variable + +:: + + REPOSITORY= + include boilerplate/lyft/golang_test_targets/Makefile + +(this ensures the extra make targets get included in your main Makefile) diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/goimports b/flytestdlib/boilerplate/lyft/golang_test_targets/goimports new file mode 100755 index 0000000000..11d3c9af06 --- /dev/null +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/goimports @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*") diff --git a/flytestdlib/boilerplate/update.cfg b/flytestdlib/boilerplate/update.cfg new file mode 100644 index 0000000000..f861a23ccd --- /dev/null +++ b/flytestdlib/boilerplate/update.cfg @@ -0,0 +1,2 @@ +lyft/golang_test_targets +lyft/golangci_file diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go new file mode 100644 index 0000000000..2e4dd30c54 --- /dev/null +++ b/flytestdlib/cli/pflags/api/generator.go @@ -0,0 +1,277 @@ +package api + +import ( + "context" + "fmt" + "go/types" + "path/filepath" + + "github.com/lyft/flytestdlib/logger" + + "go/importer" + + "github.com/ernesto-jimenez/gogen/gogenutil" +) + +const ( + indent = " " +) + +// PFlagProviderGenerator parses and generates GetPFlagSet implementation to add PFlags for a given struct's fields. +type PFlagProviderGenerator struct { + pkg *types.Package + st *types.Named +} + +// This list is restricted because that's the only kinds viper parses out, otherwise it assumes strings. +// github.com/spf13/viper/viper.go:1016 +var allowedKinds = []types.Type{ + types.Typ[types.Int], + types.Typ[types.Int8], + types.Typ[types.Int16], + types.Typ[types.Int32], + types.Typ[types.Int64], + types.Typ[types.Bool], + types.Typ[types.String], +} + +type SliceOrArray interface { + Elem() types.Type +} + +func capitalize(s string) string { + if s[0] >= 'a' && s[0] <= 'z' { + return string(s[0]-'a'+'A') + s[1:] + } + + return s +} + +func buildFieldForSlice(ctx context.Context, t SliceOrArray, name, goName, usage, defaultValue string) (FieldInfo, error) { + strategy := SliceRaw + FlagMethodName := "StringSlice" + typ := types.NewSlice(types.Typ[types.String]) + emptyDefaultValue := `[]string{}` + if b, ok := t.Elem().(*types.Basic); !ok { + logger.Infof(ctx, "Elem of type [%v] is not a basic type. It must be json unmarshalable or generation will fail.", t.Elem()) + if !jsonUnmarshaler(t.Elem()) { + return FieldInfo{}, + fmt.Errorf("slice of type [%v] is not supported. Only basic slices or slices of json-unmarshalable types are supported", + t.Elem().String()) + } + } else { + logger.Infof(ctx, "Elem of type [%v] is a basic type. Will use a pflag as a Slice.", b) + strategy = SliceJoined + FlagMethodName = fmt.Sprintf("%vSlice", capitalize(b.Name())) + typ = types.NewSlice(b) + emptyDefaultValue = fmt.Sprintf(`[]%v{}`, b.Name()) + } + + testValue := defaultValue + if len(defaultValue) == 0 { + defaultValue = emptyDefaultValue + testValue = `"1,1"` + } + + return FieldInfo{ + Name: name, + GoName: goName, + Typ: typ, + FlagMethodName: FlagMethodName, + DefaultValue: defaultValue, + UsageString: usage, + TestValue: testValue, + TestStrategy: strategy, + }, nil +} + +// Traverses fields in type and follows recursion tree to discover all fields. It stops when one of two conditions is +// met; encountered a basic type (e.g. string, int... etc.) or the field type implements UnmarshalJSON. +func discoverFieldsRecursive(ctx context.Context, typ *types.Named) ([]FieldInfo, error) { + logger.Printf(ctx, "Finding all fields in [%v.%v.%v]", + typ.Obj().Pkg().Path(), typ.Obj().Pkg().Name(), typ.Obj().Name()) + + ctx = logger.WithIndent(ctx, indent) + + st := typ.Underlying().(*types.Struct) + fields := make([]FieldInfo, 0, st.NumFields()) + for i := 0; i < st.NumFields(); i++ { + v := st.Field(i) + if !v.IsField() { + continue + } + + // Parses out the tag if one exists. + tag, err := ParseTag(st.Tag(i)) + if err != nil { + return nil, err + } + + if len(tag.Name) == 0 { + tag.Name = v.Name() + } + + typ := v.Type() + if ptr, isPtr := typ.(*types.Pointer); isPtr { + typ = ptr.Elem() + } + + switch t := typ.(type) { + case *types.Basic: + if len(tag.DefaultValue) == 0 { + tag.DefaultValue = fmt.Sprintf("*new(%v)", typ.String()) + } + + logger.Infof(ctx, "[%v] is of a basic type with default value [%v].", tag.Name, tag.DefaultValue) + + isAllowed := false + for _, k := range allowedKinds { + if t.String() == k.String() { + isAllowed = true + break + } + } + + if !isAllowed { + return nil, fmt.Errorf("only these basic kinds are allowed. given [%v] (Kind: [%v]. expected: [%+v]", + t.String(), t.Kind(), allowedKinds) + } + + fields = append(fields, FieldInfo{ + Name: tag.Name, + GoName: v.Name(), + Typ: t, + FlagMethodName: camelCase(t.String()), + DefaultValue: tag.DefaultValue, + UsageString: tag.Usage, + TestValue: `"1"`, + TestStrategy: JSON, + }) + case *types.Named: + if _, isStruct := t.Underlying().(*types.Struct); !isStruct { + // TODO: Add a more descriptive error message. + return nil, fmt.Errorf("invalid type. it must be struct, received [%v] for field [%v]", t.Underlying().String(), tag.Name) + } + + // If the type has json unmarshaler, then stop the recursion and assume the type is string. config package + // will use json unmarshaler to fill in the final config object. + jsonUnmarshaler := jsonUnmarshaler(t) + + testValue := tag.DefaultValue + if len(tag.DefaultValue) == 0 { + tag.DefaultValue = `""` + testValue = `"1"` + } + + logger.Infof(ctx, "[%v] is of a Named type (struct) with default value [%v].", tag.Name, tag.DefaultValue) + + if jsonUnmarshaler { + logger.Infof(logger.WithIndent(ctx, indent), "Type is json unmarhslalable.") + + fields = append(fields, FieldInfo{ + Name: tag.Name, + GoName: v.Name(), + Typ: types.Typ[types.String], + FlagMethodName: "String", + DefaultValue: tag.DefaultValue, + UsageString: tag.Usage, + TestValue: testValue, + TestStrategy: JSON, + }) + } else { + logger.Infof(ctx, "Traversing fields in type.") + + nested, err := discoverFieldsRecursive(logger.WithIndent(ctx, indent), t) + if err != nil { + return nil, err + } + + for _, subField := range nested { + fields = append(fields, FieldInfo{ + Name: fmt.Sprintf("%v.%v", tag.Name, subField.Name), + GoName: fmt.Sprintf("%v.%v", v.Name(), subField.GoName), + Typ: subField.Typ, + FlagMethodName: subField.FlagMethodName, + DefaultValue: subField.DefaultValue, + UsageString: subField.UsageString, + TestValue: subField.TestValue, + TestStrategy: subField.TestStrategy, + }) + } + } + case *types.Slice: + logger.Infof(ctx, "[%v] is of a slice type with default value [%v].", tag.Name, tag.DefaultValue) + + f, err := buildFieldForSlice(logger.WithIndent(ctx, indent), t, tag.Name, v.Name(), tag.Usage, tag.DefaultValue) + if err != nil { + return nil, err + } + + fields = append(fields, f) + case *types.Array: + logger.Infof(ctx, "[%v] is of an array with default value [%v].", tag.Name, tag.DefaultValue) + + f, err := buildFieldForSlice(logger.WithIndent(ctx, indent), t, tag.Name, v.Name(), tag.Usage, tag.DefaultValue) + if err != nil { + return nil, err + } + + fields = append(fields, f) + default: + return nil, fmt.Errorf("unexpected type %v", t.String()) + } + } + + return fields, nil +} + +// NewGenerator initializes a PFlagProviderGenerator for pflags files for targetTypeName struct under pkg. If pkg is not filled in, +// it's assumed to be current package (which is expected to be the common use case when invoking pflags from +// go:generate comments) +func NewGenerator(pkg, targetTypeName string) (*PFlagProviderGenerator, error) { + var err error + // Resolve package path + if pkg == "" || pkg[0] == '.' { + pkg, err = filepath.Abs(filepath.Clean(pkg)) + if err != nil { + return nil, err + } + pkg = gogenutil.StripGopath(pkg) + } + + targetPackage, err := importer.For("source", nil).Import(pkg) + if err != nil { + return nil, err + } + + obj := targetPackage.Scope().Lookup(targetTypeName) + if obj == nil { + return nil, fmt.Errorf("struct %s missing", targetTypeName) + } + + var st *types.Named + switch obj.Type().Underlying().(type) { + case *types.Struct: + st = obj.Type().(*types.Named) + default: + return nil, fmt.Errorf("%s should be an struct, was %s", targetTypeName, obj.Type().Underlying()) + } + + return &PFlagProviderGenerator{ + st: st, + pkg: targetPackage, + }, nil +} + +func (g PFlagProviderGenerator) GetTargetPackage() *types.Package { + return g.pkg +} + +func (g PFlagProviderGenerator) Generate(ctx context.Context) (PFlagProvider, error) { + fields, err := discoverFieldsRecursive(ctx, g.st) + if err != nil { + return PFlagProvider{}, err + } + + return newPflagProvider(g.pkg, g.st.Obj().Name(), fields), nil +} diff --git a/flytestdlib/cli/pflags/api/generator_test.go b/flytestdlib/cli/pflags/api/generator_test.go new file mode 100644 index 0000000000..edfab6c1ca --- /dev/null +++ b/flytestdlib/cli/pflags/api/generator_test.go @@ -0,0 +1,56 @@ +package api + +import ( + "context" + "flag" + "io/ioutil" + "os" + "path/filepath" + "testing" + + "github.com/stretchr/testify/assert" +) + +// Make sure existing config file(s) parse correctly before overriding them with this flag! +var update = flag.Bool("update", false, "Updates testdata") + +func TestNewGenerator(t *testing.T) { + g, err := NewGenerator(".", "TestType") + assert.NoError(t, err) + + ctx := context.Background() + p, err := g.Generate(ctx) + assert.NoError(t, err) + + codeOutput, err := ioutil.TempFile("", "output-*.go") + assert.NoError(t, err) + defer func() { assert.NoError(t, os.Remove(codeOutput.Name())) }() + + testOutput, err := ioutil.TempFile("", "output-*_test.go") + assert.NoError(t, err) + defer func() { assert.NoError(t, os.Remove(testOutput.Name())) }() + + assert.NoError(t, p.WriteCodeFile(codeOutput.Name())) + assert.NoError(t, p.WriteTestFile(testOutput.Name())) + + codeBytes, err := ioutil.ReadFile(codeOutput.Name()) + assert.NoError(t, err) + + testBytes, err := ioutil.ReadFile(testOutput.Name()) + assert.NoError(t, err) + + goldenFilePath := filepath.Join("testdata", "testtype.go") + goldenTestFilePath := filepath.Join("testdata", "testtype_test.go") + if *update { + assert.NoError(t, ioutil.WriteFile(goldenFilePath, codeBytes, os.ModePerm)) + assert.NoError(t, ioutil.WriteFile(goldenTestFilePath, testBytes, os.ModePerm)) + } + + goldenOutput, err := ioutil.ReadFile(filepath.Clean(goldenFilePath)) + assert.NoError(t, err) + assert.Equal(t, goldenOutput, codeBytes) + + goldenTestOutput, err := ioutil.ReadFile(filepath.Clean(goldenTestFilePath)) + assert.NoError(t, err) + assert.Equal(t, string(goldenTestOutput), string(testBytes)) +} diff --git a/flytestdlib/cli/pflags/api/pflag_provider.go b/flytestdlib/cli/pflags/api/pflag_provider.go new file mode 100644 index 0000000000..e414398063 --- /dev/null +++ b/flytestdlib/cli/pflags/api/pflag_provider.go @@ -0,0 +1,90 @@ +package api + +import ( + "bytes" + "fmt" + "go/types" + "io/ioutil" + "os" + "time" + + "github.com/ernesto-jimenez/gogen/imports" + goimports "golang.org/x/tools/imports" +) + +type PFlagProvider struct { + typeName string + pkg *types.Package + fields []FieldInfo +} + +// Adds any needed imports for types not directly declared in this package. +func (p PFlagProvider) Imports() map[string]string { + imp := imports.New(p.pkg.Name()) + for _, m := range p.fields { + imp.AddImportsFrom(m.Typ) + } + + return imp.Imports() +} + +// Evaluates the main code file template and writes the output to outputFilePath +func (p PFlagProvider) WriteCodeFile(outputFilePath string) error { + buf := bytes.Buffer{} + err := p.generate(GenerateCodeFile, &buf, outputFilePath) + if err != nil { + return fmt.Errorf("error generating code, Error: %v. Source: %v", err, buf.String()) + } + + return p.writeToFile(&buf, outputFilePath) +} + +// Evaluates the test code file template and writes the output to outputFilePath +func (p PFlagProvider) WriteTestFile(outputFilePath string) error { + buf := bytes.Buffer{} + err := p.generate(GenerateTestFile, &buf, outputFilePath) + if err != nil { + return fmt.Errorf("error generating code, Error: %v. Source: %v", err, buf.String()) + } + + return p.writeToFile(&buf, outputFilePath) +} + +func (p PFlagProvider) writeToFile(buffer *bytes.Buffer, fileName string) error { + return ioutil.WriteFile(fileName, buffer.Bytes(), os.ModePerm) +} + +// Evaluates the generator and writes the output to buffer. targetFileName is used only to influence how imports are +// generated/optimized. +func (p PFlagProvider) generate(generator func(buffer *bytes.Buffer, info TypeInfo) error, buffer *bytes.Buffer, targetFileName string) error { + info := TypeInfo{ + Name: p.typeName, + Fields: p.fields, + Package: p.pkg.Name(), + Timestamp: time.Now(), + Imports: p.Imports(), + } + + if err := generator(buffer, info); err != nil { + return err + } + + // Update imports + newBytes, err := goimports.Process(targetFileName, buffer.Bytes(), nil) + if err != nil { + return err + } + + buffer.Reset() + _, err = buffer.Write(newBytes) + + return err +} + +func newPflagProvider(pkg *types.Package, typeName string, fields []FieldInfo) PFlagProvider { + return PFlagProvider{ + typeName: typeName, + pkg: pkg, + fields: fields, + } +} diff --git a/flytestdlib/cli/pflags/api/sample.go b/flytestdlib/cli/pflags/api/sample.go new file mode 100644 index 0000000000..b1ebb50684 --- /dev/null +++ b/flytestdlib/cli/pflags/api/sample.go @@ -0,0 +1,53 @@ +package api + +import ( + "encoding/json" + "errors" + + "github.com/lyft/flytestdlib/storage" +) + +type TestType struct { + StringValue string `json:"str" pflag:"\"hello world\",\"life is short\""` + BoolValue bool `json:"bl" pflag:"true"` + NestedType NestedType `json:"nested"` + IntArray []int `json:"ints" pflag:"[]int{12%2C1}"` + StringArray []string `json:"strs" pflag:"[]string{\"12\"%2C\"1\"}"` + ComplexJSONArray []ComplexJSONType `json:"complexArr"` + StringToJSON ComplexJSONType `json:"c" pflag:",I'm a complex type but can be converted from string."` + StorageConfig storage.Config `json:"storage"` + IntValue *int `json:"i"` +} + +type NestedType struct { + IntValue int `json:"i" pflag:",this is an important flag"` +} + +type ComplexJSONType struct { + StringValue string `json:"str"` + IntValue int `json:"i"` +} + +func (c *ComplexJSONType) UnmarshalJSON(b []byte) error { + if len(b) == 0 { + c.StringValue = "" + return nil + } + + var v interface{} + if err := json.Unmarshal(b, &v); err != nil { + return err + } + switch value := v.(type) { + case string: + if len(value) == 0 { + c.StringValue = "" + } else { + c.StringValue = value + } + default: + return errors.New("invalid duration") + } + + return nil +} diff --git a/flytestdlib/cli/pflags/api/tag.go b/flytestdlib/cli/pflags/api/tag.go new file mode 100644 index 0000000000..5d4a2d8e57 --- /dev/null +++ b/flytestdlib/cli/pflags/api/tag.go @@ -0,0 +1,66 @@ +package api + +import ( + "fmt" + "net/url" + "strings" + + "github.com/fatih/structtag" +) + +const ( + TagName = "pflag" + JSONTagName = "json" +) + +// Represents parsed PFlag Go-struct tag. +// type Foo struct { +// StringValue string `json:"str" pflag:"\"hello world\",This is a string value"` +// } +// Name will be "str", Default value is "hello world" and Usage is "This is a string value" +type Tag struct { + Name string + DefaultValue string + Usage string +} + +// Parses tag. Name is computed from json tag, defaultvalue is the name of the pflag tag and usage is the concatenation +// of all options for pflag tag. +// e.g. `json:"name" pflag:"2,this is a useful param"` +func ParseTag(tag string) (t Tag, err error) { + tags, err := structtag.Parse(tag) + if err != nil { + return Tag{}, err + } + + t = Tag{} + + jsonTag, err := tags.Get(JSONTagName) + if err == nil { + t.Name = jsonTag.Name + } + + pflagTag, err := tags.Get(TagName) + if err == nil { + t.DefaultValue, err = url.QueryUnescape(pflagTag.Name) + if err != nil { + fmt.Printf("Failed to Query unescape tag name [%v], will use value as is. Error: %v", pflagTag.Name, err) + t.DefaultValue = pflagTag.Name + } + + t.Usage = strings.Join(pflagTag.Options, ", ") + if len(t.Usage) == 0 { + t.Usage = `""` + } + + if t.Usage[0] != '"' { + t.Usage = fmt.Sprintf(`"%v"`, t.Usage) + } + } else { + // We receive an error when the tag isn't present (or is malformed). Because there is no strongly-typed way to + // do that, we will just set Usage to empty string and move on. + t.Usage = `""` + } + + return t, nil +} diff --git a/flytestdlib/cli/pflags/api/templates.go b/flytestdlib/cli/pflags/api/templates.go new file mode 100644 index 0000000000..a7adba8922 --- /dev/null +++ b/flytestdlib/cli/pflags/api/templates.go @@ -0,0 +1,175 @@ +package api + +import ( + "bytes" + "text/template" +) + +func GenerateCodeFile(buffer *bytes.Buffer, info TypeInfo) error { + return mainTmpl.Execute(buffer, info) +} + +func GenerateTestFile(buffer *bytes.Buffer, info TypeInfo) error { + return testTmpl.Execute(buffer, info) +} + +var mainTmpl = template.Must(template.New("MainFile").Parse( + `// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package {{ .Package }} + +import ( + "github.com/spf13/pflag" + "fmt" +{{range $path, $name := .Imports}} + {{$name}} "{{$path}}"{{end}} +) + +// GetPFlagSet will return strongly types pflags for all fields in {{ .Name }} and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func ({{ .Name }}) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("{{ .Name }}", pflag.ExitOnError) + {{- range .Fields }} + cmdFlags.{{ .FlagMethodName }}(fmt.Sprintf("%v%v", prefix, "{{ .Name }}"), {{ .DefaultValue }}, {{ .UsageString }}) + {{- end }} + return cmdFlags +} +`)) + +var testTmpl = template.Must(template.New("TestFile").Parse( + `// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package {{ .Package }} + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +{{- range $path, $name := .Imports}} + {{$name}} "{{$path}}" +{{- end}} +) + +var dereferencableKinds{{ .Name }} = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElement{{ .Name }}(t reflect.Kind) bool { + _, exists := dereferencableKinds{{ .Name }}[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHook{{ .Name }}(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElement{{ .Name }}(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_{{ .Name }}(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHook{{ .Name }}, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_{{ .Name }}(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_{{ .Name }}(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_{{ .Name }}(val, result)) +} + +func testDecodeSlice_{{ .Name }}(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_{{ .Name }}(vStringSlice, result)) +} + +func Test{{ .Name }}_GetPFlagSet(t *testing.T) { + val := {{ .Name }}{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func Test{{ .Name }}_SetFlags(t *testing.T) { + actual := {{ .Name }}{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + {{ $ParentName := .Name }} + {{- range .Fields }} + t.Run("Test_{{ .Name }}", func(t *testing.T) { {{ $varName := print "v" .FlagMethodName }} + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if {{ $varName }}, err := cmdFlags.Get{{ .FlagMethodName }}("{{ .Name }}"); err == nil { + assert.Equal(t, {{ .Typ }}({{ .DefaultValue }}), {{ $varName }}) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + {{ if eq .TestStrategy "Json" }}testValue := {{ .TestValue }} + {{ else if eq .TestStrategy "SliceRaw" }}testValue := {{ .TestValue }} + {{ else }}testValue := join_{{ $ParentName }}({{ .TestValue }}, ",") + {{ end }} + cmdFlags.Set("{{ .Name }}", testValue) + if {{ $varName }}, err := cmdFlags.Get{{ .FlagMethodName }}("{{ .Name }}"); err == nil { + {{ if eq .TestStrategy "Json" }}testDecodeJson_{{ $ParentName }}(t, fmt.Sprintf("%v", {{ print "v" .FlagMethodName }}), &actual.{{ .GoName }}) + {{ else if eq .TestStrategy "SliceRaw" }}testDecodeSlice_{{ $ParentName }}(t, {{ print "v" .FlagMethodName }}, &actual.{{ .GoName }}) + {{ else }}testDecodeSlice_{{ $ParentName }}(t, join_{{ $ParentName }}({{ print "v" .FlagMethodName }}, ","), &actual.{{ .GoName }}) + {{ end }} + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + {{- end }} +} +`)) diff --git a/flytestdlib/cli/pflags/api/testdata/testtype.go b/flytestdlib/cli/pflags/api/testdata/testtype.go new file mode 100755 index 0000000000..87f5cb7dfe --- /dev/null +++ b/flytestdlib/cli/pflags/api/testdata/testtype.go @@ -0,0 +1,36 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package api + +import ( + "fmt" + + "github.com/spf13/pflag" +) + +// GetPFlagSet will return strongly types pflags for all fields in TestType and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (TestType) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("TestType", pflag.ExitOnError) + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "str"), "hello world", "life is short") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "bl"), true, "") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "nested.i"), *new(int), "this is an important flag") + cmdFlags.IntSlice(fmt.Sprintf("%v%v", prefix, "ints"), []int{12, 1}, "") + cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "strs"), []string{"12", "1"}, "") + cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "complexArr"), []string{}, "") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "c"), "", "I'm a complex type but can be converted from string.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.type"), "s3", "Sets the type of storage to configure [s3/minio/local/mem].") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.endpoint"), "", "URL for storage client to connect to.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.auth-type"), "iam", "Auth Type to use [iam, accesskey].") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.access-key"), *new(string), "Access key to use. Only required when authtype is set to accesskey.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.secret-key"), *new(string), "Secret to use when accesskey is set.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.region"), "us-east-1", "Region to connect to.") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "storage.connection.disable-ssl"), *new(bool), "Disables SSL connection. Should only be used for development.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.container"), *new(string), "Initial container to create -if it doesn't exist-.'") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.max_size_mbs"), *new(int), "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.target_gc_percent"), *new(int), "Sets the garbage collection target percentage.") + cmdFlags.Int64(fmt.Sprintf("%v%v", prefix, "storage.limits.maxDownloadMBs"), 2, "Maximum allowed download size (in MBs) per call.") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "i"), *new(int), "") + return cmdFlags +} diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_test.go b/flytestdlib/cli/pflags/api/testdata/testtype_test.go new file mode 100755 index 0000000000..f8b81bbe11 --- /dev/null +++ b/flytestdlib/cli/pflags/api/testdata/testtype_test.go @@ -0,0 +1,520 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package api + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsTestType = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementTestType(t reflect.Kind) bool { + _, exists := dereferencableKindsTestType[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookTestType(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementTestType(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_TestType(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookTestType, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_TestType(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_TestType(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_TestType(val, result)) +} + +func testDecodeSlice_TestType(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_TestType(vStringSlice, result)) +} + +func TestTestType_GetPFlagSet(t *testing.T) { + val := TestType{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestTestType_SetFlags(t *testing.T) { + actual := TestType{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_str", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("str"); err == nil { + assert.Equal(t, string("hello world"), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("str", testValue) + if vString, err := cmdFlags.GetString("str"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StringValue) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_bl", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("bl"); err == nil { + assert.Equal(t, bool(true), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("bl", testValue) + if vBool, err := cmdFlags.GetBool("bl"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vBool), &actual.BoolValue) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_nested.i", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vInt, err := cmdFlags.GetInt("nested.i"); err == nil { + assert.Equal(t, int(*new(int)), vInt) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("nested.i", testValue) + if vInt, err := cmdFlags.GetInt("nested.i"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt), &actual.NestedType.IntValue) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_ints", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vIntSlice, err := cmdFlags.GetIntSlice("ints"); err == nil { + assert.Equal(t, []int([]int{12, 1}), vIntSlice) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := join_TestType([]int{12, 1}, ",") + + cmdFlags.Set("ints", testValue) + if vIntSlice, err := cmdFlags.GetIntSlice("ints"); err == nil { + testDecodeSlice_TestType(t, join_TestType(vIntSlice, ","), &actual.IntArray) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_strs", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vStringSlice, err := cmdFlags.GetStringSlice("strs"); err == nil { + assert.Equal(t, []string([]string{"12", "1"}), vStringSlice) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := join_TestType([]string{"12", "1"}, ",") + + cmdFlags.Set("strs", testValue) + if vStringSlice, err := cmdFlags.GetStringSlice("strs"); err == nil { + testDecodeSlice_TestType(t, join_TestType(vStringSlice, ","), &actual.StringArray) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_complexArr", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vStringSlice, err := cmdFlags.GetStringSlice("complexArr"); err == nil { + assert.Equal(t, []string([]string{}), vStringSlice) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1,1" + + cmdFlags.Set("complexArr", testValue) + if vStringSlice, err := cmdFlags.GetStringSlice("complexArr"); err == nil { + testDecodeSlice_TestType(t, vStringSlice, &actual.ComplexJSONArray) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_c", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("c"); err == nil { + assert.Equal(t, string(""), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("c", testValue) + if vString, err := cmdFlags.GetString("c"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StringToJSON) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.type", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("storage.type"); err == nil { + assert.Equal(t, string("s3"), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.type", testValue) + if vString, err := cmdFlags.GetString("storage.type"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Type) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.connection.endpoint", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("storage.connection.endpoint"); err == nil { + assert.Equal(t, string(""), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.connection.endpoint", testValue) + if vString, err := cmdFlags.GetString("storage.connection.endpoint"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Connection.Endpoint) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.connection.auth-type", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("storage.connection.auth-type"); err == nil { + assert.Equal(t, string("iam"), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.connection.auth-type", testValue) + if vString, err := cmdFlags.GetString("storage.connection.auth-type"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Connection.AuthType) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.connection.access-key", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("storage.connection.access-key"); err == nil { + assert.Equal(t, string(*new(string)), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.connection.access-key", testValue) + if vString, err := cmdFlags.GetString("storage.connection.access-key"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Connection.AccessKey) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.connection.secret-key", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("storage.connection.secret-key"); err == nil { + assert.Equal(t, string(*new(string)), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.connection.secret-key", testValue) + if vString, err := cmdFlags.GetString("storage.connection.secret-key"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Connection.SecretKey) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.connection.region", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("storage.connection.region"); err == nil { + assert.Equal(t, string("us-east-1"), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.connection.region", testValue) + if vString, err := cmdFlags.GetString("storage.connection.region"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Connection.Region) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.connection.disable-ssl", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("storage.connection.disable-ssl"); err == nil { + assert.Equal(t, bool(*new(bool)), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.connection.disable-ssl", testValue) + if vBool, err := cmdFlags.GetBool("storage.connection.disable-ssl"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vBool), &actual.StorageConfig.Connection.DisableSSL) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.container", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("storage.container"); err == nil { + assert.Equal(t, string(*new(string)), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.container", testValue) + if vString, err := cmdFlags.GetString("storage.container"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.InitContainer) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.cache.max_size_mbs", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vInt, err := cmdFlags.GetInt("storage.cache.max_size_mbs"); err == nil { + assert.Equal(t, int(*new(int)), vInt) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.cache.max_size_mbs", testValue) + if vInt, err := cmdFlags.GetInt("storage.cache.max_size_mbs"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt), &actual.StorageConfig.Cache.MaxSizeMegabytes) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.cache.target_gc_percent", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vInt, err := cmdFlags.GetInt("storage.cache.target_gc_percent"); err == nil { + assert.Equal(t, int(*new(int)), vInt) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.cache.target_gc_percent", testValue) + if vInt, err := cmdFlags.GetInt("storage.cache.target_gc_percent"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt), &actual.StorageConfig.Cache.TargetGCPercent) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.limits.maxDownloadMBs", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vInt64, err := cmdFlags.GetInt64("storage.limits.maxDownloadMBs"); err == nil { + assert.Equal(t, int64(2), vInt64) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.limits.maxDownloadMBs", testValue) + if vInt64, err := cmdFlags.GetInt64("storage.limits.maxDownloadMBs"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt64), &actual.StorageConfig.Limits.GetLimitMegabytes) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_i", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vInt, err := cmdFlags.GetInt("i"); err == nil { + assert.Equal(t, int(*new(int)), vInt) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("i", testValue) + if vInt, err := cmdFlags.GetInt("i"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt), &actual.IntValue) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytestdlib/cli/pflags/api/types.go b/flytestdlib/cli/pflags/api/types.go new file mode 100644 index 0000000000..1e6c1297ff --- /dev/null +++ b/flytestdlib/cli/pflags/api/types.go @@ -0,0 +1,36 @@ +package api + +import ( + "go/types" + "time" +) + +// Determines how tests should be generated. +type TestStrategy string + +const ( + JSON TestStrategy = "Json" + SliceJoined TestStrategy = "SliceJoined" + SliceRaw TestStrategy = "SliceRaw" +) + +type FieldInfo struct { + Name string + GoName string + Typ types.Type + DefaultValue string + UsageString string + FlagMethodName string + TestValue string + TestStrategy TestStrategy +} + +// Holds the finalized information passed to the template for evaluation. +type TypeInfo struct { + Timestamp time.Time + Fields []FieldInfo + Package string + Name string + TypeRef string + Imports map[string]string +} diff --git a/flytestdlib/cli/pflags/api/utils.go b/flytestdlib/cli/pflags/api/utils.go new file mode 100644 index 0000000000..4c71fbb1c4 --- /dev/null +++ b/flytestdlib/cli/pflags/api/utils.go @@ -0,0 +1,32 @@ +package api + +import ( + "bytes" + "fmt" + "go/types" + "unicode" +) + +func camelCase(str string) string { + if len(str) == 0 { + return str + } + + firstRune := bytes.Runes([]byte(str))[0] + if unicode.IsLower(firstRune) { + return fmt.Sprintf("%v%v", string(unicode.ToUpper(firstRune)), str[1:]) + } + + return str +} + +func jsonUnmarshaler(t types.Type) bool { + mset := types.NewMethodSet(t) + jsonUnmarshaler := mset.Lookup(nil, "UnmarshalJSON") + if jsonUnmarshaler == nil { + mset = types.NewMethodSet(types.NewPointer(t)) + jsonUnmarshaler = mset.Lookup(nil, "UnmarshalJSON") + } + + return jsonUnmarshaler != nil +} diff --git a/flytestdlib/cli/pflags/cmd/root.go b/flytestdlib/cli/pflags/cmd/root.go new file mode 100644 index 0000000000..b6562d8a1b --- /dev/null +++ b/flytestdlib/cli/pflags/cmd/root.go @@ -0,0 +1,71 @@ +package cmd + +import ( + "bytes" + "context" + "flag" + "fmt" + "strings" + + "github.com/lyft/flytestdlib/cli/pflags/api" + "github.com/lyft/flytestdlib/logger" + "github.com/spf13/cobra" +) + +var ( + pkg = flag.String("pkg", ".", "what package to get the interface from") +) + +var root = cobra.Command{ + Use: "pflags MyStructName --package myproject/mypackage", + Args: cobra.ExactArgs(1), + RunE: generatePflagsProvider, + Example: ` +// go:generate pflags MyStruct +type MyStruct struct { + BoolValue bool ` + "`json:\"bl\" pflag:\"true\"`" + ` + NestedType NestedType ` + "`json:\"nested\"`" + ` + IntArray []int ` + "`json:\"ints\" pflag:\"[]int{12%2C1}\"`" + ` +} + `, +} + +func init() { + root.Flags().StringP("package", "p", ".", "Determines the source/destination package.") +} + +func Execute() error { + return root.Execute() +} + +func generatePflagsProvider(cmd *cobra.Command, args []string) error { + structName := args[0] + if structName == "" { + return fmt.Errorf("need to specify a struct name") + } + + ctx := context.Background() + gen, err := api.NewGenerator(*pkg, structName) + if err != nil { + return err + } + + provider, err := gen.Generate(ctx) + if err != nil { + return err + } + + var buf bytes.Buffer + defer buf.Reset() + + logger.Infof(ctx, "Generating PFlags for type [%v.%v.%v]\n", gen.GetTargetPackage().Path(), gen.GetTargetPackage().Name(), structName) + + outFilePath := fmt.Sprintf("%s_flags.go", strings.ToLower(structName)) + err = provider.WriteCodeFile(outFilePath) + if err != nil { + return err + } + + tOutFilePath := fmt.Sprintf("%s_flags_test.go", strings.ToLower(structName)) + return provider.WriteTestFile(tOutFilePath) +} diff --git a/flytestdlib/cli/pflags/cmd/version.go b/flytestdlib/cli/pflags/cmd/version.go new file mode 100644 index 0000000000..8ee00af2e4 --- /dev/null +++ b/flytestdlib/cli/pflags/cmd/version.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/lyft/flytestdlib/version" + "github.com/spf13/cobra" +) + +var versionCmd = &cobra.Command{ + Aliases: []string{"version", "ver"}, + Run: func(cmd *cobra.Command, args []string) { + cmd.Printf("Version: %s\nBuildSHA: %s\nBuildTS: %s\n", version.Version, version.Build, version.BuildTime.String()) + }, +} + +func init() { + root.AddCommand(versionCmd) +} diff --git a/flytestdlib/cli/pflags/main.go b/flytestdlib/cli/pflags/main.go new file mode 100644 index 0000000000..e4c784a7b1 --- /dev/null +++ b/flytestdlib/cli/pflags/main.go @@ -0,0 +1,15 @@ +// Generates a Register method to automatically add pflags to a pflagSet for all fields in a given type. +package main + +import ( + "log" + + "github.com/lyft/flytestdlib/cli/pflags/cmd" +) + +func main() { + err := cmd.Execute() + if err != nil { + log.Fatal(err) + } +} diff --git a/flytestdlib/cli/pflags/readme.rst b/flytestdlib/cli/pflags/readme.rst new file mode 100644 index 0000000000..8a47d921f8 --- /dev/null +++ b/flytestdlib/cli/pflags/readme.rst @@ -0,0 +1,24 @@ +================ +Pflags Generator +================ + +This tool enables you to generate code to add pflags for all fields in a struct (recursively). In conjunction with the config package, this can be useful to generate cli flags that overrides configs while maintaing type safety and not having to deal with string typos. + +Getting Started +^^^^^^^^^^^^^^^ + - ``go get github.com/lyft/flytestdlib/cli/pflags`` + - call ``pflags --package `` OR + - add ``//go:generate pflags `` to the top of the file where the struct is declared. + has to be a struct type (it can't be, for instance, a slice type). + Supported fields' types within the struct: basic types (string, int8, int16, int32, int64, bool), json-unmarshalable types and other structs that conform to the same rules or slices of these types. + +This generates two files (struct_name_pflags.go and struct_name_pflags_test.go). If you open those, you will notice that all generated flags default to empty/zero values and no usage strings. That behavior can be customized using ``pflag`` tag. + +.. code-block:: + + type TestType struct { + StringValue string `json:"str" pflag:"\"hello world\",\"life is short\""` + BoolValue bool `json:"bl" pflag:",This is a bool value that will default to false."` + } + +``pflag`` tag is a comma-separated list. First item represents default value. Second value is usage. diff --git a/flytestdlib/config/accessor.go b/flytestdlib/config/accessor.go new file mode 100644 index 0000000000..1b5a693316 --- /dev/null +++ b/flytestdlib/config/accessor.go @@ -0,0 +1,61 @@ +// A strongly-typed config library to parse configs from PFlags, Env Vars and Config files. +// Config package enables consumers to access (readonly for now) strongly typed configs without worrying about mismatching +// keys or casting to the wrong type. It supports basic types (e.g. int, string) as well as more complex structures through +// json encoding/decoding. +// +// Config package introduces the concept of Sections. Each section should be given a unique section key. The binary will +// not load if there is a conflict. Each section should be represented as a Go struct and registered at startup before +// config is loaded/parsed. +// +// Sections can be nested too. A new config section can be registered as a sub-section of an existing one. This allows +// dynamic grouping of sections while continuing to enforce strong-typed parsing of configs. +// +// Config data can be parsed from supported config file(s) (yaml, prop, toml), env vars, PFlags or a combination of these +// Precedence is (flags, env vars, config file, defaults). When data is read from config files, a file watcher is started +// to monitor for changes in those files. If the registrant of a section subscribes to changes then a handler is called +// when the relevant section has been updated. Sections within a single config file will be invoked after all sections +// from that particular config file are parsed. It follows that if there are inter-dependent sections (e.g. changing one +// MUST be followed by a change in another), then make sure those sections are placed in the same config file. +// +// A convenience tool is also provided in cli package (pflags) that generates an implementation for PFlagProvider interface +// based on json names of the fields. +package config + +import ( + "context" + "flag" + + "github.com/spf13/pflag" +) + +// Provides a simple config parser interface. +type Accessor interface { + // Gets a friendly identifier for the accessor. + ID() string + + // Initializes the config parser with golang's default flagset. + InitializeFlags(cmdFlags *flag.FlagSet) + + // Initializes the config parser with pflag's flagset. + InitializePflags(cmdFlags *pflag.FlagSet) + + // Parses and validates config file(s) discovered then updates the underlying config section with the results. + // Exercise caution when calling this because multiple invocations will overwrite each other's results. + UpdateConfig(ctx context.Context) error + + // Gets path(s) to the config file(s) used. + ConfigFilesUsed() []string +} + +// Options used to initialize a Config Accessor +type Options struct { + // Instructs parser to fail if any section/key in the config file read do not have a corresponding registered section. + StrictMode bool + + // Search paths to look for config file(s). If not specified, it searches for config.yaml under current directory as well + // as /etc/flyte/config directories. + SearchPaths []string + + // Defines the root section to use with the accessor. + RootSection Section +} diff --git a/flytestdlib/config/accessor_test.go b/flytestdlib/config/accessor_test.go new file mode 100644 index 0000000000..f386b30b9c --- /dev/null +++ b/flytestdlib/config/accessor_test.go @@ -0,0 +1,91 @@ +package config + +import ( + "context" + "fmt" + "path/filepath" +) + +func Example() { + // This example demonstrates basic usage of config sections. + + //go:generate pflags OtherComponentConfig + + type OtherComponentConfig struct { + DurationValue Duration `json:"duration-value"` + URLValue URL `json:"url-value"` + StringValue string `json:"string-value"` + } + + // Each component should register their section in package init() or as a package var + section := MustRegisterSection("other-component", &OtherComponentConfig{}) + + // Override configpath to look for a custom location. + configPath := filepath.Join("testdata", "config.yaml") + + // Initialize an accessor. + var accessor Accessor + // e.g. + // accessor = viper.NewAccessor(viper.Options{ + // StrictMode: true, + // SearchPaths: []string{configPath, configPath2}, + // }) + + // Optionally bind to Pflags. + // accessor.InitializePflags(flags) + + // Parse config from file or pass empty to rely on env variables and PFlags + err := accessor.UpdateConfig(context.Background()) + if err != nil { + fmt.Printf("Failed to validate config from [%v], error: %v", configPath, err) + return + } + + // Get parsed config value. + parsedConfig := section.GetConfig().(*OtherComponentConfig) + fmt.Printf("Config: %v", parsedConfig) +} + +func Example_nested() { + // This example demonstrates registering nested config sections dynamically. + + //go:generate pflags OtherComponentConfig + + type OtherComponentConfig struct { + DurationValue Duration `json:"duration-value"` + URLValue URL `json:"url-value"` + StringValue string `json:"string-value"` + } + + // Each component should register their section in package init() or as a package var + Section := MustRegisterSection("my-component", &MyComponentConfig{}) + + // Other packages can register their sections at the root level (like the above line) or as nested sections of other + // sections (like the below line) + NestedSection := Section.MustRegisterSection("nested", &OtherComponentConfig{}) + + // Override configpath to look for a custom location. + configPath := filepath.Join("testdata", "nested_config.yaml") + + // Initialize an accessor. + var accessor Accessor + // e.g. + // accessor = viper.NewAccessor(viper.Options{ + // StrictMode: true, + // SearchPaths: []string{configPath, configPath2}, + // }) + + // Optionally bind to Pflags. + // accessor.InitializePflags(flags) + + // Parse config from file or pass empty to rely on env variables and PFlags + err := accessor.UpdateConfig(context.Background()) + if err != nil { + fmt.Printf("Failed to validate config from [%v], error: %v", configPath, err) + return + } + + // Get parsed config value. + parsedConfig := NestedSection.GetConfig().(*OtherComponentConfig) + fmt.Printf("Config: %v", parsedConfig) +} diff --git a/flytestdlib/config/config_cmd.go b/flytestdlib/config/config_cmd.go new file mode 100644 index 0000000000..a5023ceb61 --- /dev/null +++ b/flytestdlib/config/config_cmd.go @@ -0,0 +1,113 @@ +package config + +import ( + "context" + "os" + "strings" + + "github.com/fatih/color" + "github.com/spf13/cobra" +) + +const ( + PathFlag = "file" + StrictModeFlag = "strict" + CommandValidate = "validate" + CommandDiscover = "discover" +) + +type AccessorProvider func(options Options) Accessor + +type printer interface { + Printf(format string, i ...interface{}) + Println(i ...interface{}) +} + +func NewConfigCommand(accessorProvider AccessorProvider) *cobra.Command { + opts := Options{} + rootCmd := &cobra.Command{ + Use: "config", + Short: "Runs various config commands, look at the help of this command to get a list of available commands..", + ValidArgs: []string{CommandValidate, CommandDiscover}, + } + + validateCmd := &cobra.Command{ + Use: "validate", + Short: "Validates the loaded config.", + RunE: func(cmd *cobra.Command, args []string) error { + return validate(accessorProvider(opts), cmd) + }, + } + + discoverCmd := &cobra.Command{ + Use: "discover", + Short: "Searches for a config in one of the default search paths.", + RunE: func(cmd *cobra.Command, args []string) error { + return validate(accessorProvider(opts), cmd) + }, + } + + // Configure Root Command + rootCmd.PersistentFlags().StringArrayVar(&opts.SearchPaths, PathFlag, []string{}, `Passes the config file to load. +If empty, it'll first search for the config file path then, if found, will load config from there.`) + + rootCmd.AddCommand(validateCmd) + rootCmd.AddCommand(discoverCmd) + + // Configure Validate Command + validateCmd.Flags().BoolVar(&opts.StrictMode, StrictModeFlag, false, `Validates that all keys in loaded config +map to already registered sections.`) + + return rootCmd +} + +// Redirects Stdout to a string buffer until context is cancelled. +func redirectStdOut() (old, new *os.File) { + old = os.Stdout // keep backup of the real stdout + var err error + _, new, err = os.Pipe() + if err != nil { + panic(err) + } + + os.Stdout = new + + return +} + +func validate(accessor Accessor, p printer) error { + // Redirect stdout + old, n := redirectStdOut() + defer func() { + err := n.Close() + if err != nil { + panic(err) + } + }() + defer func() { os.Stdout = old }() + + err := accessor.UpdateConfig(context.Background()) + + printInfo(p, accessor) + if err == nil { + green := color.New(color.FgGreen).SprintFunc() + p.Println(green("Validated config file successfully.")) + } else { + red := color.New(color.FgRed).SprintFunc() + p.Println(red("Failed to validate config file.")) + } + + return err +} + +func printInfo(p printer, v Accessor) { + cfgFile := v.ConfigFilesUsed() + if len(cfgFile) != 0 { + green := color.New(color.FgGreen).SprintFunc() + + p.Printf("Config file(s) found at: %v\n", green(strings.Join(cfgFile, "\n"))) + } else { + red := color.New(color.FgRed).SprintFunc() + p.Println(red("Couldn't find a config file.")) + } +} diff --git a/flytestdlib/config/config_cmd_test.go b/flytestdlib/config/config_cmd_test.go new file mode 100644 index 0000000000..d8ef31d298 --- /dev/null +++ b/flytestdlib/config/config_cmd_test.go @@ -0,0 +1,64 @@ +package config + +import ( + "bytes" + "context" + "flag" + "testing" + + "github.com/spf13/cobra" + "github.com/spf13/pflag" + "github.com/stretchr/testify/assert" +) + +type MockAccessor struct { +} + +func (MockAccessor) ID() string { + panic("implement me") +} + +func (MockAccessor) InitializeFlags(cmdFlags *flag.FlagSet) { +} + +func (MockAccessor) InitializePflags(cmdFlags *pflag.FlagSet) { +} + +func (MockAccessor) UpdateConfig(ctx context.Context) error { + return nil +} + +func (MockAccessor) ConfigFilesUsed() []string { + return []string{"test"} +} + +func (MockAccessor) RefreshFromConfig() error { + return nil +} + +func newMockAccessor(options Options) Accessor { + return MockAccessor{} +} + +func executeCommandC(root *cobra.Command, args ...string) (c *cobra.Command, output string, err error) { + buf := new(bytes.Buffer) + root.SetOutput(buf) + root.SetArgs(args) + + c, err = root.ExecuteC() + + return c, buf.String(), err +} + +func TestNewConfigCommand(t *testing.T) { + cmd := NewConfigCommand(newMockAccessor) + assert.NotNil(t, cmd) + + _, output, err := executeCommandC(cmd, CommandDiscover) + assert.NoError(t, err) + assert.Contains(t, output, "test") + + _, output, err = executeCommandC(cmd, CommandValidate) + assert.NoError(t, err) + assert.Contains(t, output, "test") +} diff --git a/flytestdlib/config/duration.go b/flytestdlib/config/duration.go new file mode 100644 index 0000000000..e1a978d5c8 --- /dev/null +++ b/flytestdlib/config/duration.go @@ -0,0 +1,47 @@ +package config + +import ( + "encoding/json" + "errors" + "time" +) + +// A wrapper around time.Duration that enables Json Marshalling capabilities +type Duration struct { + time.Duration +} + +func (d Duration) MarshalJSON() ([]byte, error) { + return json.Marshal(d.String()) +} + +func (d *Duration) UnmarshalJSON(b []byte) error { + if len(b) == 0 { + d.Duration = time.Duration(0) + return nil + } + + var v interface{} + if err := json.Unmarshal(b, &v); err != nil { + return err + } + switch value := v.(type) { + case float64: + d.Duration = time.Duration(value) + return nil + case string: + if len(value) == 0 { + d.Duration = time.Duration(0) + } else { + var err error + d.Duration, err = time.ParseDuration(value) + if err != nil { + return err + } + } + default: + return errors.New("invalid duration") + } + + return nil +} diff --git a/flytestdlib/config/duration_test.go b/flytestdlib/config/duration_test.go new file mode 100644 index 0000000000..8e411987ac --- /dev/null +++ b/flytestdlib/config/duration_test.go @@ -0,0 +1,66 @@ +package config + +import ( + "encoding/json" + "reflect" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func TestDuration_MarshalJSON(t *testing.T) { + t.Run("Valid", func(t *testing.T) { + expected := Duration{ + Duration: time.Second * 2, + } + + b, err := expected.MarshalJSON() + assert.NoError(t, err) + + actual := Duration{} + err = actual.UnmarshalJSON(b) + assert.NoError(t, err) + + assert.True(t, reflect.DeepEqual(expected, actual)) + }) +} + +func TestDuration_UnmarshalJSON(t *testing.T) { + t.Run("Empty", func(t *testing.T) { + actual := Duration{} + err := actual.UnmarshalJSON([]byte{}) + assert.NoError(t, err) + assert.Equal(t, time.Duration(0), actual.Duration) + }) + + t.Run("Invalid_string", func(t *testing.T) { + input := "blah" + raw, err := json.Marshal(input) + assert.NoError(t, err) + + actual := Duration{} + err = actual.UnmarshalJSON(raw) + assert.Error(t, err) + }) + + t.Run("Valid_float", func(t *testing.T) { + input := float64(12345) + raw, err := json.Marshal(input) + assert.NoError(t, err) + + actual := Duration{} + err = actual.UnmarshalJSON(raw) + assert.NoError(t, err) + }) + + t.Run("Invalid_bool", func(t *testing.T) { + input := true + raw, err := json.Marshal(input) + assert.NoError(t, err) + + actual := Duration{} + err = actual.UnmarshalJSON(raw) + assert.Error(t, err) + }) +} diff --git a/flytestdlib/config/errors.go b/flytestdlib/config/errors.go new file mode 100644 index 0000000000..b46459a9f9 --- /dev/null +++ b/flytestdlib/config/errors.go @@ -0,0 +1,37 @@ +package config + +import "fmt" + +var ( + ErrStrictModeValidation = fmt.Errorf("failed strict mode check") + ErrChildConfigOverridesConfig = fmt.Errorf("child config attempts to override an existing native config property") +) + +// A helper object that collects errors. +type ErrorCollection []error + +func (e ErrorCollection) Error() string { + res := "" + for _, err := range e { + res = fmt.Sprintf("%v\n%v", res, err.Error()) + } + + return res +} + +func (e ErrorCollection) ErrorOrDefault() error { + if len(e) == 0 { + return nil + } + + return e +} + +func (e *ErrorCollection) Append(err error) bool { + if err != nil { + *e = append(*e, err) + return true + } + + return false +} diff --git a/flytestdlib/config/errors_test.go b/flytestdlib/config/errors_test.go new file mode 100644 index 0000000000..4dc1e72876 --- /dev/null +++ b/flytestdlib/config/errors_test.go @@ -0,0 +1,31 @@ +package config + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestErrorCollection_ErrorOrDefault(t *testing.T) { + errs := ErrorCollection{} + assert.Error(t, errs) + assert.NoError(t, errs.ErrorOrDefault()) +} + +func TestErrorCollection_Append(t *testing.T) { + errs := ErrorCollection{} + errs.Append(nil) + errs.Append(fmt.Errorf("this is an actual error")) + assert.Error(t, errs.ErrorOrDefault()) + assert.Len(t, errs, 1) + assert.Len(t, errs.ErrorOrDefault(), 1) +} + +func TestErrorCollection_Error(t *testing.T) { + errs := ErrorCollection{} + errs.Append(nil) + errs.Append(fmt.Errorf("this is an actual error")) + assert.Error(t, errs.ErrorOrDefault()) + assert.Contains(t, errs.ErrorOrDefault().Error(), "this is an actual error") +} diff --git a/flytestdlib/config/files/finder.go b/flytestdlib/config/files/finder.go new file mode 100644 index 0000000000..e389d88306 --- /dev/null +++ b/flytestdlib/config/files/finder.go @@ -0,0 +1,83 @@ +package files + +import ( + "os" + "path/filepath" +) + +const ( + configFileType = "yaml" + configFileName = "config" +) + +var configLocations = [][]string{ + {"."}, + {"/etc", "flyte", "config"}, + {os.ExpandEnv("$GOPATH"), "src", "github.com", "lyft", "flytestdlib"}, +} + +// Check if File / Directory Exists +func exists(path string) (bool, error) { + _, err := os.Stat(path) + if err == nil { + return true, nil + } + + if os.IsNotExist(err) { + return false, nil + } + + return false, err +} + +func isFile(path string) (bool, error) { + s, err := os.Stat(path) + if err != nil { + return false, err + } + + return !s.IsDir(), nil +} + +func contains(slice []string, value string) bool { + for _, s := range slice { + if s == value { + return true + } + } + + return false +} + +// Finds config files in search paths. If searchPaths is empty, it'll look in default locations (see configLocations above) +// If searchPaths is not empty but no configs are found there, it'll still look into configLocations. +// If it found any config file in searchPaths, it'll stop the search. +// searchPaths can contain patterns to match (behavior is OS-dependent). And it'll try to Glob the pattern for any matching +// files. +func FindConfigFiles(searchPaths []string) []string { + res := make([]string, 0, 1) + + for _, location := range searchPaths { + matchedFiles, err := filepath.Glob(location) + if err != nil { + continue + } + + for _, matchedFile := range matchedFiles { + if file, err := isFile(matchedFile); err == nil && file && !contains(res, matchedFile) { + res = append(res, matchedFile) + } + } + } + + if len(res) == 0 { + for _, location := range configLocations { + pathToTest := filepath.Join(append(location, configFileName+"."+configFileType)...) + if b, err := exists(pathToTest); err == nil && b && !contains(res, pathToTest) { + res = append(res, pathToTest) + } + } + } + + return res +} diff --git a/flytestdlib/config/files/finder_test.go b/flytestdlib/config/files/finder_test.go new file mode 100644 index 0000000000..833ac461f1 --- /dev/null +++ b/flytestdlib/config/files/finder_test.go @@ -0,0 +1,28 @@ +package files + +import ( + "path/filepath" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestFindConfigFiles(t *testing.T) { + t.Run("Find config-* group", func(t *testing.T) { + files := FindConfigFiles([]string{filepath.Join("testdata", "config*.yaml")}) + assert.Equal(t, 2, len(files)) + }) + + t.Run("Find other-group-* group", func(t *testing.T) { + files := FindConfigFiles([]string{filepath.Join("testdata", "other-group*.yaml")}) + assert.Equal(t, 2, len(files)) + }) + + t.Run("Absolute path", func(t *testing.T) { + files := FindConfigFiles([]string{filepath.Join("testdata", "other-group-1.yaml")}) + assert.Equal(t, 1, len(files)) + + files = FindConfigFiles([]string{filepath.Join("testdata", "other-group-3.yaml")}) + assert.Equal(t, 0, len(files)) + }) +} diff --git a/flytestdlib/config/files/testdata/config-1.yaml b/flytestdlib/config/files/testdata/config-1.yaml new file mode 100644 index 0000000000..a5b6191d98 --- /dev/null +++ b/flytestdlib/config/files/testdata/config-1.yaml @@ -0,0 +1,9 @@ +other-component: + duration-value: 20s + int-val: 4 + string-value: Hey there! + strings: + - hello + - world + - '!' + url-value: http://something.com diff --git a/flytestdlib/config/files/testdata/config-2.yaml b/flytestdlib/config/files/testdata/config-2.yaml new file mode 100755 index 0000000000..5c28d00a09 --- /dev/null +++ b/flytestdlib/config/files/testdata/config-2.yaml @@ -0,0 +1,2 @@ +my-component: + str: Hello World diff --git a/flytestdlib/config/files/testdata/other-group-1.yaml b/flytestdlib/config/files/testdata/other-group-1.yaml new file mode 100644 index 0000000000..a5b6191d98 --- /dev/null +++ b/flytestdlib/config/files/testdata/other-group-1.yaml @@ -0,0 +1,9 @@ +other-component: + duration-value: 20s + int-val: 4 + string-value: Hey there! + strings: + - hello + - world + - '!' + url-value: http://something.com diff --git a/flytestdlib/config/files/testdata/other-group-2.yaml b/flytestdlib/config/files/testdata/other-group-2.yaml new file mode 100755 index 0000000000..5c28d00a09 --- /dev/null +++ b/flytestdlib/config/files/testdata/other-group-2.yaml @@ -0,0 +1,2 @@ +my-component: + str: Hello World diff --git a/flytestdlib/config/port.go b/flytestdlib/config/port.go new file mode 100644 index 0000000000..87bbc854e2 --- /dev/null +++ b/flytestdlib/config/port.go @@ -0,0 +1,56 @@ +package config + +import ( + "encoding/json" + "errors" + "fmt" + "strconv" +) + +// A common port struct that supports Json marshal/unmarshal into/from simple strings/floats. +type Port struct { + Port int `json:"port,omitempty"` +} + +func (p Port) MarshalJSON() ([]byte, error) { + return json.Marshal(p.Port) +} + +func (p *Port) UnmarshalJSON(b []byte) error { + var v interface{} + if err := json.Unmarshal(b, &v); err != nil { + return err + } + + switch value := v.(type) { + case string: + u, err := parsePortString(value) + if err != nil { + return err + } + + p.Port = u + return nil + case float64: + if !validPortRange(value) { + return fmt.Errorf("port must be a valid number between 0 and 65535, inclusive") + } + + p.Port = int(value) + return nil + default: + return errors.New("invalid port") + } +} + +func parsePortString(port string) (int, error) { + if portInt, err := strconv.Atoi(port); err == nil && validPortRange(float64(portInt)) { + return portInt, nil + } + + return 0, fmt.Errorf("port must be a valid number between 1 and 65535, inclusive") +} + +func validPortRange(port float64) bool { + return 0 <= port && port <= 65535 +} diff --git a/flytestdlib/config/port_test.go b/flytestdlib/config/port_test.go new file mode 100644 index 0000000000..c69c09570d --- /dev/null +++ b/flytestdlib/config/port_test.go @@ -0,0 +1,81 @@ +package config + +import ( + "encoding/json" + "fmt" + "reflect" + "testing" + + "github.com/stretchr/testify/assert" +) + +type PortTestCase struct { + Expected Port + Input interface{} +} + +func TestPort_MarshalJSON(t *testing.T) { + validPorts := []PortTestCase{ + {Expected: Port{Port: 8080}, Input: 8080}, + {Expected: Port{Port: 1}, Input: 1}, + {Expected: Port{Port: 65535}, Input: "65535"}, + {Expected: Port{Port: 65535}, Input: 65535}, + } + + for i, validPort := range validPorts { + t.Run(fmt.Sprintf("Valid %v [%v]", i, validPort.Input), func(t *testing.T) { + b, err := json.Marshal(validPort.Input) + assert.NoError(t, err) + + actual := Port{} + err = actual.UnmarshalJSON(b) + assert.NoError(t, err) + + assert.True(t, reflect.DeepEqual(validPort.Expected, actual)) + }) + } +} + +func TestPort_UnmarshalJSON(t *testing.T) { + invalidValues := []interface{}{ + "%gh&%ij", + 1000000, + true, + } + + for i, invalidPort := range invalidValues { + t.Run(fmt.Sprintf("Invalid %v", i), func(t *testing.T) { + raw, err := json.Marshal(invalidPort) + assert.NoError(t, err) + + actual := URL{} + err = actual.UnmarshalJSON(raw) + assert.Error(t, err) + }) + } + + t.Run("Invalid json", func(t *testing.T) { + actual := Port{} + err := actual.UnmarshalJSON([]byte{}) + assert.Error(t, err) + }) + + t.Run("Invalid Range", func(t *testing.T) { + b, err := json.Marshal(float64(100000)) + assert.NoError(t, err) + + actual := Port{} + err = actual.UnmarshalJSON(b) + assert.Error(t, err) + }) + + t.Run("Unmarshal Empty", func(t *testing.T) { + p := Port{} + raw, err := json.Marshal(p) + assert.NoError(t, err) + + actual := Port{} + assert.NoError(t, actual.UnmarshalJSON(raw)) + assert.Equal(t, 0, actual.Port) + }) +} diff --git a/flytestdlib/config/section.go b/flytestdlib/config/section.go new file mode 100644 index 0000000000..41fddd0c1b --- /dev/null +++ b/flytestdlib/config/section.go @@ -0,0 +1,230 @@ +package config + +import ( + "context" + "errors" + "fmt" + "reflect" + "strings" + "sync" + + "github.com/lyft/flytestdlib/atomic" + + "github.com/spf13/pflag" +) + +type Section interface { + // Gets a cloned copy of the Config registered to this section. This config instance does not account for any child + // section registered. + GetConfig() Config + + // Gets a function pointer to call when the config has been updated. + GetConfigUpdatedHandler() SectionUpdated + + // Sets the config and sets a bit indicating whether the new config is different when compared to the existing value. + SetConfig(config Config) error + + // Gets a value indicating whether the config has changed since the last call to GetConfigChangedAndClear and clears + // the changed bit. This operation is atomic. + GetConfigChangedAndClear() bool + + // Retrieves the loaded values for section key if one exists, or nil otherwise. + GetSection(key SectionKey) Section + + // Gets all child config sections. + GetSections() SectionMap + + // Registers a section with the config manager. Section keys are case insensitive and must be unique. + // The section object must be passed by reference since it'll be used to unmarshal into. It must also support json + // marshaling. If the section registered gets updated at runtime, the updatesFn will be invoked to handle the propagation + // of changes. + RegisterSectionWithUpdates(key SectionKey, configSection Config, updatesFn SectionUpdated) (Section, error) + + // Registers a section with the config manager. Section keys are case insensitive and must be unique. + // The section object must be passed by reference since it'll be used to unmarshal into. It must also support json + // marshaling. If the section registered gets updated at runtime, the updatesFn will be invoked to handle the propagation + // of changes. + MustRegisterSectionWithUpdates(key SectionKey, configSection Config, updatesFn SectionUpdated) Section + + // Registers a section with the config manager. Section keys are case insensitive and must be unique. + // The section object must be passed by reference since it'll be used to unmarshal into. It must also support json + // marshaling. + RegisterSection(key SectionKey, configSection Config) (Section, error) + + // Registers a section with the config manager. Section keys are case insensitive and must be unique. + // The section object must be passed by reference since it'll be used to unmarshal into. It must also support json + // marshaling. + MustRegisterSection(key SectionKey, configSection Config) Section +} + +type Config = interface{} +type SectionKey = string +type SectionMap map[SectionKey]Section + +// A section can optionally implements this interface to add its fields as cmdline arguments. +type PFlagProvider interface { + GetPFlagSet(prefix string) *pflag.FlagSet +} + +type SectionUpdated func(ctx context.Context, newValue Config) + +// Global section to use with any root-level config sections registered. +var rootSection = NewRootSection() + +type section struct { + config Config + handler SectionUpdated + isDirty atomic.Bool + sections SectionMap + lockObj sync.RWMutex +} + +// Gets the global root section. +func GetRootSection() Section { + return rootSection +} + +func MustRegisterSection(key SectionKey, configSection Config) Section { + s, err := RegisterSection(key, configSection) + if err != nil { + panic(err) + } + + return s +} + +func (r *section) MustRegisterSection(key SectionKey, configSection Config) Section { + s, err := r.RegisterSection(key, configSection) + if err != nil { + panic(err) + } + + return s +} + +// Registers a section with the config manager. Section keys are case insensitive and must be unique. +// The section object must be passed by reference since it'll be used to unmarshal into. It must also support json +// marshaling. +func RegisterSection(key SectionKey, configSection Config) (Section, error) { + return rootSection.RegisterSection(key, configSection) +} + +func (r *section) RegisterSection(key SectionKey, configSection Config) (Section, error) { + return r.RegisterSectionWithUpdates(key, configSection, nil) +} + +func MustRegisterSectionWithUpdates(key SectionKey, configSection Config, updatesFn SectionUpdated) Section { + s, err := RegisterSectionWithUpdates(key, configSection, updatesFn) + if err != nil { + panic(err) + } + + return s +} + +func (r *section) MustRegisterSectionWithUpdates(key SectionKey, configSection Config, updatesFn SectionUpdated) Section { + s, err := r.RegisterSectionWithUpdates(key, configSection, updatesFn) + if err != nil { + panic(err) + } + + return s +} + +// Registers a section with the config manager. Section keys are case insensitive and must be unique. +// The section object must be passed by reference since it'll be used to unmarshal into. It must also support json +// marshaling. If the section registered gets updated at runtime, the updatesFn will be invoked to handle the propagation +// of changes. +func RegisterSectionWithUpdates(key SectionKey, configSection Config, updatesFn SectionUpdated) (Section, error) { + return rootSection.RegisterSectionWithUpdates(key, configSection, updatesFn) +} + +func (r *section) RegisterSectionWithUpdates(key SectionKey, configSection Config, updatesFn SectionUpdated) (Section, error) { + r.lockObj.Lock() + defer r.lockObj.Unlock() + + key = strings.ToLower(key) + + if len(key) == 0 { + return nil, errors.New("key must be a non-zero string") + } + + if configSection == nil { + return nil, fmt.Errorf("configSection must be a non-nil pointer. SectionKey: %v", key) + } + + if reflect.TypeOf(configSection).Kind() != reflect.Ptr { + return nil, fmt.Errorf("section must be a Pointer. SectionKey: %v", key) + } + + if _, alreadyExists := r.sections[key]; alreadyExists { + return nil, fmt.Errorf("key already exists [%v]", key) + } + + section := NewSection(configSection, updatesFn) + r.sections[key] = section + return section, nil +} + +// Retrieves the loaded values for section key if one exists, or nil otherwise. +func GetSection(key SectionKey) Section { + return rootSection.GetSection(key) +} + +func (r *section) GetSection(key SectionKey) Section { + r.lockObj.RLock() + defer r.lockObj.RUnlock() + + key = strings.ToLower(key) + + if section, alreadyExists := r.sections[key]; alreadyExists { + return section + } + + return nil +} + +func (r *section) GetSections() SectionMap { + return r.sections +} + +func (r *section) GetConfig() Config { + r.lockObj.RLock() + defer r.lockObj.RUnlock() + + return r.config +} + +func (r *section) SetConfig(c Config) error { + r.lockObj.Lock() + defer r.lockObj.Unlock() + + if !DeepEqual(r.config, c) { + r.config = c + r.isDirty.Store(true) + } + + return nil +} + +func (r *section) GetConfigUpdatedHandler() SectionUpdated { + return r.handler +} + +func (r *section) GetConfigChangedAndClear() bool { + return r.isDirty.CompareAndSwap(true, false) +} + +func NewSection(configSection Config, updatesFn SectionUpdated) Section { + return §ion{ + config: configSection, + handler: updatesFn, + isDirty: atomic.NewBool(false), + sections: map[SectionKey]Section{}, + lockObj: sync.RWMutex{}, + } +} + +func NewRootSection() Section { + return NewSection(nil, nil) +} diff --git a/flytestdlib/config/section_test.go b/flytestdlib/config/section_test.go new file mode 100644 index 0000000000..5b314bb339 --- /dev/null +++ b/flytestdlib/config/section_test.go @@ -0,0 +1,119 @@ +package config + +import ( + "flag" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "reflect" + "testing" + "time" + + "k8s.io/apimachinery/pkg/util/rand" + + "github.com/ghodss/yaml" + "github.com/lyft/flytestdlib/internal/utils" + "github.com/spf13/pflag" + + "github.com/stretchr/testify/assert" +) + +// Make sure existing config file(s) parse correctly before overriding them with this flag! +var update = flag.Bool("update", false, "Updates testdata") + +type MyComponentConfig struct { + StringValue string `json:"str"` +} + +type OtherComponentConfig struct { + DurationValue Duration `json:"duration-value"` + URLValue URL `json:"url-value"` + StringValue string `json:"string-value"` + IntValue int `json:"int-val"` + StringArray []string `json:"strings"` +} + +func (MyComponentConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("MyComponentConfig", pflag.ExitOnError) + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "str"), "hello world", "life is short") + return cmdFlags +} + +func (OtherComponentConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("MyComponentConfig", pflag.ExitOnError) + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "string-value"), "hello world", "life is short") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "duration-value"), "20s", "") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "int-val"), 4, "this is an important flag") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "url-value"), "http://blah.com", "Sets the type of storage to configure [s3/minio/local/mem].") + return cmdFlags +} + +type TestConfig struct { + MyComponentConfig MyComponentConfig `json:"my-component"` + OtherComponentConfig OtherComponentConfig `json:"other-component"` +} + +func TestMarshal(t *testing.T) { + expected := TestConfig{ + MyComponentConfig: MyComponentConfig{ + StringValue: "Hello World", + }, + OtherComponentConfig: OtherComponentConfig{ + StringValue: "Hey there!", + IntValue: 4, + URLValue: URL{URL: utils.MustParseURL("http://something.com")}, + DurationValue: Duration{Duration: time.Second * 20}, + StringArray: []string{"hello", "world", "!"}, + }, + } + + configPath := filepath.Join("testdata", "config.yaml") + if *update { + t.Log("Updating config file.") + raw, err := yaml.Marshal(expected) + assert.NoError(t, err) + assert.NoError(t, ioutil.WriteFile(configPath, raw, os.ModePerm)) + } + + r := TestConfig{} + raw, err := ioutil.ReadFile(configPath) + assert.NoError(t, err) + assert.NoError(t, yaml.Unmarshal(raw, &r)) + assert.True(t, reflect.DeepEqual(expected, r)) +} + +func TestRegisterSection(t *testing.T) { + t.Run("New Section", func(t *testing.T) { + _, err := RegisterSection(rand.String(6), &TestConfig{}) + assert.NoError(t, err) + }) + + t.Run("Duplicate", func(t *testing.T) { + s := rand.String(6) + _, err := RegisterSection(s, &TestConfig{}) + assert.NoError(t, err) + _, err = RegisterSection(s, &TestConfig{}) + assert.Error(t, err) + }) + + t.Run("Register Nested", func(t *testing.T) { + root := NewRootSection() + s := rand.String(6) + _, err := root.RegisterSection(s, &TestConfig{}) + assert.NoError(t, err) + _, err = root.RegisterSection(s, &TestConfig{}) + assert.Error(t, err) + }) +} + +func TestGetSection(t *testing.T) { + sectionName := rand.String(6) + actual1, err := RegisterSection(sectionName, &TestConfig{}) + assert.NoError(t, err) + assert.Equal(t, reflect.TypeOf(&TestConfig{}), reflect.TypeOf(actual1.GetConfig())) + + actual2 := GetSection(sectionName) + assert.NotNil(t, actual2) + assert.Equal(t, reflect.TypeOf(&TestConfig{}), reflect.TypeOf(actual2.GetConfig())) +} diff --git a/flytestdlib/config/testdata/config.yaml b/flytestdlib/config/testdata/config.yaml new file mode 100755 index 0000000000..2f20ad97b5 --- /dev/null +++ b/flytestdlib/config/testdata/config.yaml @@ -0,0 +1,11 @@ +my-component: + str: Hello World +other-component: + duration-value: 20s + int-val: 4 + string-value: Hey there! + strings: + - hello + - world + - '!' + url-value: http://something.com diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go new file mode 100644 index 0000000000..34d86237e9 --- /dev/null +++ b/flytestdlib/config/tests/accessor_test.go @@ -0,0 +1,641 @@ +package tests + +import ( + "context" + "crypto/rand" + "encoding/binary" + "fmt" + "io/ioutil" + "os" + "os/exec" + "path" + "path/filepath" + "reflect" + "runtime" + "strings" + "testing" + "time" + + "github.com/fsnotify/fsnotify" + + k8sRand "k8s.io/apimachinery/pkg/util/rand" + + "github.com/lyft/flytestdlib/config" + "github.com/lyft/flytestdlib/internal/utils" + "github.com/spf13/pflag" + + "github.com/ghodss/yaml" + "github.com/stretchr/testify/assert" +) + +type accessorCreatorFn func(registry config.Section, configPath string) config.Accessor + +func getRandInt() uint64 { + c := 10 + b := make([]byte, c) + _, err := rand.Read(b) + if err != nil { + return 0 + } + + return binary.BigEndian.Uint64(b) +} + +func tempFileName(pattern string) string { + // TODO: Remove this hack after we use Go1.11 everywhere: + // https://github.com/golang/go/commit/191efbc419d7e5dec842c20841f6f716da4b561d + + var prefix, suffix string + if pos := strings.LastIndex(pattern, "*"); pos != -1 { + prefix, suffix = pattern[:pos], pattern[pos+1:] + } else { + prefix = pattern + } + + return filepath.Join(os.TempDir(), prefix+k8sRand.String(6)+suffix) +} + +func populateConfigData(configPath string) (TestConfig, error) { + expected := TestConfig{ + MyComponentConfig: MyComponentConfig{ + StringValue: fmt.Sprintf("Hello World %v", getRandInt()), + }, + OtherComponentConfig: OtherComponentConfig{ + StringValue: fmt.Sprintf("Hello World %v", getRandInt()), + URLValue: config.URL{URL: utils.MustParseURL("http://something.com")}, + DurationValue: config.Duration{Duration: time.Second * 20}, + }, + } + + raw, err := yaml.Marshal(expected) + if err != nil { + return TestConfig{}, err + } + + return expected, ioutil.WriteFile(configPath, raw, os.ModePerm) +} + +func TestGetEmptySection(t *testing.T) { + t.Run("empty", func(t *testing.T) { + r := config.GetSection("Empty") + assert.Nil(t, r) + }) +} + +type ComplexType struct { + IntValue int `json:"int-val"` +} + +type ComplexTypeArray []ComplexType + +type ConfigWithLists struct { + ListOfStuff []ComplexType `json:"list"` + StringValue string `json:"string-val"` +} + +type ConfigWithMaps struct { + MapOfStuff map[string]ComplexType `json:"m"` + MapWithoutJSON map[string]ComplexType +} + +type ConfigWithJSONTypes struct { + Duration config.Duration `json:"duration"` +} + +func TestAccessor_InitializePflags(t *testing.T) { + for _, provider := range providers { + t.Run(fmt.Sprintf("[%v] Unused flag", provider(config.Options{}).ID()), func(t *testing.T) { + reg := config.NewRootSection() + _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + v := provider(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "config.yaml")}, + RootSection: reg, + }) + + set := pflag.NewFlagSet("test", pflag.ContinueOnError) + set.String("flag1", "123", "") + v.InitializePflags(set) + assert.NoError(t, v.UpdateConfig(context.TODO())) + }) + + t.Run(fmt.Sprintf("[%v] Override string value", provider(config.Options{}).ID()), func(t *testing.T) { + reg := config.NewRootSection() + _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + v := provider(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "config.yaml")}, + RootSection: reg, + }) + + set := pflag.NewFlagSet("test", pflag.ContinueOnError) + v.InitializePflags(set) + key := "MY_COMPONENT.STR2" + assert.NoError(t, os.Setenv(key, "123")) + defer func() { assert.NoError(t, os.Unsetenv(key)) }() + assert.NoError(t, v.UpdateConfig(context.TODO())) + r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) + assert.Equal(t, "123", r.StringValue2) + }) + + t.Run(fmt.Sprintf("[%v] Parse from config file", provider(config.Options{}).ID()), func(t *testing.T) { + reg := config.NewRootSection() + _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + _, err = reg.RegisterSection(OtherComponentSectionKey, &OtherComponentConfig{}) + assert.NoError(t, err) + + v := provider(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "config.yaml")}, + RootSection: reg, + }) + + set := pflag.NewFlagSet("test", pflag.ExitOnError) + v.InitializePflags(set) + assert.NoError(t, v.UpdateConfig(context.TODO())) + r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) + assert.Equal(t, "Hello World", r.StringValue) + otherC := reg.GetSection(OtherComponentSectionKey).GetConfig().(*OtherComponentConfig) + assert.Equal(t, 4, otherC.IntValue) + assert.Equal(t, []string{"default value"}, otherC.StringArrayWithDefaults) + }) + } +} + +func TestStrictAccessor(t *testing.T) { + for _, provider := range providers { + t.Run(fmt.Sprintf("[%v] Bad config", provider(config.Options{}).ID()), func(t *testing.T) { + reg := config.NewRootSection() + v := provider(config.Options{ + StrictMode: true, + SearchPaths: []string{filepath.Join("testdata", "bad_config.yaml")}, + RootSection: reg, + }) + + set := pflag.NewFlagSet("test", pflag.ExitOnError) + v.InitializePflags(set) + assert.Error(t, v.UpdateConfig(context.TODO())) + }) + + t.Run(fmt.Sprintf("[%v] Set through env", provider(config.Options{}).ID()), func(t *testing.T) { + reg := config.NewRootSection() + _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + _, err = reg.RegisterSection(OtherComponentSectionKey, &OtherComponentConfig{}) + assert.NoError(t, err) + + v := provider(config.Options{ + StrictMode: true, + SearchPaths: []string{filepath.Join("testdata", "config.yaml")}, + RootSection: reg, + }) + + set := pflag.NewFlagSet("other-component.string-value", pflag.ExitOnError) + v.InitializePflags(set) + + key := "OTHER_COMPONENT.STRING_VALUE" + assert.NoError(t, os.Setenv(key, "set from env")) + defer func() { assert.NoError(t, os.Unsetenv(key)) }() + assert.NoError(t, v.UpdateConfig(context.TODO())) + }) + } +} + +func TestAccessor_UpdateConfig(t *testing.T) { + for _, provider := range providers { + t.Run(fmt.Sprintf("[%v] Static File", provider(config.Options{}).ID()), func(t *testing.T) { + reg := config.NewRootSection() + _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + v := provider(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "config.yaml")}, + RootSection: reg, + }) + + assert.NoError(t, v.UpdateConfig(context.TODO())) + r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) + assert.Equal(t, "Hello World", r.StringValue) + }) + + t.Run(fmt.Sprintf("[%v] Nested", provider(config.Options{}).ID()), func(t *testing.T) { + root := config.NewRootSection() + section, err := root.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + _, err = section.RegisterSection("nested", &OtherComponentConfig{}) + assert.NoError(t, err) + + v := provider(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "nested_config.yaml")}, + RootSection: root, + }) + + assert.NoError(t, v.UpdateConfig(context.TODO())) + r := root.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) + assert.Equal(t, "Hello World", r.StringValue) + + nested := section.GetSection("nested").GetConfig().(*OtherComponentConfig) + assert.Equal(t, "Hey there!", nested.StringValue) + }) + + t.Run(fmt.Sprintf("[%v] Array Configs", provider(config.Options{}).ID()), func(t *testing.T) { + root := config.NewRootSection() + section, err := root.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + _, err = section.RegisterSection("nested", &ComplexTypeArray{}) + assert.NoError(t, err) + + _, err = root.RegisterSection("array-config", &ComplexTypeArray{}) + assert.NoError(t, err) + + v := provider(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "array_configs.yaml")}, + RootSection: root, + }) + + assert.NoError(t, v.UpdateConfig(context.TODO())) + r := root.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) + assert.Equal(t, "Hello World", r.StringValue) + + nested := section.GetSection("nested").GetConfig().(*ComplexTypeArray) + assert.Len(t, *nested, 1) + assert.Equal(t, 1, (*nested)[0].IntValue) + + topLevel := root.GetSection("array-config").GetConfig().(*ComplexTypeArray) + assert.Len(t, *topLevel, 2) + assert.Equal(t, 4, (*topLevel)[1].IntValue) + }) + + t.Run(fmt.Sprintf("[%v] Override in Env Var", provider(config.Options{}).ID()), func(t *testing.T) { + reg := config.NewRootSection() + _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + v := provider(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "config.yaml")}, + RootSection: reg, + }) + key := strings.ToUpper("my-component.str") + assert.NoError(t, os.Setenv(key, "Set From Env")) + defer func() { assert.NoError(t, os.Unsetenv(key)) }() + assert.NoError(t, v.UpdateConfig(context.TODO())) + r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) + assert.Equal(t, "Set From Env", r.StringValue) + }) + + t.Run(fmt.Sprintf("[%v] Override in Env Var no config file", provider(config.Options{}).ID()), func(t *testing.T) { + reg := config.NewRootSection() + _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + v := provider(config.Options{RootSection: reg}) + key := strings.ToUpper("my-component.str3") + assert.NoError(t, os.Setenv(key, "Set From Env")) + defer func() { assert.NoError(t, os.Unsetenv(key)) }() + assert.NoError(t, v.UpdateConfig(context.TODO())) + r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) + assert.Equal(t, "Set From Env", r.StringValue3) + }) + + t.Run(fmt.Sprintf("[%v] Change handler", provider(config.Options{}).ID()), func(t *testing.T) { + configFile := tempFileName("config-*.yaml") + defer func() { assert.NoError(t, os.Remove(configFile)) }() + _, err := populateConfigData(configFile) + assert.NoError(t, err) + + reg := config.NewRootSection() + _, err = reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + opts := config.Options{ + SearchPaths: []string{configFile}, + RootSection: reg, + } + v := provider(opts) + err = v.UpdateConfig(context.TODO()) + assert.NoError(t, err) + + r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) + firstValue := r.StringValue + + fileUpdated, err := beginWaitForFileChange(configFile) + assert.NoError(t, err) + + _, err = populateConfigData(configFile) + assert.NoError(t, err) + + // Simulate filewatcher event + assert.NoError(t, waitForFileChangeOrTimeout(fileUpdated)) + + time.Sleep(2 * time.Second) + + r = reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) + secondValue := r.StringValue + assert.NotEqual(t, firstValue, secondValue) + }) + + t.Run(fmt.Sprintf("[%v] Change handler k8s configmaps", provider(config.Options{}).ID()), func(t *testing.T) { + // 1. Create Dir structure + watchDir, configFile, cleanup := newSymlinkedConfigFile(t) + defer cleanup() + + // Independently watch for when symlink underlying change happens to know when do we expect accessor to have picked up + // the changes + fileUpdated, err := beginWaitForFileChange(configFile) + assert.NoError(t, err) + + // 2. Start accessor with the symlink as config location + reg := config.NewRootSection() + section, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + opts := config.Options{ + SearchPaths: []string{configFile}, + RootSection: reg, + } + v := provider(opts) + err = v.UpdateConfig(context.TODO()) + assert.NoError(t, err) + + r := section.GetConfig().(*MyComponentConfig) + firstValue := r.StringValue + + // 3. Now update /data symlink to point to data2 + dataDir2 := path.Join(watchDir, "data2") + err = os.Mkdir(dataDir2, os.ModePerm) + assert.NoError(t, err) + + configFile2 := path.Join(dataDir2, "config.yaml") + _, err = populateConfigData(configFile2) + assert.NoError(t, err) + + // change the symlink using the `ln -sfn` command + err = changeSymLink(dataDir2, path.Join(watchDir, "data")) + assert.NoError(t, err) + + t.Logf("New config Location: %v", configFile2) + + // Wait for filewatcher event + assert.NoError(t, waitForFileChangeOrTimeout(fileUpdated)) + + time.Sleep(2 * time.Second) + + r = section.GetConfig().(*MyComponentConfig) + secondValue := r.StringValue + // Make sure values have changed + assert.NotEqual(t, firstValue, secondValue) + }) + } +} + +func changeSymLink(targetPath, symLink string) error { + if runtime.GOOS == "windows" { + tmpLink := tempFileName("temp-sym-link-*") + err := exec.Command("mklink", filepath.Clean(tmpLink), filepath.Clean(targetPath)).Run() + if err != nil { + return err + } + + err = exec.Command("copy", "/l", "/y", filepath.Clean(tmpLink), filepath.Clean(symLink)).Run() + if err != nil { + return err + } + + return exec.Command("del", filepath.Clean(tmpLink)).Run() + } + + return exec.Command("ln", "-sfn", filepath.Clean(targetPath), filepath.Clean(symLink)).Run() +} + +// 1. Create Dir structure: +// |_ data1 +// |_ config.yaml +// |_ data (symlink for data1) +// |_ config.yaml (symlink for data/config.yaml -recursively a symlink of data1/config.yaml) +func newSymlinkedConfigFile(t *testing.T) (watchDir, configFile string, cleanup func()) { + watchDir, err := ioutil.TempDir("", "config-test-") + assert.NoError(t, err) + + dataDir1 := path.Join(watchDir, "data1") + err = os.Mkdir(dataDir1, os.ModePerm) + assert.NoError(t, err) + + realConfigFile := path.Join(dataDir1, "config.yaml") + t.Logf("Real config file location: %s\n", realConfigFile) + _, err = populateConfigData(realConfigFile) + assert.NoError(t, err) + + cleanup = func() { + assert.NoError(t, os.RemoveAll(watchDir)) + } + + // now, symlink the tm `data1` dir to `data` in the baseDir + assert.NoError(t, os.Symlink(dataDir1, path.Join(watchDir, "data"))) + + // and link the `/datadir1/config.yaml` to `/config.yaml` + configFile = path.Join(watchDir, "config.yaml") + assert.NoError(t, os.Symlink(path.Join(watchDir, "data", "config.yaml"), configFile)) + + t.Logf("Config file location: %s\n", path.Join(watchDir, "config.yaml")) + return watchDir, configFile, cleanup +} + +func waitForFileChangeOrTimeout(done chan error) error { + timeout := make(chan bool, 1) + go func() { + time.Sleep(5 * time.Second) + timeout <- true + }() + + for { + select { + case <-timeout: + return fmt.Errorf("timed out") + case err := <-done: + return err + } + } +} + +func beginWaitForFileChange(filename string) (done chan error, terminalErr error) { + watcher, err := fsnotify.NewWatcher() + if err != nil { + return nil, err + } + + configFile := filepath.Clean(filename) + realConfigFile, err := filepath.EvalSymlinks(configFile) + if err != nil { + return nil, err + } + + configDir, _ := filepath.Split(configFile) + + done = make(chan error) + go func() { + for { + select { + case event := <-watcher.Events: + // we only care about the config file + currentConfigFile, err := filepath.EvalSymlinks(filename) + if err != nil { + closeErr := watcher.Close() + if closeErr != nil { + done <- closeErr + } else { + done <- err + } + + return + } + + // We only care about the config file with the following cases: + // 1 - if the config file was modified or created + // 2 - if the real path to the config file changed (eg: k8s ConfigMap replacement) + const writeOrCreateMask = fsnotify.Write | fsnotify.Create + if (filepath.Clean(event.Name) == configFile && + event.Op&writeOrCreateMask != 0) || + (currentConfigFile != "" && currentConfigFile != realConfigFile) { + realConfigFile = currentConfigFile + closeErr := watcher.Close() + if closeErr != nil { + fmt.Printf("Close Watcher error: %v\n", closeErr) + } else { + done <- nil + } + + return + } else if filepath.Clean(event.Name) == configFile && + event.Op&fsnotify.Remove&fsnotify.Remove != 0 { + closeErr := watcher.Close() + if closeErr != nil { + fmt.Printf("Close Watcher error: %v\n", closeErr) + } else { + done <- nil + } + + return + } + case err, ok := <-watcher.Errors: + if ok { + fmt.Printf("Watcher error: %v\n", err) + closeErr := watcher.Close() + if closeErr != nil { + fmt.Printf("Close Watcher error: %v\n", closeErr) + } + } + + done <- nil + return + } + } + }() + + err = watcher.Add(configDir) + if err != nil { + return nil, err + } + + return done, err +} + +func testTypes(accessor accessorCreatorFn) func(t *testing.T) { + return func(t *testing.T) { + t.Run("ArrayConfigType", func(t *testing.T) { + expected := ComplexTypeArray{ + {IntValue: 1}, + {IntValue: 4}, + } + + runEqualTest(t, accessor, &expected, &ComplexTypeArray{}) + }) + + t.Run("Lists", func(t *testing.T) { + expected := ConfigWithLists{ + ListOfStuff: []ComplexType{ + {IntValue: 1}, + {IntValue: 4}, + }, + } + + runEqualTest(t, accessor, &expected, &ConfigWithLists{}) + }) + + t.Run("Maps", func(t *testing.T) { + expected := ConfigWithMaps{ + MapOfStuff: map[string]ComplexType{ + "item1": {IntValue: 1}, + "item2": {IntValue: 3}, + }, + MapWithoutJSON: map[string]ComplexType{ + "it-1": {IntValue: 5}, + }, + } + + runEqualTest(t, accessor, &expected, &ConfigWithMaps{}) + }) + + t.Run("JsonUnmarshalableTypes", func(t *testing.T) { + expected := ConfigWithJSONTypes{ + Duration: config.Duration{ + Duration: time.Second * 10, + }, + } + + runEqualTest(t, accessor, &expected, &ConfigWithJSONTypes{}) + }) + } +} + +func runEqualTest(t *testing.T, accessor accessorCreatorFn, expected interface{}, emptyType interface{}) { + assert.NotPanics(t, func() { + reflect.TypeOf(expected).Elem() + }, "expected must be a Pointer type. Instead, it was %v", reflect.TypeOf(expected)) + + assert.Equal(t, reflect.TypeOf(expected), reflect.TypeOf(emptyType)) + + rootSection := config.NewRootSection() + sectionKey := fmt.Sprintf("rand-key-%v", getRandInt()%2000) + _, err := rootSection.RegisterSection(sectionKey, emptyType) + assert.NoError(t, err) + + m := map[string]interface{}{ + sectionKey: expected, + } + + raw, err := yaml.Marshal(m) + assert.NoError(t, err) + f := tempFileName("test_type_*.yaml") + assert.NoError(t, err) + defer func() { assert.NoError(t, os.Remove(f)) }() + + assert.NoError(t, ioutil.WriteFile(f, raw, os.ModePerm)) + t.Logf("Generated yaml: %v", string(raw)) + assert.NoError(t, accessor(rootSection, f).UpdateConfig(context.TODO())) + + res := rootSection.GetSection(sectionKey).GetConfig() + t.Logf("Expected: %+v", expected) + t.Logf("Actual: %+v", res) + assert.True(t, reflect.DeepEqual(res, expected)) +} + +func TestAccessor_Integration(t *testing.T) { + accessorsToTest := make([]accessorCreatorFn, 0, len(providers)) + for _, provider := range providers { + accessorsToTest = append(accessorsToTest, func(r config.Section, configPath string) config.Accessor { + return provider(config.Options{ + SearchPaths: []string{configPath}, + RootSection: r, + }) + }) + } + + for _, accessor := range accessorsToTest { + t.Run(fmt.Sprintf(testNameFormatter, accessor(nil, "").ID(), "Types"), testTypes(accessor)) + } +} diff --git a/flytestdlib/config/tests/config_cmd_test.go b/flytestdlib/config/tests/config_cmd_test.go new file mode 100644 index 0000000000..3b15268292 --- /dev/null +++ b/flytestdlib/config/tests/config_cmd_test.go @@ -0,0 +1,92 @@ +package tests + +import ( + "bytes" + "fmt" + "os" + "testing" + + "github.com/lyft/flytestdlib/config" + + "github.com/spf13/cobra" + "github.com/stretchr/testify/assert" +) + +func executeCommand(root *cobra.Command, args ...string) (output string, err error) { + _, output, err = executeCommandC(root, args...) + return output, err +} + +func executeCommandC(root *cobra.Command, args ...string) (c *cobra.Command, output string, err error) { + buf := new(bytes.Buffer) + root.SetOutput(buf) + root.SetArgs(args) + + c, err = root.ExecuteC() + + return c, buf.String(), err +} + +func TestDiscoverCommand(t *testing.T) { + for _, provider := range providers { + t.Run(fmt.Sprintf(testNameFormatter, provider(config.Options{}).ID(), "No config file"), func(t *testing.T) { + cmd := config.NewConfigCommand(provider) + output, err := executeCommand(cmd, config.CommandDiscover) + assert.NoError(t, err) + assert.Contains(t, output, "Couldn't find a config file.") + }) + + t.Run(fmt.Sprintf(testNameFormatter, provider(config.Options{}).ID(), "Valid config file"), func(t *testing.T) { + dir, err := os.Getwd() + assert.NoError(t, err) + wd := os.ExpandEnv("$PWD/testdata") + err = os.Chdir(wd) + assert.NoError(t, err) + defer func() { assert.NoError(t, os.Chdir(dir)) }() + + cmd := config.NewConfigCommand(provider) + output, err := executeCommand(cmd, config.CommandDiscover) + assert.NoError(t, err) + assert.Contains(t, output, "Config") + }) + } +} + +func TestValidateCommand(t *testing.T) { + for _, provider := range providers { + t.Run(fmt.Sprintf(testNameFormatter, provider(config.Options{}).ID(), "No config file"), func(t *testing.T) { + cmd := config.NewConfigCommand(provider) + output, err := executeCommand(cmd, config.CommandValidate) + assert.NoError(t, err) + assert.Contains(t, output, "Couldn't find a config file.") + }) + + t.Run(fmt.Sprintf(testNameFormatter, provider(config.Options{}).ID(), "Invalid Config file"), func(t *testing.T) { + dir, err := os.Getwd() + assert.NoError(t, err) + wd := os.ExpandEnv("$PWD/testdata") + err = os.Chdir(wd) + assert.NoError(t, err) + defer func() { assert.NoError(t, os.Chdir(dir)) }() + + cmd := config.NewConfigCommand(provider) + output, err := executeCommand(cmd, config.CommandValidate, "--file=bad_config.yaml", "--strict") + assert.Error(t, err) + assert.Contains(t, output, "Failed") + }) + + t.Run(fmt.Sprintf(testNameFormatter, provider(config.Options{}).ID(), "Valid config file"), func(t *testing.T) { + dir, err := os.Getwd() + assert.NoError(t, err) + wd := os.ExpandEnv("$PWD/testdata") + err = os.Chdir(wd) + assert.NoError(t, err) + defer func() { assert.NoError(t, os.Chdir(dir)) }() + + cmd := config.NewConfigCommand(provider) + output, err := executeCommand(cmd, config.CommandValidate) + assert.NoError(t, err) + assert.Contains(t, output, "successfully") + }) + } +} diff --git a/flytestdlib/config/tests/testdata/array_configs.yaml b/flytestdlib/config/tests/testdata/array_configs.yaml new file mode 100644 index 0000000000..6a02a280a6 --- /dev/null +++ b/flytestdlib/config/tests/testdata/array_configs.yaml @@ -0,0 +1,7 @@ +my-component: + str: Hello World + nested: + - int-val: 1 +array-config: + - int-val: 1 + - int-val: 4 diff --git a/flytestdlib/config/tests/testdata/bad_config.yaml b/flytestdlib/config/tests/testdata/bad_config.yaml new file mode 100644 index 0000000000..c0707abdeb --- /dev/null +++ b/flytestdlib/config/tests/testdata/bad_config.yaml @@ -0,0 +1,13 @@ +my-component: + str: Hello World +other-component: + duration-value: 20s + int-val: 4 + string-value: Hey there! + strings: + - hello + - world + - '!' + url-value: http://something.com + unknown-key: "something" + diff --git a/flytestdlib/config/tests/testdata/config.yaml b/flytestdlib/config/tests/testdata/config.yaml new file mode 100755 index 0000000000..ca78698fae --- /dev/null +++ b/flytestdlib/config/tests/testdata/config.yaml @@ -0,0 +1,11 @@ +my-component: + str: Hello World +other-component: + duration-value: 20s + int-val: 4 + string-value: Hey there! + strings: + - hello + - world + - '!' + url-value: http://something.com diff --git a/flytestdlib/config/tests/testdata/nested_config.yaml b/flytestdlib/config/tests/testdata/nested_config.yaml new file mode 100755 index 0000000000..321f563a42 --- /dev/null +++ b/flytestdlib/config/tests/testdata/nested_config.yaml @@ -0,0 +1,11 @@ +my-component: + str: Hello World + nested: + duration-value: 20s + int-val: 4 + string-value: Hey there! + strings: + - hello + - world + - '!' + url-value: http://something.com diff --git a/flytestdlib/config/tests/types_test.go b/flytestdlib/config/tests/types_test.go new file mode 100644 index 0000000000..c6150e93fa --- /dev/null +++ b/flytestdlib/config/tests/types_test.go @@ -0,0 +1,66 @@ +package tests + +import ( + "fmt" + + "github.com/lyft/flytestdlib/config" + "github.com/lyft/flytestdlib/config/viper" + "github.com/spf13/pflag" +) + +const testNameFormatter = "[%v] %v" + +var providers = []config.AccessorProvider{viper.NewAccessor} + +type MyComponentConfig struct { + StringValue string `json:"str"` + StringValue2 string `json:"str2"` + StringValue3 string `json:"str3"` +} + +type OtherComponentConfig struct { + DurationValue config.Duration `json:"duration-value"` + URLValue config.URL `json:"url-value"` + StringValue string `json:"string-value"` + IntValue int `json:"int-val"` + StringArray []string `json:"strings"` + StringArrayWithDefaults []string `json:"strings-def"` +} + +func (MyComponentConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("MyComponentConfig", pflag.ExitOnError) + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "str"), "hello world", "life is short") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "str2"), "hello world", "life is short") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "str3"), "hello world", "life is short") + return cmdFlags +} + +func (OtherComponentConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("MyComponentConfig", pflag.ExitOnError) + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "string-value"), "hello world", "life is short") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "duration-value"), "20s", "") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "int-val"), 4, "this is an important flag") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "url-value"), "http://blah.com", "Sets the type of storage to configure [s3/minio/local/mem].") + cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "strings-def"), []string{"default value"}, "Sets the type of storage to configure [s3/minio/local/mem].") + return cmdFlags +} + +type TestConfig struct { + MyComponentConfig MyComponentConfig `json:"my-component"` + OtherComponentConfig OtherComponentConfig `json:"other-component"` +} + +const ( + MyComponentSectionKey = "my-component" + OtherComponentSectionKey = "other-component" +) + +func init() { + if _, err := config.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}); err != nil { + panic(err) + } + + if _, err := config.RegisterSection(OtherComponentSectionKey, &OtherComponentConfig{}); err != nil { + panic(err) + } +} diff --git a/flytestdlib/config/url.go b/flytestdlib/config/url.go new file mode 100644 index 0000000000..4045caf962 --- /dev/null +++ b/flytestdlib/config/url.go @@ -0,0 +1,36 @@ +package config + +import ( + "encoding/json" + "errors" + "net/url" +) + +// A url.URL wrapper that can marshal and unmarshal into simple URL strings. +type URL struct { + url.URL +} + +func (d URL) MarshalJSON() ([]byte, error) { + return json.Marshal(d.String()) +} + +func (d *URL) UnmarshalJSON(b []byte) error { + var v interface{} + if err := json.Unmarshal(b, &v); err != nil { + return err + } + + switch value := v.(type) { + case string: + u, err := url.Parse(value) + if err != nil { + return err + } + + d.URL = *u + return nil + default: + return errors.New("invalid url") + } +} diff --git a/flytestdlib/config/url_test.go b/flytestdlib/config/url_test.go new file mode 100644 index 0000000000..e4046b3b16 --- /dev/null +++ b/flytestdlib/config/url_test.go @@ -0,0 +1,59 @@ +package config + +import ( + "encoding/json" + "fmt" + "reflect" + "testing" + + "github.com/lyft/flytestdlib/internal/utils" + + "github.com/stretchr/testify/assert" +) + +func TestURL_MarshalJSON(t *testing.T) { + validURLs := []string{ + "http://localhost:123", + "http://localhost", + "https://non-existent.com/path/to/something", + } + + for i, validURL := range validURLs { + t.Run(fmt.Sprintf("Valid %v", i), func(t *testing.T) { + expected := URL{URL: utils.MustParseURL(validURL)} + + b, err := expected.MarshalJSON() + assert.NoError(t, err) + + actual := URL{} + err = actual.UnmarshalJSON(b) + assert.NoError(t, err) + + assert.True(t, reflect.DeepEqual(expected, actual)) + }) + } +} + +func TestURL_UnmarshalJSON(t *testing.T) { + invalidValues := []interface{}{ + "%gh&%ij", + 123, + true, + } + for i, invalidURL := range invalidValues { + t.Run(fmt.Sprintf("Invalid %v", i), func(t *testing.T) { + raw, err := json.Marshal(invalidURL) + assert.NoError(t, err) + + actual := URL{} + err = actual.UnmarshalJSON(raw) + assert.Error(t, err) + }) + } + + t.Run("Invalid json", func(t *testing.T) { + actual := URL{} + err := actual.UnmarshalJSON([]byte{}) + assert.Error(t, err) + }) +} diff --git a/flytestdlib/config/utils.go b/flytestdlib/config/utils.go new file mode 100644 index 0000000000..fcd833ff75 --- /dev/null +++ b/flytestdlib/config/utils.go @@ -0,0 +1,69 @@ +package config + +import ( + "encoding/json" + "fmt" + "reflect" + + "github.com/pkg/errors" +) + +// Uses Json marshal/unmarshal to make a deep copy of a config object. +func DeepCopyConfig(config Config) (Config, error) { + raw, err := json.Marshal(config) + if err != nil { + return nil, err + } + + t := reflect.TypeOf(config) + ptrValue := reflect.New(t) + newObj := ptrValue.Interface() + if err = json.Unmarshal(raw, newObj); err != nil { + return nil, err + } + + return ptrValue.Elem().Interface(), nil +} + +func DeepEqual(config1, config2 Config) bool { + return reflect.DeepEqual(config1, config2) +} + +func toInterface(config Config) (interface{}, error) { + raw, err := json.Marshal(config) + if err != nil { + return nil, err + } + + var m interface{} + err = json.Unmarshal(raw, &m) + return m, err +} + +// Builds a generic map out of the root section config and its sub-sections configs. +func AllConfigsAsMap(root Section) (m map[string]interface{}, err error) { + errs := ErrorCollection{} + allConfigs := make(map[string]interface{}, len(root.GetSections())) + if root.GetConfig() != nil { + rootConfig, err := toInterface(root.GetConfig()) + if !errs.Append(err) { + if asMap, isCasted := rootConfig.(map[string]interface{}); isCasted { + allConfigs = asMap + } else { + allConfigs[""] = rootConfig + } + } + } + + for k, section := range root.GetSections() { + if _, alreadyExists := allConfigs[k]; alreadyExists { + errs.Append(errors.Wrap(ErrChildConfigOverridesConfig, + fmt.Sprintf("section key [%v] overrides an existing native config property", k))) + } + + allConfigs[k], err = AllConfigsAsMap(section) + errs.Append(err) + } + + return allConfigs, errs.ErrorOrDefault() +} diff --git a/flytestdlib/config/utils_test.go b/flytestdlib/config/utils_test.go new file mode 100644 index 0000000000..e5d7d02105 --- /dev/null +++ b/flytestdlib/config/utils_test.go @@ -0,0 +1,39 @@ +package config + +import ( + "reflect" + "strconv" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestDeepCopyConfig(t *testing.T) { + type pair struct { + first interface{} + second interface{} + } + + type fakeConfig struct { + I int + S string + Ptr *fakeConfig + } + + testCases := []pair{ + {3, 3}, + {"word", "word"}, + {fakeConfig{I: 4, S: "four", Ptr: &fakeConfig{I: 5, S: "five"}}, fakeConfig{I: 4, S: "four", Ptr: &fakeConfig{I: 5, S: "five"}}}, + {&fakeConfig{I: 4, S: "four", Ptr: &fakeConfig{I: 5, S: "five"}}, &fakeConfig{I: 4, S: "four", Ptr: &fakeConfig{I: 5, S: "five"}}}, + } + + for i, testCase := range testCases { + t.Run(strconv.Itoa(i), func(t *testing.T) { + input, expected := testCase.first, testCase.second + actual, err := DeepCopyConfig(input) + assert.NoError(t, err) + assert.Equal(t, reflect.TypeOf(expected).String(), reflect.TypeOf(actual).String()) + assert.Equal(t, expected, actual) + }) + } +} diff --git a/flytestdlib/config/viper/collection.go b/flytestdlib/config/viper/collection.go new file mode 100644 index 0000000000..680052f494 --- /dev/null +++ b/flytestdlib/config/viper/collection.go @@ -0,0 +1,175 @@ +package viper + +import ( + "context" + "fmt" + "io" + "os" + "strings" + + "github.com/lyft/flytestdlib/config" + + "github.com/lyft/flytestdlib/logger" + + viperLib "github.com/spf13/viper" + + "github.com/fsnotify/fsnotify" + "github.com/spf13/pflag" +) + +type Viper interface { + BindPFlags(flags *pflag.FlagSet) error + BindEnv(input ...string) error + AutomaticEnv() + ReadInConfig() error + OnConfigChange(run func(in fsnotify.Event)) + WatchConfig() + AllSettings() map[string]interface{} + ConfigFileUsed() string + MergeConfig(in io.Reader) error +} + +// A proxy object for a collection of Viper instances. +type CollectionProxy struct { + underlying []Viper + pflags *pflag.FlagSet + envVars [][]string + automaticEnv bool +} + +func (c *CollectionProxy) BindPFlags(flags *pflag.FlagSet) error { + err := config.ErrorCollection{} + for _, v := range c.underlying { + err.Append(v.BindPFlags(flags)) + } + + c.pflags = flags + + return err.ErrorOrDefault() +} + +func (c *CollectionProxy) BindEnv(input ...string) error { + err := config.ErrorCollection{} + for _, v := range c.underlying { + err.Append(v.BindEnv(input...)) + } + + if c.envVars == nil { + c.envVars = make([][]string, 0, 1) + } + + c.envVars = append(c.envVars, input) + + return err.ErrorOrDefault() +} + +func (c *CollectionProxy) AutomaticEnv() { + for _, v := range c.underlying { + v.AutomaticEnv() + } + + c.automaticEnv = true +} + +func (c CollectionProxy) ReadInConfig() error { + err := config.ErrorCollection{} + for _, v := range c.underlying { + err.Append(v.ReadInConfig()) + } + + return err.ErrorOrDefault() +} + +func (c CollectionProxy) OnConfigChange(run func(in fsnotify.Event)) { + for _, v := range c.underlying { + v.OnConfigChange(run) + } +} + +func (c CollectionProxy) WatchConfig() { + for _, v := range c.underlying { + v.WatchConfig() + } +} + +func (c CollectionProxy) AllSettings() map[string]interface{} { + finalRes := map[string]interface{}{} + if len(c.underlying) == 0 { + return finalRes + } + + combinedConfig, err := c.MergeAllConfigs() + if err != nil { + logger.Warnf(context.TODO(), "Failed to merge config. Error: %v", err) + return finalRes + } + + return combinedConfig.AllSettings() +} + +func (c CollectionProxy) ConfigFileUsed() string { + return fmt.Sprintf("[%v]", strings.Join(c.ConfigFilesUsed(), ",")) +} + +func (c CollectionProxy) MergeConfig(in io.Reader) error { + panic("Not yet implemented.") +} + +func (c CollectionProxy) MergeAllConfigs() (all Viper, err error) { + combinedConfig := viperLib.New() + if c.envVars != nil { + for _, envConfig := range c.envVars { + err = combinedConfig.BindEnv(envConfig...) + if err != nil { + return nil, err + } + } + } + + if c.automaticEnv { + combinedConfig.AutomaticEnv() + } + + if c.pflags != nil { + err = combinedConfig.BindPFlags(c.pflags) + if err != nil { + return nil, err + } + } + + for _, v := range c.underlying { + if _, isCollection := v.(*CollectionProxy); isCollection { + return nil, fmt.Errorf("merging nested CollectionProxies is not yet supported") + } + + if len(v.ConfigFileUsed()) == 0 { + continue + } + + combinedConfig.SetConfigFile(v.ConfigFileUsed()) + + reader, err := os.Open(v.ConfigFileUsed()) + if err != nil { + return nil, err + } + + err = combinedConfig.MergeConfig(reader) + if err != nil { + return nil, err + } + } + + return combinedConfig, nil +} + +func (c CollectionProxy) ConfigFilesUsed() []string { + res := make([]string, 0, len(c.underlying)) + for _, v := range c.underlying { + filePath := v.ConfigFileUsed() + if len(filePath) > 0 { + res = append(res, filePath) + } + } + + return res +} diff --git a/flytestdlib/config/viper/viper.go b/flytestdlib/config/viper/viper.go new file mode 100644 index 0000000000..05a5378ec7 --- /dev/null +++ b/flytestdlib/config/viper/viper.go @@ -0,0 +1,357 @@ +package viper + +import ( + "context" + "encoding/json" + "flag" + "fmt" + "reflect" + "strings" + "sync" + + "github.com/pkg/errors" + + "github.com/lyft/flytestdlib/config" + "github.com/lyft/flytestdlib/config/files" + "github.com/lyft/flytestdlib/logger" + "github.com/spf13/cobra" + + "github.com/fsnotify/fsnotify" + "github.com/mitchellh/mapstructure" + + "github.com/spf13/pflag" + viperLib "github.com/spf13/viper" +) + +const ( + keyDelim = "." +) + +var ( + dereferencableKinds = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, + } +) + +type viperAccessor struct { + // Determines whether parsing config should fail if it contains un-registered sections. + strictMode bool + viper *CollectionProxy + rootConfig config.Section + // Ensures we initialize the file Watcher once. + watcherInitializer *sync.Once +} + +func (viperAccessor) ID() string { + return "Viper" +} + +func (viperAccessor) InitializeFlags(cmdFlags *flag.FlagSet) { + // TODO: Implement? +} + +func (v viperAccessor) InitializePflags(cmdFlags *pflag.FlagSet) { + err := v.addSectionsPFlags(cmdFlags) + if err != nil { + panic(errors.Wrap(err, "error adding config PFlags to flag set")) + } + + // Allow viper to read the value of the flags + err = v.viper.BindPFlags(cmdFlags) + if err != nil { + panic(errors.Wrap(err, "error binding PFlags")) + } +} + +func (v viperAccessor) addSectionsPFlags(flags *pflag.FlagSet) (err error) { + for key, section := range v.rootConfig.GetSections() { + if asPFlagProvider, ok := section.GetConfig().(config.PFlagProvider); ok { + flags.AddFlagSet(asPFlagProvider.GetPFlagSet(key + keyDelim)) + } + } + + return nil +} + +// Binds keys from all sections to viper env vars. This instructs viper to lookup those from env vars when we ask for +// viperLib.AllSettings() +func (v viperAccessor) bindViperConfigsFromEnv(root config.Section) (err error) { + allConfigs, err := config.AllConfigsAsMap(root) + if err != nil { + return err + } + + return v.bindViperConfigsEnvDepth(allConfigs, "") +} + +func (v viperAccessor) bindViperConfigsEnvDepth(m map[string]interface{}, prefix string) error { + errs := config.ErrorCollection{} + for key, val := range m { + subKey := prefix + key + if asMap, ok := val.(map[string]interface{}); ok { + errs.Append(v.bindViperConfigsEnvDepth(asMap, subKey+keyDelim)) + } else { + errs.Append(v.viper.BindEnv(subKey, strings.ToUpper(strings.Replace(subKey, "-", "_", -1)))) + } + } + + return errs.ErrorOrDefault() +} + +func (v viperAccessor) updateConfig(ctx context.Context, r config.Section) error { + // Binds all keys to env vars. + err := v.bindViperConfigsFromEnv(r) + if err != nil { + return err + } + + v.viper.AutomaticEnv() // read in environment variables that match + + shouldWatchChanges := true + // If a config file is found, read it in. + if err = v.viper.ReadInConfig(); err == nil { + logger.Printf(ctx, "Using config file: %+v", v.viper.ConfigFilesUsed()) + } else if asErrorCollection, ok := err.(config.ErrorCollection); ok { + shouldWatchChanges = false + for i, e := range asErrorCollection { + if _, isNotFound := errors.Cause(e).(viperLib.ConfigFileNotFoundError); isNotFound { + logger.Printf(ctx, "[%v] Couldn't find a config file [%v]. Relying on env vars and pflags.", + i, v.viper.underlying[i].ConfigFileUsed()) + } else { + return err + } + } + } else if reflect.TypeOf(err) == reflect.TypeOf(viperLib.ConfigFileNotFoundError{}) { + shouldWatchChanges = false + logger.Printf(ctx, "Couldn't find a config file. Relying on env vars and pflags.") + } else { + return err + } + + if shouldWatchChanges { + v.watcherInitializer.Do(func() { + // Watch config files to pick up on file changes without requiring a full application restart. + // This call must occur after *all* config paths have been added. + v.viper.OnConfigChange(func(e fsnotify.Event) { + fmt.Printf("Got a notification change for file [%v]\n", e.Name) + v.configChangeHandler() + }) + v.viper.WatchConfig() + }) + } + + return v.RefreshFromConfig(ctx, r) +} + +func (v viperAccessor) UpdateConfig(ctx context.Context) error { + return v.updateConfig(ctx, v.rootConfig) +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElement(t reflect.Kind) bool { + _, exists := dereferencableKinds[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshallerHook(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElement(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + ctx := context.Background() + raw, err := json.Marshal(data) + if err != nil { + logger.Printf(ctx, "Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + logger.Printf(ctx, "Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +// Parses RootType config from parsed Viper settings. This should be called after viper has parsed config file/pflags...etc. +func (v viperAccessor) parseViperConfig(root config.Section) error { + // We use AllSettings instead of AllKeys to get the root level keys folded. + return v.parseViperConfigRecursive(root, v.viper.AllSettings()) +} + +func (v viperAccessor) parseViperConfigRecursive(root config.Section, settings interface{}) error { + errs := config.ErrorCollection{} + var mine interface{} + myKeysCount := 0 + if asMap, casted := settings.(map[string]interface{}); casted { + myMap := map[string]interface{}{} + for childKey, childValue := range asMap { + if childSection, found := root.GetSections()[childKey]; found { + errs.Append(v.parseViperConfigRecursive(childSection, childValue)) + } else { + myMap[childKey] = childValue + } + } + + mine = myMap + myKeysCount = len(myMap) + } else if asSlice, casted := settings.([]interface{}); casted { + mine = settings + myKeysCount = len(asSlice) + } else { + mine = settings + if settings != nil { + myKeysCount = 1 + } + } + + if root.GetConfig() != nil { + c, err := config.DeepCopyConfig(root.GetConfig()) + errs.Append(err) + if err != nil { + return errs.ErrorOrDefault() + } + + errs.Append(decode(mine, defaultDecoderConfig(c, v.decoderConfigs()...))) + errs.Append(root.SetConfig(c)) + + return errs.ErrorOrDefault() + } else if myKeysCount > 0 { + // There are keys set that are meant to be decoded but no config to receive them. Fail if strict mode is on. + if v.strictMode { + errs.Append(errors.Wrap( + config.ErrStrictModeValidation, + fmt.Sprintf("strict mode is on but received keys [%+v] to decode with no config assigned to"+ + " receive them", mine))) + } + } + + return errs.ErrorOrDefault() +} + +// Adds any specific configs controlled by this viper accessor instance. +func (v viperAccessor) decoderConfigs() []viperLib.DecoderConfigOption { + return []viperLib.DecoderConfigOption{ + func(config *mapstructure.DecoderConfig) { + config.ErrorUnused = v.strictMode + }, + } +} + +// defaultDecoderConfig returns default mapsstructure.DecoderConfig with support +// of time.Duration values & string slices +func defaultDecoderConfig(output interface{}, opts ...viperLib.DecoderConfigOption) *mapstructure.DecoderConfig { + c := &mapstructure.DecoderConfig{ + Metadata: nil, + Result: output, + WeaklyTypedInput: true, + TagName: "json", + DecodeHook: mapstructure.ComposeDecodeHookFunc( + jsonUnmarshallerHook, + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + ), + } + + for _, opt := range opts { + opt(c) + } + + return c +} + +// A wrapper around mapstructure.Decode that mimics the WeakDecode functionality +func decode(input interface{}, config *mapstructure.DecoderConfig) error { + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + return decoder.Decode(input) +} + +func (v viperAccessor) configChangeHandler() { + ctx := context.Background() + err := v.RefreshFromConfig(ctx, v.rootConfig) + if err != nil { + // TODO: Retry? panic? + logger.Printf(ctx, "Failed to update config. Error: %v", err) + } else { + logger.Printf(ctx, "Refreshed config in response to file(s) change.") + } +} + +func (v viperAccessor) RefreshFromConfig(ctx context.Context, r config.Section) error { + err := v.parseViperConfig(r) + if err != nil { + return err + } + + v.sendUpdatedEvents(ctx, r, "") + + return nil +} + +func (v viperAccessor) sendUpdatedEvents(ctx context.Context, root config.Section, sectionKey config.SectionKey) { + for key, section := range root.GetSections() { + if !section.GetConfigChangedAndClear() { + logger.Infof(ctx, "Config section [%v] hasn't changed.", sectionKey+key) + } else if section.GetConfigUpdatedHandler() == nil { + logger.Infof(ctx, "Config section [%v] updated. No update handler registered.", sectionKey+key) + } else { + logger.Infof(ctx, "Config section [%v] updated. Firing updated event.", sectionKey+key) + section.GetConfigUpdatedHandler()(ctx, section.GetConfig()) + } + + v.sendUpdatedEvents(ctx, section, sectionKey+key+keyDelim) + } +} + +func (v viperAccessor) ConfigFilesUsed() []string { + return v.viper.ConfigFilesUsed() +} + +// Creates a config accessor that implements Accessor interface and uses viper to load configs. +func NewAccessor(opts config.Options) config.Accessor { + return newAccessor(opts) +} + +func newAccessor(opts config.Options) viperAccessor { + vipers := make([]Viper, 0, 1) + configFiles := files.FindConfigFiles(opts.SearchPaths) + for _, configFile := range configFiles { + v := viperLib.New() + v.SetConfigFile(configFile) + + vipers = append(vipers, v) + } + + // Create a default viper even if we couldn't find any matching files + if len(configFiles) == 0 { + v := viperLib.New() + vipers = append(vipers, v) + } + + r := opts.RootSection + if r == nil { + r = config.GetRootSection() + } + + return viperAccessor{ + strictMode: opts.StrictMode, + rootConfig: r, + viper: &CollectionProxy{underlying: vipers}, + watcherInitializer: &sync.Once{}, + } +} + +// Gets the root level command that can be added to any cobra-powered cli to get config* commands. +func GetConfigCommand() *cobra.Command { + return config.NewConfigCommand(NewAccessor) +} diff --git a/flytestdlib/contextutils/context.go b/flytestdlib/contextutils/context.go new file mode 100644 index 0000000000..b5a9c00fa2 --- /dev/null +++ b/flytestdlib/contextutils/context.go @@ -0,0 +1,140 @@ +// Contains common flyte context utils. +package contextutils + +import ( + "context" + "fmt" +) + +type Key string + +const ( + AppNameKey Key = "app_name" + NamespaceKey Key = "ns" + TaskTypeKey Key = "tasktype" + ProjectKey Key = "project" + DomainKey Key = "domain" + WorkflowIDKey Key = "wf" + NodeIDKey Key = "node" + TaskIDKey Key = "task" + ExecIDKey Key = "exec_id" + JobIDKey Key = "job_id" + PhaseKey Key = "phase" +) + +func (k Key) String() string { + return string(k) +} + +var logKeys = []Key{ + AppNameKey, + JobIDKey, + NamespaceKey, + ExecIDKey, + NodeIDKey, + WorkflowIDKey, + TaskTypeKey, + PhaseKey, +} + +// Gets a new context with namespace set. +func WithNamespace(ctx context.Context, namespace string) context.Context { + return context.WithValue(ctx, NamespaceKey, namespace) +} + +// Gets a new context with JobId set. If the existing context already has a job id, the new context will have +// / set as the job id. +func WithJobID(ctx context.Context, jobID string) context.Context { + existingJobID := ctx.Value(JobIDKey) + if existingJobID != nil { + jobID = fmt.Sprintf("%v/%v", existingJobID, jobID) + } + + return context.WithValue(ctx, JobIDKey, jobID) +} + +// Gets a new context with AppName set. +func WithAppName(ctx context.Context, appName string) context.Context { + return context.WithValue(ctx, AppNameKey, appName) +} + +// Gets a new context with Phase set. +func WithPhase(ctx context.Context, phase string) context.Context { + return context.WithValue(ctx, PhaseKey, phase) +} + +// Gets a new context with ExecutionID set. +func WithExecutionID(ctx context.Context, execID string) context.Context { + return context.WithValue(ctx, ExecIDKey, execID) +} + +// Gets a new context with NodeID (nested) set. +func WithNodeID(ctx context.Context, nodeID string) context.Context { + existingNodeID := ctx.Value(NodeIDKey) + if existingNodeID != nil { + nodeID = fmt.Sprintf("%v/%v", existingNodeID, nodeID) + } + return context.WithValue(ctx, NodeIDKey, nodeID) +} + +// Gets a new context with WorkflowName set. +func WithWorkflowID(ctx context.Context, workflow string) context.Context { + return context.WithValue(ctx, WorkflowIDKey, workflow) +} + +// Get new context with Project and Domain values set +func WithProjectDomain(ctx context.Context, project, domain string) context.Context { + c := context.WithValue(ctx, ProjectKey, project) + return context.WithValue(c, DomainKey, domain) +} + +// Gets a new context with WorkflowName set. +func WithTaskID(ctx context.Context, taskID string) context.Context { + return context.WithValue(ctx, TaskIDKey, taskID) +} + +// Gets a new context with TaskType set. +func WithTaskType(ctx context.Context, taskType string) context.Context { + return context.WithValue(ctx, TaskTypeKey, taskType) +} + +func addFieldIfNotNil(ctx context.Context, m map[string]interface{}, fieldKey Key) { + val := ctx.Value(fieldKey) + if val != nil { + m[fieldKey.String()] = val + } +} + +func addStringFieldWithDefaults(ctx context.Context, m map[string]string, fieldKey Key) { + val := ctx.Value(fieldKey) + if val == nil { + val = "" + } + m[fieldKey.String()] = val.(string) +} + +// Gets a map of all known logKeys set on the context. logKeys are special and should be used incase, context fields +// are to be added to the log lines. +func GetLogFields(ctx context.Context) map[string]interface{} { + res := map[string]interface{}{} + for _, k := range logKeys { + addFieldIfNotNil(ctx, res, k) + } + return res +} + +func Value(ctx context.Context, key Key) string { + val := ctx.Value(key) + if val != nil { + return val.(string) + } + return "" +} + +func Values(ctx context.Context, keys ...Key) map[string]string { + res := map[string]string{} + for _, k := range keys { + addStringFieldWithDefaults(ctx, res, k) + } + return res +} diff --git a/flytestdlib/contextutils/context_test.go b/flytestdlib/contextutils/context_test.go new file mode 100644 index 0000000000..99d29d3e3d --- /dev/null +++ b/flytestdlib/contextutils/context_test.go @@ -0,0 +1,113 @@ +package contextutils + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestWithAppName(t *testing.T) { + ctx := context.Background() + assert.Nil(t, ctx.Value(AppNameKey)) + ctx = WithAppName(ctx, "application-name-123") + assert.Equal(t, "application-name-123", ctx.Value(AppNameKey)) + + ctx = WithAppName(ctx, "app-name-modified") + assert.Equal(t, "app-name-modified", ctx.Value(AppNameKey)) +} + +func TestWithPhase(t *testing.T) { + ctx := context.Background() + assert.Nil(t, ctx.Value(PhaseKey)) + ctx = WithPhase(ctx, "Running") + assert.Equal(t, "Running", ctx.Value(PhaseKey)) + + ctx = WithPhase(ctx, "Failed") + assert.Equal(t, "Failed", ctx.Value(PhaseKey)) +} + +func TestWithJobId(t *testing.T) { + ctx := context.Background() + assert.Nil(t, ctx.Value(JobIDKey)) + ctx = WithJobID(ctx, "job123") + assert.Equal(t, "job123", ctx.Value(JobIDKey)) + + ctx = WithJobID(ctx, "subtask") + assert.Equal(t, "job123/subtask", ctx.Value(JobIDKey)) +} + +func TestWithNamespace(t *testing.T) { + ctx := context.Background() + assert.Nil(t, ctx.Value(NamespaceKey)) + ctx = WithNamespace(ctx, "flyte") + assert.Equal(t, "flyte", ctx.Value(NamespaceKey)) + + ctx = WithNamespace(ctx, "flyte2") + assert.Equal(t, "flyte2", ctx.Value(NamespaceKey)) +} + +func TestWithExecutionID(t *testing.T) { + ctx := context.Background() + assert.Nil(t, ctx.Value(ExecIDKey)) + ctx = WithExecutionID(ctx, "job123") + assert.Equal(t, "job123", ctx.Value(ExecIDKey)) +} + +func TestWithTaskType(t *testing.T) { + ctx := context.Background() + assert.Nil(t, ctx.Value(TaskTypeKey)) + ctx = WithTaskType(ctx, "flyte") + assert.Equal(t, "flyte", ctx.Value(TaskTypeKey)) +} + +func TestWithWorkflowID(t *testing.T) { + ctx := context.Background() + assert.Nil(t, ctx.Value(WorkflowIDKey)) + ctx = WithWorkflowID(ctx, "flyte") + assert.Equal(t, "flyte", ctx.Value(WorkflowIDKey)) +} + +func TestWithNodeID(t *testing.T) { + ctx := context.Background() + assert.Nil(t, ctx.Value(NodeIDKey)) + ctx = WithNodeID(ctx, "n1") + assert.Equal(t, "n1", ctx.Value(NodeIDKey)) + + ctx = WithNodeID(ctx, "n2") + assert.Equal(t, "n1/n2", ctx.Value(NodeIDKey)) +} + +func TestWithProjectDomain(t *testing.T) { + ctx := context.Background() + assert.Nil(t, ctx.Value(ProjectKey)) + assert.Nil(t, ctx.Value(DomainKey)) + ctx = WithProjectDomain(ctx, "proj", "domain") + assert.Equal(t, "proj", ctx.Value(ProjectKey)) + assert.Equal(t, "domain", ctx.Value(DomainKey)) +} + +func TestWithTaskID(t *testing.T) { + ctx := context.Background() + assert.Nil(t, ctx.Value(TaskIDKey)) + ctx = WithTaskID(ctx, "task") + assert.Equal(t, "task", ctx.Value(TaskIDKey)) +} + +func TestGetFields(t *testing.T) { + ctx := context.Background() + ctx = WithJobID(WithNamespace(ctx, "ns123"), "job123") + m := GetLogFields(ctx) + assert.Equal(t, "ns123", m[NamespaceKey.String()]) + assert.Equal(t, "job123", m[JobIDKey.String()]) +} + +func TestValues(t *testing.T) { + ctx := context.Background() + ctx = WithWorkflowID(ctx, "flyte") + m := Values(ctx, ProjectKey, WorkflowIDKey) + assert.NotNil(t, m) + assert.Equal(t, 2, len(m)) + assert.Equal(t, "flyte", m[WorkflowIDKey.String()]) + assert.Equal(t, "", m[ProjectKey.String()]) +} diff --git a/flytestdlib/internal/utils/parsers.go b/flytestdlib/internal/utils/parsers.go new file mode 100644 index 0000000000..c1fcfa3a4a --- /dev/null +++ b/flytestdlib/internal/utils/parsers.go @@ -0,0 +1,20 @@ +package utils + +import ( + "net/url" +) + +// A utility function to be used in tests. It parses urlString as url.URL or panics if it's invalid. +func MustParseURL(urlString string) url.URL { + u, err := url.Parse(urlString) + if err != nil { + panic(err) + } + + return *u +} + +// A utility function to be used in tests. It returns the address of the passed value. +func RefInt(val int) *int { + return &val +} diff --git a/flytestdlib/internal/utils/parsers_test.go b/flytestdlib/internal/utils/parsers_test.go new file mode 100644 index 0000000000..c15202b6ac --- /dev/null +++ b/flytestdlib/internal/utils/parsers_test.go @@ -0,0 +1,25 @@ +package utils + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestMustParseURL(t *testing.T) { + t.Run("Valid URL", func(t *testing.T) { + MustParseURL("http://something-profound-localhost.com") + }) + + t.Run("Invalid URL", func(t *testing.T) { + assert.Panics(t, func() { + MustParseURL("invalid_url:is_here\\") + }) + }) +} + +func TestRefUint32(t *testing.T) { + input := int(5) + res := RefInt(input) + assert.Equal(t, input, *res) +} diff --git a/flytestdlib/ioutils/bytes.go b/flytestdlib/ioutils/bytes.go new file mode 100644 index 0000000000..ad69c0d97b --- /dev/null +++ b/flytestdlib/ioutils/bytes.go @@ -0,0 +1,21 @@ +package ioutils + +import ( + "bytes" + "io" +) + +// A Closeable Reader for bytes to mimic stream from inmemory byte storage +type BytesReadCloser struct { + *bytes.Reader +} + +func (*BytesReadCloser) Close() error { + return nil +} + +func NewBytesReadCloser(b []byte) io.ReadCloser { + return &BytesReadCloser{ + Reader: bytes.NewReader(b), + } +} diff --git a/flytestdlib/ioutils/bytes_test.go b/flytestdlib/ioutils/bytes_test.go new file mode 100644 index 0000000000..9745c62c91 --- /dev/null +++ b/flytestdlib/ioutils/bytes_test.go @@ -0,0 +1,17 @@ +package ioutils + +import ( + "io/ioutil" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestNewBytesReadCloser(t *testing.T) { + i := []byte("abc") + r := NewBytesReadCloser(i) + o, e := ioutil.ReadAll(r) + assert.NoError(t, e) + assert.Equal(t, o, i) + assert.NoError(t, r.Close()) +} diff --git a/flytestdlib/ioutils/timed_readers.go b/flytestdlib/ioutils/timed_readers.go new file mode 100644 index 0000000000..ceb6415952 --- /dev/null +++ b/flytestdlib/ioutils/timed_readers.go @@ -0,0 +1,17 @@ +package ioutils + +import ( + "io" + "io/ioutil" +) + +// Defines a common interface for timers. +type Timer interface { + // Stops the timer and reports observation. + Stop() float64 +} + +func ReadAll(r io.Reader, t Timer) ([]byte, error) { + defer t.Stop() + return ioutil.ReadAll(r) +} diff --git a/flytestdlib/ioutils/timed_readers_test.go b/flytestdlib/ioutils/timed_readers_test.go new file mode 100644 index 0000000000..7fa74f7241 --- /dev/null +++ b/flytestdlib/ioutils/timed_readers_test.go @@ -0,0 +1,20 @@ +package ioutils + +import ( + "bytes" + "testing" + "time" + + "github.com/lyft/flytestdlib/promutils" + "github.com/stretchr/testify/assert" +) + +func TestReadAll(t *testing.T) { + r := bytes.NewReader([]byte("hello")) + s := promutils.NewTestScope() + w, e := s.NewStopWatch("x", "empty", time.Millisecond) + assert.NoError(t, e) + b, err := ReadAll(r, w.Start()) + assert.NoError(t, err) + assert.Equal(t, "hello", string(b)) +} diff --git a/flytestdlib/logger/config.go b/flytestdlib/logger/config.go new file mode 100644 index 0000000000..faa2da6f9e --- /dev/null +++ b/flytestdlib/logger/config.go @@ -0,0 +1,81 @@ +package logger + +import ( + "context" + + "github.com/lyft/flytestdlib/config" +) + +//go:generate pflags Config + +const configSectionKey = "Logger" + +type FormatterType = string + +const ( + FormatterJSON FormatterType = "json" + FormatterText FormatterType = "text" +) + +const ( + jsonDataKey string = "json" +) + +// Global logger config. +type Config struct { + // Determines whether to include source code location in logs. This might incurs a performance hit and is only + // recommended on debug/development builds. + IncludeSourceCode bool `json:"show-source" pflag:",Includes source code location in logs."` + + // Determines whether the logger should mute all logs (including panics) + Mute bool `json:"mute" pflag:",Mutes all logs regardless of severity. Intended for benchmarks/tests only."` + + // Determines the minimum log level to log. + Level Level `json:"level" pflag:"4,Sets the minimum logging level."` + + Formatter FormatterConfig `json:"formatter" pflag:",Sets logging format."` +} + +type FormatterConfig struct { + Type FormatterType `json:"type" pflag:"\"json\",Sets logging format type."` +} + +var globalConfig = Config{} + +// Sets global logger config +func SetConfig(cfg Config) { + globalConfig = cfg + + onConfigUpdated(cfg) +} + +// Level type. +type Level = int + +// These are the different logging levels. +const ( + // PanicLevel level, highest level of severity. Logs and then calls panic with the + // message passed to Debug, Info, ... + PanicLevel Level = iota + // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the + // logging level is set to Panic. + FatalLevel + // ErrorLevel level. Logs. Used for errors that should definitely be noted. + // Commonly used for hooks to send errors to an error tracking service. + ErrorLevel + // WarnLevel level. Non-critical entries that deserve eyes. + WarnLevel + // InfoLevel level. General operational entries about what's going on inside the + // application. + InfoLevel + // DebugLevel level. Usually only enabled when debugging. Very verbose logging. + DebugLevel +) + +func init() { + if _, err := config.RegisterSectionWithUpdates(configSectionKey, &Config{}, func(ctx context.Context, newValue config.Config) { + SetConfig(*newValue.(*Config)) + }); err != nil { + panic(err) + } +} diff --git a/flytestdlib/logger/config_flags.go b/flytestdlib/logger/config_flags.go new file mode 100755 index 0000000000..cf8950b94f --- /dev/null +++ b/flytestdlib/logger/config_flags.go @@ -0,0 +1,21 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package logger + +import ( + "fmt" + + "github.com/spf13/pflag" +) + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "show-source"), *new(bool), "Includes source code location in logs.") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "mute"), *new(bool), "Mutes all logs regardless of severity. Intended for benchmarks/tests only.") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "level"), 4, "Sets the minimum logging level.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "formatter.type"), "json", "Sets logging format type.") + return cmdFlags +} diff --git a/flytestdlib/logger/config_flags_test.go b/flytestdlib/logger/config_flags_test.go new file mode 100755 index 0000000000..401d58d493 --- /dev/null +++ b/flytestdlib/logger/config_flags_test.go @@ -0,0 +1,190 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package logger + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_Config(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_Config(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) +} + +func testDecodeSlice_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) +} + +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_show-source", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("show-source"); err == nil { + assert.Equal(t, bool(*new(bool)), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("show-source", testValue) + if vBool, err := cmdFlags.GetBool("show-source"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.IncludeSourceCode) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_mute", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("mute"); err == nil { + assert.Equal(t, bool(*new(bool)), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("mute", testValue) + if vBool, err := cmdFlags.GetBool("mute"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Mute) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_level", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vInt, err := cmdFlags.GetInt("level"); err == nil { + assert.Equal(t, int(4), vInt) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("level", testValue) + if vInt, err := cmdFlags.GetInt("level"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt), &actual.Level) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_formatter.type", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("formatter.type"); err == nil { + assert.Equal(t, string("json"), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("formatter.type", testValue) + if vString, err := cmdFlags.GetString("formatter.type"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Formatter.Type) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytestdlib/logger/config_test.go b/flytestdlib/logger/config_test.go new file mode 100644 index 0000000000..7d2d3782b1 --- /dev/null +++ b/flytestdlib/logger/config_test.go @@ -0,0 +1,20 @@ +package logger + +import "testing" + +func TestSetConfig(t *testing.T) { + type args struct { + cfg Config + } + tests := []struct { + name string + args args + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + SetConfig(tt.args.cfg) + }) + } +} diff --git a/flytestdlib/logger/logger.go b/flytestdlib/logger/logger.go new file mode 100644 index 0000000000..29aadc8bf8 --- /dev/null +++ b/flytestdlib/logger/logger.go @@ -0,0 +1,337 @@ +// Defines global context-aware logger. +// The default implementation uses logrus. This package registers "logger" config section on init(). The structure of the +// config section is expected to be un-marshal-able to Config struct. +package logger + +import ( + "context" + + "github.com/lyft/flytestdlib/contextutils" + + "fmt" + "runtime" + "strings" + + "github.com/sirupsen/logrus" +) + +//go:generate gotests -w -all $FILE + +const indentLevelKey contextutils.Key = "LoggerIndentLevel" + +func onConfigUpdated(cfg Config) { + logrus.SetLevel(logrus.Level(cfg.Level)) + + switch cfg.Formatter.Type { + case FormatterText: + if _, isText := logrus.StandardLogger().Formatter.(*logrus.JSONFormatter); !isText { + logrus.SetFormatter(&logrus.TextFormatter{ + FieldMap: logrus.FieldMap{ + logrus.FieldKeyTime: "ts", + }, + }) + } + default: + if _, isJSON := logrus.StandardLogger().Formatter.(*logrus.JSONFormatter); !isJSON { + logrus.SetFormatter(&logrus.JSONFormatter{ + DataKey: jsonDataKey, + FieldMap: logrus.FieldMap{ + logrus.FieldKeyTime: "ts", + }, + }) + } + } +} + +func getSourceLocation() string { + if globalConfig.IncludeSourceCode { + _, file, line, ok := runtime.Caller(3) + if !ok { + file = "???" + line = 1 + } else { + slash := strings.LastIndex(file, "/") + if slash >= 0 { + file = file[slash+1:] + } + } + + return fmt.Sprintf("[%v:%v] ", file, line) + } + + return "" +} + +func wrapHeader(ctx context.Context, args ...interface{}) []interface{} { + args = append([]interface{}{getIndent(ctx)}, args...) + + if globalConfig.IncludeSourceCode { + return append( + []interface{}{ + fmt.Sprintf("%v", getSourceLocation()), + }, + args...) + } + + return args +} + +func wrapHeaderForMessage(ctx context.Context, message string) string { + message = fmt.Sprintf("%v%v", getIndent(ctx), message) + + if globalConfig.IncludeSourceCode { + return fmt.Sprintf("%v%v", getSourceLocation(), message) + } + + return message +} + +func getLogger(ctx context.Context) *logrus.Entry { + entry := logrus.WithFields(logrus.Fields(contextutils.GetLogFields(ctx))) + entry.Level = logrus.Level(globalConfig.Level) + return entry +} + +func WithIndent(ctx context.Context, additionalIndent string) context.Context { + indentLevel := getIndent(ctx) + additionalIndent + return context.WithValue(ctx, indentLevelKey, indentLevel) +} + +func getIndent(ctx context.Context) string { + if existing := ctx.Value(indentLevelKey); existing != nil { + return existing.(string) + } + + return "" +} + +// Gets a value indicating whether logs at this level will be written to the logger. This is particularly useful to avoid +// computing log messages unnecessarily. +func IsLoggable(ctx context.Context, level Level) bool { + return getLogger(ctx).Level >= logrus.Level(level) +} + +// Debug logs a message at level Debug on the standard logger. +func Debug(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Debug(wrapHeader(ctx, args)...) +} + +// Print logs a message at level Info on the standard logger. +func Print(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Print(wrapHeader(ctx, args)...) +} + +// Info logs a message at level Info on the standard logger. +func Info(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Info(wrapHeader(ctx, args)...) +} + +// Warn logs a message at level Warn on the standard logger. +func Warn(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Warn(wrapHeader(ctx, args)...) +} + +// Warning logs a message at level Warn on the standard logger. +func Warning(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Warning(wrapHeader(ctx, args)...) +} + +// Error logs a message at level Error on the standard logger. +func Error(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Error(wrapHeader(ctx, args)...) +} + +// Panic logs a message at level Panic on the standard logger. +func Panic(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Panic(wrapHeader(ctx, args)...) +} + +// Fatal logs a message at level Fatal on the standard logger. +func Fatal(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Fatal(wrapHeader(ctx, args)...) +} + +// Debugf logs a message at level Debug on the standard logger. +func Debugf(ctx context.Context, format string, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Debugf(wrapHeaderForMessage(ctx, format), args...) +} + +// Printf logs a message at level Info on the standard logger. +func Printf(ctx context.Context, format string, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Printf(wrapHeaderForMessage(ctx, format), args...) +} + +// Infof logs a message at level Info on the standard logger. +func Infof(ctx context.Context, format string, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Infof(wrapHeaderForMessage(ctx, format), args...) +} + +// InfofNoCtx logs a formatted message without context. +func InfofNoCtx(format string, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(context.TODO()).Infof(format, args...) +} + +// Warnf logs a message at level Warn on the standard logger. +func Warnf(ctx context.Context, format string, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Warnf(wrapHeaderForMessage(ctx, format), args...) +} + +// Warningf logs a message at level Warn on the standard logger. +func Warningf(ctx context.Context, format string, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Warningf(wrapHeaderForMessage(ctx, format), args...) +} + +// Errorf logs a message at level Error on the standard logger. +func Errorf(ctx context.Context, format string, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Errorf(wrapHeaderForMessage(ctx, format), args...) +} + +// Panicf logs a message at level Panic on the standard logger. +func Panicf(ctx context.Context, format string, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Panicf(wrapHeaderForMessage(ctx, format), args...) +} + +// Fatalf logs a message at level Fatal on the standard logger. +func Fatalf(ctx context.Context, format string, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Fatalf(wrapHeaderForMessage(ctx, format), args...) +} + +// Debugln logs a message at level Debug on the standard logger. +func Debugln(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Debugln(wrapHeader(ctx, args)...) +} + +// Println logs a message at level Info on the standard logger. +func Println(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Println(wrapHeader(ctx, args)...) +} + +// Infoln logs a message at level Info on the standard logger. +func Infoln(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Infoln(wrapHeader(ctx, args)...) +} + +// Warnln logs a message at level Warn on the standard logger. +func Warnln(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Warnln(wrapHeader(ctx, args)...) +} + +// Warningln logs a message at level Warn on the standard logger. +func Warningln(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Warningln(wrapHeader(ctx, args)...) +} + +// Errorln logs a message at level Error on the standard logger. +func Errorln(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Errorln(wrapHeader(ctx, args)...) +} + +// Panicln logs a message at level Panic on the standard logger. +func Panicln(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Panicln(wrapHeader(ctx, args)...) +} + +// Fatalln logs a message at level Fatal on the standard logger. +func Fatalln(ctx context.Context, args ...interface{}) { + if globalConfig.Mute { + return + } + + getLogger(ctx).Fatalln(wrapHeader(ctx, args)...) +} diff --git a/flytestdlib/logger/logger_test.go b/flytestdlib/logger/logger_test.go new file mode 100644 index 0000000000..75c73a9432 --- /dev/null +++ b/flytestdlib/logger/logger_test.go @@ -0,0 +1,643 @@ +// Defines global context-aware logger. +// The default implementation uses logrus. This package registers "logger" config section on init(). The structure of the +// config section is expected to be un-marshal-able to Config struct. +package logger + +import ( + "context" + "reflect" + "strings" + "testing" + + "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" +) + +func init() { + SetConfig(Config{ + Level: InfoLevel, + IncludeSourceCode: true, + }) +} + +func Test_getSourceLocation(t *testing.T) { + tests := []struct { + name string + want string + }{ + {"current", " "}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := getSourceLocation(); !strings.HasSuffix(got, tt.want) { + t.Errorf("getSourceLocation() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_wrapHeaderForMessage(t *testing.T) { + type args struct { + message string + } + tests := []struct { + name string + args args + want string + }{ + {"no args", args{message: ""}, " "}, + {"1 arg", args{message: "hello"}, " hello"}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := wrapHeaderForMessage(context.TODO(), tt.args.message); !strings.HasSuffix(got, tt.want) { + t.Errorf("wrapHeaderForMessage() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestIsLoggable(t *testing.T) { + type args struct { + ctx context.Context + level Level + } + tests := []struct { + name string + args args + want bool + }{ + {"Debug Is not loggable", args{ctx: context.TODO(), level: DebugLevel}, false}, + {"Info Is loggable", args{ctx: context.TODO(), level: InfoLevel}, true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := IsLoggable(tt.args.ctx, tt.args.level); got != tt.want { + t.Errorf("IsLoggable() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestDebug(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Debug(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestPrint(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Print(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestInfo(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Info(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestWarn(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Warn(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestWarning(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Warning(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestError(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Error(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestPanic(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Panics(t, func() { + Panic(tt.args.ctx, tt.args.args...) + }) + }) + } +} + +func TestDebugf(t *testing.T) { + type args struct { + ctx context.Context + format string + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Debugf(tt.args.ctx, tt.args.format, tt.args.args...) + }) + } +} + +func TestPrintf(t *testing.T) { + type args struct { + ctx context.Context + format string + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Printf(tt.args.ctx, tt.args.format, tt.args.args...) + }) + } +} + +func TestInfof(t *testing.T) { + type args struct { + ctx context.Context + format string + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Infof(tt.args.ctx, tt.args.format, tt.args.args...) + }) + } +} + +func TestInfofNoCtx(t *testing.T) { + type args struct { + format string + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{format: "%v", args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + InfofNoCtx(tt.args.format, tt.args.args...) + }) + } +} + +func TestWarnf(t *testing.T) { + type args struct { + ctx context.Context + format string + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Warnf(tt.args.ctx, tt.args.format, tt.args.args...) + }) + } +} + +func TestWarningf(t *testing.T) { + type args struct { + ctx context.Context + format string + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Warningf(tt.args.ctx, tt.args.format, tt.args.args...) + }) + } +} + +func TestErrorf(t *testing.T) { + type args struct { + ctx context.Context + format string + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Errorf(tt.args.ctx, tt.args.format, tt.args.args...) + }) + } +} + +func TestPanicf(t *testing.T) { + type args struct { + ctx context.Context + format string + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Panics(t, func() { + Panicf(tt.args.ctx, tt.args.format, tt.args.args...) + }) + }) + } +} + +func TestDebugln(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Debugln(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestPrintln(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Println(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestInfoln(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Infoln(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestWarnln(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Warnln(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestWarningln(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Warningln(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestErrorln(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Errorln(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestPanicln(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + {"test", args{ctx: context.TODO(), args: []interface{}{"arg"}}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Panics(t, func() { + Panicln(tt.args.ctx, tt.args.args...) + }) + }) + } +} + +func Test_wrapHeader(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + want []interface{} + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := wrapHeader(tt.args.ctx, tt.args.args...); !reflect.DeepEqual(got, tt.want) { + t.Errorf("wrapHeader() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_getLogger(t *testing.T) { + type args struct { + ctx context.Context + } + tests := []struct { + name string + args args + want *logrus.Entry + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := getLogger(tt.args.ctx); !reflect.DeepEqual(got, tt.want) { + t.Errorf("getLogger() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestWithIndent(t *testing.T) { + type args struct { + ctx context.Context + additionalIndent string + } + tests := []struct { + name string + args args + want context.Context + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := WithIndent(tt.args.ctx, tt.args.additionalIndent); !reflect.DeepEqual(got, tt.want) { + t.Errorf("WithIndent() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_getIndent(t *testing.T) { + type args struct { + ctx context.Context + } + tests := []struct { + name string + args args + want string + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := getIndent(tt.args.ctx); got != tt.want { + t.Errorf("getIndent() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestFatal(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Fatal(tt.args.ctx, tt.args.args...) + }) + } +} + +func TestFatalf(t *testing.T) { + type args struct { + ctx context.Context + format string + args []interface{} + } + tests := []struct { + name string + args args + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Fatalf(tt.args.ctx, tt.args.format, tt.args.args...) + }) + } +} + +func TestFatalln(t *testing.T) { + type args struct { + ctx context.Context + args []interface{} + } + tests := []struct { + name string + args args + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + Fatalln(tt.args.ctx, tt.args.args...) + }) + } +} + +func Test_onConfigUpdated(t *testing.T) { + type args struct { + cfg Config + } + tests := []struct { + name string + args args + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + onConfigUpdated(tt.args.cfg) + }) + } +} diff --git a/flytestdlib/pbhash/pbhash.go b/flytestdlib/pbhash/pbhash.go new file mode 100644 index 0000000000..820b5c511a --- /dev/null +++ b/flytestdlib/pbhash/pbhash.go @@ -0,0 +1,58 @@ +// This is a package that provides hashing utilities for Protobuf objects. +package pbhash + +import ( + "context" + "encoding/base64" + + goObjectHash "github.com/benlaurie/objecthash/go/objecthash" + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" + "github.com/lyft/flytestdlib/logger" +) + +var marshaller = &jsonpb.Marshaler{} + +func fromHashToByteArray(input [32]byte) []byte { + output := make([]byte, 32) + for idx, val := range input { + output[idx] = val + } + return output +} + +// Generate a deterministic hash in bytes for the pb object +func ComputeHash(ctx context.Context, pb proto.Message) ([]byte, error) { + // We marshal the pb object to JSON first which should provide a consistent mapping of pb to json fields as stated + // here: https://developers.google.com/protocol-buffers/docs/proto3#json + // jsonpb marshalling includes: + // - sorting map values to provide a stable output + // - omitting empty values which supports backwards compatibility of old protobuf definitions + // We do not use protobuf marshalling because it does not guarantee stable output because of how it handles + // unknown fields and ordering of fields. https://github.com/protocolbuffers/protobuf/issues/2830 + pbJSON, err := marshaller.MarshalToString(pb) + if err != nil { + logger.Warning(ctx, "failed to marshal pb [%+v] to JSON with err %v", pb, err) + return nil, err + } + + // Deterministically hash the JSON object to a byte array. The library will sort the map keys of the JSON object + // so that we do not run into the issues from pb marshalling. + hash, err := goObjectHash.CommonJSONHash(pbJSON) + if err != nil { + logger.Warning(ctx, "failed to hash JSON for pb [%+v] with err %v", pb, err) + return nil, err + } + + return fromHashToByteArray(hash), err +} + +// Generate a deterministic hash as a base64 encoded string for the pb object. +func ComputeHashString(ctx context.Context, pb proto.Message) (string, error) { + hashBytes, err := ComputeHash(ctx, pb) + if err != nil { + return "", err + } + + return base64.StdEncoding.EncodeToString(hashBytes), err +} diff --git a/flytestdlib/pbhash/pbhash_test.go b/flytestdlib/pbhash/pbhash_test.go new file mode 100644 index 0000000000..75735b4135 --- /dev/null +++ b/flytestdlib/pbhash/pbhash_test.go @@ -0,0 +1,145 @@ +package pbhash + +import ( + "context" + "testing" + "time" + + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes" + "github.com/golang/protobuf/ptypes/duration" + "github.com/golang/protobuf/ptypes/timestamp" + "github.com/stretchr/testify/assert" +) + +// Mock a Protobuf generated GO object +type mockProtoMessage struct { + Integer int64 `protobuf:"varint,1,opt,name=integer,proto3" json:"integer,omitempty"` + FloatValue float64 `protobuf:"fixed64,2,opt,name=float_value,json=floatValue,proto3" json:"float_value,omitempty"` + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` + Boolean bool `protobuf:"varint,4,opt,name=boolean,proto3" json:"boolean,omitempty"` + Datetime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=datetime,proto3" json:"datetime,omitempty"` + Duration *duration.Duration `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"` + MapValue map[string]string `protobuf:"bytes,7,rep,name=map_value,json=mapValue,proto3" json:"map_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Collections []string `protobuf:"bytes,8,rep,name=collections,proto3" json:"collections,omitempty"` +} + +func (mockProtoMessage) Reset() { +} + +func (m mockProtoMessage) String() string { + return proto.CompactTextString(m) +} + +func (mockProtoMessage) ProtoMessage() { +} + +// Mock an older version of the above pb object that doesn't have some fields +type mockOlderProto struct { + Integer int64 `protobuf:"varint,1,opt,name=integer,proto3" json:"integer,omitempty"` + FloatValue float64 `protobuf:"fixed64,2,opt,name=float_value,json=floatValue,proto3" json:"float_value,omitempty"` + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` + Boolean bool `protobuf:"varint,4,opt,name=boolean,proto3" json:"boolean,omitempty"` +} + +func (mockOlderProto) Reset() { +} + +func (m mockOlderProto) String() string { + return proto.CompactTextString(m) +} + +func (mockOlderProto) ProtoMessage() { +} + +var sampleTime, _ = ptypes.TimestampProto( + time.Date(2019, 03, 29, 12, 0, 0, 0, time.UTC)) + +func TestProtoHash(t *testing.T) { + mockProto := &mockProtoMessage{ + Integer: 18, + FloatValue: 1.3, + StringValue: "lets test this", + Boolean: true, + Datetime: sampleTime, + Duration: ptypes.DurationProto(time.Millisecond), + MapValue: map[string]string{ + "z": "last", + "a": "first", + }, + Collections: []string{"1", "2", "3"}, + } + + expectedHashedMockProto := []byte{0x62, 0x95, 0xb2, 0x2c, 0x23, 0xf5, 0x35, 0x6d, 0x3, 0x56, 0x4d, 0xc7, 0x8f, 0xae, + 0x2d, 0x2b, 0xbd, 0x7, 0xff, 0xdb, 0x7e, 0xe5, 0xf4, 0x25, 0x8f, 0xbc, 0xb2, 0xc, 0xad, 0xa5, 0x48, 0x44} + expectedHashString := "YpWyLCP1NW0DVk3Hj64tK70H/9t+5fQlj7yyDK2lSEQ=" + + t.Run("TestFullProtoHash", func(t *testing.T) { + hashedBytes, err := ComputeHash(context.Background(), mockProto) + assert.Nil(t, err) + assert.Equal(t, expectedHashedMockProto, hashedBytes) + assert.Len(t, hashedBytes, 32) + + hashedString, err := ComputeHashString(context.Background(), mockProto) + assert.Nil(t, err) + assert.Equal(t, hashedString, expectedHashString) + }) + + t.Run("TestFullProtoHashReorderKeys", func(t *testing.T) { + mockProto.MapValue = map[string]string{"a": "first", "z": "last"} + hashedBytes, err := ComputeHash(context.Background(), mockProto) + assert.Nil(t, err) + assert.Equal(t, expectedHashedMockProto, hashedBytes) + assert.Len(t, hashedBytes, 32) + + hashedString, err := ComputeHashString(context.Background(), mockProto) + assert.Nil(t, err) + assert.Equal(t, hashedString, expectedHashString) + }) +} + +func TestPartialFilledProtoHash(t *testing.T) { + + mockProtoOmitEmpty := &mockProtoMessage{ + Integer: 18, + FloatValue: 1.3, + StringValue: "lets test this", + Boolean: true, + } + + expectedHashedMockProtoOmitEmpty := []byte{0x1a, 0x13, 0xcc, 0x4c, 0xab, 0xc9, 0x7d, 0x43, 0xc7, 0x2b, 0xc5, 0x37, + 0xbc, 0x49, 0xa8, 0x8b, 0xfc, 0x1d, 0x54, 0x1c, 0x7b, 0x21, 0x04, 0x8f, 0xab, 0x28, 0xc6, 0x5c, 0x06, 0x73, + 0xaa, 0xe2} + + expectedHashStringOmitEmpty := "GhPMTKvJfUPHK8U3vEmoi/wdVBx7IQSPqyjGXAZzquI=" + + t.Run("TestPartial", func(t *testing.T) { + hashedBytes, err := ComputeHash(context.Background(), mockProtoOmitEmpty) + assert.Nil(t, err) + assert.Equal(t, expectedHashedMockProtoOmitEmpty, hashedBytes) + assert.Len(t, hashedBytes, 32) + + hashedString, err := ComputeHashString(context.Background(), mockProtoOmitEmpty) + assert.Nil(t, err) + assert.Equal(t, hashedString, expectedHashStringOmitEmpty) + }) + + mockOldProtoMessage := &mockOlderProto{ + Integer: 18, + FloatValue: 1.3, + StringValue: "lets test this", + Boolean: true, + } + + t.Run("TestOlderProto", func(t *testing.T) { + hashedBytes, err := ComputeHash(context.Background(), mockOldProtoMessage) + assert.Nil(t, err) + assert.Equal(t, expectedHashedMockProtoOmitEmpty, hashedBytes) + assert.Len(t, hashedBytes, 32) + + hashedString, err := ComputeHashString(context.Background(), mockProtoOmitEmpty) + assert.Nil(t, err) + assert.Equal(t, hashedString, expectedHashStringOmitEmpty) + }) + +} diff --git a/flytestdlib/profutils/server.go b/flytestdlib/profutils/server.go new file mode 100644 index 0000000000..b8240cf25c --- /dev/null +++ b/flytestdlib/profutils/server.go @@ -0,0 +1,116 @@ +package profutils + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + + "github.com/lyft/flytestdlib/config" + + "github.com/lyft/flytestdlib/version" + + "github.com/lyft/flytestdlib/logger" + "github.com/prometheus/client_golang/prometheus/promhttp" + + _ "net/http/pprof" // Import for pprof server +) + +const ( + healthcheck = "/healthcheck" + metricsPath = "/metrics" + versionPath = "/version" + configPath = "/config" +) + +const ( + contentTypeHeader = "Content-Type" + contentTypeJSON = "application/json; charset=utf-8" +) + +func WriteStringResponse(resp http.ResponseWriter, code int, body string) error { + resp.WriteHeader(code) + _, err := resp.Write([]byte(body)) + return err +} + +func WriteJSONResponse(resp http.ResponseWriter, code int, body interface{}) error { + resp.Header().Set(contentTypeHeader, contentTypeJSON) + resp.WriteHeader(code) + j, err := json.Marshal(body) + if err != nil { + return WriteStringResponse(resp, http.StatusInternalServerError, err.Error()) + } + return WriteStringResponse(resp, http.StatusOK, string(j)) +} + +func healtcheckHandler(w http.ResponseWriter, req *http.Request) { + err := WriteStringResponse(w, http.StatusOK, http.StatusText(http.StatusOK)) + if err != nil { + panic(err) + } +} + +func versionHandler(w http.ResponseWriter, req *http.Request) { + err := WriteStringResponse(w, http.StatusOK, fmt.Sprintf("Build [%s], Version [%s]", version.Build, version.Version)) + if err != nil { + panic(err) + } +} + +func configHandler(w http.ResponseWriter, req *http.Request) { + m, err := config.AllConfigsAsMap(config.GetRootSection()) + if err != nil { + err = WriteStringResponse(w, http.StatusInternalServerError, err.Error()) + if err != nil { + logger.Errorf(context.TODO(), "Failed to write error response. Error: %v", err) + panic(err) + } + } + + if err := WriteJSONResponse(w, http.StatusOK, m); err != nil { + panic(err) + } +} + +// Starts an http server on the given port +func StartProfilingServer(ctx context.Context, pprofPort int) error { + logger.Infof(ctx, "Starting profiling server on port [%v]", pprofPort) + e := http.ListenAndServe(fmt.Sprintf(":%d", pprofPort), nil) + if e != nil { + logger.Errorf(ctx, "Failed to start profiling server. Error: %v", e) + return fmt.Errorf("failed to start profiling server, %s", e) + } + + return nil +} + +func configureGlobalHTTPHandler(handlers map[string]http.Handler) error { + if handlers == nil { + handlers = map[string]http.Handler{} + } + handlers[metricsPath] = promhttp.Handler() + handlers[healthcheck] = http.HandlerFunc(healtcheckHandler) + handlers[versionPath] = http.HandlerFunc(versionHandler) + handlers[configPath] = http.HandlerFunc(configHandler) + + for p, h := range handlers { + http.Handle(p, h) + } + + return nil +} + +// Forwards the call to StartProfilingServer +// Also registers: +// 1. the prometheus HTTP handler on '/metrics' path shared with the profiling server. +// 2. A healthcheck (L7) handler on '/healthcheck'. +// 3. A version handler on '/version' provides information about the specific build. +// 4. A config handler on '/config' provides a dump of the currently loaded config. +func StartProfilingServerWithDefaultHandlers(ctx context.Context, pprofPort int, handlers map[string]http.Handler) error { + if err := configureGlobalHTTPHandler(handlers); err != nil { + return err + } + + return StartProfilingServer(ctx, pprofPort) +} diff --git a/flytestdlib/profutils/server_test.go b/flytestdlib/profutils/server_test.go new file mode 100644 index 0000000000..e2eb709943 --- /dev/null +++ b/flytestdlib/profutils/server_test.go @@ -0,0 +1,103 @@ +package profutils + +import ( + "encoding/json" + "net/http" + "testing" + + "github.com/lyft/flytestdlib/internal/utils" + + "github.com/stretchr/testify/assert" +) + +type MockResponseWriter struct { + Status int + Headers http.Header + Body []byte +} + +func (m *MockResponseWriter) Write(b []byte) (int, error) { + m.Body = b + return 1, nil +} + +func (m *MockResponseWriter) WriteHeader(statusCode int) { + m.Status = statusCode +} + +func (m *MockResponseWriter) Header() http.Header { + return m.Headers +} + +type TestObj struct { + X int `json:"x"` +} + +func init() { + if err := configureGlobalHTTPHandler(nil); err != nil { + panic(err) + } +} + +func TestWriteJsonResponse(t *testing.T) { + m := &MockResponseWriter{Headers: http.Header{}} + assert.NoError(t, WriteJSONResponse(m, http.StatusOK, TestObj{10})) + assert.Equal(t, http.StatusOK, m.Status) + assert.Equal(t, http.Header{contentTypeHeader: []string{contentTypeJSON}}, m.Headers) + assert.Equal(t, `{"x":10}`, string(m.Body)) +} + +func TestWriteStringResponse(t *testing.T) { + m := &MockResponseWriter{Headers: http.Header{}} + assert.NoError(t, WriteStringResponse(m, http.StatusOK, "OK")) + assert.Equal(t, http.StatusOK, m.Status) + assert.Equal(t, "OK", string(m.Body)) +} + +func TestConfigHandler(t *testing.T) { + writer := &MockResponseWriter{Headers: http.Header{}} + testURL := utils.MustParseURL(configPath) + request := &http.Request{ + URL: &testURL, + } + + http.DefaultServeMux.ServeHTTP(writer, request) + assert.Equal(t, http.StatusOK, writer.Status) + + m := map[string]interface{}{} + assert.NoError(t, json.Unmarshal(writer.Body, &m)) + assert.Equal(t, map[string]interface{}{ + "logger": map[string]interface{}{ + "show-source": false, + "mute": false, + "level": float64(0), + "formatter": map[string]interface{}{ + "type": "", + }, + }, + }, m) +} + +func TestVersionHandler(t *testing.T) { + writer := &MockResponseWriter{Headers: http.Header{}} + testURL := utils.MustParseURL(versionPath) + request := &http.Request{ + URL: &testURL, + } + + http.DefaultServeMux.ServeHTTP(writer, request) + assert.Equal(t, http.StatusOK, writer.Status) + assert.Equal(t, `Build [unknown], Version [unknown]`, string(writer.Body)) +} + +func TestHealthcheckHandler(t *testing.T) { + writer := &MockResponseWriter{Headers: http.Header{}} + testURL := utils.MustParseURL(healthcheck) + request := &http.Request{ + URL: &testURL, + } + + http.DefaultServeMux.ServeHTTP(writer, request) + assert.Equal(t, http.StatusOK, writer.Status) + assert.Equal(t, `OK`, string(writer.Body)) +} diff --git a/flytestdlib/promutils/labeled/counter.go b/flytestdlib/promutils/labeled/counter.go new file mode 100644 index 0000000000..c68ce02d23 --- /dev/null +++ b/flytestdlib/promutils/labeled/counter.go @@ -0,0 +1,65 @@ +package labeled + +import ( + "context" + + "github.com/lyft/flytestdlib/contextutils" + "github.com/lyft/flytestdlib/promutils" + "github.com/prometheus/client_golang/prometheus" +) + +// Represents a counter labeled with values from the context. See labeled.SetMetricsKeys for information about to +// configure that. +type Counter struct { + *prometheus.CounterVec + + prometheus.Counter +} + +// Inc increments the counter by 1. Use Add to increment it by arbitrary non-negative values. The data point will be +// labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. +func (c Counter) Inc(ctx context.Context) { + counter, err := c.CounterVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + if err != nil { + panic(err.Error()) + } + counter.Inc() + + if c.Counter != nil { + c.Counter.Inc() + } +} + +// Add adds the given value to the counter. It panics if the value is < 0.. The data point will be labeled with values +// from context. See labeled.SetMetricsKeys for information about to configure that. +func (c Counter) Add(ctx context.Context, v float64) { + counter, err := c.CounterVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + if err != nil { + panic(err.Error()) + } + counter.Add(v) + + if c.Counter != nil { + c.Counter.Add(v) + } +} + +// Creates a new labeled counter. Label keys must be set before instantiating a counter. See labeled.SetMetricsKeys for +// information about to configure that. +func NewCounter(name, description string, scope promutils.Scope, opts ...MetricOption) Counter { + if len(metricKeys) == 0 { + panic(ErrNeverSet) + } + + c := Counter{ + CounterVec: scope.MustNewCounterVec(name, description, metricStringKeys...), + } + + for _, opt := range opts { + if _, emitUnlabeledMetric := opt.(EmitUnlabeledMetricOption); emitUnlabeledMetric { + c.Counter = scope.MustNewCounter(GetUnlabeledMetricName(name), description) + } + } + + return c +} diff --git a/flytestdlib/promutils/labeled/counter_test.go b/flytestdlib/promutils/labeled/counter_test.go new file mode 100644 index 0000000000..130b8217a2 --- /dev/null +++ b/flytestdlib/promutils/labeled/counter_test.go @@ -0,0 +1,31 @@ +package labeled + +import ( + "context" + "testing" + + "github.com/lyft/flytestdlib/contextutils" + "github.com/lyft/flytestdlib/promutils" + "github.com/stretchr/testify/assert" +) + +func TestLabeledCounter(t *testing.T) { + assert.NotPanics(t, func() { + SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) + }) + + scope := promutils.NewTestScope() + c := NewCounter("lbl_counter", "help", scope) + assert.NotNil(t, c) + ctx := context.TODO() + c.Inc(ctx) + c.Add(ctx, 1.0) + + ctx = contextutils.WithProjectDomain(ctx, "project", "domain") + c.Inc(ctx) + c.Add(ctx, 1.0) + + ctx = contextutils.WithTaskID(ctx, "task") + c.Inc(ctx) + c.Add(ctx, 1.0) +} diff --git a/flytestdlib/promutils/labeled/keys.go b/flytestdlib/promutils/labeled/keys.go new file mode 100644 index 0000000000..d8c8683750 --- /dev/null +++ b/flytestdlib/promutils/labeled/keys.go @@ -0,0 +1,47 @@ +package labeled + +import ( + "fmt" + "reflect" + "sync" + + "github.com/lyft/flytestdlib/contextutils" +) + +var ( + ErrAlreadySet = fmt.Errorf("cannot set metric keys more than once") + ErrEmpty = fmt.Errorf("cannot set metric keys to an empty set") + ErrNeverSet = fmt.Errorf("must call SetMetricKeys prior to using labeled package") + + // Metric Keys to label metrics with. These keys get pulled from context if they are present. Use contextutils to fill + // them in. + metricKeys = make([]contextutils.Key, 0) + + // :(, we have to create a separate list to satisfy the MustNewCounterVec API as it accepts string only + metricStringKeys = make([]string, 0) + metricKeysAreSet = sync.Once{} +) + +// Sets keys to use with labeled metrics. The values of these keys will be pulled from context at runtime. +func SetMetricKeys(keys ...contextutils.Key) { + if len(keys) == 0 { + panic(ErrEmpty) + } + + ran := false + metricKeysAreSet.Do(func() { + ran = true + metricKeys = keys + for _, metricKey := range metricKeys { + metricStringKeys = append(metricStringKeys, metricKey.String()) + } + }) + + if !ran && !reflect.DeepEqual(keys, metricKeys) { + panic(ErrAlreadySet) + } +} + +func GetUnlabeledMetricName(metricName string) string { + return metricName + "_unlabeled" +} diff --git a/flytestdlib/promutils/labeled/keys_test.go b/flytestdlib/promutils/labeled/keys_test.go new file mode 100644 index 0000000000..4a8600aea3 --- /dev/null +++ b/flytestdlib/promutils/labeled/keys_test.go @@ -0,0 +1,24 @@ +package labeled + +import ( + "testing" + + "github.com/lyft/flytestdlib/contextutils" + "github.com/stretchr/testify/assert" +) + +func TestMetricKeys(t *testing.T) { + input := []contextutils.Key{ + contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey, + } + + assert.NotPanics(t, func() { SetMetricKeys(input...) }) + assert.Equal(t, input, metricKeys) + + for i, k := range metricKeys { + assert.Equal(t, k.String(), metricStringKeys[i]) + } + + assert.NotPanics(t, func() { SetMetricKeys(input...) }) + assert.Panics(t, func() { SetMetricKeys(contextutils.DomainKey) }) +} diff --git a/flytestdlib/promutils/labeled/metric_option.go b/flytestdlib/promutils/labeled/metric_option.go new file mode 100644 index 0000000000..08fb2f76f9 --- /dev/null +++ b/flytestdlib/promutils/labeled/metric_option.go @@ -0,0 +1,15 @@ +package labeled + +// Defines extra set of options to customize the emitted metric. +type MetricOption interface { + isMetricOption() +} + +// Instructs the metric to emit unlabeled metric (besides the labeled one). This is useful to get overall system +// performance. +type EmitUnlabeledMetricOption struct { +} + +func (EmitUnlabeledMetricOption) isMetricOption() {} + +var EmitUnlabeledMetric = EmitUnlabeledMetricOption{} diff --git a/flytestdlib/promutils/labeled/metric_option_test.go b/flytestdlib/promutils/labeled/metric_option_test.go new file mode 100644 index 0000000000..0a070f7420 --- /dev/null +++ b/flytestdlib/promutils/labeled/metric_option_test.go @@ -0,0 +1,13 @@ +package labeled + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestMetricOption(t *testing.T) { + var opt MetricOption = &EmitUnlabeledMetric + _, isMetricOption := opt.(MetricOption) + assert.True(t, isMetricOption) +} diff --git a/flytestdlib/promutils/labeled/stopwatch.go b/flytestdlib/promutils/labeled/stopwatch.go new file mode 100644 index 0000000000..90e29971f9 --- /dev/null +++ b/flytestdlib/promutils/labeled/stopwatch.go @@ -0,0 +1,87 @@ +package labeled + +import ( + "context" + "time" + + "github.com/lyft/flytestdlib/contextutils" + "github.com/lyft/flytestdlib/promutils" +) + +type StopWatch struct { + *promutils.StopWatchVec + + // We use SummaryVec for emitting StopWatchVec, this computes percentiles per metric tags combination on the client- + // side. This makes it impossible to aggregate percentiles across tags (e.g. to have system-wide view). When enabled + // through a flag in the constructor, we initialize this additional untagged stopwatch to compute percentiles + // across tags. + promutils.StopWatch +} + +// Start creates a new Instance of the StopWatch called a Timer that is closeable/stoppable. +// Common pattern to time a scope would be +// { +// timer := stopWatch.Start(ctx) +// defer timer.Stop() +// .... +// } +func (c StopWatch) Start(ctx context.Context) Timer { + w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + if err != nil { + panic(err.Error()) + } + + if c.StopWatch.Observer == nil { + return w.Start() + } + + return timer{ + Timers: []Timer{ + w.Start(), + c.StopWatch.Start(), + }, + } +} + +// Observes specified duration between the start and end time. The data point will be labeled with values from context. +// See labeled.SetMetricsKeys for information about to configure that. +func (c StopWatch) Observe(ctx context.Context, start, end time.Time) { + w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + if err != nil { + panic(err.Error()) + } + w.Observe(start, end) + + if c.StopWatch.Observer != nil { + c.StopWatch.Observe(start, end) + } +} + +// This method observes the elapsed duration since the creation of the timer. The timer is created using a StopWatch. +// The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about to +// configure that. +func (c StopWatch) Time(ctx context.Context, f func()) { + t := c.Start(ctx) + f() + t.Stop() +} + +// Creates a new labeled stopwatch. Label keys must be set before instantiating a counter. See labeled.SetMetricsKeys +// for information about to configure that. +func NewStopWatch(name, description string, scale time.Duration, scope promutils.Scope, opts ...MetricOption) StopWatch { + if len(metricKeys) == 0 { + panic(ErrNeverSet) + } + + sw := StopWatch{ + StopWatchVec: scope.MustNewStopWatchVec(name, description, scale, metricStringKeys...), + } + + for _, opt := range opts { + if _, emitUnableMetric := opt.(EmitUnlabeledMetricOption); emitUnableMetric { + sw.StopWatch = scope.MustNewStopWatch(GetUnlabeledMetricName(name), description, scale) + } + } + + return sw +} diff --git a/flytestdlib/promutils/labeled/stopwatch_test.go b/flytestdlib/promutils/labeled/stopwatch_test.go new file mode 100644 index 0000000000..d5adf0eade --- /dev/null +++ b/flytestdlib/promutils/labeled/stopwatch_test.go @@ -0,0 +1,47 @@ +package labeled + +import ( + "context" + "testing" + "time" + + "github.com/lyft/flytestdlib/contextutils" + "github.com/lyft/flytestdlib/promutils" + "github.com/stretchr/testify/assert" +) + +func TestLabeledStopWatch(t *testing.T) { + assert.NotPanics(t, func() { + SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) + }) + + t.Run("always labeled", func(t *testing.T) { + scope := promutils.NewTestScope() + c := NewStopWatch("lbl_counter", "help", time.Second, scope) + assert.NotNil(t, c) + ctx := context.TODO() + w := c.Start(ctx) + w.Stop() + + ctx = contextutils.WithProjectDomain(ctx, "project", "domain") + w = c.Start(ctx) + w.Stop() + + ctx = contextutils.WithTaskID(ctx, "task") + w = c.Start(ctx) + w.Stop() + + c.Observe(ctx, time.Now(), time.Now().Add(time.Second)) + c.Time(ctx, func() { + // Do nothing + }) + }) + + t.Run("unlabeled", func(t *testing.T) { + scope := promutils.NewTestScope() + c := NewStopWatch("lbl_counter_2", "help", time.Second, scope, EmitUnlabeledMetric) + assert.NotNil(t, c) + + c.Start(context.TODO()) + }) +} diff --git a/flytestdlib/promutils/labeled/timer_wrapper.go b/flytestdlib/promutils/labeled/timer_wrapper.go new file mode 100644 index 0000000000..75aa4bee94 --- /dev/null +++ b/flytestdlib/promutils/labeled/timer_wrapper.go @@ -0,0 +1,20 @@ +package labeled + +// Defines a common interface for timers. +type Timer interface { + // Stops the timer and reports observation. + Stop() float64 +} + +type timer struct { + Timers []Timer +} + +func (t timer) Stop() float64 { + var res float64 + for _, timer := range t.Timers { + res = timer.Stop() + } + + return res +} diff --git a/flytestdlib/promutils/labeled/timer_wrapper_test.go b/flytestdlib/promutils/labeled/timer_wrapper_test.go new file mode 100644 index 0000000000..375836c557 --- /dev/null +++ b/flytestdlib/promutils/labeled/timer_wrapper_test.go @@ -0,0 +1,28 @@ +package labeled + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +type fakeTimer struct { + stopCount int +} + +func (f *fakeTimer) Stop() float64 { + f.stopCount++ + return 0 +} + +func TestTimerStop(t *testing.T) { + ft := &fakeTimer{} + tim := timer{ + Timers: []Timer{ + ft, ft, ft, + }, + } + + tim.Stop() + assert.Equal(t, 3, ft.stopCount) +} diff --git a/flytestdlib/promutils/scope.go b/flytestdlib/promutils/scope.go new file mode 100644 index 0000000000..d32fab4cfa --- /dev/null +++ b/flytestdlib/promutils/scope.go @@ -0,0 +1,434 @@ +package promutils + +import ( + "strings" + "time" + + "k8s.io/apimachinery/pkg/util/rand" + + "github.com/prometheus/client_golang/prometheus" +) + +const defaultScopeDelimiterStr = ":" +const defaultMetricDelimiterStr = "_" + +func panicIfError(err error) { + if err != nil { + panic("Failed to register metrics. Error: " + err.Error()) + } +} + +// A Simple StopWatch that works with prometheus summary +// It will scale the output to match the expected time scale (milliseconds, seconds etc) +// NOTE: Do not create a StopWatch object by hand, use a Scope to get a new instance of the StopWatch object +type StopWatch struct { + prometheus.Observer + outputScale time.Duration +} + +// Start creates a new Instance of the StopWatch called a Timer that is closeable/stoppable. +// Common pattern to time a scope would be +// { +// timer := stopWatch.Start() +// defer timer.Stop() +// .... +// } +func (s StopWatch) Start() Timer { + return Timer{ + start: time.Now(), + outputScale: s.outputScale, + timer: s.Observer, + } +} + +// Observes specified duration between the start and end time +func (s StopWatch) Observe(start, end time.Time) { + observed := end.Sub(start).Nanoseconds() + outputScaleDuration := s.outputScale.Nanoseconds() + if outputScaleDuration == 0 { + s.Observer.Observe(0) + return + } + scaled := float64(observed / outputScaleDuration) + s.Observer.Observe(scaled) +} + +// Observes/records the time to execute the given function synchronously +func (s StopWatch) Time(f func()) { + t := s.Start() + f() + t.Stop() +} + +// A Simple StopWatch that works with prometheus summary +// It will scale the output to match the expected time scale (milliseconds, seconds etc) +// NOTE: Do not create a StopWatch object by hand, use a Scope to get a new instance of the StopWatch object +type StopWatchVec struct { + *prometheus.SummaryVec + outputScale time.Duration +} + +// Gets a concrete StopWatch instance that can be used to start a timer and record observations. +func (s StopWatchVec) WithLabelValues(values ...string) StopWatch { + return StopWatch{ + Observer: s.SummaryVec.WithLabelValues(values...), + outputScale: s.outputScale, + } +} + +func (s StopWatchVec) GetMetricWith(labels prometheus.Labels) (StopWatch, error) { + sVec, err := s.SummaryVec.GetMetricWith(labels) + if err != nil { + return StopWatch{}, err + } + return StopWatch{ + Observer: sVec, + outputScale: s.outputScale, + }, nil +} + +// This is a stoppable instance of a StopWatch or a Timer +// A Timer can only be stopped. On stopping it will output the elapsed duration to prometheus +type Timer struct { + start time.Time + outputScale time.Duration + timer prometheus.Observer +} + +// This method observes the elapsed duration since the creation of the timer. The timer is created using a StopWatch +func (s Timer) Stop() float64 { + observed := time.Since(s.start).Nanoseconds() + outputScaleDuration := s.outputScale.Nanoseconds() + if outputScaleDuration == 0 { + s.timer.Observe(0) + return 0 + } + scaled := float64(observed / outputScaleDuration) + s.timer.Observe(scaled) + return scaled +} + +// A Scope represents a prefix in Prometheus. It is nestable, thus every metric that is published does not need to +// provide a prefix, but just the name of the metric. As long as the Scope is used to create a new instance of the metric +// The prefix (or scope) is automatically set. +type Scope interface { + // Creates new prometheus.Gauge metric with the prefix as the CurrentScope + // Name is a string that follows prometheus conventions (mostly [_a-z]) + // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information + NewGauge(name, description string) (prometheus.Gauge, error) + MustNewGauge(name, description string) prometheus.Gauge + + // Creates new prometheus.GaugeVec metric with the prefix as the CurrentScope + // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information + NewGaugeVec(name, description string, labelNames ...string) (*prometheus.GaugeVec, error) + MustNewGaugeVec(name, description string, labelNames ...string) *prometheus.GaugeVec + + // Creates new prometheus.Summary metric with the prefix as the CurrentScope + // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information + NewSummary(name, description string) (prometheus.Summary, error) + MustNewSummary(name, description string) prometheus.Summary + + // Creates new prometheus.SummaryVec metric with the prefix as the CurrentScope + // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information + NewSummaryVec(name, description string, labelNames ...string) (*prometheus.SummaryVec, error) + MustNewSummaryVec(name, description string, labelNames ...string) *prometheus.SummaryVec + + // Creates new prometheus.Histogram metric with the prefix as the CurrentScope + // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information + NewHistogram(name, description string) (prometheus.Histogram, error) + MustNewHistogram(name, description string) prometheus.Histogram + + // Creates new prometheus.HistogramVec metric with the prefix as the CurrentScope + // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information + NewHistogramVec(name, description string, labelNames ...string) (*prometheus.HistogramVec, error) + MustNewHistogramVec(name, description string, labelNames ...string) *prometheus.HistogramVec + + // Creates new prometheus.Counter metric with the prefix as the CurrentScope + // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information + // Important to note, counters are not like typical counters. These are ever increasing and cumulative. + // So if you want to observe counters within buckets use Summary/Histogram + NewCounter(name, description string) (prometheus.Counter, error) + MustNewCounter(name, description string) prometheus.Counter + + // Creates new prometheus.GaugeVec metric with the prefix as the CurrentScope + // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information + NewCounterVec(name, description string, labelNames ...string) (*prometheus.CounterVec, error) + MustNewCounterVec(name, description string, labelNames ...string) *prometheus.CounterVec + + // This is a custom wrapper to create a StopWatch object in the current Scope. + // Duration is to specify the scale of the Timer. For example if you are measuring times in milliseconds + // pass scale=times.Millisecond + // https://golang.org/pkg/time/#Duration + // The metric name is auto-suffixed with the right scale. Refer to DurationToString to understand + NewStopWatch(name, description string, scale time.Duration) (StopWatch, error) + MustNewStopWatch(name, description string, scale time.Duration) StopWatch + + // This is a custom wrapper to create a StopWatch object in the current Scope. + // Duration is to specify the scale of the Timer. For example if you are measuring times in milliseconds + // pass scale=times.Millisecond + // https://golang.org/pkg/time/#Duration + // The metric name is auto-suffixed with the right scale. Refer to DurationToString to understand + NewStopWatchVec(name, description string, scale time.Duration, labelNames ...string) (*StopWatchVec, error) + MustNewStopWatchVec(name, description string, scale time.Duration, labelNames ...string) *StopWatchVec + + // In case nesting is desired for metrics, create a new subScope. This is generally useful in creating + // Scoped and SubScoped metrics + NewSubScope(name string) Scope + + // Returns the current ScopeName. Use for creating your own metrics + CurrentScope() string + + // Method that provides a scoped metric name. Can be used, if you want to directly create your own metric + NewScopedMetricName(name string) string +} + +type metricsScope struct { + scope string +} + +func (m metricsScope) NewGauge(name, description string) (prometheus.Gauge, error) { + g := prometheus.NewGauge( + prometheus.GaugeOpts{ + Name: m.NewScopedMetricName(name), + Help: description, + }, + ) + return g, prometheus.Register(g) +} + +func (m metricsScope) MustNewGauge(name, description string) prometheus.Gauge { + g, err := m.NewGauge(name, description) + panicIfError(err) + return g +} + +func (m metricsScope) NewGaugeVec(name, description string, labelNames ...string) (*prometheus.GaugeVec, error) { + g := prometheus.NewGaugeVec( + prometheus.GaugeOpts{ + Name: m.NewScopedMetricName(name), + Help: description, + }, + labelNames, + ) + return g, prometheus.Register(g) +} + +func (m metricsScope) MustNewGaugeVec(name, description string, labelNames ...string) *prometheus.GaugeVec { + g, err := m.NewGaugeVec(name, description, labelNames...) + panicIfError(err) + return g +} + +func (m metricsScope) NewSummary(name, description string) (prometheus.Summary, error) { + s := prometheus.NewSummary( + prometheus.SummaryOpts{ + Name: m.NewScopedMetricName(name), + Help: description, + }, + ) + + return s, prometheus.Register(s) +} + +func (m metricsScope) MustNewSummary(name, description string) prometheus.Summary { + s, err := m.NewSummary(name, description) + panicIfError(err) + return s +} + +func (m metricsScope) NewSummaryVec(name, description string, labelNames ...string) (*prometheus.SummaryVec, error) { + s := prometheus.NewSummaryVec( + prometheus.SummaryOpts{ + Name: m.NewScopedMetricName(name), + Help: description, + }, + labelNames, + ) + + return s, prometheus.Register(s) +} +func (m metricsScope) MustNewSummaryVec(name, description string, labelNames ...string) *prometheus.SummaryVec { + s, err := m.NewSummaryVec(name, description, labelNames...) + panicIfError(err) + return s +} + +func (m metricsScope) NewHistogram(name, description string) (prometheus.Histogram, error) { + h := prometheus.NewHistogram( + prometheus.HistogramOpts{ + Name: m.NewScopedMetricName(name), + Help: description, + }, + ) + return h, prometheus.Register(h) +} + +func (m metricsScope) MustNewHistogram(name, description string) prometheus.Histogram { + h, err := m.NewHistogram(name, description) + panicIfError(err) + return h +} + +func (m metricsScope) NewHistogramVec(name, description string, labelNames ...string) (*prometheus.HistogramVec, error) { + h := prometheus.NewHistogramVec( + prometheus.HistogramOpts{ + Name: m.NewScopedMetricName(name), + Help: description, + }, + labelNames, + ) + return h, prometheus.Register(h) +} + +func (m metricsScope) MustNewHistogramVec(name, description string, labelNames ...string) *prometheus.HistogramVec { + h, err := m.NewHistogramVec(name, description, labelNames...) + panicIfError(err) + return h +} + +func (m metricsScope) NewCounter(name, description string) (prometheus.Counter, error) { + c := prometheus.NewCounter( + prometheus.CounterOpts{ + Name: m.NewScopedMetricName(name), + Help: description, + }, + ) + return c, prometheus.Register(c) +} + +func (m metricsScope) MustNewCounter(name, description string) prometheus.Counter { + c, err := m.NewCounter(name, description) + panicIfError(err) + return c +} + +func (m metricsScope) NewCounterVec(name, description string, labelNames ...string) (*prometheus.CounterVec, error) { + c := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Name: m.NewScopedMetricName(name), + Help: description, + }, + labelNames, + ) + return c, prometheus.Register(c) +} + +func (m metricsScope) MustNewCounterVec(name, description string, labelNames ...string) *prometheus.CounterVec { + c, err := m.NewCounterVec(name, description, labelNames...) + panicIfError(err) + return c +} + +func (m metricsScope) NewStopWatch(name, description string, scale time.Duration) (StopWatch, error) { + if !strings.HasSuffix(name, defaultMetricDelimiterStr) { + name += defaultMetricDelimiterStr + } + name += DurationToString(scale) + s, err := m.NewSummary(name, description) + if err != nil { + return StopWatch{}, err + } + + return StopWatch{ + Observer: s, + outputScale: scale, + }, nil +} + +func (m metricsScope) MustNewStopWatch(name, description string, scale time.Duration) StopWatch { + s, err := m.NewStopWatch(name, description, scale) + panicIfError(err) + return s +} + +func (m metricsScope) NewStopWatchVec(name, description string, scale time.Duration, labelNames ...string) (*StopWatchVec, error) { + if !strings.HasSuffix(name, defaultMetricDelimiterStr) { + name += defaultMetricDelimiterStr + } + name += DurationToString(scale) + s, err := m.NewSummaryVec(name, description, labelNames...) + if err != nil { + return &StopWatchVec{}, err + } + + return &StopWatchVec{ + SummaryVec: s, + outputScale: scale, + }, nil +} + +func (m metricsScope) MustNewStopWatchVec(name, description string, scale time.Duration, labelNames ...string) *StopWatchVec { + s, err := m.NewStopWatchVec(name, description, scale, labelNames...) + panicIfError(err) + return s +} + +func (m metricsScope) CurrentScope() string { + return m.scope +} + +// Creates a metric name under the scope. Scope will always have a defaultScopeDelimiterRune as the last character +func (m metricsScope) NewScopedMetricName(name string) string { + if name == "" { + panic("metric name cannot be an empty string") + } + + return m.scope + name +} + +func (m metricsScope) NewSubScope(subscopeName string) Scope { + if subscopeName == "" { + panic("scope name cannot be an empty string") + } + + // If the last character of the new subscope is already a defaultScopeDelimiterRune, do not add anything + if !strings.HasSuffix(subscopeName, defaultScopeDelimiterStr) { + subscopeName += defaultScopeDelimiterStr + } + + // Always add a new defaultScopeDelimiterRune to every scope name + return NewScope(m.scope + subscopeName) +} + +// Creates a new scope in the format `name + defaultScopeDelimiterRune` +// If the last character is already a defaultScopeDelimiterRune, then it does not add it to the scope name +func NewScope(name string) Scope { + if name == "" { + panic("base scope for a metric cannot be an empty string") + } + + // If the last character of the new subscope is already a defaultScopeDelimiterRune, do not add anything + if !strings.HasSuffix(name, defaultScopeDelimiterStr) { + name += defaultScopeDelimiterStr + } + + return metricsScope{ + scope: name, + } +} + +// Returns a randomly-named scope for use in tests. +// Prometheus requires that metric names begin with a single word, which is generated from the alphabetic testScopeNameCharset. +func NewTestScope() Scope { + return NewScope("test" + rand.String(6)) +} + +// DurationToString converts the duration to a string suffix that indicates the scale of the timer. +func DurationToString(duration time.Duration) string { + if duration >= time.Hour { + return "h" + } + if duration >= time.Minute { + return "m" + } + if duration >= time.Second { + return "s" + } + if duration >= time.Millisecond { + return "ms" + } + if duration >= time.Microsecond { + return "us" + } + return "ns" +} diff --git a/flytestdlib/promutils/scope_test.go b/flytestdlib/promutils/scope_test.go new file mode 100644 index 0000000000..cb076ee980 --- /dev/null +++ b/flytestdlib/promutils/scope_test.go @@ -0,0 +1,151 @@ +package promutils + +import ( + "testing" + "time" + + "k8s.io/apimachinery/pkg/util/rand" + + "github.com/prometheus/client_golang/prometheus" + "github.com/stretchr/testify/assert" +) + +func TestDurationToString(t *testing.T) { + assert.Equal(t, "m", DurationToString(time.Minute)) + assert.Equal(t, "m", DurationToString(time.Minute*10)) + assert.Equal(t, "h", DurationToString(time.Hour)) + assert.Equal(t, "h", DurationToString(time.Hour*10)) + assert.Equal(t, "s", DurationToString(time.Second)) + assert.Equal(t, "s", DurationToString(time.Second*10)) + assert.Equal(t, "us", DurationToString(time.Microsecond*10)) + assert.Equal(t, "us", DurationToString(time.Microsecond)) + assert.Equal(t, "ms", DurationToString(time.Millisecond*10)) + assert.Equal(t, "ms", DurationToString(time.Millisecond)) + assert.Equal(t, "ns", DurationToString(1)) +} + +func TestNewScope(t *testing.T) { + assert.Panics(t, func() { + NewScope("") + }) + s := NewScope("test") + assert.Equal(t, "test:", s.CurrentScope()) + assert.Equal(t, "test:hello:", s.NewSubScope("hello").CurrentScope()) + assert.Panics(t, func() { + s.NewSubScope("") + }) + assert.Equal(t, "test:timer_x", s.NewScopedMetricName("timer_x")) + assert.Equal(t, "test:hello:timer:", s.NewSubScope("hello").NewSubScope("timer").CurrentScope()) + assert.Equal(t, "test:hello:timer:", s.NewSubScope("hello").NewSubScope("timer:").CurrentScope()) +} + +func TestMetricsScope(t *testing.T) { + s := NewScope("test") + const description = "some x" + if !assert.NotNil(t, prometheus.DefaultRegisterer) { + assert.Fail(t, "Prometheus registrar failed") + } + t.Run("Counter", func(t *testing.T) { + m := s.MustNewCounter("xc", description) + assert.Equal(t, `Desc{fqName: "test:xc", help: "some x", constLabels: {}, variableLabels: []}`, m.Desc().String()) + mv := s.MustNewCounterVec("xcv", description) + assert.NotNil(t, mv) + assert.Panics(t, func() { + _ = s.MustNewCounter("xc", description) + }) + assert.Panics(t, func() { + _ = s.MustNewCounterVec("xcv", description) + }) + }) + + t.Run("Histogram", func(t *testing.T) { + m := s.MustNewHistogram("xh", description) + assert.Equal(t, `Desc{fqName: "test:xh", help: "some x", constLabels: {}, variableLabels: []}`, m.Desc().String()) + mv := s.MustNewHistogramVec("xhv", description) + assert.NotNil(t, mv) + assert.Panics(t, func() { + _ = s.MustNewHistogram("xh", description) + }) + assert.Panics(t, func() { + _ = s.MustNewHistogramVec("xhv", description) + }) + }) + + t.Run("Summary", func(t *testing.T) { + m := s.MustNewSummary("xs", description) + assert.Equal(t, `Desc{fqName: "test:xs", help: "some x", constLabels: {}, variableLabels: []}`, m.Desc().String()) + mv := s.MustNewSummaryVec("xsv", description) + assert.NotNil(t, mv) + assert.Panics(t, func() { + _ = s.MustNewSummary("xs", description) + }) + assert.Panics(t, func() { + _ = s.MustNewSummaryVec("xsv", description) + }) + }) + + t.Run("Gauge", func(t *testing.T) { + m := s.MustNewGauge("xg", description) + assert.Equal(t, `Desc{fqName: "test:xg", help: "some x", constLabels: {}, variableLabels: []}`, m.Desc().String()) + mv := s.MustNewGaugeVec("xgv", description) + assert.NotNil(t, mv) + assert.Panics(t, func() { + m = s.MustNewGauge("xg", description) + }) + assert.Panics(t, func() { + _ = s.MustNewGaugeVec("xgv", description) + }) + }) + + t.Run("Timer", func(t *testing.T) { + m := s.MustNewStopWatch("xt", description, time.Second) + asDesc, ok := m.Observer.(prometheus.Metric) + assert.True(t, ok) + assert.Equal(t, `Desc{fqName: "test:xt_s", help: "some x", constLabels: {}, variableLabels: []}`, asDesc.Desc().String()) + assert.Panics(t, func() { + _ = s.MustNewStopWatch("xt", description, time.Second) + }) + }) + +} + +func TestStopWatch_Start(t *testing.T) { + scope := NewTestScope() + s, e := scope.NewStopWatch("yt"+rand.String(3), "timer", time.Millisecond) + assert.NoError(t, e) + assert.Equal(t, time.Millisecond, s.outputScale) + i := s.Start() + assert.Equal(t, time.Millisecond, i.outputScale) + assert.NotNil(t, i.start) + i.Stop() +} + +func TestStopWatch_Observe(t *testing.T) { + scope := NewTestScope() + s, e := scope.NewStopWatch("yt"+rand.String(3), "timer", time.Millisecond) + assert.NoError(t, e) + assert.Equal(t, time.Millisecond, s.outputScale) + s.Observe(time.Now(), time.Now().Add(time.Second)) +} + +func TestStopWatch_Time(t *testing.T) { + scope := NewTestScope() + s, e := scope.NewStopWatch("yt"+rand.String(3), "timer", time.Millisecond) + assert.NoError(t, e) + assert.Equal(t, time.Millisecond, s.outputScale) + s.Time(func() { + }) +} + +func TestStopWatchVec_WithLabelValues(t *testing.T) { + scope := NewTestScope() + v, e := scope.NewStopWatchVec("yt"+rand.String(3), "timer", time.Millisecond, "workflow", "label") + assert.NoError(t, e) + assert.Equal(t, time.Millisecond, v.outputScale) + s := v.WithLabelValues("my_wf", "something") + assert.NotNil(t, s) + i := s.Start() + assert.Equal(t, time.Millisecond, i.outputScale) + assert.NotNil(t, i.start) + i.Stop() +} diff --git a/flytestdlib/promutils/workqueue.go b/flytestdlib/promutils/workqueue.go new file mode 100644 index 0000000000..24de6a0053 --- /dev/null +++ b/flytestdlib/promutils/workqueue.go @@ -0,0 +1,82 @@ +// Source: https://raw.githubusercontent.com/kubernetes/kubernetes/3dbbd0bdf44cb07fdde85aa392adf99ea7e95939/pkg/util/workqueue/prometheus/prometheus.go +/* +Copyright 2016 The Kubernetes Authors. + +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 promutils + +import ( + "k8s.io/client-go/util/workqueue" + + "github.com/prometheus/client_golang/prometheus" +) + +// Package prometheus sets the workqueue DefaultMetricsFactory to produce +// prometheus metrics. To use this package, you just have to import it. + +func init() { + workqueue.SetProvider(prometheusMetricsProvider{}) +} + +type prometheusMetricsProvider struct{} + +func (prometheusMetricsProvider) NewDepthMetric(name string) workqueue.GaugeMetric { + depth := prometheus.NewGauge(prometheus.GaugeOpts{ + Subsystem: name, + Name: "depth", + Help: "Current depth of workqueue: " + name, + }) + prometheus.MustRegister(depth) + return depth +} + +func (prometheusMetricsProvider) NewAddsMetric(name string) workqueue.CounterMetric { + adds := prometheus.NewCounter(prometheus.CounterOpts{ + Subsystem: name, + Name: "adds", + Help: "Total number of adds handled by workqueue: " + name, + }) + prometheus.MustRegister(adds) + return adds +} + +func (prometheusMetricsProvider) NewLatencyMetric(name string) workqueue.SummaryMetric { + latency := prometheus.NewSummary(prometheus.SummaryOpts{ + Subsystem: name, + Name: "queue_latency_us", + Help: "How long an item stays in workqueue" + name + " before being requested.", + }) + prometheus.MustRegister(latency) + return latency +} + +func (prometheusMetricsProvider) NewWorkDurationMetric(name string) workqueue.SummaryMetric { + workDuration := prometheus.NewSummary(prometheus.SummaryOpts{ + Subsystem: name, + Name: "work_duration_us", + Help: "How long processing an item from workqueue" + name + " takes.", + }) + prometheus.MustRegister(workDuration) + return workDuration +} + +func (prometheusMetricsProvider) NewRetriesMetric(name string) workqueue.CounterMetric { + retries := prometheus.NewCounter(prometheus.CounterOpts{ + Subsystem: name, + Name: "retries", + Help: "Total number of retries handled by workqueue: " + name, + }) + prometheus.MustRegister(retries) + return retries +} diff --git a/flytestdlib/promutils/workqueue_test.go b/flytestdlib/promutils/workqueue_test.go new file mode 100644 index 0000000000..4c5bbcae9e --- /dev/null +++ b/flytestdlib/promutils/workqueue_test.go @@ -0,0 +1,42 @@ +package promutils + +import ( + "testing" + + "github.com/prometheus/client_golang/prometheus" + "github.com/stretchr/testify/assert" +) + +var provider = prometheusMetricsProvider{} + +func TestPrometheusMetricsProvider(t *testing.T) { + t.Run("Adds", func(t *testing.T) { + c := provider.NewAddsMetric("x") + _, ok := c.(prometheus.Counter) + assert.True(t, ok) + }) + + t.Run("Depth", func(t *testing.T) { + c := provider.NewDepthMetric("x") + _, ok := c.(prometheus.Gauge) + assert.True(t, ok) + }) + + t.Run("Latency", func(t *testing.T) { + c := provider.NewLatencyMetric("x") + _, ok := c.(prometheus.Summary) + assert.True(t, ok) + }) + + t.Run("Retries", func(t *testing.T) { + c := provider.NewRetriesMetric("x") + _, ok := c.(prometheus.Counter) + assert.True(t, ok) + }) + + t.Run("WorkDuration", func(t *testing.T) { + c := provider.NewWorkDurationMetric("x") + _, ok := c.(prometheus.Summary) + assert.True(t, ok) + }) +} diff --git a/flytestdlib/sets/generic_set.go b/flytestdlib/sets/generic_set.go new file mode 100644 index 0000000000..abc739f8aa --- /dev/null +++ b/flytestdlib/sets/generic_set.go @@ -0,0 +1,195 @@ +package sets + +import ( + "sort" +) + +type SetObject interface { + GetID() string +} + +type Generic map[string]SetObject + +// New creates a Generic from a list of values. +func NewGeneric(items ...SetObject) Generic { + gs := Generic{} + gs.Insert(items...) + return gs +} + +// Insert adds items to the set. +func (g Generic) Insert(items ...SetObject) { + for _, item := range items { + g[item.GetID()] = item + } +} + +// Delete removes all items from the set. +func (g Generic) Delete(items ...SetObject) { + for _, item := range items { + delete(g, item.GetID()) + } +} + +// Has returns true if and only if item is contained in the set. +func (g Generic) Has(item SetObject) bool { + _, contained := g[item.GetID()] + return contained +} + +// HasAll returns true if and only if all items are contained in the set. +func (g Generic) HasAll(items ...SetObject) bool { + for _, item := range items { + if !g.Has(item) { + return false + } + } + return true +} + +// HasAny returns true if any items are contained in the set. +func (g Generic) HasAny(items ...SetObject) bool { + for _, item := range items { + if g.Has(item) { + return true + } + } + return false +} + +// Difference returns a set of objects that are not in s2 +// For example: +// s1 = {a1, a2, a3} +// s2 = {a1, a2, a4, a5} +// s1.Difference(s2) = {a3} +// s2.Difference(s1) = {a4, a5} +func (g Generic) Difference(g2 Generic) Generic { + result := NewGeneric() + for _, v := range g { + if !g2.Has(v) { + result.Insert(v) + } + } + return result +} + +// Union returns a new set which includes items in either s1 or s2. +// For example: +// s1 = {a1, a2} +// s2 = {a3, a4} +// s1.Union(s2) = {a1, a2, a3, a4} +// s2.Union(s1) = {a1, a2, a3, a4} +func (g Generic) Union(s2 Generic) Generic { + result := NewGeneric() + for _, v := range g { + result.Insert(v) + } + for _, v := range s2 { + result.Insert(v) + } + return result +} + +// Intersection returns a new set which includes the item in BOTH s1 and s2 +// For example: +// s1 = {a1, a2} +// s2 = {a2, a3} +// s1.Intersection(s2) = {a2} +func (g Generic) Intersection(s2 Generic) Generic { + var walk, other Generic + result := NewGeneric() + if g.Len() < s2.Len() { + walk = g + other = s2 + } else { + walk = s2 + other = g + } + for _, v := range walk { + if other.Has(v) { + result.Insert(v) + } + } + return result +} + +// IsSuperset returns true if and only if s1 is a superset of s2. +func (g Generic) IsSuperset(s2 Generic) bool { + for _, v := range s2 { + if !g.Has(v) { + return false + } + } + return true +} + +// Equal returns true if and only if s1 is equal (as a set) to s2. +// Two sets are equal if their membership is identical. +// (In practice, this means same elements, order doesn't matter) +func (g Generic) Equal(s2 Generic) bool { + return len(g) == len(s2) && g.IsSuperset(s2) +} + +type sortableSliceOfGeneric []string + +func (s sortableSliceOfGeneric) Len() int { return len(s) } +func (s sortableSliceOfGeneric) Less(i, j int) bool { return lessString(s[i], s[j]) } +func (s sortableSliceOfGeneric) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// List returns the contents as a sorted string slice. +func (g Generic) ListKeys() []string { + res := make(sortableSliceOfGeneric, 0, len(g)) + for key := range g { + res = append(res, key) + } + sort.Sort(res) + return []string(res) +} + +// List returns the contents as a sorted string slice. +func (g Generic) List() []SetObject { + keys := g.ListKeys() + res := make([]SetObject, 0, len(keys)) + for _, k := range keys { + s := g[k] + res = append(res, s) + } + return res +} + +// UnsortedList returns the slice with contents in random order. +func (g Generic) UnsortedListKeys() []string { + res := make([]string, 0, len(g)) + for key := range g { + res = append(res, key) + } + return res +} + +// UnsortedList returns the slice with contents in random order. +func (g Generic) UnsortedList() []SetObject { + res := make([]SetObject, 0, len(g)) + for _, v := range g { + res = append(res, v) + } + return res +} + +// Returns a single element from the set. +func (g Generic) PopAny() (SetObject, bool) { + for _, v := range g { + g.Delete(v) + return v, true + } + var zeroValue SetObject + return zeroValue, false +} + +// Len returns the size of the set. +func (g Generic) Len() int { + return len(g) +} + +func lessString(lhs, rhs string) bool { + return lhs < rhs +} diff --git a/flytestdlib/sets/generic_set_test.go b/flytestdlib/sets/generic_set_test.go new file mode 100644 index 0000000000..9d9f165ed5 --- /dev/null +++ b/flytestdlib/sets/generic_set_test.go @@ -0,0 +1,116 @@ +package sets + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +type GenericVal string + +func (g GenericVal) GetID() string { + return string(g) +} + +func TestGenericSet(t *testing.T) { + assert.Equal(t, []string{"a", "b"}, NewGeneric(GenericVal("a"), GenericVal("b")).ListKeys()) + assert.Equal(t, []string{"a", "b"}, NewGeneric(GenericVal("a"), GenericVal("b"), GenericVal("a")).ListKeys()) + + { + g1 := NewGeneric(GenericVal("a"), GenericVal("b")) + g2 := NewGeneric(GenericVal("a"), GenericVal("b"), GenericVal("c")) + { + g := g1.Intersection(g2) + assert.Equal(t, []string{"a", "b"}, g.ListKeys()) + } + { + g := g2.Intersection(g1) + assert.Equal(t, []string{"a", "b"}, g.ListKeys()) + } + } + { + g1 := NewGeneric(GenericVal("a"), GenericVal("b")) + g2 := NewGeneric(GenericVal("a"), GenericVal("b"), GenericVal("c")) + g := g2.Difference(g1) + assert.Equal(t, []string{"c"}, g.ListKeys()) + } + { + g1 := NewGeneric(GenericVal("a"), GenericVal("b")) + g2 := NewGeneric(GenericVal("a"), GenericVal("b"), GenericVal("c")) + g := g1.Difference(g2) + assert.Equal(t, []string{}, g.ListKeys()) + } + { + g1 := NewGeneric(GenericVal("a"), GenericVal("b")) + assert.True(t, g1.Has(GenericVal("a"))) + assert.False(t, g1.Has(GenericVal("c"))) + } + { + g1 := NewGeneric(GenericVal("a"), GenericVal("b")) + assert.False(t, g1.HasAll(GenericVal("a"), GenericVal("b"), GenericVal("c"))) + assert.True(t, g1.HasAll(GenericVal("a"), GenericVal("b"))) + } + + { + g1 := NewGeneric(GenericVal("a"), GenericVal("b")) + g2 := NewGeneric(GenericVal("a"), GenericVal("b"), GenericVal("c")) + g := g1.Union(g2) + assert.Equal(t, []string{"a", "b", "c"}, g.ListKeys()) + } + + { + g1 := NewGeneric(GenericVal("a"), GenericVal("b")) + g2 := NewGeneric(GenericVal("a"), GenericVal("b"), GenericVal("c")) + assert.True(t, g2.IsSuperset(g1)) + assert.False(t, g1.IsSuperset(g2)) + } + + { + g1 := NewGeneric(GenericVal("a"), GenericVal("b")) + assert.True(t, g1.Has(GenericVal("a"))) + assert.False(t, g1.Has(GenericVal("c"))) + assert.Equal(t, []SetObject{ + GenericVal("a"), + GenericVal("b"), + }, g1.List()) + g2 := NewGeneric(g1.UnsortedList()...) + assert.True(t, g1.Equal(g2)) + } + { + g1 := NewGeneric(GenericVal("a"), GenericVal("b")) + g2 := NewGeneric(GenericVal("a"), GenericVal("b"), GenericVal("c")) + g3 := NewGeneric(GenericVal("a"), GenericVal("b")) + assert.False(t, g1.Equal(g2)) + assert.True(t, g1.Equal(g3)) + + assert.Equal(t, 2, g1.Len()) + g1.Insert(GenericVal("b")) + assert.Equal(t, 2, g1.Len()) + assert.True(t, g1.Equal(g3)) + g1.Insert(GenericVal("c")) + assert.Equal(t, 3, g1.Len()) + assert.True(t, g1.Equal(g2)) + assert.True(t, g1.HasAny(GenericVal("a"), GenericVal("d"))) + assert.False(t, g1.HasAny(GenericVal("f"), GenericVal("d"))) + g1.Delete(GenericVal("f")) + assert.True(t, g1.Equal(g2)) + g1.Delete(GenericVal("c")) + assert.True(t, g1.Equal(g3)) + + { + p, ok := g1.PopAny() + assert.NotNil(t, p) + assert.True(t, ok) + } + { + p, ok := g1.PopAny() + assert.NotNil(t, p) + assert.True(t, ok) + } + { + p, ok := g1.PopAny() + assert.Nil(t, p) + assert.False(t, ok) + } + } +} diff --git a/flytestdlib/storage/cached_rawstore.go b/flytestdlib/storage/cached_rawstore.go new file mode 100644 index 0000000000..2b539d7bb1 --- /dev/null +++ b/flytestdlib/storage/cached_rawstore.go @@ -0,0 +1,123 @@ +package storage + +import ( + "bytes" + "context" + "io" + "runtime/debug" + "time" + + "github.com/prometheus/client_golang/prometheus" + + "github.com/lyft/flytestdlib/promutils" + + "github.com/coocood/freecache" + "github.com/lyft/flytestdlib/ioutils" + "github.com/lyft/flytestdlib/logger" +) + +const neverExpire = 0 + +// TODO Freecache has bunch of metrics it calculates. Lets write a prom collector to publish these metrics +type cacheMetrics struct { + CacheHit prometheus.Counter + CacheMiss prometheus.Counter + CacheWriteError prometheus.Counter + FetchLatency promutils.StopWatch +} + +type cachedRawStore struct { + RawStore + cache *freecache.Cache + scope promutils.Scope + metrics *cacheMetrics +} + +// Gets metadata about the reference. This should generally be a light weight operation. +func (s *cachedRawStore) Head(ctx context.Context, reference DataReference) (Metadata, error) { + key := []byte(reference) + if oRaw, err := s.cache.Get(key); err == nil { + s.metrics.CacheHit.Inc() + // Found, Cache hit + size := int64(len(oRaw)) + // return size in metadata + return StowMetadata{exists: true, size: size}, nil + } + s.metrics.CacheMiss.Inc() + return s.RawStore.Head(ctx, reference) +} + +// Retrieves a byte array from the Blob store or an error +func (s *cachedRawStore) ReadRaw(ctx context.Context, reference DataReference) (io.ReadCloser, error) { + key := []byte(reference) + if oRaw, err := s.cache.Get(key); err == nil { + // Found, Cache hit + s.metrics.CacheHit.Inc() + return ioutils.NewBytesReadCloser(oRaw), nil + } + s.metrics.CacheMiss.Inc() + reader, err := s.RawStore.ReadRaw(ctx, reference) + if err != nil { + return nil, err + } + + defer func() { + err = reader.Close() + if err != nil { + logger.Warnf(ctx, "Failed to close reader [%v]. Error: %v", reference, err) + } + }() + + b, err := ioutils.ReadAll(reader, s.metrics.FetchLatency.Start()) + if err != nil { + return nil, err + } + + err = s.cache.Set(key, b, 0) + if err != nil { + // TODO Ignore errors in writing to cache? + logger.Debugf(ctx, "Failed to Cache the metadata") + } + + return ioutils.NewBytesReadCloser(b), nil +} + +// Stores a raw byte array. +func (s *cachedRawStore) WriteRaw(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error { + var buf bytes.Buffer + teeReader := io.TeeReader(raw, &buf) + err := s.RawStore.WriteRaw(ctx, reference, size, opts, teeReader) + if err != nil { + return err + } + + err = s.cache.Set([]byte(reference), buf.Bytes(), neverExpire) + if err != nil { + s.metrics.CacheWriteError.Inc() + } + + // TODO ignore errors? + return err +} + +// Creates a CachedStore if Caching is enabled, otherwise returns a RawStore +func newCachedRawStore(cfg *Config, store RawStore, scope promutils.Scope) RawStore { + if cfg.Cache.MaxSizeMegabytes > 0 { + c := &cachedRawStore{ + RawStore: store, + cache: freecache.NewCache(cfg.Cache.MaxSizeMegabytes * 1024 * 1024), + scope: scope, + metrics: &cacheMetrics{ + FetchLatency: scope.MustNewStopWatch("remote_fetch", "Total Time to read from remote metastore", time.Millisecond), + CacheHit: scope.MustNewCounter("cache_hit", "Number of times metadata was found in cache"), + CacheMiss: scope.MustNewCounter("cache_miss", "Number of times metadata was not found in cache and remote fetch was required"), + CacheWriteError: scope.MustNewCounter("cache_write_err", "Failed to write to cache"), + }, + } + if cfg.Cache.TargetGCPercent > 0 { + debug.SetGCPercent(cfg.Cache.TargetGCPercent) + } + return c + } + return store +} diff --git a/flytestdlib/storage/cached_rawstore_test.go b/flytestdlib/storage/cached_rawstore_test.go new file mode 100644 index 0000000000..316f999bf7 --- /dev/null +++ b/flytestdlib/storage/cached_rawstore_test.go @@ -0,0 +1,182 @@ +package storage + +import ( + "bytes" + "context" + "fmt" + "io" + "io/ioutil" + "runtime/debug" + "testing" + + "github.com/lyft/flytestdlib/contextutils" + "github.com/lyft/flytestdlib/promutils/labeled" + + "github.com/lyft/flytestdlib/promutils" + + "github.com/lyft/flytestdlib/ioutils" + "github.com/stretchr/testify/assert" +) + +func init() { + labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) +} + +func TestNewCachedStore(t *testing.T) { + + t.Run("CachingDisabled", func(t *testing.T) { + testScope := promutils.NewTestScope() + cfg := &Config{} + assert.Nil(t, newCachedRawStore(cfg, nil, testScope)) + store, err := NewInMemoryRawStore(cfg, testScope) + assert.NoError(t, err) + assert.Equal(t, store, newCachedRawStore(cfg, store, testScope)) + }) + + t.Run("CachingEnabled", func(t *testing.T) { + testScope := promutils.NewTestScope() + cfg := &Config{ + Cache: CachingConfig{ + MaxSizeMegabytes: 1, + TargetGCPercent: 20, + }, + } + store, err := NewInMemoryRawStore(cfg, testScope) + assert.NoError(t, err) + cStore := newCachedRawStore(cfg, store, testScope) + assert.Equal(t, 20, debug.SetGCPercent(100)) + assert.NotNil(t, cStore) + assert.NotNil(t, cStore.(*cachedRawStore).cache) + }) +} + +func dummyCacheStore(t *testing.T, store RawStore, scope promutils.Scope) *cachedRawStore { + cfg := &Config{ + Cache: CachingConfig{ + MaxSizeMegabytes: 1, + TargetGCPercent: 20, + }, + } + cStore := newCachedRawStore(cfg, store, scope) + assert.NotNil(t, cStore) + return cStore.(*cachedRawStore) +} + +type dummyStore struct { + copyImpl + HeadCb func(ctx context.Context, reference DataReference) (Metadata, error) + ReadRawCb func(ctx context.Context, reference DataReference) (io.ReadCloser, error) + WriteRawCb func(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error +} + +func (d *dummyStore) GetBaseContainerFQN(ctx context.Context) DataReference { + return "dummy" +} + +func (d *dummyStore) Head(ctx context.Context, reference DataReference) (Metadata, error) { + return d.HeadCb(ctx, reference) +} + +func (d *dummyStore) ReadRaw(ctx context.Context, reference DataReference) (io.ReadCloser, error) { + return d.ReadRawCb(ctx, reference) +} + +func (d *dummyStore) WriteRaw(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error { + return d.WriteRawCb(ctx, reference, size, opts, raw) +} + +func TestCachedRawStore(t *testing.T) { + ctx := context.TODO() + k1 := DataReference("k1") + k2 := DataReference("k2") + d1 := []byte("abc") + d2 := []byte("xyz") + writeCalled := false + readCalled := false + store := &dummyStore{ + HeadCb: func(ctx context.Context, reference DataReference) (Metadata, error) { + if reference == "k1" { + return MemoryMetadata{exists: true, size: int64(len(d1))}, nil + } + return MemoryMetadata{}, fmt.Errorf("err") + }, + WriteRawCb: func(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error { + if writeCalled { + assert.FailNow(t, "Should not be writeCalled") + } + writeCalled = true + if reference == "k2" { + b, err := ioutil.ReadAll(raw) + assert.NoError(t, err) + assert.Equal(t, d2, b) + return nil + } + return fmt.Errorf("err") + }, + ReadRawCb: func(ctx context.Context, reference DataReference) (io.ReadCloser, error) { + if readCalled { + assert.FailNow(t, "Should not be invoked again") + } + readCalled = true + if reference == "k1" { + return ioutils.NewBytesReadCloser(d1), nil + } + return nil, fmt.Errorf("err") + }, + } + testScope := promutils.NewTestScope() + + store.copyImpl = newCopyImpl(store, testScope.NewSubScope("copy")) + + cStore := dummyCacheStore(t, store, testScope.NewSubScope("x")) + + t.Run("HeadExists", func(t *testing.T) { + m, err := cStore.Head(ctx, k1) + assert.NoError(t, err) + assert.Equal(t, int64(len(d1)), m.Size()) + assert.True(t, m.Exists()) + }) + + t.Run("HeadNotExists", func(t *testing.T) { + m, err := cStore.Head(ctx, k2) + assert.Error(t, err) + assert.False(t, m.Exists()) + }) + + t.Run("ReadCachePopulate", func(t *testing.T) { + o, err := cStore.ReadRaw(ctx, k1) + assert.NoError(t, err) + b, err := ioutil.ReadAll(o) + assert.NoError(t, err) + assert.Equal(t, d1, b) + assert.True(t, readCalled) + readCalled = false + o, err = cStore.ReadRaw(ctx, k1) + assert.NoError(t, err) + b, err = ioutil.ReadAll(o) + assert.NoError(t, err) + assert.Equal(t, d1, b) + assert.False(t, readCalled) + }) + + t.Run("ReadFail", func(t *testing.T) { + readCalled = false + _, err := cStore.ReadRaw(ctx, k2) + assert.Error(t, err) + assert.True(t, readCalled) + }) + + t.Run("WriteAndRead", func(t *testing.T) { + readCalled = false + assert.NoError(t, cStore.WriteRaw(ctx, k2, int64(len(d2)), Options{}, bytes.NewReader(d2))) + assert.True(t, writeCalled) + + o, err := cStore.ReadRaw(ctx, k2) + assert.NoError(t, err) + b, err := ioutil.ReadAll(o) + assert.NoError(t, err) + assert.Equal(t, d2, b) + assert.False(t, readCalled) + }) + +} diff --git a/flytestdlib/storage/config.go b/flytestdlib/storage/config.go new file mode 100644 index 0000000000..59db0197c3 --- /dev/null +++ b/flytestdlib/storage/config.go @@ -0,0 +1,85 @@ +package storage + +import ( + "context" + + "github.com/lyft/flytestdlib/config" + "github.com/lyft/flytestdlib/logger" +) + +//go:generate pflags Config + +// Defines the storage config type. +type Type = string + +// The reserved config section key for storage. +const configSectionKey = "Storage" + +const ( + TypeMemory Type = "mem" + TypeS3 Type = "s3" + TypeLocal Type = "local" + TypeMinio Type = "minio" +) + +const ( + KiB int64 = 1024 + MiB int64 = 1024 * KiB +) + +var ( + ConfigSection = config.MustRegisterSection(configSectionKey, &Config{}) +) + +// A common storage config. +type Config struct { + Type Type `json:"type" pflag:"\"s3\",Sets the type of storage to configure [s3/minio/local/mem]."` + Connection ConnectionConfig `json:"connection"` + InitContainer string `json:"container" pflag:",Initial container to create -if it doesn't exist-.'"` + // Caching is recommended to improve the performance of underlying systems. It caches the metadata and resolving + // inputs is accelerated. The size of the cache is large so understand how to configure the cache. + // TODO provide some default config choices + // If this section is skipped, Caching is disabled + Cache CachingConfig `json:"cache"` + Limits LimitsConfig `json:"limits" pflag:",Sets limits for stores."` +} + +// Defines connection configurations. +type ConnectionConfig struct { + Endpoint config.URL `json:"endpoint" pflag:",URL for storage client to connect to."` + AuthType string `json:"auth-type" pflag:"\"iam\",Auth Type to use [iam,accesskey]."` + AccessKey string `json:"access-key" pflag:",Access key to use. Only required when authtype is set to accesskey."` + SecretKey string `json:"secret-key" pflag:",Secret to use when accesskey is set."` + Region string `json:"region" pflag:"\"us-east-1\",Region to connect to."` + DisableSSL bool `json:"disable-ssl" pflag:",Disables SSL connection. Should only be used for development."` +} + +type CachingConfig struct { + // Maximum size of the cache where the Blob store data is cached in-memory + // Refer to https://github.com/coocood/freecache to understand how to set the value + // If not specified or set to 0, cache is not used + // NOTE: if Object sizes are larger than 1/1024 of the cache size, the entry will not be written to the cache + // Also refer to https://github.com/coocood/freecache/issues/17 to understand how to set the cache + MaxSizeMegabytes int `json:"max_size_mbs" pflag:",Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used"` + // sets the garbage collection target percentage: + // a collection is triggered when the ratio of freshly allocated data + // to live data remaining after the previous collection reaches this percentage. + // refer to https://golang.org/pkg/runtime/debug/#SetGCPercent + // If not specified or set to 0, GC percent is not tweaked + TargetGCPercent int `json:"target_gc_percent" pflag:",Sets the garbage collection target percentage."` +} + +// Specifies limits for storage package. +type LimitsConfig struct { + GetLimitMegabytes int64 `json:"maxDownloadMBs" pflag:"2,Maximum allowed download size (in MBs) per call."` +} + +// Retrieve current global config for storage. +func GetConfig() *Config { + if c, ok := ConfigSection.GetConfig().(*Config); ok { + return c + } + + logger.Warnf(context.TODO(), "Failed to retrieve config section [%v].", configSectionKey) + return nil +} diff --git a/flytestdlib/storage/config_flags.go b/flytestdlib/storage/config_flags.go new file mode 100755 index 0000000000..9a74efdd64 --- /dev/null +++ b/flytestdlib/storage/config_flags.go @@ -0,0 +1,28 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package storage + +import ( + "fmt" + + "github.com/spf13/pflag" +) + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "type"), "s3", "Sets the type of storage to configure [s3/minio/local/mem].") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.endpoint"), "", "URL for storage client to connect to.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.auth-type"), "iam", "Auth Type to use [iam, accesskey].") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.access-key"), *new(string), "Access key to use. Only required when authtype is set to accesskey.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.secret-key"), *new(string), "Secret to use when accesskey is set.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.region"), "us-east-1", "Region to connect to.") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "connection.disable-ssl"), *new(bool), "Disables SSL connection. Should only be used for development.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "container"), *new(string), "Initial container to create -if it doesn't exist-.'") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.max_size_mbs"), *new(int), "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.target_gc_percent"), *new(int), "Sets the garbage collection target percentage.") + cmdFlags.Int64(fmt.Sprintf("%v%v", prefix, "limits.maxDownloadMBs"), 2, "Maximum allowed download size (in MBs) per call.") + return cmdFlags +} diff --git a/flytestdlib/storage/config_flags_test.go b/flytestdlib/storage/config_flags_test.go new file mode 100755 index 0000000000..2f39f00006 --- /dev/null +++ b/flytestdlib/storage/config_flags_test.go @@ -0,0 +1,344 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package storage + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_Config(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_Config(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) +} + +func testDecodeSlice_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) +} + +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_type", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("type"); err == nil { + assert.Equal(t, string("s3"), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("type", testValue) + if vString, err := cmdFlags.GetString("type"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Type) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_connection.endpoint", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("connection.endpoint"); err == nil { + assert.Equal(t, string(""), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("connection.endpoint", testValue) + if vString, err := cmdFlags.GetString("connection.endpoint"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Connection.Endpoint) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_connection.auth-type", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("connection.auth-type"); err == nil { + assert.Equal(t, string("iam"), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("connection.auth-type", testValue) + if vString, err := cmdFlags.GetString("connection.auth-type"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Connection.AuthType) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_connection.access-key", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("connection.access-key"); err == nil { + assert.Equal(t, string(*new(string)), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("connection.access-key", testValue) + if vString, err := cmdFlags.GetString("connection.access-key"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Connection.AccessKey) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_connection.secret-key", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("connection.secret-key"); err == nil { + assert.Equal(t, string(*new(string)), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("connection.secret-key", testValue) + if vString, err := cmdFlags.GetString("connection.secret-key"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Connection.SecretKey) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_connection.region", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("connection.region"); err == nil { + assert.Equal(t, string("us-east-1"), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("connection.region", testValue) + if vString, err := cmdFlags.GetString("connection.region"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Connection.Region) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_connection.disable-ssl", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("connection.disable-ssl"); err == nil { + assert.Equal(t, bool(*new(bool)), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("connection.disable-ssl", testValue) + if vBool, err := cmdFlags.GetBool("connection.disable-ssl"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Connection.DisableSSL) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_container", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("container"); err == nil { + assert.Equal(t, string(*new(string)), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("container", testValue) + if vString, err := cmdFlags.GetString("container"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.InitContainer) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_cache.max_size_mbs", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vInt, err := cmdFlags.GetInt("cache.max_size_mbs"); err == nil { + assert.Equal(t, int(*new(int)), vInt) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("cache.max_size_mbs", testValue) + if vInt, err := cmdFlags.GetInt("cache.max_size_mbs"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt), &actual.Cache.MaxSizeMegabytes) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_cache.target_gc_percent", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vInt, err := cmdFlags.GetInt("cache.target_gc_percent"); err == nil { + assert.Equal(t, int(*new(int)), vInt) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("cache.target_gc_percent", testValue) + if vInt, err := cmdFlags.GetInt("cache.target_gc_percent"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt), &actual.Cache.TargetGCPercent) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_limits.maxDownloadMBs", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vInt64, err := cmdFlags.GetInt64("limits.maxDownloadMBs"); err == nil { + assert.Equal(t, int64(2), vInt64) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("limits.maxDownloadMBs", testValue) + if vInt64, err := cmdFlags.GetInt64("limits.maxDownloadMBs"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt64), &actual.Limits.GetLimitMegabytes) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytestdlib/storage/config_test.go b/flytestdlib/storage/config_test.go new file mode 100644 index 0000000000..93a5fe887c --- /dev/null +++ b/flytestdlib/storage/config_test.go @@ -0,0 +1,45 @@ +package storage + +import ( + "flag" + "io/ioutil" + "os" + "path/filepath" + "reflect" + "testing" + + "github.com/ghodss/yaml" + "github.com/lyft/flytestdlib/config" + "github.com/lyft/flytestdlib/internal/utils" + "github.com/stretchr/testify/assert" +) + +// Make sure existing config file(s) parse correctly before overriding them with this flag! +var update = flag.Bool("update", false, "Updates testdata") + +func TestMarshal(t *testing.T) { + expected := Config{ + Type: "s3", + Connection: ConnectionConfig{ + Endpoint: config.URL{URL: utils.MustParseURL("http://minio:9000")}, + AuthType: "accesskey", + AccessKey: "minio", + SecretKey: "miniostorage", + Region: "us-east-1", + DisableSSL: true, + }, + } + + if *update { + t.Log("Updating config file.") + raw, err := yaml.Marshal(expected) + assert.NoError(t, err) + assert.NoError(t, ioutil.WriteFile(filepath.Join("testdata", "config.yaml"), raw, os.ModePerm)) + } + + actual := Config{} + raw, err := ioutil.ReadFile(filepath.Join("testdata", "config.yaml")) + assert.NoError(t, err) + assert.NoError(t, yaml.Unmarshal(raw, &actual)) + assert.True(t, reflect.DeepEqual(expected, actual)) +} diff --git a/flytestdlib/storage/copy_impl.go b/flytestdlib/storage/copy_impl.go new file mode 100644 index 0000000000..43f97f026f --- /dev/null +++ b/flytestdlib/storage/copy_impl.go @@ -0,0 +1,60 @@ +package storage + +import ( + "context" + "io" + "time" + + "github.com/lyft/flytestdlib/ioutils" + "github.com/lyft/flytestdlib/promutils" + "github.com/lyft/flytestdlib/promutils/labeled" +) + +type copyImpl struct { + rawStore RawStore + metrics copyMetrics +} + +type copyMetrics struct { + CopyLatency labeled.StopWatch + ComputeLengthLatency labeled.StopWatch +} + +// A naiive implementation for copy that reads all data locally then writes them to destination. +// TODO: We should upstream an API change to stow to implement copy more natively. E.g. Use s3 copy: +// https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectUsingREST.html +func (c copyImpl) CopyRaw(ctx context.Context, source, destination DataReference, opts Options) error { + rc, err := c.rawStore.ReadRaw(ctx, source) + if err != nil { + return err + } + + length := int64(0) + if _, isSeeker := rc.(io.Seeker); !isSeeker { + // If the returned ReadCloser doesn't implement Seeker interface, then the underlying writer won't be able to + // calculate content length on its own. Some implementations (e.g. S3 Stow Store) will error if it can't. + var raw []byte + raw, err = ioutils.ReadAll(rc, c.metrics.ComputeLengthLatency.Start(ctx)) + if err != nil { + return err + } + + length = int64(len(raw)) + } + + return c.rawStore.WriteRaw(ctx, destination, length, Options{}, rc) +} + +func newCopyMetrics(scope promutils.Scope) copyMetrics { + return copyMetrics{ + CopyLatency: labeled.NewStopWatch("overall", "Overall copy latency", time.Millisecond, scope, labeled.EmitUnlabeledMetric), + ComputeLengthLatency: labeled.NewStopWatch("length", "Latency involved in computing length of content before writing.", time.Millisecond, scope, labeled.EmitUnlabeledMetric), + } +} + +func newCopyImpl(store RawStore, metricsScope promutils.Scope) copyImpl { + return copyImpl{ + rawStore: store, + metrics: newCopyMetrics(metricsScope.NewSubScope("copy")), + } +} diff --git a/flytestdlib/storage/copy_impl_test.go b/flytestdlib/storage/copy_impl_test.go new file mode 100644 index 0000000000..fc8d78cd1a --- /dev/null +++ b/flytestdlib/storage/copy_impl_test.go @@ -0,0 +1,82 @@ +package storage + +import ( + "context" + "io" + "testing" + + "github.com/lyft/flytestdlib/ioutils" + "github.com/lyft/flytestdlib/promutils" + "github.com/stretchr/testify/assert" +) + +type notSeekerReader struct { + bytesCount int +} + +func (notSeekerReader) Close() error { + return nil +} + +func (r *notSeekerReader) Read(p []byte) (n int, err error) { + if len(p) < 1 { + return 0, nil + } + + p[0] = byte(10) + + r.bytesCount-- + if r.bytesCount <= 0 { + return 0, io.EOF + } + + return 1, nil +} + +func newNotSeekerReader(bytesCount int) *notSeekerReader { + return ¬SeekerReader{ + bytesCount: bytesCount, + } +} + +func TestCopyRaw(t *testing.T) { + t.Run("Called", func(t *testing.T) { + readerCalled := false + writerCalled := false + store := dummyStore{ + ReadRawCb: func(ctx context.Context, reference DataReference) (closer io.ReadCloser, e error) { + readerCalled = true + return ioutils.NewBytesReadCloser([]byte{}), nil + }, + WriteRawCb: func(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error { + writerCalled = true + return nil + }, + } + + copier := newCopyImpl(&store, promutils.NewTestScope()) + assert.NoError(t, copier.CopyRaw(context.Background(), DataReference("source.pb"), DataReference("dest.pb"), Options{})) + assert.True(t, readerCalled) + assert.True(t, writerCalled) + }) + + t.Run("Not Seeker", func(t *testing.T) { + readerCalled := false + writerCalled := false + store := dummyStore{ + ReadRawCb: func(ctx context.Context, reference DataReference) (closer io.ReadCloser, e error) { + readerCalled = true + return newNotSeekerReader(10), nil + }, + WriteRawCb: func(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error { + writerCalled = true + return nil + }, + } + + copier := newCopyImpl(&store, promutils.NewTestScope()) + assert.NoError(t, copier.CopyRaw(context.Background(), DataReference("source.pb"), DataReference("dest.pb"), Options{})) + assert.True(t, readerCalled) + assert.True(t, writerCalled) + }) +} diff --git a/flytestdlib/storage/localstore.go b/flytestdlib/storage/localstore.go new file mode 100644 index 0000000000..450c102a24 --- /dev/null +++ b/flytestdlib/storage/localstore.go @@ -0,0 +1,48 @@ +package storage + +import ( + "fmt" + + "github.com/lyft/flytestdlib/promutils" + + "github.com/graymeta/stow" + "github.com/graymeta/stow/local" +) + +func getLocalStowConfigMap(cfg *Config) stow.ConfigMap { + stowConfig := stow.ConfigMap{} + if endpoint := cfg.Connection.Endpoint.String(); endpoint != "" { + stowConfig[local.ConfigKeyPath] = endpoint + } + + return stowConfig +} + +// Creates a Data store backed by Stow-S3 raw store. +func newLocalRawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error) { + if cfg.InitContainer == "" { + return nil, fmt.Errorf("initContainer is required") + } + + loc, err := stow.Dial(local.Kind, getLocalStowConfigMap(cfg)) + + if err != nil { + return emptyStore, fmt.Errorf("unable to configure the storage for local. Error: %v", err) + } + + c, err := loc.Container(cfg.InitContainer) + if err != nil { + if IsNotFound(err) { + c, err = loc.CreateContainer(cfg.InitContainer) + if err != nil && !IsExists(err) { + return emptyStore, fmt.Errorf("unable to initialize container [%v]. Error: %v", cfg.InitContainer, err) + } + + return NewStowRawStore(DataReference(c.Name()), c, metricsScope) + } + + return emptyStore, err + } + + return NewStowRawStore(DataReference(c.Name()), c, metricsScope) +} diff --git a/flytestdlib/storage/localstore_test.go b/flytestdlib/storage/localstore_test.go new file mode 100644 index 0000000000..31f8aabeb2 --- /dev/null +++ b/flytestdlib/storage/localstore_test.go @@ -0,0 +1,66 @@ +package storage + +import ( + "context" + "io/ioutil" + "os" + "path/filepath" + "testing" + + "github.com/lyft/flytestdlib/promutils" + + "github.com/lyft/flytestdlib/config" + "github.com/lyft/flytestdlib/internal/utils" + "github.com/stretchr/testify/assert" +) + +func TestNewLocalStore(t *testing.T) { + t.Run("Valid config", func(t *testing.T) { + testScope := promutils.NewTestScope() + store, err := newLocalRawStore(&Config{ + Connection: ConnectionConfig{ + Endpoint: config.URL{URL: utils.MustParseURL("./")}, + }, + InitContainer: "testdata", + }, testScope.NewSubScope("x")) + + assert.NoError(t, err) + assert.NotNil(t, store) + + // Stow local store expects the full path after the container portion (looks like a bug to me) + rc, err := store.ReadRaw(context.TODO(), DataReference("file://testdata/testdata/config.yaml")) + assert.NoError(t, err) + assert.NotNil(t, rc) + assert.NoError(t, rc.Close()) + }) + + t.Run("Invalid config", func(t *testing.T) { + testScope := promutils.NewTestScope() + _, err := newLocalRawStore(&Config{}, testScope) + assert.Error(t, err) + }) + + t.Run("Initialize container", func(t *testing.T) { + testScope := promutils.NewTestScope() + tmpDir, err := ioutil.TempDir("", "stdlib_local") + assert.NoError(t, err) + + stats, err := os.Stat(tmpDir) + assert.NoError(t, err) + assert.NotNil(t, stats) + + store, err := newLocalRawStore(&Config{ + Connection: ConnectionConfig{ + Endpoint: config.URL{URL: utils.MustParseURL(tmpDir)}, + }, + InitContainer: "tmp", + }, testScope.NewSubScope("y")) + + assert.NoError(t, err) + assert.NotNil(t, store) + + stats, err = os.Stat(filepath.Join(tmpDir, "tmp")) + assert.NoError(t, err) + assert.True(t, stats.IsDir()) + }) +} diff --git a/flytestdlib/storage/mem_store.go b/flytestdlib/storage/mem_store.go new file mode 100644 index 0000000000..cc0c5854c0 --- /dev/null +++ b/flytestdlib/storage/mem_store.go @@ -0,0 +1,74 @@ +package storage + +import ( + "bytes" + "context" + "io" + "io/ioutil" + "os" + + "github.com/lyft/flytestdlib/promutils" +) + +type rawFile = []byte + +type InMemoryStore struct { + copyImpl + cache map[DataReference]rawFile +} + +type MemoryMetadata struct { + exists bool + size int64 +} + +func (m MemoryMetadata) Size() int64 { + return m.size +} + +func (m MemoryMetadata) Exists() bool { + return m.exists +} + +func (s *InMemoryStore) Head(ctx context.Context, reference DataReference) (Metadata, error) { + data, found := s.cache[reference] + return MemoryMetadata{exists: found, size: int64(len(data))}, nil +} + +func (s *InMemoryStore) ReadRaw(ctx context.Context, reference DataReference) (io.ReadCloser, error) { + if raw, found := s.cache[reference]; found { + return ioutil.NopCloser(bytes.NewReader(raw)), nil + } + + return nil, os.ErrNotExist +} + +func (s *InMemoryStore) WriteRaw(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) ( + err error) { + + rawBytes, err := ioutil.ReadAll(raw) + if err != nil { + return err + } + + s.cache[reference] = rawBytes + return nil +} + +func (s *InMemoryStore) Clear(ctx context.Context) error { + s.cache = map[DataReference]rawFile{} + return nil +} + +func (s *InMemoryStore) GetBaseContainerFQN(ctx context.Context) DataReference { + return DataReference("") +} + +func NewInMemoryRawStore(_ *Config, scope promutils.Scope) (RawStore, error) { + self := &InMemoryStore{ + cache: map[DataReference]rawFile{}, + } + + self.copyImpl = newCopyImpl(self, scope) + return self, nil +} diff --git a/flytestdlib/storage/mem_store_test.go b/flytestdlib/storage/mem_store_test.go new file mode 100644 index 0000000000..fdfe2b724a --- /dev/null +++ b/flytestdlib/storage/mem_store_test.go @@ -0,0 +1,78 @@ +package storage + +import ( + "bytes" + "context" + "testing" + + "github.com/lyft/flytestdlib/promutils" + + "github.com/stretchr/testify/assert" +) + +func TestInMemoryStore_Head(t *testing.T) { + t.Run("Empty store", func(t *testing.T) { + testScope := promutils.NewTestScope() + s, err := NewInMemoryRawStore(&Config{}, testScope) + assert.NoError(t, err) + metadata, err := s.Head(context.TODO(), DataReference("hello")) + assert.NoError(t, err) + assert.False(t, metadata.Exists()) + }) + + t.Run("Existing Item", func(t *testing.T) { + testScope := promutils.NewTestScope() + s, err := NewInMemoryRawStore(&Config{}, testScope) + assert.NoError(t, err) + err = s.WriteRaw(context.TODO(), DataReference("hello"), 0, Options{}, bytes.NewReader([]byte{})) + assert.NoError(t, err) + + metadata, err := s.Head(context.TODO(), DataReference("hello")) + assert.NoError(t, err) + assert.True(t, metadata.Exists()) + }) +} + +func TestInMemoryStore_ReadRaw(t *testing.T) { + t.Run("Empty store", func(t *testing.T) { + testScope := promutils.NewTestScope() + s, err := NewInMemoryRawStore(&Config{}, testScope) + assert.NoError(t, err) + + raw, err := s.ReadRaw(context.TODO(), DataReference("hello")) + assert.Error(t, err) + assert.Nil(t, raw) + }) + + t.Run("Existing Item", func(t *testing.T) { + testScope := promutils.NewTestScope() + s, err := NewInMemoryRawStore(&Config{}, testScope) + assert.NoError(t, err) + + err = s.WriteRaw(context.TODO(), DataReference("hello"), 0, Options{}, bytes.NewReader([]byte{})) + assert.NoError(t, err) + + _, err = s.ReadRaw(context.TODO(), DataReference("hello")) + assert.NoError(t, err) + }) +} + +func TestInMemoryStore_Clear(t *testing.T) { + testScope := promutils.NewTestScope() + m, err := NewInMemoryRawStore(&Config{}, testScope) + assert.NoError(t, err) + + mStore := m.(*InMemoryStore) + err = m.WriteRaw(context.TODO(), DataReference("hello"), 0, Options{}, bytes.NewReader([]byte("world"))) + assert.NoError(t, err) + + _, err = m.ReadRaw(context.TODO(), DataReference("hello")) + assert.NoError(t, err) + + err = mStore.Clear(context.TODO()) + assert.NoError(t, err) + + _, err = m.ReadRaw(context.TODO(), DataReference("hello")) + assert.Error(t, err) + assert.True(t, IsNotFound(err)) +} diff --git a/flytestdlib/storage/protobuf_store.go b/flytestdlib/storage/protobuf_store.go new file mode 100644 index 0000000000..ba11d3311c --- /dev/null +++ b/flytestdlib/storage/protobuf_store.go @@ -0,0 +1,85 @@ +package storage + +import ( + "bytes" + "context" + "fmt" + "time" + + "github.com/lyft/flytestdlib/logger" + + "github.com/lyft/flytestdlib/ioutils" + "github.com/lyft/flytestdlib/promutils" + "github.com/prometheus/client_golang/prometheus" + + "github.com/golang/protobuf/proto" + errs "github.com/pkg/errors" +) + +type protoMetrics struct { + FetchLatency promutils.StopWatch + MarshalTime promutils.StopWatch + UnmarshalTime promutils.StopWatch + MarshalFailure prometheus.Counter + UnmarshalFailure prometheus.Counter +} + +// Implements ProtobufStore to marshal and unmarshal protobufs to/from a RawStore +type DefaultProtobufStore struct { + RawStore + metrics *protoMetrics +} + +func (s DefaultProtobufStore) ReadProtobuf(ctx context.Context, reference DataReference, msg proto.Message) error { + rc, err := s.ReadRaw(ctx, reference) + if err != nil { + return errs.Wrap(err, fmt.Sprintf("path:%v", reference)) + } + + defer func() { + err = rc.Close() + if err != nil { + logger.Warn(ctx, "Failed to close reference [%v]. Error: %v", reference, err) + } + }() + + docContents, err := ioutils.ReadAll(rc, s.metrics.FetchLatency.Start()) + if err != nil { + return errs.Wrap(err, fmt.Sprintf("readAll: %v", reference)) + } + + t := s.metrics.UnmarshalTime.Start() + err = proto.Unmarshal(docContents, msg) + t.Stop() + if err != nil { + s.metrics.UnmarshalFailure.Inc() + return errs.Wrap(err, fmt.Sprintf("unmarshall: %v", reference)) + } + + return nil +} + +func (s DefaultProtobufStore) WriteProtobuf(ctx context.Context, reference DataReference, opts Options, msg proto.Message) error { + t := s.metrics.MarshalTime.Start() + raw, err := proto.Marshal(msg) + t.Stop() + if err != nil { + s.metrics.MarshalFailure.Inc() + return err + } + + return s.WriteRaw(ctx, reference, int64(len(raw)), opts, bytes.NewReader(raw)) +} + +func NewDefaultProtobufStore(store RawStore, metricsScope promutils.Scope) DefaultProtobufStore { + return DefaultProtobufStore{ + RawStore: store, + metrics: &protoMetrics{ + FetchLatency: metricsScope.MustNewStopWatch("proto_fetch", "Time to read data before unmarshalling", time.Millisecond), + MarshalTime: metricsScope.MustNewStopWatch("marshal", "Time incurred in marshalling data before writing", time.Millisecond), + UnmarshalTime: metricsScope.MustNewStopWatch("unmarshal", "Time incurred in unmarshalling received data", time.Millisecond), + MarshalFailure: metricsScope.MustNewCounter("marshal_failure", "Failures when marshalling"), + UnmarshalFailure: metricsScope.MustNewCounter("unmarshal_failure", "Failures when unmarshalling"), + }, + } +} diff --git a/flytestdlib/storage/protobuf_store_test.go b/flytestdlib/storage/protobuf_store_test.go new file mode 100644 index 0000000000..160239bb73 --- /dev/null +++ b/flytestdlib/storage/protobuf_store_test.go @@ -0,0 +1,41 @@ +package storage + +import ( + "context" + "testing" + + "github.com/lyft/flytestdlib/promutils" + + "github.com/golang/protobuf/proto" + "github.com/stretchr/testify/assert" +) + +type mockProtoMessage struct { + X int64 `protobuf:"varint,2,opt,name=x,json=x,proto3" json:"x,omitempty"` +} + +func (mockProtoMessage) Reset() { +} + +func (m mockProtoMessage) String() string { + return proto.CompactTextString(m) +} + +func (mockProtoMessage) ProtoMessage() { +} + +func TestDefaultProtobufStore_ReadProtobuf(t *testing.T) { + t.Run("Read after Write", func(t *testing.T) { + testScope := promutils.NewTestScope() + s, err := NewDataStore(&Config{Type: TypeMemory}, testScope) + assert.NoError(t, err) + + err = s.WriteProtobuf(context.TODO(), DataReference("hello"), Options{}, &mockProtoMessage{X: 5}) + assert.NoError(t, err) + + m := &mockProtoMessage{} + err = s.ReadProtobuf(context.TODO(), DataReference("hello"), m) + assert.NoError(t, err) + assert.Equal(t, int64(5), m.X) + }) +} diff --git a/flytestdlib/storage/rawstores.go b/flytestdlib/storage/rawstores.go new file mode 100644 index 0000000000..4a6d35573c --- /dev/null +++ b/flytestdlib/storage/rawstores.go @@ -0,0 +1,40 @@ +package storage + +import ( + "fmt" + + "github.com/lyft/flytestdlib/promutils" +) + +type dataStoreCreateFn func(cfg *Config, metricsScope promutils.Scope) (RawStore, error) + +var stores = map[string]dataStoreCreateFn{ + TypeMemory: NewInMemoryRawStore, + TypeLocal: newLocalRawStore, + TypeMinio: newS3RawStore, + TypeS3: newS3RawStore, +} + +// Creates a new Data Store with the supplied config. +func NewDataStore(cfg *Config, metricsScope promutils.Scope) (s *DataStore, err error) { + var rawStore RawStore + if fn, found := stores[cfg.Type]; found { + rawStore, err = fn(cfg, metricsScope) + if err != nil { + return &emptyStore, err + } + + protoStore := NewDefaultProtobufStore(newCachedRawStore(cfg, rawStore, metricsScope), metricsScope) + return NewCompositeDataStore(URLPathConstructor{}, protoStore), nil + } + + return &emptyStore, fmt.Errorf("type is of an invalid value [%v]", cfg.Type) +} + +// Composes a new DataStore. +func NewCompositeDataStore(refConstructor ReferenceConstructor, composedProtobufStore ComposedProtobufStore) *DataStore { + return &DataStore{ + ReferenceConstructor: refConstructor, + ComposedProtobufStore: composedProtobufStore, + } +} diff --git a/flytestdlib/storage/s3store.go b/flytestdlib/storage/s3store.go new file mode 100644 index 0000000000..3c96730e0a --- /dev/null +++ b/flytestdlib/storage/s3store.go @@ -0,0 +1,102 @@ +package storage + +import ( + "context" + "fmt" + + "github.com/lyft/flytestdlib/promutils" + + "github.com/aws/aws-sdk-go/aws/awserr" + awsS3 "github.com/aws/aws-sdk-go/service/s3" + "github.com/lyft/flytestdlib/logger" + "github.com/pkg/errors" + + "github.com/graymeta/stow" + "github.com/graymeta/stow/s3" +) + +func getStowConfigMap(cfg *Config) stow.ConfigMap { + // Non-nullable fields + stowConfig := stow.ConfigMap{ + s3.ConfigAuthType: cfg.Connection.AuthType, + s3.ConfigRegion: cfg.Connection.Region, + } + + // Fields that differ between minio and real S3 + if endpoint := cfg.Connection.Endpoint.String(); endpoint != "" { + stowConfig[s3.ConfigEndpoint] = endpoint + } + + if accessKey := cfg.Connection.AccessKey; accessKey != "" { + stowConfig[s3.ConfigAccessKeyID] = accessKey + } + + if secretKey := cfg.Connection.SecretKey; secretKey != "" { + stowConfig[s3.ConfigSecretKey] = secretKey + } + + if disableSsl := cfg.Connection.DisableSSL; disableSsl { + stowConfig[s3.ConfigDisableSSL] = "True" + } + + return stowConfig + +} + +func s3FQN(bucket string) DataReference { + return DataReference(fmt.Sprintf("s3://%s", bucket)) +} + +func newS3RawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error) { + if cfg.InitContainer == "" { + return nil, fmt.Errorf("initContainer is required") + } + + loc, err := stow.Dial(s3.Kind, getStowConfigMap(cfg)) + + if err != nil { + return emptyStore, fmt.Errorf("unable to configure the storage for s3. Error: %v", err) + } + + c, err := loc.Container(cfg.InitContainer) + if err != nil { + if IsNotFound(err) || awsBucketIsNotFound(err) { + c, err := loc.CreateContainer(cfg.InitContainer) + if err != nil { + // If the container's already created, move on. Otherwise, fail with error. + if awsBucketAlreadyExists(err) { + logger.Infof(context.TODO(), "Storage init-container already exists [%v].", cfg.InitContainer) + return NewStowRawStore(s3FQN(c.Name()), c, metricsScope) + } + } + return emptyStore, fmt.Errorf("unable to initialize container [%v]. Error: %v", cfg.InitContainer, err) + } + return emptyStore, err + } + + return NewStowRawStore(s3FQN(c.Name()), c, metricsScope) +} + +func awsBucketIsNotFound(err error) bool { + if IsNotFound(err) { + return true + } + + if awsErr, errOk := errors.Cause(err).(awserr.Error); errOk { + return awsErr.Code() == awsS3.ErrCodeNoSuchBucket + } + + return false +} + +func awsBucketAlreadyExists(err error) bool { + if IsExists(err) { + return true + } + + if awsErr, errOk := errors.Cause(err).(awserr.Error); errOk { + return awsErr.Code() == awsS3.ErrCodeBucketAlreadyOwnedByYou + } + + return false +} diff --git a/flytestdlib/storage/s3stsore_test.go b/flytestdlib/storage/s3stsore_test.go new file mode 100644 index 0000000000..2e8674a834 --- /dev/null +++ b/flytestdlib/storage/s3stsore_test.go @@ -0,0 +1,26 @@ +package storage + +import ( + "testing" + + "github.com/lyft/flytestdlib/promutils" + + "github.com/lyft/flytestdlib/config" + "github.com/lyft/flytestdlib/internal/utils" + "github.com/stretchr/testify/assert" +) + +func TestNewS3RawStore(t *testing.T) { + t.Run("Missing required config", func(t *testing.T) { + testScope := promutils.NewTestScope() + _, err := NewDataStore(&Config{ + Type: TypeMinio, + InitContainer: "some-container", + Connection: ConnectionConfig{ + Endpoint: config.URL{URL: utils.MustParseURL("http://minio:9000")}, + }, + }, testScope) + + assert.Error(t, err) + }) +} diff --git a/flytestdlib/storage/storage.go b/flytestdlib/storage/storage.go new file mode 100644 index 0000000000..ffbc2c62b0 --- /dev/null +++ b/flytestdlib/storage/storage.go @@ -0,0 +1,95 @@ +// Defines extensible storage interface. +// This package registers "storage" config section that maps to Config struct. Use NewDataStore(cfg) to initialize a +// DataStore with the provided config. The package provides default implementation to access local, S3 (and minio), +// and In-Memory storage. Use NewCompositeDataStore to swap any portions of the DataStore interface with an external +// implementation (e.g. a cached protobuf store). The underlying storage is provided by extensible "stow" library. You +// can use NewStowRawStore(cfg) to create a Raw store based on any other stow-supported configs (e.g. Azure Blob Storage) +package storage + +import ( + "context" + "strings" + + "io" + "net/url" + + "github.com/golang/protobuf/proto" +) + +// Defines a reference to data location. +type DataReference string + +var emptyStore = DataStore{} + +// Holder for recording storage options. It is used to pass Metadata (like headers for S3) and also tags or labels for +// objects +type Options struct { + Metadata map[string]interface{} +} + +// Placeholder for data reference metadata. +type Metadata interface { + Exists() bool + Size() int64 +} + +// A simplified interface for accessing and storing data in one of the Cloud stores. +// Today we rely on Stow for multi-cloud support, but this interface abstracts that part +type DataStore struct { + ComposedProtobufStore + ReferenceConstructor +} + +// Defines a low level interface for accessing and storing bytes. +type RawStore interface { + // returns a FQN DataReference with the configured base init container + GetBaseContainerFQN(ctx context.Context) DataReference + + // Gets metadata about the reference. This should generally be a light weight operation. + Head(ctx context.Context, reference DataReference) (Metadata, error) + + // Retrieves a byte array from the Blob store or an error + ReadRaw(ctx context.Context, reference DataReference) (io.ReadCloser, error) + + // Stores a raw byte array. + WriteRaw(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error + + // Copies from source to destination. + CopyRaw(ctx context.Context, source, destination DataReference, opts Options) error +} + +// Defines an interface for building data reference paths. +type ReferenceConstructor interface { + // Creates a new dataReference that matches the storage structure. + ConstructReference(ctx context.Context, reference DataReference, nestedKeys ...string) (DataReference, error) +} + +// Defines an interface for reading and writing protobuf messages +type ProtobufStore interface { + // Retrieves the entire blob from blobstore and unmarshals it to the passed protobuf + ReadProtobuf(ctx context.Context, reference DataReference, msg proto.Message) error + + // Serializes and stores the protobuf. + WriteProtobuf(ctx context.Context, reference DataReference, opts Options, msg proto.Message) error +} + +// A ProtobufStore needs a RawStore to get the RawData. This interface provides all the necessary components to make +// Protobuf fetching work +type ComposedProtobufStore interface { + RawStore + ProtobufStore +} + +// Splits the data reference into parts. +func (r DataReference) Split() (scheme, container, key string, err error) { + u, err := url.Parse(string(r)) + if err != nil { + return "", "", "", err + } + + return u.Scheme, u.Host, strings.Trim(u.Path, "/"), nil +} + +func (r DataReference) String() string { + return string(r) +} diff --git a/flytestdlib/storage/storage_test.go b/flytestdlib/storage/storage_test.go new file mode 100644 index 0000000000..1895b0ac5f --- /dev/null +++ b/flytestdlib/storage/storage_test.go @@ -0,0 +1,52 @@ +package storage + +import ( + "context" + "fmt" + "strings" + "testing" + + "github.com/lyft/flytestdlib/promutils" + + "github.com/stretchr/testify/assert" +) + +func TestDataReference_Split(t *testing.T) { + input := DataReference("s3://container/path/to/file") + scheme, container, key, err := input.Split() + + assert.NoError(t, err) + assert.Equal(t, "s3", scheme) + assert.Equal(t, "container", container) + assert.Equal(t, "path/to/file", key) +} + +func ExampleNewDataStore() { + testScope := promutils.NewTestScope() + ctx := context.Background() + fmt.Println("Creating in memory data store.") + store, err := NewDataStore(&Config{ + Type: TypeMemory, + }, testScope.NewSubScope("exp_new")) + + if err != nil { + fmt.Printf("Failed to create data store. Error: %v", err) + } + + ref, err := store.ConstructReference(ctx, DataReference("root"), "subkey", "subkey2") + if err != nil { + fmt.Printf("Failed to construct data reference. Error: %v", err) + } + + fmt.Printf("Constructed data reference [%v] and writing data to it.\n", ref) + + dataToStore := "hello world" + err = store.WriteRaw(ctx, ref, int64(len(dataToStore)), Options{}, strings.NewReader(dataToStore)) + if err != nil { + fmt.Printf("Failed to write data. Error: %v", err) + } + + // Output: + // Creating in memory data store. + // Constructed data reference [/root/subkey/subkey2] and writing data to it. +} diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go new file mode 100644 index 0000000000..b13170bf09 --- /dev/null +++ b/flytestdlib/storage/stow_store.go @@ -0,0 +1,174 @@ +package storage + +import ( + "context" + "io" + "time" + + "github.com/prometheus/client_golang/prometheus" + + "github.com/lyft/flytestdlib/promutils" + + "github.com/graymeta/stow" + errs "github.com/pkg/errors" +) + +type stowMetrics struct { + BadReference prometheus.Counter + BadContainer prometheus.Counter + + HeadFailure prometheus.Counter + HeadLatency promutils.StopWatch + + ReadFailure prometheus.Counter + ReadOpenLatency promutils.StopWatch + + WriteFailure prometheus.Counter + WriteLatency promutils.StopWatch +} + +// Implements DataStore to talk to stow location store. +type StowStore struct { + stow.Container + copyImpl + metrics *stowMetrics + containerBaseFQN DataReference +} + +type StowMetadata struct { + exists bool + size int64 +} + +func (s StowMetadata) Size() int64 { + return s.size +} + +func (s StowMetadata) Exists() bool { + return s.exists +} + +func (s *StowStore) getContainer(container string) (c stow.Container, err error) { + if s.Container.Name() != container { + s.metrics.BadContainer.Inc() + return nil, stow.ErrNotFound + } + + return s.Container, nil +} + +func (s *StowStore) Head(ctx context.Context, reference DataReference) (Metadata, error) { + _, c, k, err := reference.Split() + if err != nil { + s.metrics.BadReference.Inc() + return nil, err + } + + container, err := s.getContainer(c) + if err != nil { + return nil, err + } + + t := s.metrics.HeadLatency.Start() + item, err := container.Item(k) + if err == nil { + if _, err = item.Metadata(); err == nil { + size, err := item.Size() + if err == nil { + t.Stop() + return StowMetadata{ + exists: true, + size: size, + }, nil + } + } + } + s.metrics.HeadFailure.Inc() + if IsNotFound(err) { + return StowMetadata{exists: false}, nil + } + return StowMetadata{exists: false}, errs.Wrapf(err, "path:%v", k) +} + +func (s *StowStore) ReadRaw(ctx context.Context, reference DataReference) (io.ReadCloser, error) { + _, c, k, err := reference.Split() + if err != nil { + s.metrics.BadReference.Inc() + return nil, err + } + + container, err := s.getContainer(c) + if err != nil { + return nil, err + } + + t := s.metrics.ReadOpenLatency.Start() + item, err := container.Item(k) + if err != nil { + s.metrics.ReadFailure.Inc() + return nil, err + } + t.Stop() + + sizeBytes, err := item.Size() + if err != nil { + return nil, err + } + + if sizeBytes/MiB > GetConfig().Limits.GetLimitMegabytes { + return nil, ErrExceedsLimit + } + + return item.Open() +} + +func (s *StowStore) WriteRaw(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error { + _, c, k, err := reference.Split() + if err != nil { + s.metrics.BadReference.Inc() + return err + } + + container, err := s.getContainer(c) + if err != nil { + return err + } + + t := s.metrics.WriteLatency.Start() + _, err = container.Put(k, raw, size, opts.Metadata) + if err != nil { + s.metrics.WriteFailure.Inc() + return errs.Wrapf(err, "Failed to write data [%vb] to path [%v].", size, k) + } + t.Stop() + + return nil +} + +func (s *StowStore) GetBaseContainerFQN(ctx context.Context) DataReference { + return s.containerBaseFQN +} + +func NewStowRawStore(containerBaseFQN DataReference, container stow.Container, metricsScope promutils.Scope) (*StowStore, error) { + self := &StowStore{ + Container: container, + containerBaseFQN: containerBaseFQN, + metrics: &stowMetrics{ + BadReference: metricsScope.MustNewCounter("bad_key", "Indicates the provided storage reference/key is incorrectly formatted"), + BadContainer: metricsScope.MustNewCounter("bad_container", "Indicates request for a container that has not been initialized"), + + HeadFailure: metricsScope.MustNewCounter("head_failure", "Indicates failure in HEAD for a given reference"), + HeadLatency: metricsScope.MustNewStopWatch("head", "Indicates time to fetch metadata using the Head API", time.Millisecond), + + ReadFailure: metricsScope.MustNewCounter("read_failure", "Indicates failure in GET for a given reference"), + ReadOpenLatency: metricsScope.MustNewStopWatch("read_open", "Indicates time to first byte when reading", time.Millisecond), + + WriteFailure: metricsScope.MustNewCounter("write_failure", "Indicates failure in storing/PUT for a given reference"), + WriteLatency: metricsScope.MustNewStopWatch("write", "Time to write an object irrespective of size", time.Millisecond), + }, + } + + self.copyImpl = newCopyImpl(self, metricsScope) + + return self, nil +} diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go new file mode 100644 index 0000000000..f0fd282340 --- /dev/null +++ b/flytestdlib/storage/stow_store_test.go @@ -0,0 +1,133 @@ +package storage + +import ( + "bytes" + "context" + "io" + "io/ioutil" + "net/url" + "testing" + "time" + + "github.com/lyft/flytestdlib/promutils" + + "github.com/graymeta/stow" + "github.com/stretchr/testify/assert" +) + +type mockStowContainer struct { + id string + items map[string]mockStowItem +} + +func (m mockStowContainer) ID() string { + return m.id +} + +func (m mockStowContainer) Name() string { + return m.id +} + +func (m mockStowContainer) Item(id string) (stow.Item, error) { + if item, found := m.items[id]; found { + return item, nil + } + + return nil, stow.ErrNotFound +} + +func (mockStowContainer) Items(prefix, cursor string, count int) ([]stow.Item, string, error) { + return []stow.Item{}, "", nil +} + +func (mockStowContainer) RemoveItem(id string) error { + return nil +} + +func (m *mockStowContainer) Put(name string, r io.Reader, size int64, metadata map[string]interface{}) (stow.Item, error) { + item := mockStowItem{url: name, size: size} + m.items[name] = item + return item, nil +} + +func newMockStowContainer(id string) *mockStowContainer { + return &mockStowContainer{ + id: id, + items: map[string]mockStowItem{}, + } +} + +type mockStowItem struct { + url string + size int64 +} + +func (m mockStowItem) ID() string { + return m.url +} + +func (m mockStowItem) Name() string { + return m.url +} + +func (m mockStowItem) URL() *url.URL { + u, err := url.Parse(m.url) + if err != nil { + panic(err) + } + + return u +} + +func (m mockStowItem) Size() (int64, error) { + return m.size, nil +} + +func (mockStowItem) Open() (io.ReadCloser, error) { + return ioutil.NopCloser(bytes.NewReader([]byte{})), nil +} + +func (mockStowItem) ETag() (string, error) { + return "", nil +} + +func (mockStowItem) LastMod() (time.Time, error) { + return time.Now(), nil +} + +func (mockStowItem) Metadata() (map[string]interface{}, error) { + return map[string]interface{}{}, nil +} + +func TestStowStore_ReadRaw(t *testing.T) { + t.Run("Happy Path", func(t *testing.T) { + testScope := promutils.NewTestScope() + s, err := NewStowRawStore(s3FQN("container"), newMockStowContainer("container"), testScope) + assert.NoError(t, err) + err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) + assert.NoError(t, err) + metadata, err := s.Head(context.TODO(), DataReference("s3://container/path")) + assert.NoError(t, err) + assert.True(t, metadata.Exists()) + raw, err := s.ReadRaw(context.TODO(), DataReference("s3://container/path")) + assert.NoError(t, err) + rawBytes, err := ioutil.ReadAll(raw) + assert.NoError(t, err) + assert.Equal(t, 0, len(rawBytes)) + assert.Equal(t, DataReference("s3://container"), s.GetBaseContainerFQN(context.TODO())) + }) + + t.Run("Exceeds limit", func(t *testing.T) { + testScope := promutils.NewTestScope() + s, err := NewStowRawStore(s3FQN("container"), newMockStowContainer("container"), testScope) + assert.NoError(t, err) + err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 3*MiB, Options{}, bytes.NewReader([]byte{})) + assert.NoError(t, err) + metadata, err := s.Head(context.TODO(), DataReference("s3://container/path")) + assert.NoError(t, err) + assert.True(t, metadata.Exists()) + _, err = s.ReadRaw(context.TODO(), DataReference("s3://container/path")) + assert.Error(t, err) + assert.True(t, IsExceedsLimit(err)) + }) +} diff --git a/flytestdlib/storage/testdata/config.yaml b/flytestdlib/storage/testdata/config.yaml new file mode 100755 index 0000000000..d8664ca347 --- /dev/null +++ b/flytestdlib/storage/testdata/config.yaml @@ -0,0 +1,14 @@ +cache: + max_size_mbs: 0 + target_gc_percent: 0 +connection: + access-key: minio + auth-type: accesskey + disable-ssl: true + endpoint: http://minio:9000 + region: us-east-1 + secret-key: miniostorage +container: "" +limits: + maxDownloadMBs: 0 +type: s3 diff --git a/flytestdlib/storage/url_path.go b/flytestdlib/storage/url_path.go new file mode 100644 index 0000000000..94e26e317a --- /dev/null +++ b/flytestdlib/storage/url_path.go @@ -0,0 +1,44 @@ +package storage + +import ( + "context" + "fmt" + + "github.com/pkg/errors" + + "net/url" + "os" + "path/filepath" + + "github.com/lyft/flytestdlib/logger" +) + +// Implements ReferenceConstructor that assumes paths are URL-compatible. +type URLPathConstructor struct { +} + +func ensureEndingPathSeparator(path DataReference) DataReference { + if len(path) > 0 && path[len(path)-1] == os.PathSeparator { + return path + } + + return path + "/" +} + +func (URLPathConstructor) ConstructReference(ctx context.Context, reference DataReference, nestedKeys ...string) (DataReference, error) { + u, err := url.Parse(string(ensureEndingPathSeparator(reference))) + if err != nil { + logger.Errorf(ctx, "Failed to parse prefix: %v", reference) + return "", errors.Wrap(err, fmt.Sprintf("Reference is of an invalid format [%v]", reference)) + } + + rel, err := url.Parse(filepath.Join(nestedKeys...)) + if err != nil { + logger.Errorf(ctx, "Failed to parse nested keys: %v", reference) + return "", errors.Wrap(err, fmt.Sprintf("Reference is of an invalid format [%v]", reference)) + } + + u = u.ResolveReference(rel) + + return DataReference(u.String()), nil +} diff --git a/flytestdlib/storage/url_path_test.go b/flytestdlib/storage/url_path_test.go new file mode 100644 index 0000000000..5dc24661cf --- /dev/null +++ b/flytestdlib/storage/url_path_test.go @@ -0,0 +1,15 @@ +package storage + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestUrlPathConstructor_ConstructReference(t *testing.T) { + s := URLPathConstructor{} + r, err := s.ConstructReference(context.TODO(), DataReference("hello"), "key1", "key2/", "key3") + assert.NoError(t, err) + assert.Equal(t, "/hello/key1/key2/key3", r.String()) +} diff --git a/flytestdlib/storage/utils.go b/flytestdlib/storage/utils.go new file mode 100644 index 0000000000..62fb2aa22c --- /dev/null +++ b/flytestdlib/storage/utils.go @@ -0,0 +1,34 @@ +package storage + +import ( + "fmt" + "os" + + "github.com/graymeta/stow" + "github.com/pkg/errors" +) + +var ErrExceedsLimit = fmt.Errorf("limit exceeded") + +// Gets a value indicating whether the underlying error is a Not Found error. +func IsNotFound(err error) bool { + if root := errors.Cause(err); root == stow.ErrNotFound || os.IsNotExist(root) { + return true + } + + return false +} + +// Gets a value indicating whether the underlying error is "already exists" error. +func IsExists(err error) bool { + if root := errors.Cause(err); os.IsExist(root) { + return true + } + + return false +} + +// Gets a value indicating whether the root cause of error is a "limit exceeded" error. +func IsExceedsLimit(err error) bool { + return errors.Cause(err) == ErrExceedsLimit +} diff --git a/flytestdlib/tests/config_test.go b/flytestdlib/tests/config_test.go new file mode 100644 index 0000000000..15c890cf08 --- /dev/null +++ b/flytestdlib/tests/config_test.go @@ -0,0 +1,78 @@ +package tests + +import ( + "context" + "flag" + "io/ioutil" + "os" + "path/filepath" + "reflect" + "testing" + + "github.com/lyft/flytestdlib/config/viper" + + "github.com/ghodss/yaml" + "github.com/lyft/flytestdlib/config" + "github.com/lyft/flytestdlib/internal/utils" + "github.com/lyft/flytestdlib/logger" + "github.com/lyft/flytestdlib/storage" + "github.com/stretchr/testify/assert" +) + +// Make sure existing config file(s) parse correctly before overriding them with this flag! +var update = flag.Bool("update", false, "Updates testdata") + +func TestStorageAndLoggerConfig(t *testing.T) { + type CompositeConfig struct { + Storage storage.Config `json:"storage"` + Logger logger.Config `json:"logger"` + } + + expected := CompositeConfig{ + Storage: storage.Config{ + Type: "s3", + Connection: storage.ConnectionConfig{ + Endpoint: config.URL{URL: utils.MustParseURL("http://minio:9000")}, + AuthType: "accesskey", + AccessKey: "minio", + SecretKey: "miniostorage", + Region: "us-east-1", + DisableSSL: true, + }, + }, + Logger: logger.Config{ + Level: logger.DebugLevel, + }, + } + + configPath := filepath.Join("testdata", "combined.yaml") + if *update { + t.Log("Updating golden files.") + raw, err := yaml.Marshal(expected) + assert.NoError(t, err) + assert.NoError(t, ioutil.WriteFile(configPath, raw, os.ModePerm)) + } + + actual := CompositeConfig{} + /* #nosec */ + raw, err := ioutil.ReadFile(configPath) + assert.NoError(t, err) + assert.NoError(t, yaml.Unmarshal(raw, &actual)) + assert.True(t, reflect.DeepEqual(expected, actual)) +} + +func TestParseExistingConfig(t *testing.T) { + accessor := viper.NewAccessor(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "combined.yaml")}, + }) + + assert.NoError(t, accessor.UpdateConfig(context.TODO())) + + assert.NotNil(t, storage.ConfigSection) + + if _, ok := storage.ConfigSection.GetConfig().(*storage.Config); ok { + assert.True(t, ok) + } else { + assert.FailNow(t, "Retrieved section is not of type storage.") + } +} diff --git a/flytestdlib/tests/testdata/combined.yaml b/flytestdlib/tests/testdata/combined.yaml new file mode 100755 index 0000000000..f167b1ab33 --- /dev/null +++ b/flytestdlib/tests/testdata/combined.yaml @@ -0,0 +1,19 @@ +logger: + level: 5 + mute: false + show-source: false +storage: + cache: + max_size_mbs: 0 + target_gc_percent: 0 + connection: + access-key: minio + auth-type: accesskey + disable-ssl: true + endpoint: http://minio:9000 + region: us-east-1 + secret-key: miniostorage + container: "" + limits: + maxDownloadMBs: 0 + type: s3 diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go new file mode 100644 index 0000000000..a231bbd7c2 --- /dev/null +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -0,0 +1,99 @@ +package utils + +import ( + "context" + "sync" + "time" + + "github.com/lyft/flytestdlib/logger" + "k8s.io/apimachinery/pkg/util/wait" +) + +// AutoRefreshCache with regular GetOrCreate and Delete along with background asynchronous refresh. Caller provides +// callbacks for create, refresh and delete item. +// The cache doesn't provide apis to update items. +type AutoRefreshCache interface { + // starts background refresh of items + Start(ctx context.Context) + + // Get item by id if exists else null + Get(id string) CacheItem + + // Get object if exists else create it + GetOrCreate(item CacheItem) (CacheItem, error) +} + +type CacheItem interface { + ID() string +} + +type CacheSyncItem func(ctx context.Context, obj CacheItem) (CacheItem, error) + +func NewAutoRefreshCache(syncCb CacheSyncItem, syncRateLimiter RateLimiter, resyncPeriod time.Duration) AutoRefreshCache { + cache := &autoRefreshCache{ + syncCb: syncCb, + syncRateLimiter: syncRateLimiter, + resyncPeriod: resyncPeriod, + } + + return cache +} + +// Thread-safe general purpose auto-refresh cache that watches for updates asynchronously for the keys after they are added to +// the cache. An item can be inserted only once. +// +// Get reads from sync.map while refresh is invoked on a snapshot of keys. Cache eventually catches up on deleted items. +// +// Sync is run as a fixed-interval-scheduled-task, and is skipped if sync from previous cycle is still running. +type autoRefreshCache struct { + syncCb CacheSyncItem + syncMap sync.Map + syncRateLimiter RateLimiter + resyncPeriod time.Duration +} + +func (w *autoRefreshCache) Start(ctx context.Context) { + go wait.Until(func() { w.sync(ctx) }, w.resyncPeriod, ctx.Done()) +} + +func (w *autoRefreshCache) Get(id string) CacheItem { + if val, ok := w.syncMap.Load(id); ok { + return val.(CacheItem) + } + return nil +} + +// Return the item if exists else create it. +// Create should be invoked only once. recreating the object is not supported. +func (w *autoRefreshCache) GetOrCreate(item CacheItem) (CacheItem, error) { + if val, ok := w.syncMap.Load(item.ID()); ok { + return val.(CacheItem), nil + } + + w.syncMap.Store(item.ID(), item) + return item, nil +} + +func (w *autoRefreshCache) sync(ctx context.Context) { + w.syncMap.Range(func(key, value interface{}) bool { + if w.syncRateLimiter != nil { + err := w.syncRateLimiter.Wait(ctx) + if err != nil { + logger.Warnf(ctx, "unexpected failure in rate-limiter wait %v", key) + return true + } + } + item, err := w.syncCb(ctx, value.(CacheItem)) + if err != nil { + logger.Error(ctx, "failed to get latest copy of the item %v", key) + } + + if item == nil { + w.syncMap.Delete(key) + } else { + w.syncMap.Store(key, item) + } + + return true + }) +} diff --git a/flytestdlib/utils/auto_refresh_cache_test.go b/flytestdlib/utils/auto_refresh_cache_test.go new file mode 100644 index 0000000000..85a09ce508 --- /dev/null +++ b/flytestdlib/utils/auto_refresh_cache_test.go @@ -0,0 +1,108 @@ +package utils + +import ( + "context" + "testing" + "time" + + atomic2 "sync/atomic" + + "github.com/lyft/flytestdlib/atomic" + "github.com/stretchr/testify/assert" +) + +type testCacheItem struct { + val int + deleted atomic.Bool + resyncPeriod time.Duration +} + +func (m *testCacheItem) ID() string { + return "id" +} + +func (m *testCacheItem) moveNext() { + // change value and spare enough time for cache to process the change. + m.val++ + time.Sleep(m.resyncPeriod * 5) +} + +func (m *testCacheItem) syncItem(ctx context.Context, obj CacheItem) (CacheItem, error) { + if m.deleted.Load() { + return nil, nil + } + return m, nil +} + +type testAutoIncrementItem struct { + val int32 +} + +func (a *testAutoIncrementItem) ID() string { + return "autoincrement" +} + +func (a *testAutoIncrementItem) syncItem(ctx context.Context, obj CacheItem) (CacheItem, error) { + atomic2.AddInt32(&a.val, 1) + return a, nil +} + +func TestCache(t *testing.T) { + testResyncPeriod := time.Millisecond + rateLimiter := NewRateLimiter("mockLimiter", 100, 1) + + item := &testCacheItem{val: 0, resyncPeriod: testResyncPeriod, deleted: atomic.NewBool(false)} + cache := NewAutoRefreshCache(item.syncItem, rateLimiter, testResyncPeriod) + + //ctx := context.Background() + ctx, cancel := context.WithCancel(context.Background()) + cache.Start(ctx) + + // create + _, err := cache.GetOrCreate(item) + assert.NoError(t, err, "unexpected GetOrCreate failure") + + // synced? + item.moveNext() + m := cache.Get(item.ID()).(*testCacheItem) + assert.Equal(t, 1, m.val) + + // synced again? + item.moveNext() + m = cache.Get(item.ID()).(*testCacheItem) + assert.Equal(t, 2, m.val) + + // removed? + item.moveNext() + item.deleted.Store(true) + time.Sleep(testResyncPeriod * 10) // spare enough time to process remove! + val := cache.Get(item.ID()) + + assert.Nil(t, val) + cancel() +} + +func TestCacheContextCancel(t *testing.T) { + testResyncPeriod := time.Millisecond + rateLimiter := NewRateLimiter("mockLimiter", 10000, 1) + + item := &testAutoIncrementItem{val: 0} + cache := NewAutoRefreshCache(item.syncItem, rateLimiter, testResyncPeriod) + + ctx, cancel := context.WithCancel(context.Background()) + cache.Start(ctx) + _, err := cache.GetOrCreate(item) + assert.NoError(t, err, "failed to add item to cache") + time.Sleep(testResyncPeriod * 10) // spare enough time to process remove! + cancel() + + // Get item + m, err := cache.GetOrCreate(item) + val1 := m.(*testAutoIncrementItem).val + assert.NoError(t, err, "unexpected GetOrCreate failure") + + // wait a few more resync periods and check that nothings has changed as auto-refresh is stopped + time.Sleep(testResyncPeriod * 20) + val2 := m.(*testAutoIncrementItem).val + assert.Equal(t, val1, val2) +} diff --git a/flytestdlib/utils/auto_refresh_example_test.go b/flytestdlib/utils/auto_refresh_example_test.go new file mode 100644 index 0000000000..1c47d39ec5 --- /dev/null +++ b/flytestdlib/utils/auto_refresh_example_test.go @@ -0,0 +1,88 @@ +package utils + +import ( + "context" + "fmt" + "time" +) + +type ExampleItemStatus string + +const ( + ExampleStatusNotStarted ExampleItemStatus = "Not-started" + ExampleStatusStarted ExampleItemStatus = "Started" + ExampleStatusSucceeded ExampleItemStatus = "Completed" +) + +type ExampleCacheItem struct { + status ExampleItemStatus + id string +} + +func (e *ExampleCacheItem) ID() string { + return e.id +} + +type ExampleService struct { + jobStatus map[string]ExampleItemStatus +} + +func newExampleService() *ExampleService { + return &ExampleService{jobStatus: make(map[string]ExampleItemStatus)} +} + +// advance the status to next, and return +func (f *ExampleService) getStatus(id string) *ExampleCacheItem { + if _, ok := f.jobStatus[id]; !ok { + f.jobStatus[id] = ExampleStatusStarted + } + f.jobStatus[id] = ExampleStatusSucceeded + return &ExampleCacheItem{f.jobStatus[id], id} +} + +func ExampleNewAutoRefreshCache() { + // This auto-refresh cache can be used for cases where keys are created by caller but processed by + // an external service and we want to asynchronously keep track of its progress. + exampleService := newExampleService() + + // define a sync method that the cache can use to auto-refresh in background + syncItemCb := func(ctx context.Context, obj CacheItem) (CacheItem, error) { + return exampleService.getStatus(obj.(*ExampleCacheItem).ID()), nil + } + + // define resync period as time duration we want cache to refresh. We can go as low as we want but cache + // would still be constrained by time it takes to run Sync call for each item. + resyncPeriod := time.Millisecond + + // Since number of items in the cache is dynamic, rate limiter is our knob to control resources we spend on + // sync. + rateLimiter := NewRateLimiter("ExampleRateLimiter", 10000, 1) + + // since cache refreshes itself asynchronously, it may not notice that an object has been deleted immediately, + // so users of the cache should have the delete logic aware of this shortcoming (eg. not-exists may be a valid + // error during removal if based on status in cache). + cache := NewAutoRefreshCache(syncItemCb, rateLimiter, resyncPeriod) + + // start the cache with a context that would be to stop the cache by cancelling the context + ctx, cancel := context.WithCancel(context.Background()) + cache.Start(ctx) + + // creating objects that go through a couple of state transitions to reach the final state. + item1 := &ExampleCacheItem{status: ExampleStatusNotStarted, id: "item1"} + item2 := &ExampleCacheItem{status: ExampleStatusNotStarted, id: "item2"} + _, err1 := cache.GetOrCreate(item1) + _, err2 := cache.GetOrCreate(item2) + if err1 != nil || err2 != nil { + fmt.Printf("unexpected error in create; err1: %v, err2: %v", err1, err2) + } + + // wait for the cache to go through a few refresh cycles and then check status + time.Sleep(resyncPeriod * 10) + fmt.Printf("Current status for item1 is %v", cache.Get(item1.ID()).(*ExampleCacheItem).status) + + // stop the cache + cancel() + + // Output: + // Current status for item1 is Completed +} diff --git a/flytestdlib/utils/rate_limiter.go b/flytestdlib/utils/rate_limiter.go new file mode 100644 index 0000000000..6a28b21da9 --- /dev/null +++ b/flytestdlib/utils/rate_limiter.go @@ -0,0 +1,35 @@ +package utils + +import ( + "context" + + "github.com/lyft/flytestdlib/logger" + "golang.org/x/time/rate" +) + +// Interface to use rate limiter +type RateLimiter interface { + Wait(ctx context.Context) error +} + +type rateLimiter struct { + name string + limiter rate.Limiter +} + +// Blocking method which waits for the next token as per the tps and burst values defined +func (r *rateLimiter) Wait(ctx context.Context) error { + logger.Debugf(ctx, "Waiting for a token from rate limiter %s", r.name) + if err := r.limiter.Wait(ctx); err != nil { + return err + } + return nil +} + +// Create a new rate-limiter with the tps and burst values +func NewRateLimiter(rateLimiterName string, tps float64, burst int) RateLimiter { + return &rateLimiter{ + name: rateLimiterName, + limiter: *rate.NewLimiter(rate.Limit(tps), burst), + } +} diff --git a/flytestdlib/utils/rate_limiter_test.go b/flytestdlib/utils/rate_limiter_test.go new file mode 100644 index 0000000000..3aaf1df522 --- /dev/null +++ b/flytestdlib/utils/rate_limiter_test.go @@ -0,0 +1,39 @@ +package utils + +import ( + "context" + "math" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func TestInfiniteRateLimiter(t *testing.T) { + infRateLimiter := NewRateLimiter("test_rate_limiter", math.MaxFloat64, 0) + start := time.Now() + + for i := 0; i < 100; i++ { + err := infRateLimiter.Wait(context.Background()) + assert.NoError(t, err, "unexpected failure in wait") + } + assert.True(t, time.Since(start) < 100*time.Millisecond) +} + +func TestRateLimiter(t *testing.T) { + rateLimiter := NewRateLimiter("test_rate_limiter", 1, 1) + start := time.Now() + + for i := 0; i < 5; i++ { + err := rateLimiter.Wait(context.Background()) + assert.Nil(t, err) + } + assert.True(t, time.Since(start) > 3*time.Second) + assert.True(t, time.Since(start) < 5*time.Second) +} + +func TestInvalidRateLimitConfig(t *testing.T) { + rateLimiter := NewRateLimiter("test_rate_limiter", 1, 0) + err := rateLimiter.Wait(context.Background()) + assert.NotNil(t, err) +} diff --git a/flytestdlib/utils/sequencer.go b/flytestdlib/utils/sequencer.go new file mode 100644 index 0000000000..1d41dde367 --- /dev/null +++ b/flytestdlib/utils/sequencer.go @@ -0,0 +1,39 @@ +package utils + +import ( + "sync" + "sync/atomic" +) + +// Sequencer is a thread-safe incremental integer counter. Note that it is a singleton, so +// GetSequencer.GetNext may not always start at 0. +type Sequencer interface { + GetNext() uint64 + GetCur() uint64 +} + +type sequencer struct { + val *uint64 +} + +var once sync.Once +var instance Sequencer + +func GetSequencer() Sequencer { + once.Do(func() { + val := uint64(0) + instance = &sequencer{val: &val} + }) + return instance +} + +// Get the next sequence number, 1 higher than the last and set it as the current one +func (s sequencer) GetNext() uint64 { + x := atomic.AddUint64(s.val, 1) + return x +} + +// Get the current sequence number +func (s sequencer) GetCur() uint64 { + return *s.val +} diff --git a/flytestdlib/utils/sequencer_test.go b/flytestdlib/utils/sequencer_test.go new file mode 100644 index 0000000000..2444048764 --- /dev/null +++ b/flytestdlib/utils/sequencer_test.go @@ -0,0 +1,54 @@ +package utils + +import ( + "sync" + "testing" + + "fmt" + + "github.com/stretchr/testify/assert" +) + +func TestSequencer(t *testing.T) { + size := 3 + sequencer := GetSequencer() + curVal := sequencer.GetCur() + 1 + // sum = n(a0 + aN) / 2 + expectedSum := uint64(size) * (curVal + curVal + uint64(size-1)) / 2 + numbers := make(chan uint64, size) + + var wg sync.WaitGroup + wg.Add(size) + + iter := 0 + for iter < size { + go func() { + number := sequencer.GetNext() + fmt.Printf("list value: %d", number) + numbers <- number + wg.Done() + }() + iter++ + } + wg.Wait() + close(numbers) + + unique, sum := uniqueAndSum(numbers) + assert.True(t, unique, "sequencer generated duplicate numbers") + assert.Equal(t, expectedSum, sum, "sequencer generated sequence numbers with gap %d %d", expectedSum, sum) +} + +func uniqueAndSum(list chan uint64) (bool, uint64) { + set := make(map[uint64]struct{}) + var sum uint64 + + for elem := range list { + fmt.Printf("list value: %d\n", elem) + if _, ok := set[elem]; ok { + return false, sum + } + set[elem] = struct{}{} + sum += elem + } + return true, sum +} diff --git a/flytestdlib/version/version.go b/flytestdlib/version/version.go new file mode 100644 index 0000000000..ab3e4cf112 --- /dev/null +++ b/flytestdlib/version/version.go @@ -0,0 +1,29 @@ +package version + +import ( + "time" + + "github.com/sirupsen/logrus" +) + +// This module provides the ability to inject Build (git sha) and Version information at compile time. +// To set these values invoke go build as follows +// go build -ldflags “-X github.com/lyft/flytestdlib/version.Build=xyz -X github.com/lyft/flytestdlib/version.Version=1.2.3" +// NOTE: If the version is set and server.StartProfilingServerWithDefaultHandlers are initialized then, `/version` +// will provide the build and version information +var ( + // Specifies the GIT sha of the build + Build = "unknown" + // Version for the build, should follow a semver + Version = "unknown" + // Build timestamp + BuildTime = time.Now() +) + +// Use this method to log the build information for the current app. The app name should be provided. To inject the build +// and version information refer to the top-level comment in this file +func LogBuildInformation(appName string) { + logrus.Info("------------------------------------------------------------------------") + logrus.Infof("App [%s], Version [%s], BuildSHA [%s], BuildTS [%s]", appName, Version, Build, BuildTime.String()) + logrus.Info("------------------------------------------------------------------------") +} diff --git a/flytestdlib/version/version_test.go b/flytestdlib/version/version_test.go new file mode 100644 index 0000000000..d4ddb2def4 --- /dev/null +++ b/flytestdlib/version/version_test.go @@ -0,0 +1,29 @@ +package version + +import ( + "bytes" + "fmt" + "testing" + "time" + + "github.com/magiconair/properties/assert" + "github.com/sirupsen/logrus" +) + +type dFormat struct { +} + +func (dFormat) Format(e *logrus.Entry) ([]byte, error) { + return []byte(e.Message), nil +} + +func TestLogBuildInformation(t *testing.T) { + + n := time.Now() + BuildTime = n + buf := bytes.NewBufferString("") + logrus.SetFormatter(dFormat{}) + logrus.SetOutput(buf) + LogBuildInformation("hello") + assert.Equal(t, buf.String(), fmt.Sprintf("------------------------------------------------------------------------App [hello], Version [unknown], BuildSHA [unknown], BuildTS [%s]------------------------------------------------------------------------", n.String())) +} diff --git a/flytestdlib/yamlutils/yaml_json.go b/flytestdlib/yamlutils/yaml_json.go new file mode 100644 index 0000000000..152c6ce5f4 --- /dev/null +++ b/flytestdlib/yamlutils/yaml_json.go @@ -0,0 +1,17 @@ +package yamlutils + +import ( + "io/ioutil" + "path/filepath" + + "github.com/ghodss/yaml" +) + +func ReadYamlFileAsJSON(path string) ([]byte, error) { + r, err := ioutil.ReadFile(filepath.Clean(path)) + if err != nil { + return nil, err + } + + return yaml.YAMLToJSON(r) +} From ab8b66753a7c10d0f7f371cca33e3800f5a86aac Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 9 Apr 2019 16:00:46 -0700 Subject: [PATCH 002/191] Update ReadMe Title --- flytestdlib/README.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/flytestdlib/README.rst b/flytestdlib/README.rst index f78785fa3d..a43dc38bff 100644 --- a/flytestdlib/README.rst +++ b/flytestdlib/README.rst @@ -1,4 +1,4 @@ -K8s Standard Library +Common Go Tools ===================== Shared components we found ourselves building time and time again, so we collected them in one place! @@ -10,26 +10,34 @@ This library consists of: - cli/pflags Tool to generate a pflags for all fields in a given struct. + - storage Abstract storage library that uses stow behind the scenes to connect to s3/azure/gcs but also offers configurable factory, in-memory storage (for testing) as well as native protobuf support. + - contextutils Wrapper around golang's context to set/get known keys. + - logger Wrapper around logrus that's configurable, taggable and context-aware. + - profutils Starts an http server that serves /metrics (exposes prometheus metrics), /healthcheck and /version endpoints. + - promutils Exposes a Scope instance that's a more convenient way to construct prometheus metrics and scope them per component. + - atomic Wrapper around sync.atomic library to offer AtomicInt32 and other convenient types. + - sets Offers strongly types and convenient interface sets. + - utils - version From b4462cc4bb1a69d28893af4e725e51f0e072539f Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 9 Apr 2019 16:01:08 -0700 Subject: [PATCH 003/191] Update Travis GoVersion --- flytestdlib/.travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/flytestdlib/.travis.yml b/flytestdlib/.travis.yml index 91723384da..05d3a1b406 100644 --- a/flytestdlib/.travis.yml +++ b/flytestdlib/.travis.yml @@ -1,9 +1,7 @@ sudo: required language: go go: - - "1.10" -services: - - docker + - "1.11" jobs: include: - stage: test From 660c51c0e77b6eae002f52780a43d21fda005b2d Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 9 Apr 2019 16:03:56 -0700 Subject: [PATCH 004/191] Temporarily add docker service --- flytestdlib/.travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flytestdlib/.travis.yml b/flytestdlib/.travis.yml index 05d3a1b406..21c689d91e 100644 --- a/flytestdlib/.travis.yml +++ b/flytestdlib/.travis.yml @@ -2,6 +2,8 @@ sudo: required language: go go: - "1.11" +services: + - docker jobs: include: - stage: test From 24e21649711687114778554bafb285bd43be6a5e Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 9 Apr 2019 16:33:13 -0700 Subject: [PATCH 005/191] Remove services from travis config --- flytestdlib/.travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/flytestdlib/.travis.yml b/flytestdlib/.travis.yml index 21c689d91e..05d3a1b406 100644 --- a/flytestdlib/.travis.yml +++ b/flytestdlib/.travis.yml @@ -2,8 +2,6 @@ sudo: required language: go go: - "1.11" -services: - - docker jobs: include: - stage: test From 60a7971b106452dd8f7d7e5e0fccc6e7b5a41893 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 9 Apr 2019 16:39:34 -0700 Subject: [PATCH 006/191] Add CODEOWNERS file --- flytestdlib/CODEOWNERS | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 flytestdlib/CODEOWNERS diff --git a/flytestdlib/CODEOWNERS b/flytestdlib/CODEOWNERS new file mode 100644 index 0000000000..f64c50ba34 --- /dev/null +++ b/flytestdlib/CODEOWNERS @@ -0,0 +1,11 @@ +# These owners will be the default owners for everything in +# the repo. Unless a later match takes precedence, +# @global-owner1 and @global-owner2 will be requested for +# review when someone opens a pull request. +* @EngHabu @katrogan @kumare3 @wild-endeavor + +# Order is important; the last matching pattern takes the most +# precedence. When someone opens a pull request that only +# modifies JS files, only @js-owner and not the global +# owner(s) will be requested for a review. +# *.js @js-owner From 1d47c19933d2f79c4d7ef852c17af7a95693bd58 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 10 Apr 2019 08:44:09 -0700 Subject: [PATCH 007/191] Remove comments --- flytestdlib/CODEOWNERS | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/flytestdlib/CODEOWNERS b/flytestdlib/CODEOWNERS index f64c50ba34..c05664d497 100644 --- a/flytestdlib/CODEOWNERS +++ b/flytestdlib/CODEOWNERS @@ -1,11 +1,3 @@ # These owners will be the default owners for everything in -# the repo. Unless a later match takes precedence, -# @global-owner1 and @global-owner2 will be requested for -# review when someone opens a pull request. +# the repo. Unless a later match takes precedence. * @EngHabu @katrogan @kumare3 @wild-endeavor - -# Order is important; the last matching pattern takes the most -# precedence. When someone opens a pull request that only -# modifies JS files, only @js-owner and not the global -# owner(s) will be requested for a review. -# *.js @js-owner From 8b92db6330fa358397d1446aa663529c8f44c02c Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 10 Apr 2019 15:40:57 -0700 Subject: [PATCH 008/191] regenerate --- .../lyft/golang_test_targets/Makefile | 2 +- flytestdlib/cli/pflags/api/generator.go | 75 +++++++++++++++---- flytestdlib/cli/pflags/api/generator_test.go | 32 +++++++- flytestdlib/cli/pflags/api/sample.go | 5 +- flytestdlib/cli/pflags/api/templates.go | 18 ++++- .../cli/pflags/api/testdata/testtype.go | 51 ++++++++----- .../cli/pflags/api/testdata/testtype_test.go | 32 ++++---- flytestdlib/cli/pflags/api/utils.go | 28 +++++-- flytestdlib/cli/pflags/cmd/root.go | 9 ++- flytestdlib/logger/config.go | 19 +++-- flytestdlib/logger/config_flags.go | 27 +++++-- flytestdlib/logger/config_flags_test.go | 41 +++++++++- flytestdlib/profutils/server_test.go | 4 +- flytestdlib/storage/config.go | 20 +++-- flytestdlib/storage/config_flags.go | 41 +++++++--- flytestdlib/storage/config_flags_test.go | 22 +++--- 16 files changed, 320 insertions(+), 106 deletions(-) diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile index 1c6f893521..04b79ba99e 100644 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile @@ -1,6 +1,6 @@ .PHONY: lint lint: #lints the package for common code smells - which golangci-lint || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $$GOPATH/bin v1.10 + which golangci-lint || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $$GOPATH/bin v1.11 golangci-lint run # If code is failing goimports linter, this will fix. diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index 2e4dd30c54..0ee2a61de4 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -19,8 +19,9 @@ const ( // PFlagProviderGenerator parses and generates GetPFlagSet implementation to add PFlags for a given struct's fields. type PFlagProviderGenerator struct { - pkg *types.Package - st *types.Named + pkg *types.Package + st *types.Named + defaultVar *types.Var } // This list is restricted because that's the only kinds viper parses out, otherwise it assumes strings. @@ -54,7 +55,7 @@ func buildFieldForSlice(ctx context.Context, t SliceOrArray, name, goName, usage emptyDefaultValue := `[]string{}` if b, ok := t.Elem().(*types.Basic); !ok { logger.Infof(ctx, "Elem of type [%v] is not a basic type. It must be json unmarshalable or generation will fail.", t.Elem()) - if !jsonUnmarshaler(t.Elem()) { + if !isJSONUnmarshaler(t.Elem()) { return FieldInfo{}, fmt.Errorf("slice of type [%v] is not supported. Only basic slices or slices of json-unmarshalable types are supported", t.Elem().String()) @@ -85,9 +86,17 @@ func buildFieldForSlice(ctx context.Context, t SliceOrArray, name, goName, usage }, nil } +func appendAccessorIfNotEmpty(baseAccessor, childAccessor string) string { + if len(baseAccessor) == 0 { + return baseAccessor + } + + return baseAccessor + "." + childAccessor +} + // Traverses fields in type and follows recursion tree to discover all fields. It stops when one of two conditions is // met; encountered a basic type (e.g. string, int... etc.) or the field type implements UnmarshalJSON. -func discoverFieldsRecursive(ctx context.Context, typ *types.Named) ([]FieldInfo, error) { +func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValueAccessor string) ([]FieldInfo, error) { logger.Printf(ctx, "Finding all fields in [%v.%v.%v]", typ.Obj().Pkg().Path(), typ.Obj().Pkg().Name(), typ.Obj().Name()) @@ -111,9 +120,11 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named) ([]FieldInfo tag.Name = v.Name() } + isPtr := false typ := v.Type() - if ptr, isPtr := typ.(*types.Pointer); isPtr { + if ptr, casted := typ.(*types.Pointer); casted { typ = ptr.Elem() + isPtr = true } switch t := typ.(type) { @@ -137,12 +148,21 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named) ([]FieldInfo t.String(), t.Kind(), allowedKinds) } + defaultValue := tag.DefaultValue + if accessor := appendAccessorIfNotEmpty(defaultValueAccessor, v.Name()); len(accessor) > 0 { + defaultValue = accessor + + if isPtr { + defaultValue = fmt.Sprintf("cfg.elemValueOrNil(%s).(%s)", defaultValue, t.Name()) + } + } + fields = append(fields, FieldInfo{ Name: tag.Name, GoName: v.Name(), Typ: t, FlagMethodName: camelCase(t.String()), - DefaultValue: tag.DefaultValue, + DefaultValue: defaultValue, UsageString: tag.Usage, TestValue: `"1"`, TestStrategy: JSON, @@ -155,7 +175,7 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named) ([]FieldInfo // If the type has json unmarshaler, then stop the recursion and assume the type is string. config package // will use json unmarshaler to fill in the final config object. - jsonUnmarshaler := jsonUnmarshaler(t) + jsonUnmarshaler := isJSONUnmarshaler(t) testValue := tag.DefaultValue if len(tag.DefaultValue) == 0 { @@ -163,6 +183,16 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named) ([]FieldInfo testValue = `"1"` } + defaultValue := tag.DefaultValue + if accessor := appendAccessorIfNotEmpty(defaultValueAccessor, v.Name()); len(accessor) > 0 { + defaultValue = accessor + if isStringer(t) { + defaultValue = defaultValue + ".String()" + } else { + defaultValue = fmt.Sprintf("fmt.Sprintf(\"%%v\",%s)", defaultValue) + } + } + logger.Infof(ctx, "[%v] is of a Named type (struct) with default value [%v].", tag.Name, tag.DefaultValue) if jsonUnmarshaler { @@ -173,7 +203,7 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named) ([]FieldInfo GoName: v.Name(), Typ: types.Typ[types.String], FlagMethodName: "String", - DefaultValue: tag.DefaultValue, + DefaultValue: defaultValue, UsageString: tag.Usage, TestValue: testValue, TestStrategy: JSON, @@ -181,7 +211,7 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named) ([]FieldInfo } else { logger.Infof(ctx, "Traversing fields in type.") - nested, err := discoverFieldsRecursive(logger.WithIndent(ctx, indent), t) + nested, err := discoverFieldsRecursive(logger.WithIndent(ctx, indent), t, appendAccessorIfNotEmpty(defaultValueAccessor, v.Name())) if err != nil { return nil, err } @@ -228,7 +258,8 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named) ([]FieldInfo // NewGenerator initializes a PFlagProviderGenerator for pflags files for targetTypeName struct under pkg. If pkg is not filled in, // it's assumed to be current package (which is expected to be the common use case when invoking pflags from // go:generate comments) -func NewGenerator(pkg, targetTypeName string) (*PFlagProviderGenerator, error) { +func NewGenerator(pkg, targetTypeName, defaultVariableName string) (*PFlagProviderGenerator, error) { + ctx := context.Background() var err error // Resolve package path if pkg == "" || pkg[0] == '.' { @@ -257,9 +288,22 @@ func NewGenerator(pkg, targetTypeName string) (*PFlagProviderGenerator, error) { return nil, fmt.Errorf("%s should be an struct, was %s", targetTypeName, obj.Type().Underlying()) } + var defaultVar *types.Var + obj = targetPackage.Scope().Lookup(defaultVariableName) + if obj != nil { + defaultVar = obj.(*types.Var) + } + + if defaultVar != nil { + logger.Infof(ctx, "Using default variable with name [%v] to assign all default values.", defaultVariableName) + } else { + logger.Infof(ctx, "Using default values defined in tags if any.") + } + return &PFlagProviderGenerator{ - st: st, - pkg: targetPackage, + st: st, + pkg: targetPackage, + defaultVar: defaultVar, }, nil } @@ -268,7 +312,12 @@ func (g PFlagProviderGenerator) GetTargetPackage() *types.Package { } func (g PFlagProviderGenerator) Generate(ctx context.Context) (PFlagProvider, error) { - fields, err := discoverFieldsRecursive(ctx, g.st) + defaultValueAccessor := "" + if g.defaultVar != nil { + defaultValueAccessor = g.defaultVar.Name() + } + + fields, err := discoverFieldsRecursive(ctx, g.st, defaultValueAccessor) if err != nil { return PFlagProvider{}, err } diff --git a/flytestdlib/cli/pflags/api/generator_test.go b/flytestdlib/cli/pflags/api/generator_test.go index edfab6c1ca..b1d7c617c1 100644 --- a/flytestdlib/cli/pflags/api/generator_test.go +++ b/flytestdlib/cli/pflags/api/generator_test.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "os" "path/filepath" + "reflect" "testing" "github.com/stretchr/testify/assert" @@ -14,8 +15,37 @@ import ( // Make sure existing config file(s) parse correctly before overriding them with this flag! var update = flag.Bool("update", false, "Updates testdata") +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func TestElemValueOrNil(t *testing.T) { + var iPtr *int + assert.Equal(t, 0, elemValueOrNil(iPtr)) + var sPtr *string + assert.Equal(t, "", elemValueOrNil(sPtr)) + var i int + assert.Equal(t, 0, elemValueOrNil(i)) + var s string + assert.Equal(t, "", elemValueOrNil(s)) + var arr []string + assert.Equal(t, arr, elemValueOrNil(arr)) +} + func TestNewGenerator(t *testing.T) { - g, err := NewGenerator(".", "TestType") + g, err := NewGenerator(".", "TestType", "DefaultTestType") assert.NoError(t, err) ctx := context.Background() diff --git a/flytestdlib/cli/pflags/api/sample.go b/flytestdlib/cli/pflags/api/sample.go index b1ebb50684..43dfce7585 100644 --- a/flytestdlib/cli/pflags/api/sample.go +++ b/flytestdlib/cli/pflags/api/sample.go @@ -3,10 +3,13 @@ package api import ( "encoding/json" "errors" - "github.com/lyft/flytestdlib/storage" ) +var DefaultTestType = &TestType{ + StringValue: "Welcome to defaults", +} + type TestType struct { StringValue string `json:"str" pflag:"\"hello world\",\"life is short\""` BoolValue bool `json:"bl" pflag:"true"` diff --git a/flytestdlib/cli/pflags/api/templates.go b/flytestdlib/cli/pflags/api/templates.go index a7adba8922..545d0ceae1 100644 --- a/flytestdlib/cli/pflags/api/templates.go +++ b/flytestdlib/cli/pflags/api/templates.go @@ -26,9 +26,25 @@ import ( {{$name}} "{{$path}}"{{end}} ) +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func ({{ .Name }}) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + // GetPFlagSet will return strongly types pflags for all fields in {{ .Name }} and its nested types. The format of the // flags is json-name.json-sub-name... etc. -func ({{ .Name }}) GetPFlagSet(prefix string) *pflag.FlagSet { +func (cfg {{ .Name }}) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("{{ .Name }}", pflag.ExitOnError) {{- range .Fields }} cmdFlags.{{ .FlagMethodName }}(fmt.Sprintf("%v%v", prefix, "{{ .Name }}"), {{ .DefaultValue }}, {{ .UsageString }}) diff --git a/flytestdlib/cli/pflags/api/testdata/testtype.go b/flytestdlib/cli/pflags/api/testdata/testtype.go index 87f5cb7dfe..dde0f48c80 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype.go @@ -5,32 +5,49 @@ package api import ( "fmt" + "reflect" "github.com/spf13/pflag" ) +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (TestType) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + // GetPFlagSet will return strongly types pflags for all fields in TestType and its nested types. The format of the // flags is json-name.json-sub-name... etc. -func (TestType) GetPFlagSet(prefix string) *pflag.FlagSet { +func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("TestType", pflag.ExitOnError) - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "str"), "hello world", "life is short") - cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "bl"), true, "") - cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "nested.i"), *new(int), "this is an important flag") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "str"), DefaultTestType.StringValue, "life is short") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "bl"), DefaultTestType.BoolValue, "") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "nested.i"), DefaultTestType.NestedType.IntValue, "this is an important flag") cmdFlags.IntSlice(fmt.Sprintf("%v%v", prefix, "ints"), []int{12, 1}, "") cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "strs"), []string{"12", "1"}, "") cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "complexArr"), []string{}, "") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "c"), "", "I'm a complex type but can be converted from string.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.type"), "s3", "Sets the type of storage to configure [s3/minio/local/mem].") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.endpoint"), "", "URL for storage client to connect to.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.auth-type"), "iam", "Auth Type to use [iam, accesskey].") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.access-key"), *new(string), "Access key to use. Only required when authtype is set to accesskey.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.secret-key"), *new(string), "Secret to use when accesskey is set.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.region"), "us-east-1", "Region to connect to.") - cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "storage.connection.disable-ssl"), *new(bool), "Disables SSL connection. Should only be used for development.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.container"), *new(string), "Initial container to create -if it doesn't exist-.'") - cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.max_size_mbs"), *new(int), "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") - cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.target_gc_percent"), *new(int), "Sets the garbage collection target percentage.") - cmdFlags.Int64(fmt.Sprintf("%v%v", prefix, "storage.limits.maxDownloadMBs"), 2, "Maximum allowed download size (in MBs) per call.") - cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "i"), *new(int), "") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "c"), fmt.Sprintf("%v", DefaultTestType.StringToJSON), "I'm a complex type but can be converted from string.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.type"), DefaultTestType.StorageConfig.Type, "Sets the type of storage to configure [s3/minio/local/mem].") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.endpoint"), DefaultTestType.StorageConfig.Connection.Endpoint.String(), "URL for storage client to connect to.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.auth-type"), DefaultTestType.StorageConfig.Connection.AuthType, "Auth Type to use [iam, accesskey].") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.access-key"), DefaultTestType.StorageConfig.Connection.AccessKey, "Access key to use. Only required when authtype is set to accesskey.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.secret-key"), DefaultTestType.StorageConfig.Connection.SecretKey, "Secret to use when accesskey is set.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.region"), DefaultTestType.StorageConfig.Connection.Region, "Region to connect to.") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "storage.connection.disable-ssl"), DefaultTestType.StorageConfig.Connection.DisableSSL, "Disables SSL connection. Should only be used for development.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.container"), DefaultTestType.StorageConfig.InitContainer, "Initial container to create -if it doesn't exist-.'") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.max_size_mbs"), DefaultTestType.StorageConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.target_gc_percent"), DefaultTestType.StorageConfig.Cache.TargetGCPercent, "Sets the garbage collection target percentage.") + cmdFlags.Int64(fmt.Sprintf("%v%v", prefix, "storage.limits.maxDownloadMBs"), DefaultTestType.StorageConfig.Limits.GetLimitMegabytes, "Maximum allowed download size (in MBs) per call.") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "i"), cfg.elemValueOrNil(DefaultTestType.IntValue).(int), "") return cmdFlags } diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_test.go b/flytestdlib/cli/pflags/api/testdata/testtype_test.go index f8b81bbe11..03412f0d86 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype_test.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype_test.go @@ -103,7 +103,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("str"); err == nil { - assert.Equal(t, string("hello world"), vString) + assert.Equal(t, string(DefaultTestType.StringValue), vString) } else { assert.FailNow(t, err.Error()) } @@ -125,7 +125,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vBool, err := cmdFlags.GetBool("bl"); err == nil { - assert.Equal(t, bool(true), vBool) + assert.Equal(t, bool(DefaultTestType.BoolValue), vBool) } else { assert.FailNow(t, err.Error()) } @@ -147,7 +147,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vInt, err := cmdFlags.GetInt("nested.i"); err == nil { - assert.Equal(t, int(*new(int)), vInt) + assert.Equal(t, int(DefaultTestType.NestedType.IntValue), vInt) } else { assert.FailNow(t, err.Error()) } @@ -235,7 +235,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("c"); err == nil { - assert.Equal(t, string(""), vString) + assert.Equal(t, string(fmt.Sprintf("%v", DefaultTestType.StringToJSON)), vString) } else { assert.FailNow(t, err.Error()) } @@ -257,7 +257,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("storage.type"); err == nil { - assert.Equal(t, string("s3"), vString) + assert.Equal(t, string(DefaultTestType.StorageConfig.Type), vString) } else { assert.FailNow(t, err.Error()) } @@ -279,7 +279,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("storage.connection.endpoint"); err == nil { - assert.Equal(t, string(""), vString) + assert.Equal(t, string(DefaultTestType.StorageConfig.Connection.Endpoint.String()), vString) } else { assert.FailNow(t, err.Error()) } @@ -301,7 +301,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("storage.connection.auth-type"); err == nil { - assert.Equal(t, string("iam"), vString) + assert.Equal(t, string(DefaultTestType.StorageConfig.Connection.AuthType), vString) } else { assert.FailNow(t, err.Error()) } @@ -323,7 +323,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("storage.connection.access-key"); err == nil { - assert.Equal(t, string(*new(string)), vString) + assert.Equal(t, string(DefaultTestType.StorageConfig.Connection.AccessKey), vString) } else { assert.FailNow(t, err.Error()) } @@ -345,7 +345,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("storage.connection.secret-key"); err == nil { - assert.Equal(t, string(*new(string)), vString) + assert.Equal(t, string(DefaultTestType.StorageConfig.Connection.SecretKey), vString) } else { assert.FailNow(t, err.Error()) } @@ -367,7 +367,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("storage.connection.region"); err == nil { - assert.Equal(t, string("us-east-1"), vString) + assert.Equal(t, string(DefaultTestType.StorageConfig.Connection.Region), vString) } else { assert.FailNow(t, err.Error()) } @@ -389,7 +389,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vBool, err := cmdFlags.GetBool("storage.connection.disable-ssl"); err == nil { - assert.Equal(t, bool(*new(bool)), vBool) + assert.Equal(t, bool(DefaultTestType.StorageConfig.Connection.DisableSSL), vBool) } else { assert.FailNow(t, err.Error()) } @@ -411,7 +411,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("storage.container"); err == nil { - assert.Equal(t, string(*new(string)), vString) + assert.Equal(t, string(DefaultTestType.StorageConfig.InitContainer), vString) } else { assert.FailNow(t, err.Error()) } @@ -433,7 +433,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vInt, err := cmdFlags.GetInt("storage.cache.max_size_mbs"); err == nil { - assert.Equal(t, int(*new(int)), vInt) + assert.Equal(t, int(DefaultTestType.StorageConfig.Cache.MaxSizeMegabytes), vInt) } else { assert.FailNow(t, err.Error()) } @@ -455,7 +455,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vInt, err := cmdFlags.GetInt("storage.cache.target_gc_percent"); err == nil { - assert.Equal(t, int(*new(int)), vInt) + assert.Equal(t, int(DefaultTestType.StorageConfig.Cache.TargetGCPercent), vInt) } else { assert.FailNow(t, err.Error()) } @@ -477,7 +477,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vInt64, err := cmdFlags.GetInt64("storage.limits.maxDownloadMBs"); err == nil { - assert.Equal(t, int64(2), vInt64) + assert.Equal(t, int64(DefaultTestType.StorageConfig.Limits.GetLimitMegabytes), vInt64) } else { assert.FailNow(t, err.Error()) } @@ -499,7 +499,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vInt, err := cmdFlags.GetInt("i"); err == nil { - assert.Equal(t, int(*new(int)), vInt) + assert.Equal(t, int(cfg.elemValueOrNil(DefaultTestType.IntValue).(int)), vInt) } else { assert.FailNow(t, err.Error()) } diff --git a/flytestdlib/cli/pflags/api/utils.go b/flytestdlib/cli/pflags/api/utils.go index 4c71fbb1c4..16edb50d38 100644 --- a/flytestdlib/cli/pflags/api/utils.go +++ b/flytestdlib/cli/pflags/api/utils.go @@ -20,13 +20,29 @@ func camelCase(str string) string { return str } -func jsonUnmarshaler(t types.Type) bool { +func isJSONUnmarshaler(t types.Type) bool { + found, _ := implementsAnyOfMethods(t, "UnmarshalJSON") + return found +} + +func isStringer(t types.Type) bool { + found, _ := implementsAnyOfMethods(t, "String") + return found +} + +func implementsAnyOfMethods(t types.Type, methodNames ...string) (found, implementedByPtr bool) { mset := types.NewMethodSet(t) - jsonUnmarshaler := mset.Lookup(nil, "UnmarshalJSON") - if jsonUnmarshaler == nil { - mset = types.NewMethodSet(types.NewPointer(t)) - jsonUnmarshaler = mset.Lookup(nil, "UnmarshalJSON") + for _, name := range methodNames { + if mset.Lookup(nil, name) != nil { + return true, false + } + } + mset = types.NewMethodSet(types.NewPointer(t)) + for _, name := range methodNames { + if mset.Lookup(nil, name) != nil { + return true, true + } } - return jsonUnmarshaler != nil + return false, false } diff --git a/flytestdlib/cli/pflags/cmd/root.go b/flytestdlib/cli/pflags/cmd/root.go index b6562d8a1b..d78d4c4d4a 100644 --- a/flytestdlib/cli/pflags/cmd/root.go +++ b/flytestdlib/cli/pflags/cmd/root.go @@ -3,7 +3,6 @@ package cmd import ( "bytes" "context" - "flag" "fmt" "strings" @@ -13,7 +12,8 @@ import ( ) var ( - pkg = flag.String("pkg", ".", "what package to get the interface from") + pkg string + defaultValuesVariable string ) var root = cobra.Command{ @@ -31,7 +31,8 @@ type MyStruct struct { } func init() { - root.Flags().StringP("package", "p", ".", "Determines the source/destination package.") + root.Flags().StringVarP(&pkg, "package", "p", ".", "Determines the source/destination package.") + root.Flags().StringVar(&defaultValuesVariable, "default-var", "defaultConfig", "Points to a variable to use to load default configs. If specified & found, it'll be used instead of the values specified in the tag.") } func Execute() error { @@ -45,7 +46,7 @@ func generatePflagsProvider(cmd *cobra.Command, args []string) error { } ctx := context.Background() - gen, err := api.NewGenerator(*pkg, structName) + gen, err := api.NewGenerator(pkg, structName, defaultValuesVariable) if err != nil { return err } diff --git a/flytestdlib/logger/config.go b/flytestdlib/logger/config.go index faa2da6f9e..1c665ac523 100644 --- a/flytestdlib/logger/config.go +++ b/flytestdlib/logger/config.go @@ -6,7 +6,7 @@ import ( "github.com/lyft/flytestdlib/config" ) -//go:generate pflags Config +//go:generate pflags Config --default-var defaultConfig const configSectionKey = "Logger" @@ -21,6 +21,13 @@ const ( jsonDataKey string = "json" ) +var defaultConfig = &Config{ + Formatter: FormatterConfig{ + Type: FormatterJSON, + }, + Level: InfoLevel, +} + // Global logger config. type Config struct { // Determines whether to include source code location in logs. This might incurs a performance hit and is only @@ -31,13 +38,13 @@ type Config struct { Mute bool `json:"mute" pflag:",Mutes all logs regardless of severity. Intended for benchmarks/tests only."` // Determines the minimum log level to log. - Level Level `json:"level" pflag:"4,Sets the minimum logging level."` + Level Level `json:"level" pflag:",Sets the minimum logging level."` Formatter FormatterConfig `json:"formatter" pflag:",Sets logging format."` } type FormatterConfig struct { - Type FormatterType `json:"type" pflag:"\"json\",Sets logging format type."` + Type FormatterType `json:"type" pflag:",Sets logging format type."` } var globalConfig = Config{} @@ -73,9 +80,7 @@ const ( ) func init() { - if _, err := config.RegisterSectionWithUpdates(configSectionKey, &Config{}, func(ctx context.Context, newValue config.Config) { + config.MustRegisterSectionWithUpdates(configSectionKey, defaultConfig, func(ctx context.Context, newValue config.Config) { SetConfig(*newValue.(*Config)) - }); err != nil { - panic(err) - } + }) } diff --git a/flytestdlib/logger/config_flags.go b/flytestdlib/logger/config_flags.go index cf8950b94f..27be2e3440 100755 --- a/flytestdlib/logger/config_flags.go +++ b/flytestdlib/logger/config_flags.go @@ -5,17 +5,34 @@ package logger import ( "fmt" + "reflect" "github.com/spf13/pflag" ) +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + // GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the // flags is json-name.json-sub-name... etc. -func (Config) GetPFlagSet(prefix string) *pflag.FlagSet { +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "show-source"), *new(bool), "Includes source code location in logs.") - cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "mute"), *new(bool), "Mutes all logs regardless of severity. Intended for benchmarks/tests only.") - cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "level"), 4, "Sets the minimum logging level.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "formatter.type"), "json", "Sets logging format type.") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "show-source"), defaultConfig.IncludeSourceCode, "Includes source code location in logs.") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "mute"), defaultConfig.Mute, "Mutes all logs regardless of severity. Intended for benchmarks/tests only.") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "level"), defaultConfig.Level, "Sets the minimum logging level.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "formatter.type"), defaultConfig.Formatter.Type, "Sets logging format type.") return cmdFlags } diff --git a/flytestdlib/logger/config_flags_test.go b/flytestdlib/logger/config_flags_test.go index 401d58d493..853aeac0b0 100755 --- a/flytestdlib/logger/config_flags_test.go +++ b/flytestdlib/logger/config_flags_test.go @@ -103,7 +103,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vBool, err := cmdFlags.GetBool("show-source"); err == nil { - assert.Equal(t, bool(*new(bool)), vBool) + assert.Equal(t, bool(defaultConfig.IncludeSourceCode), vBool) } else { assert.FailNow(t, err.Error()) } @@ -125,7 +125,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vBool, err := cmdFlags.GetBool("mute"); err == nil { - assert.Equal(t, bool(*new(bool)), vBool) + assert.Equal(t, bool(defaultConfig.Mute), vBool) } else { assert.FailNow(t, err.Error()) } @@ -147,7 +147,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vInt, err := cmdFlags.GetInt("level"); err == nil { - assert.Equal(t, int(4), vInt) + assert.Equal(t, int(defaultConfig.Level), vInt) } else { assert.FailNow(t, err.Error()) } @@ -169,7 +169,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("formatter.type"); err == nil { - assert.Equal(t, string("json"), vString) + assert.Equal(t, string(defaultConfig.Formatter.Type), vString) } else { assert.FailNow(t, err.Error()) } @@ -188,3 +188,36 @@ func TestConfig_SetFlags(t *testing.T) { }) }) } + +func TestConfig_elemValueOrNil(t *testing.T) { + type fields struct { + IncludeSourceCode bool + Mute bool + Level Level + Formatter FormatterConfig + } + type args struct { + v interface{} + } + tests := []struct { + name string + fields fields + args args + want interface{} + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := Config{ + IncludeSourceCode: tt.fields.IncludeSourceCode, + Mute: tt.fields.Mute, + Level: tt.fields.Level, + Formatter: tt.fields.Formatter, + } + if got := c.elemValueOrNil(tt.args.v); !reflect.DeepEqual(got, tt.want) { + t.Errorf("Config.elemValueOrNil() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/flytestdlib/profutils/server_test.go b/flytestdlib/profutils/server_test.go index e2eb709943..a7ef350002 100644 --- a/flytestdlib/profutils/server_test.go +++ b/flytestdlib/profutils/server_test.go @@ -70,9 +70,9 @@ func TestConfigHandler(t *testing.T) { "logger": map[string]interface{}{ "show-source": false, "mute": false, - "level": float64(0), + "level": float64(4), "formatter": map[string]interface{}{ - "type": "", + "type": "json", }, }, }, m) diff --git a/flytestdlib/storage/config.go b/flytestdlib/storage/config.go index 59db0197c3..780ef12ac9 100644 --- a/flytestdlib/storage/config.go +++ b/flytestdlib/storage/config.go @@ -28,12 +28,22 @@ const ( ) var ( - ConfigSection = config.MustRegisterSection(configSectionKey, &Config{}) + ConfigSection = config.MustRegisterSection(configSectionKey, defaultConfig) + defaultConfig = &Config{ + Type: TypeS3, + Limits: LimitsConfig{ + GetLimitMegabytes: 2, + }, + Connection: ConnectionConfig{ + Region: "us-east-1", + AuthType: "iam", + }, + } ) // A common storage config. type Config struct { - Type Type `json:"type" pflag:"\"s3\",Sets the type of storage to configure [s3/minio/local/mem]."` + Type Type `json:"type" pflag:",Sets the type of storage to configure [s3/minio/local/mem]."` Connection ConnectionConfig `json:"connection"` InitContainer string `json:"container" pflag:",Initial container to create -if it doesn't exist-.'"` // Caching is recommended to improve the performance of underlying systems. It caches the metadata and resolving @@ -47,10 +57,10 @@ type Config struct { // Defines connection configurations. type ConnectionConfig struct { Endpoint config.URL `json:"endpoint" pflag:",URL for storage client to connect to."` - AuthType string `json:"auth-type" pflag:"\"iam\",Auth Type to use [iam,accesskey]."` + AuthType string `json:"auth-type" pflag:",Auth Type to use [iam,accesskey]."` AccessKey string `json:"access-key" pflag:",Access key to use. Only required when authtype is set to accesskey."` SecretKey string `json:"secret-key" pflag:",Secret to use when accesskey is set."` - Region string `json:"region" pflag:"\"us-east-1\",Region to connect to."` + Region string `json:"region" pflag:",Region to connect to."` DisableSSL bool `json:"disable-ssl" pflag:",Disables SSL connection. Should only be used for development."` } @@ -71,7 +81,7 @@ type CachingConfig struct { // Specifies limits for storage package. type LimitsConfig struct { - GetLimitMegabytes int64 `json:"maxDownloadMBs" pflag:"2,Maximum allowed download size (in MBs) per call."` + GetLimitMegabytes int64 `json:"maxDownloadMBs" pflag:",Maximum allowed download size (in MBs) per call."` } // Retrieve current global config for storage. diff --git a/flytestdlib/storage/config_flags.go b/flytestdlib/storage/config_flags.go index 9a74efdd64..4cde49bec6 100755 --- a/flytestdlib/storage/config_flags.go +++ b/flytestdlib/storage/config_flags.go @@ -5,24 +5,41 @@ package storage import ( "fmt" + "reflect" "github.com/spf13/pflag" ) +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + // GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the // flags is json-name.json-sub-name... etc. -func (Config) GetPFlagSet(prefix string) *pflag.FlagSet { +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "type"), "s3", "Sets the type of storage to configure [s3/minio/local/mem].") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.endpoint"), "", "URL for storage client to connect to.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.auth-type"), "iam", "Auth Type to use [iam, accesskey].") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.access-key"), *new(string), "Access key to use. Only required when authtype is set to accesskey.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.secret-key"), *new(string), "Secret to use when accesskey is set.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.region"), "us-east-1", "Region to connect to.") - cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "connection.disable-ssl"), *new(bool), "Disables SSL connection. Should only be used for development.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "container"), *new(string), "Initial container to create -if it doesn't exist-.'") - cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.max_size_mbs"), *new(int), "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") - cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.target_gc_percent"), *new(int), "Sets the garbage collection target percentage.") - cmdFlags.Int64(fmt.Sprintf("%v%v", prefix, "limits.maxDownloadMBs"), 2, "Maximum allowed download size (in MBs) per call.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "type"), defaultConfig.Type, "Sets the type of storage to configure [s3/minio/local/mem].") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.endpoint"), defaultConfig.Connection.Endpoint.String(), "URL for storage client to connect to.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.auth-type"), defaultConfig.Connection.AuthType, "Auth Type to use [iam, accesskey].") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.access-key"), defaultConfig.Connection.AccessKey, "Access key to use. Only required when authtype is set to accesskey.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.secret-key"), defaultConfig.Connection.SecretKey, "Secret to use when accesskey is set.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.region"), defaultConfig.Connection.Region, "Region to connect to.") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "connection.disable-ssl"), defaultConfig.Connection.DisableSSL, "Disables SSL connection. Should only be used for development.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "container"), defaultConfig.InitContainer, "Initial container to create -if it doesn't exist-.'") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.max_size_mbs"), defaultConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.target_gc_percent"), defaultConfig.Cache.TargetGCPercent, "Sets the garbage collection target percentage.") + cmdFlags.Int64(fmt.Sprintf("%v%v", prefix, "limits.maxDownloadMBs"), defaultConfig.Limits.GetLimitMegabytes, "Maximum allowed download size (in MBs) per call.") return cmdFlags } diff --git a/flytestdlib/storage/config_flags_test.go b/flytestdlib/storage/config_flags_test.go index 2f39f00006..429af71283 100755 --- a/flytestdlib/storage/config_flags_test.go +++ b/flytestdlib/storage/config_flags_test.go @@ -103,7 +103,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("type"); err == nil { - assert.Equal(t, string("s3"), vString) + assert.Equal(t, string(defaultConfig.Type), vString) } else { assert.FailNow(t, err.Error()) } @@ -125,7 +125,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("connection.endpoint"); err == nil { - assert.Equal(t, string(""), vString) + assert.Equal(t, string(defaultConfig.Connection.Endpoint.String()), vString) } else { assert.FailNow(t, err.Error()) } @@ -147,7 +147,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("connection.auth-type"); err == nil { - assert.Equal(t, string("iam"), vString) + assert.Equal(t, string(defaultConfig.Connection.AuthType), vString) } else { assert.FailNow(t, err.Error()) } @@ -169,7 +169,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("connection.access-key"); err == nil { - assert.Equal(t, string(*new(string)), vString) + assert.Equal(t, string(defaultConfig.Connection.AccessKey), vString) } else { assert.FailNow(t, err.Error()) } @@ -191,7 +191,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("connection.secret-key"); err == nil { - assert.Equal(t, string(*new(string)), vString) + assert.Equal(t, string(defaultConfig.Connection.SecretKey), vString) } else { assert.FailNow(t, err.Error()) } @@ -213,7 +213,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("connection.region"); err == nil { - assert.Equal(t, string("us-east-1"), vString) + assert.Equal(t, string(defaultConfig.Connection.Region), vString) } else { assert.FailNow(t, err.Error()) } @@ -235,7 +235,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vBool, err := cmdFlags.GetBool("connection.disable-ssl"); err == nil { - assert.Equal(t, bool(*new(bool)), vBool) + assert.Equal(t, bool(defaultConfig.Connection.DisableSSL), vBool) } else { assert.FailNow(t, err.Error()) } @@ -257,7 +257,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("container"); err == nil { - assert.Equal(t, string(*new(string)), vString) + assert.Equal(t, string(defaultConfig.InitContainer), vString) } else { assert.FailNow(t, err.Error()) } @@ -279,7 +279,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vInt, err := cmdFlags.GetInt("cache.max_size_mbs"); err == nil { - assert.Equal(t, int(*new(int)), vInt) + assert.Equal(t, int(defaultConfig.Cache.MaxSizeMegabytes), vInt) } else { assert.FailNow(t, err.Error()) } @@ -301,7 +301,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vInt, err := cmdFlags.GetInt("cache.target_gc_percent"); err == nil { - assert.Equal(t, int(*new(int)), vInt) + assert.Equal(t, int(defaultConfig.Cache.TargetGCPercent), vInt) } else { assert.FailNow(t, err.Error()) } @@ -323,7 +323,7 @@ func TestConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vInt64, err := cmdFlags.GetInt64("limits.maxDownloadMBs"); err == nil { - assert.Equal(t, int64(2), vInt64) + assert.Equal(t, int64(defaultConfig.Limits.GetLimitMegabytes), vInt64) } else { assert.FailNow(t, err.Error()) } From 17757daad422af6d2830649fad3bd0b1a8bc615e Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 10 Apr 2019 15:41:36 -0700 Subject: [PATCH 009/191] Update target go in lint make target --- flytestdlib/boilerplate/lyft/golang_test_targets/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile index 1c6f893521..04b79ba99e 100644 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile @@ -1,6 +1,6 @@ .PHONY: lint lint: #lints the package for common code smells - which golangci-lint || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $$GOPATH/bin v1.10 + which golangci-lint || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $$GOPATH/bin v1.11 golangci-lint run # If code is failing goimports linter, this will fix. From 13aff7ac2f34aaf0e9b8b9b7d589b7b2845d5f12 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 17 Apr 2019 11:37:50 -0700 Subject: [PATCH 010/191] Add lods to debug test concurrent issue --- flytestdlib/config/tests/accessor_test.go | 42 +++++++++++++++++------ 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index 34d86237e9..702c9fc86a 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -30,6 +30,11 @@ import ( type accessorCreatorFn func(registry config.Section, configPath string) config.Accessor +type testLogger interface { + Logf(format string, args ...interface{}) + Errorf(format string, args ...interface{}) +} + func getRandInt() uint64 { c := 10 b := make([]byte, c) @@ -323,7 +328,7 @@ func TestAccessor_UpdateConfig(t *testing.T) { r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) firstValue := r.StringValue - fileUpdated, err := beginWaitForFileChange(configFile) + fileUpdated, err := beginWaitForFileChange(t, configFile) assert.NoError(t, err) _, err = populateConfigData(configFile) @@ -346,7 +351,7 @@ func TestAccessor_UpdateConfig(t *testing.T) { // Independently watch for when symlink underlying change happens to know when do we expect accessor to have picked up // the changes - fileUpdated, err := beginWaitForFileChange(configFile) + fileUpdated, err := beginWaitForFileChange(t, configFile) assert.NoError(t, err) // 2. Start accessor with the symlink as config location @@ -383,7 +388,7 @@ func TestAccessor_UpdateConfig(t *testing.T) { // Wait for filewatcher event assert.NoError(t, waitForFileChangeOrTimeout(fileUpdated)) - time.Sleep(2 * time.Second) + time.Sleep(5 * time.Second) r = section.GetConfig().(*MyComponentConfig) secondValue := r.StringValue @@ -462,7 +467,7 @@ func waitForFileChangeOrTimeout(done chan error) error { } } -func beginWaitForFileChange(filename string) (done chan error, terminalErr error) { +func beginWaitForFileChange(logger testLogger, filename string) (done chan error, terminalErr error) { watcher, err := fsnotify.NewWatcher() if err != nil { return nil, err @@ -480,12 +485,21 @@ func beginWaitForFileChange(filename string) (done chan error, terminalErr error go func() { for { select { - case event := <-watcher.Events: + case event, channelOpen := <-watcher.Events: + if !channelOpen { + logger.Logf("Events Channel has been closed") + done <- nil + return + } + + logger.Logf("Received watcher event [%v], %v", event) // we only care about the config file currentConfigFile, err := filepath.EvalSymlinks(filename) if err != nil { + logger.Errorf("Failed to EvalSymLinks. Will attempt to close watcher now. Error: %v", err) closeErr := watcher.Close() if closeErr != nil { + logger.Errorf("Failed to close watcher. Error: %v", closeErr) done <- closeErr } else { done <- err @@ -501,10 +515,12 @@ func beginWaitForFileChange(filename string) (done chan error, terminalErr error if (filepath.Clean(event.Name) == configFile && event.Op&writeOrCreateMask != 0) || (currentConfigFile != "" && currentConfigFile != realConfigFile) { + + logger.Logf("CurrentConfigFile [%v], RealConfigFile [%v]", currentConfigFile, realConfigFile) realConfigFile = currentConfigFile closeErr := watcher.Close() if closeErr != nil { - fmt.Printf("Close Watcher error: %v\n", closeErr) + logger.Errorf("Failed to close watcher. Error: %v", closeErr) } else { done <- nil } @@ -512,21 +528,25 @@ func beginWaitForFileChange(filename string) (done chan error, terminalErr error return } else if filepath.Clean(event.Name) == configFile && event.Op&fsnotify.Remove&fsnotify.Remove != 0 { + + logger.Logf("ConfigFile [%v] Removed.", configFile) closeErr := watcher.Close() if closeErr != nil { - fmt.Printf("Close Watcher error: %v\n", closeErr) + logger.Logf("Close Watcher error: %v", closeErr) } else { done <- nil } return } - case err, ok := <-watcher.Errors: - if ok { - fmt.Printf("Watcher error: %v\n", err) + case err, channelOpen := <-watcher.Errors: + if !channelOpen { + logger.Logf("Error Channel has been closed.") + } else { + logger.Logf("Watcher error: %v", err) closeErr := watcher.Close() if closeErr != nil { - fmt.Printf("Close Watcher error: %v\n", closeErr) + logger.Logf("Close Watcher error: %v\n", closeErr) } } From 6cfceec205ec460b8bd0ddca122740d0249140b3 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 17 Apr 2019 16:29:41 -0700 Subject: [PATCH 011/191] atomic symlink --- flytestdlib/config/tests/accessor_test.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index 702c9fc86a..5bffe8650e 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -399,8 +399,8 @@ func TestAccessor_UpdateConfig(t *testing.T) { } func changeSymLink(targetPath, symLink string) error { + tmpLink := tempFileName("temp-sym-link-*") if runtime.GOOS == "windows" { - tmpLink := tempFileName("temp-sym-link-*") err := exec.Command("mklink", filepath.Clean(tmpLink), filepath.Clean(targetPath)).Run() if err != nil { return err @@ -414,7 +414,15 @@ func changeSymLink(targetPath, symLink string) error { return exec.Command("del", filepath.Clean(tmpLink)).Run() } - return exec.Command("ln", "-sfn", filepath.Clean(targetPath), filepath.Clean(symLink)).Run() + // ln -sfn is not an atomic operation. Under the hood, it first calls the system unlink then symlink calls. During + // that, there will be a brief moment when there is no symlink at all. mv operation is, however, atomic. That's + // why we make this command instead + err := exec.Command("ln", "-s", filepath.Clean(targetPath), filepath.Clean(tmpLink)).Run() + if err != nil { + return err + } + + return exec.Command("mv", "-Tf", filepath.Clean(tmpLink), filepath.Clean(symLink)).Run() } // 1. Create Dir structure: @@ -492,7 +500,7 @@ func beginWaitForFileChange(logger testLogger, filename string) (done chan error return } - logger.Logf("Received watcher event [%v], %v", event) + logger.Logf("Received watcher event [%v]", event) // we only care about the config file currentConfigFile, err := filepath.EvalSymlinks(filename) if err != nil { From 6cc4a4d48f3ada4101cf6e9909626c37de48982b Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 17 Apr 2019 23:29:42 -0700 Subject: [PATCH 012/191] simplify tests --- flytestdlib/cli/pflags/api/generator.go | 43 +++-- flytestdlib/cli/pflags/api/generator_test.go | 4 +- flytestdlib/cli/pflags/api/sample.go | 1 + flytestdlib/config/tests/accessor_test.go | 167 ++----------------- 4 files changed, 51 insertions(+), 164 deletions(-) diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index 0ee2a61de4..c6ea06fc21 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -5,6 +5,7 @@ import ( "fmt" "go/types" "path/filepath" + "strings" "github.com/lyft/flytestdlib/logger" @@ -86,17 +87,35 @@ func buildFieldForSlice(ctx context.Context, t SliceOrArray, name, goName, usage }, nil } -func appendAccessorIfNotEmpty(baseAccessor, childAccessor string) string { - if len(baseAccessor) == 0 { - return baseAccessor +// Appends field accessors using "." as the delimiter. +// e.g. appendAccessors("var1", "field1", "subField") will output "var1.field1.subField" +func appendAccessors(accessors ...string) string { + sb := strings.Builder{} + switch len(accessors) { + case 0: + return "" + case 1: + return accessors[0] } - return baseAccessor + "." + childAccessor + for _, s := range accessors { + if len(s) > 0 { + if sb.Len() > 0 { + sb.WriteString(".") + } + + sb.WriteString(s) + } + } + + return sb.String() } // Traverses fields in type and follows recursion tree to discover all fields. It stops when one of two conditions is // met; encountered a basic type (e.g. string, int... etc.) or the field type implements UnmarshalJSON. -func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValueAccessor string) ([]FieldInfo, error) { +// If passed a non-empty defaultValueAccessor, it'll be used to fill in default values instead of any default value +// specified in pflag tag. +func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValueAccessor, fieldPath string) ([]FieldInfo, error) { logger.Printf(ctx, "Finding all fields in [%v.%v.%v]", typ.Obj().Pkg().Path(), typ.Obj().Pkg().Name(), typ.Obj().Name()) @@ -149,8 +168,8 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue } defaultValue := tag.DefaultValue - if accessor := appendAccessorIfNotEmpty(defaultValueAccessor, v.Name()); len(accessor) > 0 { - defaultValue = accessor + if len(defaultValueAccessor) > 0 { + defaultValue = appendAccessors(defaultValueAccessor, fieldPath, v.Name()) if isPtr { defaultValue = fmt.Sprintf("cfg.elemValueOrNil(%s).(%s)", defaultValue, t.Name()) @@ -184,11 +203,13 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue } defaultValue := tag.DefaultValue - if accessor := appendAccessorIfNotEmpty(defaultValueAccessor, v.Name()); len(accessor) > 0 { - defaultValue = accessor + if len(defaultValueAccessor) > 0 { + defaultValue = appendAccessors(defaultValueAccessor, fieldPath, v.Name()) if isStringer(t) { defaultValue = defaultValue + ".String()" } else { + logger.Infof(ctx, "Field [%v] of type [%v] does not implement Stringer interface."+ + " Will use fmt.Sprintf() to get its default value.", v.Name(), t.String()) defaultValue = fmt.Sprintf("fmt.Sprintf(\"%%v\",%s)", defaultValue) } } @@ -211,7 +232,7 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue } else { logger.Infof(ctx, "Traversing fields in type.") - nested, err := discoverFieldsRecursive(logger.WithIndent(ctx, indent), t, appendAccessorIfNotEmpty(defaultValueAccessor, v.Name())) + nested, err := discoverFieldsRecursive(logger.WithIndent(ctx, indent), t, defaultValueAccessor, appendAccessors(fieldPath, v.Name())) if err != nil { return nil, err } @@ -317,7 +338,7 @@ func (g PFlagProviderGenerator) Generate(ctx context.Context) (PFlagProvider, er defaultValueAccessor = g.defaultVar.Name() } - fields, err := discoverFieldsRecursive(ctx, g.st, defaultValueAccessor) + fields, err := discoverFieldsRecursive(ctx, g.st, defaultValueAccessor, "") if err != nil { return PFlagProvider{}, err } diff --git a/flytestdlib/cli/pflags/api/generator_test.go b/flytestdlib/cli/pflags/api/generator_test.go index b1d7c617c1..26f77a64e0 100644 --- a/flytestdlib/cli/pflags/api/generator_test.go +++ b/flytestdlib/cli/pflags/api/generator_test.go @@ -21,9 +21,9 @@ func elemValueOrNil(v interface{}) interface{} { if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { if reflect.ValueOf(v).IsNil() { return reflect.Zero(t.Elem()).Interface() - } else { - return reflect.ValueOf(v).Interface() } + + return reflect.ValueOf(v).Interface() } else if v == nil { return reflect.Zero(t).Interface() } diff --git a/flytestdlib/cli/pflags/api/sample.go b/flytestdlib/cli/pflags/api/sample.go index 43dfce7585..f1b40e5b74 100644 --- a/flytestdlib/cli/pflags/api/sample.go +++ b/flytestdlib/cli/pflags/api/sample.go @@ -3,6 +3,7 @@ package api import ( "encoding/json" "errors" + "github.com/lyft/flytestdlib/storage" ) diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index 5bffe8650e..d8c9e2a5a0 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -16,8 +16,6 @@ import ( "testing" "time" - "github.com/fsnotify/fsnotify" - k8sRand "k8s.io/apimachinery/pkg/util/rand" "github.com/lyft/flytestdlib/config" @@ -30,11 +28,6 @@ import ( type accessorCreatorFn func(registry config.Section, configPath string) config.Accessor -type testLogger interface { - Logf(format string, args ...interface{}) - Errorf(format string, args ...interface{}) -} - func getRandInt() uint64 { c := 10 b := make([]byte, c) @@ -328,16 +321,11 @@ func TestAccessor_UpdateConfig(t *testing.T) { r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) firstValue := r.StringValue - fileUpdated, err := beginWaitForFileChange(t, configFile) - assert.NoError(t, err) - _, err = populateConfigData(configFile) assert.NoError(t, err) - // Simulate filewatcher event - assert.NoError(t, waitForFileChangeOrTimeout(fileUpdated)) - - time.Sleep(2 * time.Second) + // Wait enough for the file change notification to propagate. + time.Sleep(5 * time.Second) r = reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) secondValue := r.StringValue @@ -345,20 +333,17 @@ func TestAccessor_UpdateConfig(t *testing.T) { }) t.Run(fmt.Sprintf("[%v] Change handler k8s configmaps", provider(config.Options{}).ID()), func(t *testing.T) { + reg := config.NewRootSection() + section, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + var firstValue string + // 1. Create Dir structure watchDir, configFile, cleanup := newSymlinkedConfigFile(t) defer cleanup() - // Independently watch for when symlink underlying change happens to know when do we expect accessor to have picked up - // the changes - fileUpdated, err := beginWaitForFileChange(t, configFile) - assert.NoError(t, err) - // 2. Start accessor with the symlink as config location - reg := config.NewRootSection() - section, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) - assert.NoError(t, err) - opts := config.Options{ SearchPaths: []string{configFile}, RootSection: reg, @@ -368,7 +353,8 @@ func TestAccessor_UpdateConfig(t *testing.T) { assert.NoError(t, err) r := section.GetConfig().(*MyComponentConfig) - firstValue := r.StringValue + firstValue = r.StringValue + t.Logf("First value: %v", firstValue) // 3. Now update /data symlink to point to data2 dataDir2 := path.Join(watchDir, "data2") @@ -376,8 +362,9 @@ func TestAccessor_UpdateConfig(t *testing.T) { assert.NoError(t, err) configFile2 := path.Join(dataDir2, "config.yaml") - _, err = populateConfigData(configFile2) + newData, err := populateConfigData(configFile2) assert.NoError(t, err) + t.Logf("New value written to file: %v", newData.MyComponentConfig.StringValue) // change the symlink using the `ln -sfn` command err = changeSymLink(dataDir2, path.Join(watchDir, "data")) @@ -385,9 +372,6 @@ func TestAccessor_UpdateConfig(t *testing.T) { t.Logf("New config Location: %v", configFile2) - // Wait for filewatcher event - assert.NoError(t, waitForFileChangeOrTimeout(fileUpdated)) - time.Sleep(5 * time.Second) r = section.GetConfig().(*MyComponentConfig) @@ -414,15 +398,9 @@ func changeSymLink(targetPath, symLink string) error { return exec.Command("del", filepath.Clean(tmpLink)).Run() } - // ln -sfn is not an atomic operation. Under the hood, it first calls the system unlink then symlink calls. During - // that, there will be a brief moment when there is no symlink at all. mv operation is, however, atomic. That's - // why we make this command instead - err := exec.Command("ln", "-s", filepath.Clean(targetPath), filepath.Clean(tmpLink)).Run() - if err != nil { - return err - } - - return exec.Command("mv", "-Tf", filepath.Clean(tmpLink), filepath.Clean(symLink)).Run() + //// ln -sfn is not an atomic operation. Under the hood, it first calls the system unlink then symlink calls. During + //// that, there will be a brief moment when there is no symlink at all. + return exec.Command("ln", "-sfn", filepath.Clean(targetPath), filepath.Clean(symLink)).Run() } // 1. Create Dir structure: @@ -444,6 +422,7 @@ func newSymlinkedConfigFile(t *testing.T) (watchDir, configFile string, cleanup assert.NoError(t, err) cleanup = func() { + t.Logf("Removing watchDir [%v]", watchDir) assert.NoError(t, os.RemoveAll(watchDir)) } @@ -458,120 +437,6 @@ func newSymlinkedConfigFile(t *testing.T) (watchDir, configFile string, cleanup return watchDir, configFile, cleanup } -func waitForFileChangeOrTimeout(done chan error) error { - timeout := make(chan bool, 1) - go func() { - time.Sleep(5 * time.Second) - timeout <- true - }() - - for { - select { - case <-timeout: - return fmt.Errorf("timed out") - case err := <-done: - return err - } - } -} - -func beginWaitForFileChange(logger testLogger, filename string) (done chan error, terminalErr error) { - watcher, err := fsnotify.NewWatcher() - if err != nil { - return nil, err - } - - configFile := filepath.Clean(filename) - realConfigFile, err := filepath.EvalSymlinks(configFile) - if err != nil { - return nil, err - } - - configDir, _ := filepath.Split(configFile) - - done = make(chan error) - go func() { - for { - select { - case event, channelOpen := <-watcher.Events: - if !channelOpen { - logger.Logf("Events Channel has been closed") - done <- nil - return - } - - logger.Logf("Received watcher event [%v]", event) - // we only care about the config file - currentConfigFile, err := filepath.EvalSymlinks(filename) - if err != nil { - logger.Errorf("Failed to EvalSymLinks. Will attempt to close watcher now. Error: %v", err) - closeErr := watcher.Close() - if closeErr != nil { - logger.Errorf("Failed to close watcher. Error: %v", closeErr) - done <- closeErr - } else { - done <- err - } - - return - } - - // We only care about the config file with the following cases: - // 1 - if the config file was modified or created - // 2 - if the real path to the config file changed (eg: k8s ConfigMap replacement) - const writeOrCreateMask = fsnotify.Write | fsnotify.Create - if (filepath.Clean(event.Name) == configFile && - event.Op&writeOrCreateMask != 0) || - (currentConfigFile != "" && currentConfigFile != realConfigFile) { - - logger.Logf("CurrentConfigFile [%v], RealConfigFile [%v]", currentConfigFile, realConfigFile) - realConfigFile = currentConfigFile - closeErr := watcher.Close() - if closeErr != nil { - logger.Errorf("Failed to close watcher. Error: %v", closeErr) - } else { - done <- nil - } - - return - } else if filepath.Clean(event.Name) == configFile && - event.Op&fsnotify.Remove&fsnotify.Remove != 0 { - - logger.Logf("ConfigFile [%v] Removed.", configFile) - closeErr := watcher.Close() - if closeErr != nil { - logger.Logf("Close Watcher error: %v", closeErr) - } else { - done <- nil - } - - return - } - case err, channelOpen := <-watcher.Errors: - if !channelOpen { - logger.Logf("Error Channel has been closed.") - } else { - logger.Logf("Watcher error: %v", err) - closeErr := watcher.Close() - if closeErr != nil { - logger.Logf("Close Watcher error: %v\n", closeErr) - } - } - - done <- nil - return - } - } - }() - - err = watcher.Add(configDir) - if err != nil { - return nil, err - } - - return done, err -} - func testTypes(accessor accessorCreatorFn) func(t *testing.T) { return func(t *testing.T) { t.Run("ArrayConfigType", func(t *testing.T) { From a7ce2b52a30d7fdaa9a30a204a265e289c6f96ed Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 18 Apr 2019 00:07:53 -0700 Subject: [PATCH 013/191] Add marshal utils --- flytestdlib/utils/marshal_utils.go | 66 ++++++++++ flytestdlib/utils/marshal_utils_test.go | 165 ++++++++++++++++++++++++ 2 files changed, 231 insertions(+) create mode 100644 flytestdlib/utils/marshal_utils.go create mode 100644 flytestdlib/utils/marshal_utils_test.go diff --git a/flytestdlib/utils/marshal_utils.go b/flytestdlib/utils/marshal_utils.go new file mode 100644 index 0000000000..4a434108d6 --- /dev/null +++ b/flytestdlib/utils/marshal_utils.go @@ -0,0 +1,66 @@ +package utils + +import ( + "encoding/json" + "fmt" + + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" + structpb "github.com/golang/protobuf/ptypes/struct" +) + +var jsonPbMarshaler = jsonpb.Marshaler{} + +func UnmarshalStructToPb(structObj *structpb.Struct, msg proto.Message) error { + if structObj == nil { + return fmt.Errorf("nil Struct Object passed") + } + + jsonObj, err := jsonPbMarshaler.MarshalToString(structObj) + if err != nil { + return err + } + + if err = jsonpb.UnmarshalString(jsonObj, msg); err != nil { + return err + } + + return nil +} + +func MarshalPbToStruct(in proto.Message, out *structpb.Struct) error { + if out == nil { + return fmt.Errorf("nil Struct Object passed") + } + + jsonObj, err := jsonPbMarshaler.MarshalToString(in) + if err != nil { + return err + } + + if err = jsonpb.UnmarshalString(jsonObj, out); err != nil { + return err + } + + return nil +} + +func MarshalPbToString(msg proto.Message) (string, error) { + return jsonPbMarshaler.MarshalToString(msg) +} + +// TODO: Use the stdlib version in the future, or move there if not there. +// Don't use this if input is a proto Message. +func MarshalObjToStruct(input interface{}) (*structpb.Struct, error) { + b, err := json.Marshal(input) + if err != nil { + return nil, err + } + + // Turn JSON into a protobuf struct + structObj := &structpb.Struct{} + if err := jsonpb.UnmarshalString(string(b), structObj); err != nil { + return nil, err + } + return structObj, nil +} diff --git a/flytestdlib/utils/marshal_utils_test.go b/flytestdlib/utils/marshal_utils_test.go new file mode 100644 index 0000000000..33d185f3ee --- /dev/null +++ b/flytestdlib/utils/marshal_utils_test.go @@ -0,0 +1,165 @@ +package utils + +import ( + "reflect" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/golang/protobuf/proto" + structpb "github.com/golang/protobuf/ptypes/struct" +) + +// Simple proto +type TestProto struct { + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TestProto) Reset() { *m = TestProto{} } +func (m *TestProto) String() string { return proto.CompactTextString(m) } +func (*TestProto) ProtoMessage() {} +func (*TestProto) Descriptor() ([]byte, []int) { + return []byte{}, []int{0} +} +func (m *TestProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestProto.Unmarshal(m, b) +} +func (m *TestProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestProto.Marshal(b, m, deterministic) +} +func (dst *TestProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestProto.Merge(dst, src) +} +func (m *TestProto) XXX_Size() int { + return xxx_messageInfo_TestProto.Size(m) +} +func (m *TestProto) XXX_DiscardUnknown() { + xxx_messageInfo_TestProto.DiscardUnknown(m) +} + +var xxx_messageInfo_TestProto proto.InternalMessageInfo + +func (m *TestProto) GetWorkflowId() string { + if m != nil { + return m.StringValue + } + return "" +} + +func init() { + proto.RegisterType((*TestProto)(nil), "test.package.TestProto") +} + +func TestMarshalPbToString(t *testing.T) { + type args struct { + msg proto.Message + } + tests := []struct { + name string + args args + want string + wantErr bool + }{ + {"empty", args{msg: &TestProto{}}, "{}", false}, + {"has value", args{msg: &TestProto{StringValue: "hello"}}, `{"stringValue":"hello"}`, false}, + {"nil input", args{msg: nil}, "", true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := MarshalPbToString(tt.args.msg) + if (err != nil) != tt.wantErr { + t.Errorf("MarshalToString() error = %v, wantErr %v", err, tt.wantErr) + return + } + if got != tt.want { + t.Errorf("MarshalToString() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestMarshalObjToStruct(t *testing.T) { + type args struct { + input interface{} + } + tests := []struct { + name string + args args + want *structpb.Struct + wantErr bool + }{ + {"has value", args{input: &TestProto{StringValue: "hello"}}, &structpb.Struct{Fields: map[string]*structpb.Value{ + "string_value": {Kind: &structpb.Value_StringValue{StringValue: "hello"}}, + }}, false}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := MarshalObjToStruct(tt.args.input) + if (err != nil) != tt.wantErr { + t.Errorf("MarshalObjToStruct() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("MarshalObjToStruct() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestUnmarshalStructToPb(t *testing.T) { + type args struct { + structObj *structpb.Struct + msg proto.Message + } + tests := []struct { + name string + args args + expected proto.Message + wantErr bool + }{ + {"empty", args{structObj: &structpb.Struct{Fields: map[string]*structpb.Value{}}, msg: &TestProto{}}, &TestProto{}, false}, + {"has value", args{structObj: &structpb.Struct{Fields: map[string]*structpb.Value{ + "stringValue": {Kind: &structpb.Value_StringValue{StringValue: "hello"}}, + }}, msg: &TestProto{}}, &TestProto{StringValue: "hello"}, false}, + {"nil input", args{structObj: nil}, nil, true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if err := UnmarshalStructToPb(tt.args.structObj, tt.args.msg); (err != nil) != tt.wantErr { + t.Errorf("UnmarshalStructToPb() error = %v, wantErr %v", err, tt.wantErr) + } else { + assert.Equal(t, tt.expected, tt.args.msg) + } + }) + } +} + +func TestMarshalPbToStruct(t *testing.T) { + type args struct { + in proto.Message + out *structpb.Struct + } + tests := []struct { + name string + args args + expected *structpb.Struct + wantErr bool + }{ + {"empty", args{in: &TestProto{}, out: &structpb.Struct{}}, &structpb.Struct{Fields: map[string]*structpb.Value{}}, false}, + {"has value", args{in: &TestProto{StringValue: "hello"}, out: &structpb.Struct{}}, &structpb.Struct{Fields: map[string]*structpb.Value{ + "stringValue": {Kind: &structpb.Value_StringValue{StringValue: "hello"}}, + }}, false}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if err := MarshalPbToStruct(tt.args.in, tt.args.out); (err != nil) != tt.wantErr { + t.Errorf("MarshalPbToStruct() error = %v, wantErr %v", err, tt.wantErr) + } else { + assert.Equal(t, tt.expected.Fields, tt.args.out.Fields) + } + }) + } +} From 362c166faaf43e1c4df6e20c89d8a59039355578 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 18 Apr 2019 10:26:17 -0700 Subject: [PATCH 014/191] lint --- flytestdlib/utils/marshal_utils_test.go | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/flytestdlib/utils/marshal_utils_test.go b/flytestdlib/utils/marshal_utils_test.go index 33d185f3ee..1cece1e580 100644 --- a/flytestdlib/utils/marshal_utils_test.go +++ b/flytestdlib/utils/marshal_utils_test.go @@ -7,15 +7,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/golang/protobuf/proto" - structpb "github.com/golang/protobuf/ptypes/struct" + "github.com/golang/protobuf/ptypes/struct" ) // Simple proto type TestProto struct { - StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` } func (m *TestProto) Reset() { *m = TestProto{} } @@ -24,24 +21,6 @@ func (*TestProto) ProtoMessage() {} func (*TestProto) Descriptor() ([]byte, []int) { return []byte{}, []int{0} } -func (m *TestProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TestProto.Unmarshal(m, b) -} -func (m *TestProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TestProto.Marshal(b, m, deterministic) -} -func (dst *TestProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestProto.Merge(dst, src) -} -func (m *TestProto) XXX_Size() int { - return xxx_messageInfo_TestProto.Size(m) -} -func (m *TestProto) XXX_DiscardUnknown() { - xxx_messageInfo_TestProto.DiscardUnknown(m) -} - -var xxx_messageInfo_TestProto proto.InternalMessageInfo - func (m *TestProto) GetWorkflowId() string { if m != nil { return m.StringValue From 904eeff242ec78453baaee1b600d02eb7e67eaa0 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 18 Apr 2019 10:31:20 -0700 Subject: [PATCH 015/191] lint --- flytestdlib/utils/marshal_utils_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytestdlib/utils/marshal_utils_test.go b/flytestdlib/utils/marshal_utils_test.go index 1cece1e580..a5f1512e19 100644 --- a/flytestdlib/utils/marshal_utils_test.go +++ b/flytestdlib/utils/marshal_utils_test.go @@ -21,7 +21,7 @@ func (*TestProto) ProtoMessage() {} func (*TestProto) Descriptor() ([]byte, []int) { return []byte{}, []int{0} } -func (m *TestProto) GetWorkflowId() string { +func (m *TestProto) GetWorkflowID() string { if m != nil { return m.StringValue } From 97117a81a755a6f272c302a06497a102f9b29cb2 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 18 Apr 2019 12:01:16 -0700 Subject: [PATCH 016/191] docs & refactor --- flytestdlib/utils/marshal_utils.go | 52 ++++++++++++++++--------- flytestdlib/utils/marshal_utils_test.go | 21 ++++++---- 2 files changed, 47 insertions(+), 26 deletions(-) diff --git a/flytestdlib/utils/marshal_utils.go b/flytestdlib/utils/marshal_utils.go index 4a434108d6..4d9cc14eff 100644 --- a/flytestdlib/utils/marshal_utils.go +++ b/flytestdlib/utils/marshal_utils.go @@ -1,66 +1,80 @@ package utils import ( + "bytes" "encoding/json" "fmt" - "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" - structpb "github.com/golang/protobuf/ptypes/struct" + "github.com/golang/protobuf/ptypes/struct" + "github.com/pkg/errors" ) var jsonPbMarshaler = jsonpb.Marshaler{} +// Unmarshals a proto struct into a proto message using jsonPb marshaler. func UnmarshalStructToPb(structObj *structpb.Struct, msg proto.Message) error { if structObj == nil { - return fmt.Errorf("nil Struct Object passed") + return fmt.Errorf("nil Struct object passed") + } + + if msg == nil { + return fmt.Errorf("nil proto.Message object passed") } jsonObj, err := jsonPbMarshaler.MarshalToString(structObj) if err != nil { - return err + return errors.WithMessage(err, "Failed to marshal strcutObj input") } if err = jsonpb.UnmarshalString(jsonObj, msg); err != nil { - return err + return errors.WithMessage(err, "Failed to unmarshal json obj into proto") } return nil } -func MarshalPbToStruct(in proto.Message, out *structpb.Struct) error { - if out == nil { - return fmt.Errorf("nil Struct Object passed") +// Marshals a proto message into proto Struct using jsonPb marshaler. +func MarshalPbToStruct(in proto.Message) (out *structpb.Struct, err error) { + if in == nil { + return nil, fmt.Errorf("nil proto message passed") } - jsonObj, err := jsonPbMarshaler.MarshalToString(in) - if err != nil { - return err + var buf bytes.Buffer + if err := jsonPbMarshaler.Marshal(&buf, in); err != nil { + return nil, errors.WithMessage(err, "Failed to marshal input proto message") } - if err = jsonpb.UnmarshalString(jsonObj, out); err != nil { - return err + out = &structpb.Struct{} + if err = jsonpb.Unmarshal(bytes.NewReader(buf.Bytes()), out); err != nil { + return nil, errors.WithMessage(err, "Failed to unmarshal json object into struct") } - return nil + return out, nil } +// Marshals a proto message using jsonPb marshaler to string. func MarshalPbToString(msg proto.Message) (string, error) { return jsonPbMarshaler.MarshalToString(msg) } -// TODO: Use the stdlib version in the future, or move there if not there. -// Don't use this if input is a proto Message. +// Marshals obj into a struct. Will use jsonPb if input is a proto message, otherwise, it'll use json +// marshaler. func MarshalObjToStruct(input interface{}) (*structpb.Struct, error) { + if p, casted := input.(proto.Message); casted { + return MarshalPbToStruct(p) + } + b, err := json.Marshal(input) if err != nil { - return nil, err + return nil, errors.WithMessage(err, "Failed to marshal input proto message") } // Turn JSON into a protobuf struct structObj := &structpb.Struct{} - if err := jsonpb.UnmarshalString(string(b), structObj); err != nil { - return nil, err + if err := jsonpb.Unmarshal(bytes.NewReader(b), structObj); err != nil { + return nil, errors.WithMessage(err, "Failed to unmarshal json object into struct") } + return structObj, nil } diff --git a/flytestdlib/utils/marshal_utils_test.go b/flytestdlib/utils/marshal_utils_test.go index a5f1512e19..4ac0fc130b 100644 --- a/flytestdlib/utils/marshal_utils_test.go +++ b/flytestdlib/utils/marshal_utils_test.go @@ -10,6 +10,10 @@ import ( "github.com/golang/protobuf/ptypes/struct" ) +type SimpleType struct { + StringValue string `json:"string_value,omitempty"` +} + // Simple proto type TestProto struct { StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` @@ -70,9 +74,13 @@ func TestMarshalObjToStruct(t *testing.T) { want *structpb.Struct wantErr bool }{ - {"has value", args{input: &TestProto{StringValue: "hello"}}, &structpb.Struct{Fields: map[string]*structpb.Value{ + {"has proto value", args{input: &TestProto{StringValue: "hello"}}, &structpb.Struct{Fields: map[string]*structpb.Value{ + "stringValue": {Kind: &structpb.Value_StringValue{StringValue: "hello"}}, + }}, false}, + {"has struct value", args{input: SimpleType{StringValue: "hello"}}, &structpb.Struct{Fields: map[string]*structpb.Value{ "string_value": {Kind: &structpb.Value_StringValue{StringValue: "hello"}}, }}, false}, + {"has string value", args{input: "hello"}, nil, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -118,8 +126,7 @@ func TestUnmarshalStructToPb(t *testing.T) { func TestMarshalPbToStruct(t *testing.T) { type args struct { - in proto.Message - out *structpb.Struct + in proto.Message } tests := []struct { name string @@ -127,17 +134,17 @@ func TestMarshalPbToStruct(t *testing.T) { expected *structpb.Struct wantErr bool }{ - {"empty", args{in: &TestProto{}, out: &structpb.Struct{}}, &structpb.Struct{Fields: map[string]*structpb.Value{}}, false}, - {"has value", args{in: &TestProto{StringValue: "hello"}, out: &structpb.Struct{}}, &structpb.Struct{Fields: map[string]*structpb.Value{ + {"empty", args{in: &TestProto{}}, &structpb.Struct{Fields: map[string]*structpb.Value{}}, false}, + {"has value", args{in: &TestProto{StringValue: "hello"}}, &structpb.Struct{Fields: map[string]*structpb.Value{ "stringValue": {Kind: &structpb.Value_StringValue{StringValue: "hello"}}, }}, false}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if err := MarshalPbToStruct(tt.args.in, tt.args.out); (err != nil) != tt.wantErr { + if got, err := MarshalPbToStruct(tt.args.in); (err != nil) != tt.wantErr { t.Errorf("MarshalPbToStruct() error = %v, wantErr %v", err, tt.wantErr) } else { - assert.Equal(t, tt.expected.Fields, tt.args.out.Fields) + assert.Equal(t, tt.expected.Fields, got.Fields) } }) } From c444a2cfeaafffbb97de31fd5ca862b6daddec74 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 18 Apr 2019 12:58:47 -0700 Subject: [PATCH 017/191] minor --- flytestdlib/cli/pflags/api/generator.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index c6ea06fc21..2b7faa4eb3 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -139,11 +139,10 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue tag.Name = v.Name() } - isPtr := false typ := v.Type() - if ptr, casted := typ.(*types.Pointer); casted { + ptr, isPtr := typ.(*types.Pointer) + if isPtr { typ = ptr.Elem() - isPtr = true } switch t := typ.(type) { From 74d591556dd6304ac30f57795aa366276157612c Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 18 Apr 2019 13:33:26 -0700 Subject: [PATCH 018/191] lint --- flytestdlib/utils/marshal_utils.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flytestdlib/utils/marshal_utils.go b/flytestdlib/utils/marshal_utils.go index 4d9cc14eff..129de4f87d 100644 --- a/flytestdlib/utils/marshal_utils.go +++ b/flytestdlib/utils/marshal_utils.go @@ -4,9 +4,10 @@ import ( "bytes" "encoding/json" "fmt" + "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes/struct" + structpb "github.com/golang/protobuf/ptypes/struct" "github.com/pkg/errors" ) From 578749afa715e3718db4246ba1b761a9ec58a443 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 18 Apr 2019 14:11:48 -0700 Subject: [PATCH 019/191] solidify unit tests --- flytestdlib/cli/pflags/api/generator.go | 10 ++++++++-- flytestdlib/config/tests/accessor_test.go | 21 ++++++++++++++++++++ flytestdlib/utils/auto_refresh_cache_test.go | 16 ++++++++++++--- 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index 2b7faa4eb3..2f41faab9e 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -101,10 +101,16 @@ func appendAccessors(accessors ...string) string { for _, s := range accessors { if len(s) > 0 { if sb.Len() > 0 { - sb.WriteString(".") + if _, err := sb.WriteString("."); err != nil { + fmt.Printf("Failed to writeString, error: %v", err) + return "" + } } - sb.WriteString(s) + if _, err := sb.WriteString(s); err != nil { + fmt.Printf("Failed to writeString, error: %v", err) + return "" + } } } diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index d8c9e2a5a0..e6f93095a1 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -379,6 +379,27 @@ func TestAccessor_UpdateConfig(t *testing.T) { // Make sure values have changed assert.NotEqual(t, firstValue, secondValue) }) + + t.Run(fmt.Sprintf("[%v] Default variables", provider(config.Options{}).ID()), func(t *testing.T) { + reg := config.NewRootSection() + _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{ + StringValue: "default value 1", + StringValue2: "default value 2", + }) + assert.NoError(t, err) + + v := provider(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "config.yaml")}, + RootSection: reg, + }) + key := strings.ToUpper("my-component.str") + assert.NoError(t, os.Setenv(key, "Set From Env")) + defer func() { assert.NoError(t, os.Unsetenv(key)) }() + assert.NoError(t, v.UpdateConfig(context.TODO())) + r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) + assert.Equal(t, "Set From Env", r.StringValue) + assert.Equal(t, "default value 2", r.StringValue2) + }) } } diff --git a/flytestdlib/utils/auto_refresh_cache_test.go b/flytestdlib/utils/auto_refresh_cache_test.go index 85a09ce508..05d80ed2ba 100644 --- a/flytestdlib/utils/auto_refresh_cache_test.go +++ b/flytestdlib/utils/auto_refresh_cache_test.go @@ -2,6 +2,7 @@ package utils import ( "context" + "sync" "testing" "time" @@ -15,6 +16,7 @@ type testCacheItem struct { val int deleted atomic.Bool resyncPeriod time.Duration + wg sync.WaitGroup } func (m *testCacheItem) ID() string { @@ -28,6 +30,8 @@ func (m *testCacheItem) moveNext() { } func (m *testCacheItem) syncItem(ctx context.Context, obj CacheItem) (CacheItem, error) { + defer func() { m.wg.Done() }() + if m.deleted.Load() { return nil, nil } @@ -51,10 +55,15 @@ func TestCache(t *testing.T) { testResyncPeriod := time.Millisecond rateLimiter := NewRateLimiter("mockLimiter", 100, 1) - item := &testCacheItem{val: 0, resyncPeriod: testResyncPeriod, deleted: atomic.NewBool(false)} + wg := sync.WaitGroup{} + wg.Add(1) + item := &testCacheItem{ + val: 0, + resyncPeriod: testResyncPeriod, + deleted: atomic.NewBool(false), + wg: wg,} cache := NewAutoRefreshCache(item.syncItem, rateLimiter, testResyncPeriod) - //ctx := context.Background() ctx, cancel := context.WithCancel(context.Background()) cache.Start(ctx) @@ -75,7 +84,8 @@ func TestCache(t *testing.T) { // removed? item.moveNext() item.deleted.Store(true) - time.Sleep(testResyncPeriod * 10) // spare enough time to process remove! + wg.Wait() + time.Sleep(testResyncPeriod * 2) // spare enough time to process remove! val := cache.Get(item.ID()) assert.Nil(t, val) From 7e82abf88f3579580e9c1edc386b5f724bcc65d0 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 18 Apr 2019 14:34:14 -0700 Subject: [PATCH 020/191] Refactor test --- flytestdlib/utils/auto_refresh_cache_test.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/flytestdlib/utils/auto_refresh_cache_test.go b/flytestdlib/utils/auto_refresh_cache_test.go index 05d80ed2ba..b7007a702d 100644 --- a/flytestdlib/utils/auto_refresh_cache_test.go +++ b/flytestdlib/utils/auto_refresh_cache_test.go @@ -2,7 +2,6 @@ package utils import ( "context" - "sync" "testing" "time" @@ -16,7 +15,7 @@ type testCacheItem struct { val int deleted atomic.Bool resyncPeriod time.Duration - wg sync.WaitGroup + synced atomic.Int32 } func (m *testCacheItem) ID() string { @@ -30,11 +29,12 @@ func (m *testCacheItem) moveNext() { } func (m *testCacheItem) syncItem(ctx context.Context, obj CacheItem) (CacheItem, error) { - defer func() { m.wg.Done() }() + defer func() { m.synced.Inc() }() if m.deleted.Load() { return nil, nil } + return m, nil } @@ -55,13 +55,11 @@ func TestCache(t *testing.T) { testResyncPeriod := time.Millisecond rateLimiter := NewRateLimiter("mockLimiter", 100, 1) - wg := sync.WaitGroup{} - wg.Add(1) item := &testCacheItem{ val: 0, resyncPeriod: testResyncPeriod, deleted: atomic.NewBool(false), - wg: wg,} + synced: atomic.NewInt32(0),} cache := NewAutoRefreshCache(item.syncItem, rateLimiter, testResyncPeriod) ctx, cancel := context.WithCancel(context.Background()) @@ -83,9 +81,14 @@ func TestCache(t *testing.T) { // removed? item.moveNext() + currentSyncCount := item.synced.Load() item.deleted.Store(true) - wg.Wait() - time.Sleep(testResyncPeriod * 2) // spare enough time to process remove! + for currentSyncCount == item.synced.Load() { + time.Sleep(testResyncPeriod * 5) // spare enough time to process remove! + } + + time.Sleep(testResyncPeriod * 10) // spare enough time to process remove! + val := cache.Get(item.ID()) assert.Nil(t, val) From 5ec38597168d850b0076ed92bd933bcd6b37d50f Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 18 Apr 2019 14:52:49 -0700 Subject: [PATCH 021/191] lint --- flytestdlib/utils/auto_refresh_cache_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytestdlib/utils/auto_refresh_cache_test.go b/flytestdlib/utils/auto_refresh_cache_test.go index b7007a702d..dab8c9d907 100644 --- a/flytestdlib/utils/auto_refresh_cache_test.go +++ b/flytestdlib/utils/auto_refresh_cache_test.go @@ -59,7 +59,7 @@ func TestCache(t *testing.T) { val: 0, resyncPeriod: testResyncPeriod, deleted: atomic.NewBool(false), - synced: atomic.NewInt32(0),} + synced: atomic.NewInt32(0)} cache := NewAutoRefreshCache(item.syncItem, rateLimiter, testResyncPeriod) ctx, cancel := context.WithCancel(context.Background()) From 29a2c517ca022613266b7093853ac0a2c865f551 Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Mon, 22 Apr 2019 14:13:53 -0700 Subject: [PATCH 022/191] adding lru Cache --- flytestdlib/Gopkg.lock | 13 ++++ flytestdlib/utils/auto_refresh_cache.go | 98 ++++++++++++++++++------- 2 files changed, 85 insertions(+), 26 deletions(-) diff --git a/flytestdlib/Gopkg.lock b/flytestdlib/Gopkg.lock index a56ebd2dba..c2d2438f89 100644 --- a/flytestdlib/Gopkg.lock +++ b/flytestdlib/Gopkg.lock @@ -162,6 +162,17 @@ pruneopts = "UT" revision = "77c84b1dd69c41b74fe0a94ca8ee257d85947327" +[[projects]] + digest = "1:d15ee511aa0f56baacc1eb4c6b922fa1c03b38413b6be18166b996d82a0156ea" + name = "github.com/hashicorp/golang-lru" + packages = [ + ".", + "simplelru", + ] + pruneopts = "UT" + revision = "7087cb70de9f7a8bc0a10c375cb0d2280a8edf9c" + version = "v0.5.1" + [[projects]] digest = "1:c0d19ab64b32ce9fe5cf4ddceba78d5bc9807f0016db6b1183599da3dcc24d10" name = "github.com/hashicorp/hcl" @@ -492,10 +503,12 @@ "github.com/golang/protobuf/proto", "github.com/golang/protobuf/ptypes", "github.com/golang/protobuf/ptypes/duration", + "github.com/golang/protobuf/ptypes/struct", "github.com/golang/protobuf/ptypes/timestamp", "github.com/graymeta/stow", "github.com/graymeta/stow/local", "github.com/graymeta/stow/s3", + "github.com/hashicorp/golang-lru", "github.com/magiconair/properties/assert", "github.com/mitchellh/mapstructure", "github.com/pkg/errors", diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index a231bbd7c2..e231fa558c 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -2,11 +2,13 @@ package utils import ( "context" - "sync" - "time" - + "github.com/hashicorp/golang-lru" "github.com/lyft/flytestdlib/logger" + "github.com/lyft/flytestdlib/promutils" + "github.com/prometheus/client_golang/prometheus" "k8s.io/apimachinery/pkg/util/wait" + "sync" + "time" ) // AutoRefreshCache with regular GetOrCreate and Delete along with background asynchronous refresh. Caller provides @@ -27,16 +29,50 @@ type CacheItem interface { ID() string } -type CacheSyncItem func(ctx context.Context, obj CacheItem) (CacheItem, error) +// Possible actions for the cache to take as a result of running the sync function on any given cache item +type CacheSyncAction int + +const ( + // The item returned has been updated and should be updated in the cache + Update CacheSyncAction = iota + + // The item should be removed from the cache + Delete +) + +type CacheSyncItem func(ctx context.Context, obj CacheItem) ( + newItem CacheItem, result CacheSyncAction, err error) + +func getEvictionFunction(counter prometheus.Counter) func(key interface{}, value interface{}) { + return func(_ interface{}, _ interface{}) { + counter.Inc() + } +} + +func NewAutoRefreshCache(syncCb CacheSyncItem, syncRateLimiter RateLimiter, resyncPeriod time.Duration, + size int, scope promutils.Scope) (AutoRefreshCache, error) { + + var evictionFunction func(key interface{}, value interface{}) + + // If a scope is specified, we'll add a function to log a metric when evicting + if scope != nil { + counter := scope.MustNewCounter("lru_evictions", "Counter for evictions from LRU") + evictionFunction = getEvictionFunction(counter) + } + lruCache, err := lru.NewWithEvict(size, evictionFunction) + if err != nil { + return nil, err + } -func NewAutoRefreshCache(syncCb CacheSyncItem, syncRateLimiter RateLimiter, resyncPeriod time.Duration) AutoRefreshCache { cache := &autoRefreshCache{ syncCb: syncCb, + lruMap: *lruCache, syncRateLimiter: syncRateLimiter, resyncPeriod: resyncPeriod, + scope: scope, } - return cache + return cache, nil } // Thread-safe general purpose auto-refresh cache that watches for updates asynchronously for the keys after they are added to @@ -48,8 +84,10 @@ func NewAutoRefreshCache(syncCb CacheSyncItem, syncRateLimiter RateLimiter, resy type autoRefreshCache struct { syncCb CacheSyncItem syncMap sync.Map + lruMap lru.Cache syncRateLimiter RateLimiter resyncPeriod time.Duration + scope promutils.Scope } func (w *autoRefreshCache) Start(ctx context.Context) { @@ -57,7 +95,7 @@ func (w *autoRefreshCache) Start(ctx context.Context) { } func (w *autoRefreshCache) Get(id string) CacheItem { - if val, ok := w.syncMap.Load(id); ok { + if val, ok := w.lruMap.Get(id); ok { return val.(CacheItem) } return nil @@ -66,34 +104,42 @@ func (w *autoRefreshCache) Get(id string) CacheItem { // Return the item if exists else create it. // Create should be invoked only once. recreating the object is not supported. func (w *autoRefreshCache) GetOrCreate(item CacheItem) (CacheItem, error) { - if val, ok := w.syncMap.Load(item.ID()); ok { + if val, ok := w.lruMap.Get(item.ID()); ok { return val.(CacheItem), nil } - w.syncMap.Store(item.ID(), item) + w.lruMap.Add(item.ID(), item) return item, nil } +// This function is called internally by its own timer. Roughly, it will, +// - List keys +// - For each of the keys, call syncCb, which tells us if the item has been updated +// - If it has, then do a remove followed by an add. We can get away with this because it is guaranteed that +// this loop will run to completion before the next one begins. +// +// What happens when the number of things that a user is trying to keep track of exceeds the size +// of the cache? Trivial case where the cache is size 1 and we're trying to keep track of two things. +// * Plugin asks for update on item 1 - cache evicts item 2, stores 1 and returns it unchanged +// * Plugin asks for update on item 2 - cache evicts item 1, stores 2 and returns it unchanged +// * Sync loop updates item 2, repeat func (w *autoRefreshCache) sync(ctx context.Context) { - w.syncMap.Range(func(key, value interface{}) bool { - if w.syncRateLimiter != nil { - err := w.syncRateLimiter.Wait(ctx) + keys := w.lruMap.Keys() + for _, k := range keys { + // If not ok, it means evicted between the item was evicted between calling the keys and the iteration loop + if value, ok := w.lruMap.Peek(k); ok { + newItem, result, err := w.syncCb(ctx, value.(CacheItem)) if err != nil { - logger.Warnf(ctx, "unexpected failure in rate-limiter wait %v", key) - return true + logger.Error(ctx, "failed to get latest copy of the item %v", key) } - } - item, err := w.syncCb(ctx, value.(CacheItem)) - if err != nil { - logger.Error(ctx, "failed to get latest copy of the item %v", key) - } - if item == nil { - w.syncMap.Delete(key) - } else { - w.syncMap.Store(key, item) - } + if result == Update { + w.lruMap.Remove(k) + w.lruMap.Add(k, newItem) - return true - }) + } else if result == Delete { + w.lruMap.Remove(k) + } + } + } } From a54187bc39049f772cc808791c721827cf73774e Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Mon, 22 Apr 2019 14:21:12 -0700 Subject: [PATCH 023/191] add a state for unchanged --- flytestdlib/utils/auto_refresh_cache.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index e231fa558c..ffe9b61429 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -31,10 +31,11 @@ type CacheItem interface { // Possible actions for the cache to take as a result of running the sync function on any given cache item type CacheSyncAction int - const ( + Unchanged CacheSyncAction = iota + // The item returned has been updated and should be updated in the cache - Update CacheSyncAction = iota + Update // The item should be removed from the cache Delete @@ -52,9 +53,8 @@ func getEvictionFunction(counter prometheus.Counter) func(key interface{}, value func NewAutoRefreshCache(syncCb CacheSyncItem, syncRateLimiter RateLimiter, resyncPeriod time.Duration, size int, scope promutils.Scope) (AutoRefreshCache, error) { + // If a scope is specified, we'll add a function to log a metric when an object gets evicted var evictionFunction func(key interface{}, value interface{}) - - // If a scope is specified, we'll add a function to log a metric when evicting if scope != nil { counter := scope.MustNewCounter("lru_evictions", "Counter for evictions from LRU") evictionFunction = getEvictionFunction(counter) @@ -130,7 +130,7 @@ func (w *autoRefreshCache) sync(ctx context.Context) { if value, ok := w.lruMap.Peek(k); ok { newItem, result, err := w.syncCb(ctx, value.(CacheItem)) if err != nil { - logger.Error(ctx, "failed to get latest copy of the item %v", key) + logger.Error(ctx, "failed to get latest copy of the item %v", k) } if result == Update { From 6b9a891eb45b1fd11e134c7385c7be533c4deb32 Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Mon, 22 Apr 2019 17:58:41 -0700 Subject: [PATCH 024/191] adding basic unit test --- flytestdlib/utils/auto_refresh_cache.go | 11 +- flytestdlib/utils/auto_refresh_cache_test.go | 165 ++++++++---------- .../utils/auto_refresh_example_test.go | 14 +- 3 files changed, 89 insertions(+), 101 deletions(-) diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index ffe9b61429..59a1d916e1 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -31,6 +31,7 @@ type CacheItem interface { // Possible actions for the cache to take as a result of running the sync function on any given cache item type CacheSyncAction int + const ( Unchanged CacheSyncAction = iota @@ -41,6 +42,10 @@ const ( Delete ) +// Your implementation of this function for your cache instance is responsible for returning +// 1. The new CacheItem, and +// 2. What action should be taken. The sync function has no insight into your object, and needs to be +// told explicitly if the new item is different from the old one. type CacheSyncItem func(ctx context.Context, obj CacheItem) ( newItem CacheItem, result CacheSyncAction, err error) @@ -105,9 +110,11 @@ func (w *autoRefreshCache) Get(id string) CacheItem { // Create should be invoked only once. recreating the object is not supported. func (w *autoRefreshCache) GetOrCreate(item CacheItem) (CacheItem, error) { if val, ok := w.lruMap.Get(item.ID()); ok { + //fmt.Println("existing") return val.(CacheItem), nil } + //fmt.Println("adding") w.lruMap.Add(item.ID(), item) return item, nil } @@ -126,7 +133,8 @@ func (w *autoRefreshCache) GetOrCreate(item CacheItem) (CacheItem, error) { func (w *autoRefreshCache) sync(ctx context.Context) { keys := w.lruMap.Keys() for _, k := range keys { - // If not ok, it means evicted between the item was evicted between calling the keys and the iteration loop + // If not ok, it means evicted between the item was evicted between getting the keys and this update loop + // which is fine, we can just ignore. if value, ok := w.lruMap.Peek(k); ok { newItem, result, err := w.syncCb(ctx, value.(CacheItem)) if err != nil { @@ -136,7 +144,6 @@ func (w *autoRefreshCache) sync(ctx context.Context) { if result == Update { w.lruMap.Remove(k) w.lruMap.Add(k, newItem) - } else if result == Delete { w.lruMap.Remove(k) } diff --git a/flytestdlib/utils/auto_refresh_cache_test.go b/flytestdlib/utils/auto_refresh_cache_test.go index dab8c9d907..d0968892ea 100644 --- a/flytestdlib/utils/auto_refresh_cache_test.go +++ b/flytestdlib/utils/auto_refresh_cache_test.go @@ -2,120 +2,93 @@ package utils import ( "context" + "fmt" + "github.com/stretchr/testify/assert" "testing" "time" - - atomic2 "sync/atomic" - - "github.com/lyft/flytestdlib/atomic" - "github.com/stretchr/testify/assert" ) -type testCacheItem struct { - val int - deleted atomic.Bool - resyncPeriod time.Duration - synced atomic.Int32 -} +const fakeCacheItemValueLimit = 10 -func (m *testCacheItem) ID() string { - return "id" +type fakeCacheItem struct { + id string + val int } -func (m *testCacheItem) moveNext() { - // change value and spare enough time for cache to process the change. - m.val++ - time.Sleep(m.resyncPeriod * 5) +func (f fakeCacheItem) ID() string { + return f.id } -func (m *testCacheItem) syncItem(ctx context.Context, obj CacheItem) (CacheItem, error) { - defer func() { m.synced.Inc() }() - - if m.deleted.Load() { - return nil, nil +func syncFakeItem(_ context.Context, obj CacheItem) (CacheItem, CacheSyncAction, error) { + item := obj.(fakeCacheItem) + if item.val == fakeCacheItemValueLimit { + // After the item has gone through ten update cycles, leave it unchanged + return obj, Unchanged, nil } - return m, nil -} - -type testAutoIncrementItem struct { - val int32 + return fakeCacheItem{id: item.ID(), val: item.val + 1}, Update, nil } -func (a *testAutoIncrementItem) ID() string { - return "autoincrement" +func syncFakeItemLagged(ctx context.Context, obj CacheItem) (CacheItem, CacheSyncAction, error) { + time.Sleep(100 * time.Millisecond) + return syncFakeItem(ctx, obj) } -func (a *testAutoIncrementItem) syncItem(ctx context.Context, obj CacheItem) (CacheItem, error) { - atomic2.AddInt32(&a.val, 1) - return a, nil +func syncFakeItemAlwaysDelete(_ context.Context, obj CacheItem) (CacheItem, CacheSyncAction, error) { + return obj, Delete, nil } -func TestCache(t *testing.T) { +func TestCacheTwo(t *testing.T) { testResyncPeriod := time.Millisecond rateLimiter := NewRateLimiter("mockLimiter", 100, 1) - item := &testCacheItem{ - val: 0, - resyncPeriod: testResyncPeriod, - deleted: atomic.NewBool(false), - synced: atomic.NewInt32(0)} - cache := NewAutoRefreshCache(item.syncItem, rateLimiter, testResyncPeriod) - - ctx, cancel := context.WithCancel(context.Background()) - cache.Start(ctx) - - // create - _, err := cache.GetOrCreate(item) - assert.NoError(t, err, "unexpected GetOrCreate failure") - - // synced? - item.moveNext() - m := cache.Get(item.ID()).(*testCacheItem) - assert.Equal(t, 1, m.val) - - // synced again? - item.moveNext() - m = cache.Get(item.ID()).(*testCacheItem) - assert.Equal(t, 2, m.val) - - // removed? - item.moveNext() - currentSyncCount := item.synced.Load() - item.deleted.Store(true) - for currentSyncCount == item.synced.Load() { - time.Sleep(testResyncPeriod * 5) // spare enough time to process remove! - } - - time.Sleep(testResyncPeriod * 10) // spare enough time to process remove! - - val := cache.Get(item.ID()) - - assert.Nil(t, val) - cancel() -} - -func TestCacheContextCancel(t *testing.T) { - testResyncPeriod := time.Millisecond - rateLimiter := NewRateLimiter("mockLimiter", 10000, 1) - - item := &testAutoIncrementItem{val: 0} - cache := NewAutoRefreshCache(item.syncItem, rateLimiter, testResyncPeriod) - - ctx, cancel := context.WithCancel(context.Background()) - cache.Start(ctx) - _, err := cache.GetOrCreate(item) - assert.NoError(t, err, "failed to add item to cache") - time.Sleep(testResyncPeriod * 10) // spare enough time to process remove! - cancel() - - // Get item - m, err := cache.GetOrCreate(item) - val1 := m.(*testAutoIncrementItem).val - assert.NoError(t, err, "unexpected GetOrCreate failure") - - // wait a few more resync periods and check that nothings has changed as auto-refresh is stopped - time.Sleep(testResyncPeriod * 20) - val2 := m.(*testAutoIncrementItem).val - assert.Equal(t, val1, val2) + t.Run("normal operation", func(t *testing.T) { + // the size of the cache is at least as large as the number of items we're storing + cache, err := NewAutoRefreshCache(syncFakeItem, rateLimiter, testResyncPeriod, 10, nil) + assert.NoError(t, err) + + ctx, cancel := context.WithCancel(context.Background()) + cache.Start(ctx) + + // Create ten items in the cache + for i := 1; i <= 10; i++ { + cache.GetOrCreate(fakeCacheItem{ + id: fmt.Sprintf("%d", i), + val: 0, + }) + } + + // Wait half a second for all resync periods to complete + time.Sleep(500 * time.Millisecond) + for i := 1; i <= 10; i++ { + item := cache.Get(fmt.Sprintf("%d", i)) + assert.Equal(t, 10, item.(fakeCacheItem).val) + } + cancel() + }) + + t.Run("deleting objects from cache", func(t *testing.T) { + // the size of the cache is at least as large as the number of items we're storing + cache, err := NewAutoRefreshCache(syncFakeItemAlwaysDelete, rateLimiter, testResyncPeriod, 10, nil) + assert.NoError(t, err) + + ctx, cancel := context.WithCancel(context.Background()) + cache.Start(ctx) + + // Create ten items in the cache + for i := 1; i <= 10; i++ { + cache.GetOrCreate(fakeCacheItem{ + id: fmt.Sprintf("%d", i), + val: 0, + }) + } + + // Wait for all resync periods to complete + time.Sleep(50 * time.Millisecond) + for i := 1; i <= 10; i++ { + obj := cache.Get(fmt.Sprintf("%d", i)) + assert.Nil(t, obj) + } + cancel() + }) } diff --git a/flytestdlib/utils/auto_refresh_example_test.go b/flytestdlib/utils/auto_refresh_example_test.go index 1c47d39ec5..b01ef65a1f 100644 --- a/flytestdlib/utils/auto_refresh_example_test.go +++ b/flytestdlib/utils/auto_refresh_example_test.go @@ -46,8 +46,13 @@ func ExampleNewAutoRefreshCache() { exampleService := newExampleService() // define a sync method that the cache can use to auto-refresh in background - syncItemCb := func(ctx context.Context, obj CacheItem) (CacheItem, error) { - return exampleService.getStatus(obj.(*ExampleCacheItem).ID()), nil + syncItemCb := func(ctx context.Context, obj CacheItem) (CacheItem, CacheSyncAction, error) { + oldItem := obj.(*ExampleCacheItem) + newItem := exampleService.getStatus(oldItem.ID()) + if newItem.status != oldItem.status { + return newItem, Update, nil + } + return newItem, Unchanged, nil } // define resync period as time duration we want cache to refresh. We can go as low as we want but cache @@ -61,7 +66,10 @@ func ExampleNewAutoRefreshCache() { // since cache refreshes itself asynchronously, it may not notice that an object has been deleted immediately, // so users of the cache should have the delete logic aware of this shortcoming (eg. not-exists may be a valid // error during removal if based on status in cache). - cache := NewAutoRefreshCache(syncItemCb, rateLimiter, resyncPeriod) + cache, err := NewAutoRefreshCache(syncItemCb, rateLimiter, resyncPeriod, 100, nil) + if err != nil { + panic(err) + } // start the cache with a context that would be to stop the cache by cancelling the context ctx, cancel := context.WithCancel(context.Background()) From e9d5819be538975f233295d49191b57f3cdcd206 Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Mon, 22 Apr 2019 18:28:24 -0700 Subject: [PATCH 025/191] go imports --- flytestdlib/utils/auto_refresh_cache.go | 7 +++---- flytestdlib/utils/auto_refresh_cache_test.go | 14 ++++++-------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index 59a1d916e1..5242beaf63 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -2,13 +2,13 @@ package utils import ( "context" - "github.com/hashicorp/golang-lru" + "time" + + lru "github.com/hashicorp/golang-lru" "github.com/lyft/flytestdlib/logger" "github.com/lyft/flytestdlib/promutils" "github.com/prometheus/client_golang/prometheus" "k8s.io/apimachinery/pkg/util/wait" - "sync" - "time" ) // AutoRefreshCache with regular GetOrCreate and Delete along with background asynchronous refresh. Caller provides @@ -88,7 +88,6 @@ func NewAutoRefreshCache(syncCb CacheSyncItem, syncRateLimiter RateLimiter, resy // Sync is run as a fixed-interval-scheduled-task, and is skipped if sync from previous cycle is still running. type autoRefreshCache struct { syncCb CacheSyncItem - syncMap sync.Map lruMap lru.Cache syncRateLimiter RateLimiter resyncPeriod time.Duration diff --git a/flytestdlib/utils/auto_refresh_cache_test.go b/flytestdlib/utils/auto_refresh_cache_test.go index d0968892ea..c30dcde769 100644 --- a/flytestdlib/utils/auto_refresh_cache_test.go +++ b/flytestdlib/utils/auto_refresh_cache_test.go @@ -3,9 +3,10 @@ package utils import ( "context" "fmt" - "github.com/stretchr/testify/assert" "testing" "time" + + "github.com/stretchr/testify/assert" ) const fakeCacheItemValueLimit = 10 @@ -29,11 +30,6 @@ func syncFakeItem(_ context.Context, obj CacheItem) (CacheItem, CacheSyncAction, return fakeCacheItem{id: item.ID(), val: item.val + 1}, Update, nil } -func syncFakeItemLagged(ctx context.Context, obj CacheItem) (CacheItem, CacheSyncAction, error) { - time.Sleep(100 * time.Millisecond) - return syncFakeItem(ctx, obj) -} - func syncFakeItemAlwaysDelete(_ context.Context, obj CacheItem) (CacheItem, CacheSyncAction, error) { return obj, Delete, nil } @@ -52,10 +48,11 @@ func TestCacheTwo(t *testing.T) { // Create ten items in the cache for i := 1; i <= 10; i++ { - cache.GetOrCreate(fakeCacheItem{ + _, err := cache.GetOrCreate(fakeCacheItem{ id: fmt.Sprintf("%d", i), val: 0, }) + assert.NoError(t, err) } // Wait half a second for all resync periods to complete @@ -77,10 +74,11 @@ func TestCacheTwo(t *testing.T) { // Create ten items in the cache for i := 1; i <= 10; i++ { - cache.GetOrCreate(fakeCacheItem{ + _, err = cache.GetOrCreate(fakeCacheItem{ id: fmt.Sprintf("%d", i), val: 0, }) + assert.NoError(t, err) } // Wait for all resync periods to complete From 3cb2359358cce0ba70a8d36ef7c718f26ccc9f3b Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Tue, 23 Apr 2019 09:27:52 -0700 Subject: [PATCH 026/191] linting is complaining that i'm copying a mutex even though i copy it before using it --- flytestdlib/utils/auto_refresh_cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index 5242beaf63..5f1f808912 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -71,7 +71,7 @@ func NewAutoRefreshCache(syncCb CacheSyncItem, syncRateLimiter RateLimiter, resy cache := &autoRefreshCache{ syncCb: syncCb, - lruMap: *lruCache, + lruMap: lruCache, syncRateLimiter: syncRateLimiter, resyncPeriod: resyncPeriod, scope: scope, @@ -88,7 +88,7 @@ func NewAutoRefreshCache(syncCb CacheSyncItem, syncRateLimiter RateLimiter, resy // Sync is run as a fixed-interval-scheduled-task, and is skipped if sync from previous cycle is still running. type autoRefreshCache struct { syncCb CacheSyncItem - lruMap lru.Cache + lruMap *lru.Cache syncRateLimiter RateLimiter resyncPeriod time.Duration scope promutils.Scope From 7987dc537e5590db5d717a257467d09fc4b16b91 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 23 Apr 2019 11:18:38 -0700 Subject: [PATCH 027/191] Update utils/auto_refresh_cache.go Co-Authored-By: wild-endeavor --- flytestdlib/utils/auto_refresh_cache.go | 1 - 1 file changed, 1 deletion(-) diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index 5f1f808912..903d8d4cba 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -113,7 +113,6 @@ func (w *autoRefreshCache) GetOrCreate(item CacheItem) (CacheItem, error) { return val.(CacheItem), nil } - //fmt.Println("adding") w.lruMap.Add(item.ID(), item) return item, nil } From 7f46ee0524082893eeaa546c3b604366167fe553 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 23 Apr 2019 11:18:44 -0700 Subject: [PATCH 028/191] Update utils/auto_refresh_cache.go Co-Authored-By: wild-endeavor --- flytestdlib/utils/auto_refresh_cache.go | 1 - 1 file changed, 1 deletion(-) diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index 903d8d4cba..7d2b5e076f 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -109,7 +109,6 @@ func (w *autoRefreshCache) Get(id string) CacheItem { // Create should be invoked only once. recreating the object is not supported. func (w *autoRefreshCache) GetOrCreate(item CacheItem) (CacheItem, error) { if val, ok := w.lruMap.Get(item.ID()); ok { - //fmt.Println("existing") return val.(CacheItem), nil } From 0a2e1aac58c3473887c9dbceb6ddff0fc587bb78 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 23 Apr 2019 11:18:51 -0700 Subject: [PATCH 029/191] Update utils/auto_refresh_cache.go Co-Authored-By: wild-endeavor --- flytestdlib/utils/auto_refresh_cache.go | 1 - 1 file changed, 1 deletion(-) diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index 7d2b5e076f..3453483914 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -139,7 +139,6 @@ func (w *autoRefreshCache) sync(ctx context.Context) { } if result == Update { - w.lruMap.Remove(k) w.lruMap.Add(k, newItem) } else if result == Delete { w.lruMap.Remove(k) From 6df902fc2067725a37336413f276756fb4f89bc3 Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Tue, 23 Apr 2019 15:08:31 -0700 Subject: [PATCH 030/191] Add free badges for the project (#4) - Badges for release, build passing, license and docs - TODO add badge for coverage --- flytestdlib/{README.rst => README.md} | 5 +++++ 1 file changed, 5 insertions(+) rename flytestdlib/{README.rst => README.md} (72%) diff --git a/flytestdlib/README.rst b/flytestdlib/README.md similarity index 72% rename from flytestdlib/README.rst rename to flytestdlib/README.md index a43dc38bff..6411abcfb5 100644 --- a/flytestdlib/README.rst +++ b/flytestdlib/README.md @@ -1,5 +1,10 @@ Common Go Tools ===================== +[![Current Release](https://img.shields.io/github/release/flytestdlib.svg)](https://github.com/lyft/flytestdlib/releases/latest) +[![Build Status](https://travis-ci.org/lyft/flytestdlib.svg?branch=master)](https://travis-ci.org/lyft/flytestdlib) +[![GoDoc](https://godoc.org/github.com/lyft/flytestdlib?status.svg)](https://godoc.org/github.com/lyft/flytestdlib) +[![License](https://img.shields.io/badge/LICENSE-Apache2.0-ff69b4.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) + Shared components we found ourselves building time and time again, so we collected them in one place! This library consists of: From 556fa6ca68d8d312331953a3d44da4bb37a45254 Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Tue, 23 Apr 2019 16:11:47 -0700 Subject: [PATCH 031/191] Updated Version Handler to support BuildTime (#7) * Updated Version Handler to support BuildTime - Also added some documentation - Version information is outputted as JSON * lint fix --- flytestdlib/profutils/server.go | 15 ++++++++++++++- flytestdlib/profutils/server_test.go | 12 +++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/flytestdlib/profutils/server.go b/flytestdlib/profutils/server.go index b8240cf25c..b4dcc00ac3 100644 --- a/flytestdlib/profutils/server.go +++ b/flytestdlib/profutils/server.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "net/http" + "time" "github.com/lyft/flytestdlib/config" @@ -28,12 +29,20 @@ const ( contentTypeJSON = "application/json; charset=utf-8" ) +type BuildVersion struct { + Build string `json:"build"` + Version string `json:"version"` + Timestamp time.Time `json:"timestamp,string"` +} + +// Writes a string to the Http output stream func WriteStringResponse(resp http.ResponseWriter, code int, body string) error { resp.WriteHeader(code) _, err := resp.Write([]byte(body)) return err } +// Writes a JSON to the http output stream func WriteJSONResponse(resp http.ResponseWriter, code int, body interface{}) error { resp.Header().Set(contentTypeHeader, contentTypeJSON) resp.WriteHeader(code) @@ -44,6 +53,8 @@ func WriteJSONResponse(resp http.ResponseWriter, code int, body interface{}) err return WriteStringResponse(resp, http.StatusOK, string(j)) } +// Simple healthcheck module that returns OK and provides a simple L7 healthcheck +// TODO we may want to provide a simple function that returns a bool, where users could provide custom healthchecks func healtcheckHandler(w http.ResponseWriter, req *http.Request) { err := WriteStringResponse(w, http.StatusOK, http.StatusText(http.StatusOK)) if err != nil { @@ -51,13 +62,15 @@ func healtcheckHandler(w http.ResponseWriter, req *http.Request) { } } +// Handler that returns a JSON response indicating the Build Version information (refer to #version module) func versionHandler(w http.ResponseWriter, req *http.Request) { - err := WriteStringResponse(w, http.StatusOK, fmt.Sprintf("Build [%s], Version [%s]", version.Build, version.Version)) + err := WriteJSONResponse(w, http.StatusOK, BuildVersion{Build: version.Build, Version: version.Version, Timestamp: version.BuildTime}) if err != nil { panic(err) } } +// Provides a handler that dumps the config information as a string func configHandler(w http.ResponseWriter, req *http.Request) { m, err := config.AllConfigsAsMap(config.GetRootSection()) if err != nil { diff --git a/flytestdlib/profutils/server_test.go b/flytestdlib/profutils/server_test.go index a7ef350002..deb3383128 100644 --- a/flytestdlib/profutils/server_test.go +++ b/flytestdlib/profutils/server_test.go @@ -4,6 +4,9 @@ import ( "encoding/json" "net/http" "testing" + "time" + + "github.com/lyft/flytestdlib/version" "github.com/lyft/flytestdlib/internal/utils" @@ -85,9 +88,16 @@ func TestVersionHandler(t *testing.T) { URL: &testURL, } + version.BuildTime = time.Now() + http.DefaultServeMux.ServeHTTP(writer, request) assert.Equal(t, http.StatusOK, writer.Status) - assert.Equal(t, `Build [unknown], Version [unknown]`, string(writer.Body)) + assert.NotNil(t, writer.Body) + bv := BuildVersion{} + assert.NoError(t, json.Unmarshal(writer.Body, &bv)) + assert.Equal(t, bv.Timestamp.Unix(), version.BuildTime.Unix()) + assert.Equal(t, bv.Build, version.Build) + assert.Equal(t, bv.Version, version.Version) } func TestHealthcheckHandler(t *testing.T) { From 1f05d0c589e17e745306ed377baeb56ee50fe1bf Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 23 Apr 2019 19:03:54 -0700 Subject: [PATCH 032/191] [pflags] If there is a default value, use it for tests. (#8) * If there is a default value, use it for tests. * fixes * regenerate --- flytestdlib/cli/pflags/api/generator.go | 17 ++++++++--------- flytestdlib/cli/pflags/api/templates.go | 11 +++++++++++ flytestdlib/cli/pflags/api/testdata/testtype.go | 17 ++++++++++++++--- .../cli/pflags/api/testdata/testtype_test.go | 8 ++++---- flytestdlib/config/port.go | 4 ++++ flytestdlib/storage/config_flags_test.go | 2 +- flytestdlib/tests/testdata/combined.yaml | 2 ++ 7 files changed, 44 insertions(+), 17 deletions(-) diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index 2f41faab9e..93a3a040b2 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -177,7 +177,7 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue defaultValue = appendAccessors(defaultValueAccessor, fieldPath, v.Name()) if isPtr { - defaultValue = fmt.Sprintf("cfg.elemValueOrNil(%s).(%s)", defaultValue, t.Name()) + defaultValue = fmt.Sprintf("%s.elemValueOrNil(%s).(%s)", defaultValueAccessor, defaultValue, t.Name()) } } @@ -201,12 +201,6 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue // will use json unmarshaler to fill in the final config object. jsonUnmarshaler := isJSONUnmarshaler(t) - testValue := tag.DefaultValue - if len(tag.DefaultValue) == 0 { - tag.DefaultValue = `""` - testValue = `"1"` - } - defaultValue := tag.DefaultValue if len(defaultValueAccessor) > 0 { defaultValue = appendAccessors(defaultValueAccessor, fieldPath, v.Name()) @@ -214,11 +208,16 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue defaultValue = defaultValue + ".String()" } else { logger.Infof(ctx, "Field [%v] of type [%v] does not implement Stringer interface."+ - " Will use fmt.Sprintf() to get its default value.", v.Name(), t.String()) - defaultValue = fmt.Sprintf("fmt.Sprintf(\"%%v\",%s)", defaultValue) + " Will use %s.mustMarshalJSON() to get its default value.", defaultValueAccessor, v.Name(), t.String()) + defaultValue = fmt.Sprintf("%s.mustMarshalJSON(%s)", defaultValueAccessor, defaultValue) } } + testValue := defaultValue + if len(testValue) == 0 { + testValue = `"1"` + } + logger.Infof(ctx, "[%v] is of a Named type (struct) with default value [%v].", tag.Name, tag.DefaultValue) if jsonUnmarshaler { diff --git a/flytestdlib/cli/pflags/api/templates.go b/flytestdlib/cli/pflags/api/templates.go index 545d0ceae1..15057374f2 100644 --- a/flytestdlib/cli/pflags/api/templates.go +++ b/flytestdlib/cli/pflags/api/templates.go @@ -20,6 +20,8 @@ var mainTmpl = template.Must(template.New("MainFile").Parse( package {{ .Package }} import ( + "encoding/json" + "github.com/spf13/pflag" "fmt" {{range $path, $name := .Imports}} @@ -42,6 +44,15 @@ func ({{ .Name }}) elemValueOrNil(v interface{}) interface{} { return v } +func ({{ .Name }}) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + // GetPFlagSet will return strongly types pflags for all fields in {{ .Name }} and its nested types. The format of the // flags is json-name.json-sub-name... etc. func (cfg {{ .Name }}) GetPFlagSet(prefix string) *pflag.FlagSet { diff --git a/flytestdlib/cli/pflags/api/testdata/testtype.go b/flytestdlib/cli/pflags/api/testdata/testtype.go index dde0f48c80..ff6b7e63ba 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype.go @@ -4,9 +4,11 @@ package api import ( - "fmt" + "encoding/json" "reflect" + "fmt" + "github.com/spf13/pflag" ) @@ -26,6 +28,15 @@ func (TestType) elemValueOrNil(v interface{}) interface{} { return v } +func (TestType) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + // GetPFlagSet will return strongly types pflags for all fields in TestType and its nested types. The format of the // flags is json-name.json-sub-name... etc. func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { @@ -36,7 +47,7 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.IntSlice(fmt.Sprintf("%v%v", prefix, "ints"), []int{12, 1}, "") cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "strs"), []string{"12", "1"}, "") cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "complexArr"), []string{}, "") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "c"), fmt.Sprintf("%v", DefaultTestType.StringToJSON), "I'm a complex type but can be converted from string.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "c"), DefaultTestType.mustMarshalJSON(DefaultTestType.StringToJSON), "I'm a complex type but can be converted from string.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.type"), DefaultTestType.StorageConfig.Type, "Sets the type of storage to configure [s3/minio/local/mem].") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.endpoint"), DefaultTestType.StorageConfig.Connection.Endpoint.String(), "URL for storage client to connect to.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.auth-type"), DefaultTestType.StorageConfig.Connection.AuthType, "Auth Type to use [iam, accesskey].") @@ -48,6 +59,6 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.max_size_mbs"), DefaultTestType.StorageConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.target_gc_percent"), DefaultTestType.StorageConfig.Cache.TargetGCPercent, "Sets the garbage collection target percentage.") cmdFlags.Int64(fmt.Sprintf("%v%v", prefix, "storage.limits.maxDownloadMBs"), DefaultTestType.StorageConfig.Limits.GetLimitMegabytes, "Maximum allowed download size (in MBs) per call.") - cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "i"), cfg.elemValueOrNil(DefaultTestType.IntValue).(int), "") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "i"), DefaultTestType.elemValueOrNil(DefaultTestType.IntValue).(int), "") return cmdFlags } diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_test.go b/flytestdlib/cli/pflags/api/testdata/testtype_test.go index 03412f0d86..450e04068b 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype_test.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype_test.go @@ -235,14 +235,14 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("c"); err == nil { - assert.Equal(t, string(fmt.Sprintf("%v", DefaultTestType.StringToJSON)), vString) + assert.Equal(t, string(DefaultTestType.mustMarshalJSON(DefaultTestType.StringToJSON)), vString) } else { assert.FailNow(t, err.Error()) } }) t.Run("Override", func(t *testing.T) { - testValue := "1" + testValue := DefaultTestType.mustMarshalJSON(DefaultTestType.StringToJSON) cmdFlags.Set("c", testValue) if vString, err := cmdFlags.GetString("c"); err == nil { @@ -286,7 +286,7 @@ func TestTestType_SetFlags(t *testing.T) { }) t.Run("Override", func(t *testing.T) { - testValue := "1" + testValue := DefaultTestType.StorageConfig.Connection.Endpoint.String() cmdFlags.Set("storage.connection.endpoint", testValue) if vString, err := cmdFlags.GetString("storage.connection.endpoint"); err == nil { @@ -499,7 +499,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vInt, err := cmdFlags.GetInt("i"); err == nil { - assert.Equal(t, int(cfg.elemValueOrNil(DefaultTestType.IntValue).(int)), vInt) + assert.Equal(t, int(DefaultTestType.elemValueOrNil(DefaultTestType.IntValue).(int)), vInt) } else { assert.FailNow(t, err.Error()) } diff --git a/flytestdlib/config/port.go b/flytestdlib/config/port.go index 87bbc854e2..fef6e4d11b 100644 --- a/flytestdlib/config/port.go +++ b/flytestdlib/config/port.go @@ -12,6 +12,10 @@ type Port struct { Port int `json:"port,omitempty"` } +func (p Port) String() string { + return strconv.Itoa(p.Port) +} + func (p Port) MarshalJSON() ([]byte, error) { return json.Marshal(p.Port) } diff --git a/flytestdlib/storage/config_flags_test.go b/flytestdlib/storage/config_flags_test.go index 429af71283..4809b6b78a 100755 --- a/flytestdlib/storage/config_flags_test.go +++ b/flytestdlib/storage/config_flags_test.go @@ -132,7 +132,7 @@ func TestConfig_SetFlags(t *testing.T) { }) t.Run("Override", func(t *testing.T) { - testValue := "1" + testValue := defaultConfig.Connection.Endpoint.String() cmdFlags.Set("connection.endpoint", testValue) if vString, err := cmdFlags.GetString("connection.endpoint"); err == nil { diff --git a/flytestdlib/tests/testdata/combined.yaml b/flytestdlib/tests/testdata/combined.yaml index f167b1ab33..24a463b339 100755 --- a/flytestdlib/tests/testdata/combined.yaml +++ b/flytestdlib/tests/testdata/combined.yaml @@ -1,4 +1,6 @@ logger: + formatter: + type: "" level: 5 mute: false show-source: false From 23a3d52e66c75aaec78736ffd3c6aaaaf5808063 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 23 Apr 2019 19:09:42 -0700 Subject: [PATCH 033/191] Fix release tag image --- flytestdlib/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytestdlib/README.md b/flytestdlib/README.md index 6411abcfb5..6045bf3f46 100644 --- a/flytestdlib/README.md +++ b/flytestdlib/README.md @@ -1,6 +1,6 @@ Common Go Tools ===================== -[![Current Release](https://img.shields.io/github/release/flytestdlib.svg)](https://github.com/lyft/flytestdlib/releases/latest) +[![Current Release](https://img.shields.io/github/release/lyft/flytestdlib.svg)](https://github.com/lyft/flytestdlib/releases/latest) [![Build Status](https://travis-ci.org/lyft/flytestdlib.svg?branch=master)](https://travis-ci.org/lyft/flytestdlib) [![GoDoc](https://godoc.org/github.com/lyft/flytestdlib?status.svg)](https://godoc.org/github.com/lyft/flytestdlib) [![License](https://img.shields.io/badge/LICENSE-Apache2.0-ff69b4.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) From 23d5f1d4f632fb3f73fe3e4da8167eadc3bd82d6 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Tue, 23 Apr 2019 23:32:33 -0700 Subject: [PATCH 034/191] Scoop update for flytestdlib version v0.2.2-alpha.1 --- flytestdlib/flytestdlib.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 flytestdlib/flytestdlib.json diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json new file mode 100644 index 0000000000..4af8f55d08 --- /dev/null +++ b/flytestdlib/flytestdlib.json @@ -0,0 +1,26 @@ +{ + "version": "0.2.2-alpha.1", + "architecture": { + "32bit": { + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.2-alpha.1/flytestdlib_0.2.2-alpha.1_Windows_i386.zip", + "bin": [ + "pflags.exe" + ], + "hash": "47d5e8405da7ab80e402e4bc02fc935d165b6bd0d7e42a13a728dfb756fc170f" + }, + "64bit": { + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.2-alpha.1/flytestdlib_0.2.2-alpha.1_Windows_x86_64.zip", + "bin": [ + "pflags.exe" + ], + "hash": "59a9766bba67bb20fadcbe907137de8ad9d88996147bc3905098457e73103a00" + } + }, + "homepage": "https://godoc.org/github.com/lyft/flytestdlib", + "license": "Apache-2.0", + "description": "Common Go utilities (Typed-Config, PFlags, Prometheus Metrics,... more).", + "persist": [ + "data", + "config.toml" + ] +} \ No newline at end of file From 9de816c73ea55a2b8646e956997707fa6a8fbae4 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Wed, 24 Apr 2019 00:23:14 -0700 Subject: [PATCH 035/191] Scoop update for flytestdlib version v0.2.2-alpha.4 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 4af8f55d08..264a4e9ed6 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.2-alpha.1", + "version": "0.2.2-alpha.4", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.2-alpha.1/flytestdlib_0.2.2-alpha.1_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.2-alpha.4/flytestdlib_0.2.2-alpha.4_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "47d5e8405da7ab80e402e4bc02fc935d165b6bd0d7e42a13a728dfb756fc170f" + "hash": "cb3cd184ba9d371f0959782d99bdcc6638c9e337b1a7ed763ba26d14e65ed83b" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.2-alpha.1/flytestdlib_0.2.2-alpha.1_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.2-alpha.4/flytestdlib_0.2.2-alpha.4_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "59a9766bba67bb20fadcbe907137de8ad9d88996147bc3905098457e73103a00" + "hash": "2c4fc1edc8b61ff6d489bc5de046ffb7fd3dbe3f7b9a7a53b3262d7e5d150ca9" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From fa1cfb16c5955f4bbd06e06300cc1b1664953a48 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 24 Apr 2019 09:40:22 -0700 Subject: [PATCH 036/191] Hookkup Goreleaser (#10) * Goreleaser * Add contributing section * Update README.md * Add encrypted github token * Add version info to binary * update archive to archives * Update unit tests & docs * Update README.md * lint * lint again --- flytestdlib/.goreleaser.yml | 65 +++++++++++++++++++++++++++ flytestdlib/.travis.yml | 36 +++++++++------ flytestdlib/README.md | 38 ++++++++++++++++ flytestdlib/cli/pflags/cmd/version.go | 2 +- flytestdlib/profutils/server.go | 11 ++--- flytestdlib/profutils/server_test.go | 4 +- flytestdlib/version/version.go | 4 +- flytestdlib/version/version_test.go | 2 +- 8 files changed, 136 insertions(+), 26 deletions(-) create mode 100644 flytestdlib/.goreleaser.yml diff --git a/flytestdlib/.goreleaser.yml b/flytestdlib/.goreleaser.yml new file mode 100644 index 0000000000..6e193fe0e9 --- /dev/null +++ b/flytestdlib/.goreleaser.yml @@ -0,0 +1,65 @@ +before: + hooks: + - dep ensure -vendor-only +builds: + - env: + - CGO_ENABLED=0 + main: ./cli/pflags/main.go + binary: pflags + goos: + - linux + - windows + - darwin + ldflags: + - -s -w -X github.com/lyft/flytestdlib/version.Version={{.Version}} -X github.com/lyft/flytestdlib/version.Build={{.ShortCommit}} -X github.com/lyft/flytestdlib/version.BuildTime={{.Date}} +archives: + - replacements: + darwin: macOS + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 + format_overrides: + - goos: windows + format: zip +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' +scoop: + # Default is "https://github.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" + # url_template: "http://github.mycompany.com/foo/bar/releases/{{ .Tag }}/{{ .ArtifactName }}" + + # Repository to push the app manifest to. + bucket: + owner: lyft + name: flytestdlib + + # Git author used to commit to the repository. + # Defaults are shown. + commit_author: + name: goreleaserbot + email: goreleaser@carlosbecker.com + + # Your app's homepage. + # Default is empty. + homepage: "https://godoc.org/github.com/lyft/flytestdlib" + + # Your app's description. + # Default is empty. + description: "Common Go utilities (Typed-Config, PFlags, Prometheus Metrics,... more)." + + # Your app's license + # Default is empty. + license: Apache-2.0 + + # Persist data between application updates + persist: + - "data" + - "config.toml" diff --git a/flytestdlib/.travis.yml b/flytestdlib/.travis.yml index 05d3a1b406..99ebfa3e36 100644 --- a/flytestdlib/.travis.yml +++ b/flytestdlib/.travis.yml @@ -1,18 +1,28 @@ sudo: required language: go go: - - "1.11" +- '1.11' jobs: include: - - stage: test - name: unit tests - install: make install - script: make test_unit - - stage: test - name: benchmark tests - install: make install - script: make test_benchmark - - stage: test - install: make install - name: lint - script: make lint + - stage: test + name: unit tests + install: make install + script: make test_unit + - stage: test + name: benchmark tests + install: make install + script: make test_benchmark + - stage: test + install: make install + name: lint + script: make lint +deploy: +- provider: script + skip_cleanup: true + script: curl -sL https://git.io/goreleaser | bash + on: + tags: true + condition: "$TRAVIS_OS_NAME = linux" +env: + global: + secure: xqB2LwI1qbrPUIYXtaOnIoBX5b1h1ydxOvy5Cu1sS/R2t1BfYHFX5oH0/0Z23bfpQBpzEweXA3145xyjg1Q2vJiN2ebPLmMPduWdjp1be/4xWCnkftZuGW7LDEFg3zuREUMKdfDhkb0uQ5gzIte3TvGh/tJwfxwUHVHQEl1aqPYqbRHRqoLJZiuhgIH+17su5mBFfu/62xXMP8zImLUq4WLrmbmMszLWg3IOu+oawpMXuDsjoxkucdFjmo2rsVUNr3QNo7ock7hl1OYHJZvWuRV+HxCaNRNUrbr8GuWYUSNOB51Ml7kLAlSxnmKJMs1fZRxTPlXR/0+XA8zAWahcKvKxRqguoFNVqYEESS/yRoJhLctgwAjx/btSc1a4BXCwIDFXNFVBGyZiVcLnh9PG6WWXI2YRWSbXmoBG3QN8Dtdpz54qoCpCA7IVWijWBHVXiVbyIn9XmTMFCdMXIFZQ7mzzk6K+894taPSRsia305LCJ2/h1df8bLsw5zcXmjXjZpkxM7rK5nJqx6IiaZ94GmeRER3OQxKTxxBuoZvcWcn9+ni+FtA2EzJuMBxbWLh+jinfqqieLkoOPHeBzAN6YyaPuUQje/dT4tjdf95V+wuojfu/TqIk/o7WwMPgfYWP2tlj0R5GwoA3ZocZRXZYRP/gg1Cje6wCQCOiIPsFC5g= diff --git a/flytestdlib/README.md b/flytestdlib/README.md index 6045bf3f46..37986d95d9 100644 --- a/flytestdlib/README.md +++ b/flytestdlib/README.md @@ -46,3 +46,41 @@ This library consists of: - utils - version + +Contributing +------------ + +## Versioning + +This repo follows [semantic versioning](https://semver.org/). + +## Releases + +This repository is hooked up with [goreleaser](https://goreleaser.com/). Maintainers are expected to create tags and let goreleaser compose the release message and create a release. + +To create a new release, follow these steps: + +- Create a PR with your changes. + +- [Optional] Create an alpha tag on your branch and push that. + + - First get existing tags `git describe --abbrev=0 --tags` + + - Figure out the next alpha version (e.g. if tag is v1.2.3 then you should create a v1.2.4-alpha.0 tag) + + - Create a tag `git tag v1.2.4-alpha.0` + + - Push tag `git push --tags` + +- Merge your changes and checkout master branch `git checkout master && git pull` + +- Bump version tag and push to branch. + + - First get existing tags `git describe --abbrev=0 --tags` + + - Figure out the next release version (e.g. if tag is v1.2.3 then you should create a v1.2.4 tag or v1.3.0 or a v2.0.0 depending on what has changed. Refer to [Semantic Versioning](https://semver.org/) for information about when to bump each) + + - Create a tag `git tag v1.2.4` + + - Push tag `git push --tags` + diff --git a/flytestdlib/cli/pflags/cmd/version.go b/flytestdlib/cli/pflags/cmd/version.go index 8ee00af2e4..5d15a4d7c1 100644 --- a/flytestdlib/cli/pflags/cmd/version.go +++ b/flytestdlib/cli/pflags/cmd/version.go @@ -8,7 +8,7 @@ import ( var versionCmd = &cobra.Command{ Aliases: []string{"version", "ver"}, Run: func(cmd *cobra.Command, args []string) { - cmd.Printf("Version: %s\nBuildSHA: %s\nBuildTS: %s\n", version.Version, version.Build, version.BuildTime.String()) + version.LogBuildInformation("pflags") }, } diff --git a/flytestdlib/profutils/server.go b/flytestdlib/profutils/server.go index b4dcc00ac3..fe0157fca9 100644 --- a/flytestdlib/profutils/server.go +++ b/flytestdlib/profutils/server.go @@ -5,13 +5,10 @@ import ( "encoding/json" "fmt" "net/http" - "time" "github.com/lyft/flytestdlib/config" - - "github.com/lyft/flytestdlib/version" - "github.com/lyft/flytestdlib/logger" + "github.com/lyft/flytestdlib/version" "github.com/prometheus/client_golang/prometheus/promhttp" _ "net/http/pprof" // Import for pprof server @@ -30,9 +27,9 @@ const ( ) type BuildVersion struct { - Build string `json:"build"` - Version string `json:"version"` - Timestamp time.Time `json:"timestamp,string"` + Build string `json:"build"` + Version string `json:"version"` + Timestamp string `json:"timestamp,string"` } // Writes a string to the Http output stream diff --git a/flytestdlib/profutils/server_test.go b/flytestdlib/profutils/server_test.go index deb3383128..c989bcbbf0 100644 --- a/flytestdlib/profutils/server_test.go +++ b/flytestdlib/profutils/server_test.go @@ -88,14 +88,14 @@ func TestVersionHandler(t *testing.T) { URL: &testURL, } - version.BuildTime = time.Now() + version.BuildTime = time.Now().String() http.DefaultServeMux.ServeHTTP(writer, request) assert.Equal(t, http.StatusOK, writer.Status) assert.NotNil(t, writer.Body) bv := BuildVersion{} assert.NoError(t, json.Unmarshal(writer.Body, &bv)) - assert.Equal(t, bv.Timestamp.Unix(), version.BuildTime.Unix()) + assert.Equal(t, bv.Timestamp, version.BuildTime) assert.Equal(t, bv.Build, version.Build) assert.Equal(t, bv.Version, version.Version) } diff --git a/flytestdlib/version/version.go b/flytestdlib/version/version.go index ab3e4cf112..08536c05e4 100644 --- a/flytestdlib/version/version.go +++ b/flytestdlib/version/version.go @@ -17,13 +17,13 @@ var ( // Version for the build, should follow a semver Version = "unknown" // Build timestamp - BuildTime = time.Now() + BuildTime = time.Now().String() ) // Use this method to log the build information for the current app. The app name should be provided. To inject the build // and version information refer to the top-level comment in this file func LogBuildInformation(appName string) { logrus.Info("------------------------------------------------------------------------") - logrus.Infof("App [%s], Version [%s], BuildSHA [%s], BuildTS [%s]", appName, Version, Build, BuildTime.String()) + logrus.Infof("App [%s], Version [%s], BuildSHA [%s], BuildTS [%s]", appName, Version, Build, BuildTime) logrus.Info("------------------------------------------------------------------------") } diff --git a/flytestdlib/version/version_test.go b/flytestdlib/version/version_test.go index d4ddb2def4..be7826ab76 100644 --- a/flytestdlib/version/version_test.go +++ b/flytestdlib/version/version_test.go @@ -20,7 +20,7 @@ func (dFormat) Format(e *logrus.Entry) ([]byte, error) { func TestLogBuildInformation(t *testing.T) { n := time.Now() - BuildTime = n + BuildTime = n.String() buf := bytes.NewBufferString("") logrus.SetFormatter(dFormat{}) logrus.SetOutput(buf) From 9f9155072bcad0964d0fa4b3c4a120ba0fc25591 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Wed, 24 Apr 2019 09:46:17 -0700 Subject: [PATCH 037/191] Scoop update for flytestdlib version v0.2.2 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 264a4e9ed6..b708048a40 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.2-alpha.4", + "version": "0.2.2", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.2-alpha.4/flytestdlib_0.2.2-alpha.4_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.2/flytestdlib_0.2.2_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "cb3cd184ba9d371f0959782d99bdcc6638c9e337b1a7ed763ba26d14e65ed83b" + "hash": "3693ea92f967aa57568d1b646be44a8871261578e489113b2ff8d1926d47bf17" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.2-alpha.4/flytestdlib_0.2.2-alpha.4_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.2/flytestdlib_0.2.2_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "2c4fc1edc8b61ff6d489bc5de046ffb7fd3dbe3f7b9a7a53b3262d7e5d150ca9" + "hash": "c073e0dce9b45630bdd862eb7c1a45bc000c664e7d25f74be2ca0768a516cf3d" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 555f18ff2f71d1bbf023842863d3f0475a1f7437 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 24 Apr 2019 13:39:25 -0700 Subject: [PATCH 038/191] Add godownloader script (#11) * Add godownloader script * Update README.md * typo --- flytestdlib/README.md | 26 ++- flytestdlib/godownloader.sh | 381 ++++++++++++++++++++++++++++++++++++ 2 files changed, 400 insertions(+), 7 deletions(-) create mode 100644 flytestdlib/godownloader.sh diff --git a/flytestdlib/README.md b/flytestdlib/README.md index 37986d95d9..2e979e460d 100644 --- a/flytestdlib/README.md +++ b/flytestdlib/README.md @@ -16,6 +16,18 @@ This library consists of: Tool to generate a pflags for all fields in a given struct. + #### Install + + On POSIX systems, run: `curl -sfL https://raw.githubusercontent.com/lyft/flytestdlib/godownloader/godownloader.sh | sh` + + On Windows: + + Install scoop: `iex (new-object net.webclient).downloadstring('https://get.scoop.sh')` + + Run: `scoop bucket add flytestdlib https://github.com/lyft/flytestdlib.git` + + Run: `scoop install pflags` + - storage Abstract storage library that uses stow behind the scenes to connect to s3/azure/gcs but also offers configurable factory, in-memory storage (for testing) as well as native protobuf support. @@ -63,13 +75,13 @@ To create a new release, follow these steps: - Create a PR with your changes. - [Optional] Create an alpha tag on your branch and push that. - + - First get existing tags `git describe --abbrev=0 --tags` - + - Figure out the next alpha version (e.g. if tag is v1.2.3 then you should create a v1.2.4-alpha.0 tag) - + - Create a tag `git tag v1.2.4-alpha.0` - + - Push tag `git push --tags` - Merge your changes and checkout master branch `git checkout master && git pull` @@ -77,10 +89,10 @@ To create a new release, follow these steps: - Bump version tag and push to branch. - First get existing tags `git describe --abbrev=0 --tags` - + - Figure out the next release version (e.g. if tag is v1.2.3 then you should create a v1.2.4 tag or v1.3.0 or a v2.0.0 depending on what has changed. Refer to [Semantic Versioning](https://semver.org/) for information about when to bump each) - + - Create a tag `git tag v1.2.4` - + - Push tag `git push --tags` diff --git a/flytestdlib/godownloader.sh b/flytestdlib/godownloader.sh new file mode 100644 index 0000000000..679511f30b --- /dev/null +++ b/flytestdlib/godownloader.sh @@ -0,0 +1,381 @@ +#!/bin/sh +set -e +# Code generated by godownloader on 2019-04-24T17:57:45Z. DO NOT EDIT. +# + +usage() { + this=$1 + cat </dev/null +} +echoerr() { + echo "$@" 1>&2 +} +log_prefix() { + echo "$0" +} +_logp=6 +log_set_priority() { + _logp="$1" +} +log_priority() { + if test -z "$1"; then + echo "$_logp" + return + fi + [ "$1" -le "$_logp" ] +} +log_tag() { + case $1 in + 0) echo "emerg" ;; + 1) echo "alert" ;; + 2) echo "crit" ;; + 3) echo "err" ;; + 4) echo "warning" ;; + 5) echo "notice" ;; + 6) echo "info" ;; + 7) echo "debug" ;; + *) echo "$1" ;; + esac +} +log_debug() { + log_priority 7 || return 0 + echoerr "$(log_prefix)" "$(log_tag 7)" "$@" +} +log_info() { + log_priority 6 || return 0 + echoerr "$(log_prefix)" "$(log_tag 6)" "$@" +} +log_err() { + log_priority 3 || return 0 + echoerr "$(log_prefix)" "$(log_tag 3)" "$@" +} +log_crit() { + log_priority 2 || return 0 + echoerr "$(log_prefix)" "$(log_tag 2)" "$@" +} +uname_os() { + os=$(uname -s | tr '[:upper:]' '[:lower:]') + case "$os" in + msys_nt) os="windows" ;; + esac + echo "$os" +} +uname_arch() { + arch=$(uname -m) + case $arch in + x86_64) arch="amd64" ;; + x86) arch="386" ;; + i686) arch="386" ;; + i386) arch="386" ;; + aarch64) arch="arm64" ;; + armv5*) arch="armv5" ;; + armv6*) arch="armv6" ;; + armv7*) arch="armv7" ;; + esac + echo ${arch} +} +uname_os_check() { + os=$(uname_os) + case "$os" in + darwin) return 0 ;; + dragonfly) return 0 ;; + freebsd) return 0 ;; + linux) return 0 ;; + android) return 0 ;; + nacl) return 0 ;; + netbsd) return 0 ;; + openbsd) return 0 ;; + plan9) return 0 ;; + solaris) return 0 ;; + windows) return 0 ;; + esac + log_crit "uname_os_check '$(uname -s)' got converted to '$os' which is not a GOOS value. Please file bug at https://github.com/client9/shlib" + return 1 +} +uname_arch_check() { + arch=$(uname_arch) + case "$arch" in + 386) return 0 ;; + amd64) return 0 ;; + arm64) return 0 ;; + armv5) return 0 ;; + armv6) return 0 ;; + armv7) return 0 ;; + ppc64) return 0 ;; + ppc64le) return 0 ;; + mips) return 0 ;; + mipsle) return 0 ;; + mips64) return 0 ;; + mips64le) return 0 ;; + s390x) return 0 ;; + amd64p32) return 0 ;; + esac + log_crit "uname_arch_check '$(uname -m)' got converted to '$arch' which is not a GOARCH value. Please file bug report at https://github.com/client9/shlib" + return 1 +} +untar() { + tarball=$1 + case "${tarball}" in + *.tar.gz | *.tgz) tar -xzf "${tarball}" ;; + *.tar) tar -xf "${tarball}" ;; + *.zip) unzip "${tarball}" ;; + *) + log_err "untar unknown archive format for ${tarball}" + return 1 + ;; + esac +} +http_download_curl() { + local_file=$1 + source_url=$2 + header=$3 + if [ -z "$header" ]; then + code=$(curl -w '%{http_code}' -sL -o "$local_file" "$source_url") + else + code=$(curl -w '%{http_code}' -sL -H "$header" -o "$local_file" "$source_url") + fi + if [ "$code" != "200" ]; then + log_debug "http_download_curl received HTTP status $code" + return 1 + fi + return 0 +} +http_download_wget() { + local_file=$1 + source_url=$2 + header=$3 + if [ -z "$header" ]; then + wget -q -O "$local_file" "$source_url" + else + wget -q --header "$header" -O "$local_file" "$source_url" + fi +} +http_download() { + log_debug "http_download $2" + if is_command curl; then + http_download_curl "$@" + return + elif is_command wget; then + http_download_wget "$@" + return + fi + log_crit "http_download unable to find wget or curl" + return 1 +} +http_copy() { + tmp=$(mktemp) + http_download "${tmp}" "$1" "$2" || return 1 + body=$(cat "$tmp") + rm -f "${tmp}" + echo "$body" +} +github_release() { + owner_repo=$1 + version=$2 + test -z "$version" && version="latest" + giturl="https://github.com/${owner_repo}/releases/${version}" + json=$(http_copy "$giturl" "Accept:application/json") + test -z "$json" && return 1 + version=$(echo "$json" | tr -s '\n' ' ' | sed 's/.*"tag_name":"//' | sed 's/".*//') + test -z "$version" && return 1 + echo "$version" +} +hash_sha256() { + TARGET=${1:-/dev/stdin} + if is_command gsha256sum; then + hash=$(gsha256sum "$TARGET") || return 1 + echo "$hash" | cut -d ' ' -f 1 + elif is_command sha256sum; then + hash=$(sha256sum "$TARGET") || return 1 + echo "$hash" | cut -d ' ' -f 1 + elif is_command shasum; then + hash=$(shasum -a 256 "$TARGET" 2>/dev/null) || return 1 + echo "$hash" | cut -d ' ' -f 1 + elif is_command openssl; then + hash=$(openssl -dst openssl dgst -sha256 "$TARGET") || return 1 + echo "$hash" | cut -d ' ' -f a + else + log_crit "hash_sha256 unable to find command to compute sha-256 hash" + return 1 + fi +} +hash_sha256_verify() { + TARGET=$1 + checksums=$2 + if [ -z "$checksums" ]; then + log_err "hash_sha256_verify checksum file not specified in arg2" + return 1 + fi + BASENAME=${TARGET##*/} + want=$(grep "${BASENAME}" "${checksums}" 2>/dev/null | tr '\t' ' ' | cut -d ' ' -f 1) + if [ -z "$want" ]; then + log_err "hash_sha256_verify unable to find checksum for '${TARGET}' in '${checksums}'" + return 1 + fi + got=$(hash_sha256 "$TARGET") + if [ "$want" != "$got" ]; then + log_err "hash_sha256_verify checksum for '$TARGET' did not verify ${want} vs $got" + return 1 + fi +} +cat /dev/null < Date: Wed, 24 Apr 2019 15:22:06 -0700 Subject: [PATCH 039/191] Adding codecov to report unit test coverage (#13) Setup new makefile target to get codecoverage and report it using codecov --- flytestdlib/.travis.yml | 6 +++--- flytestdlib/Makefile | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/flytestdlib/.travis.yml b/flytestdlib/.travis.yml index 99ebfa3e36..2f28738cd9 100644 --- a/flytestdlib/.travis.yml +++ b/flytestdlib/.travis.yml @@ -5,9 +5,9 @@ go: jobs: include: - stage: test - name: unit tests + name: unit tests and coverage install: make install - script: make test_unit + script: make test_unit_codecov - stage: test name: benchmark tests install: make install @@ -25,4 +25,4 @@ deploy: condition: "$TRAVIS_OS_NAME = linux" env: global: - secure: xqB2LwI1qbrPUIYXtaOnIoBX5b1h1ydxOvy5Cu1sS/R2t1BfYHFX5oH0/0Z23bfpQBpzEweXA3145xyjg1Q2vJiN2ebPLmMPduWdjp1be/4xWCnkftZuGW7LDEFg3zuREUMKdfDhkb0uQ5gzIte3TvGh/tJwfxwUHVHQEl1aqPYqbRHRqoLJZiuhgIH+17su5mBFfu/62xXMP8zImLUq4WLrmbmMszLWg3IOu+oawpMXuDsjoxkucdFjmo2rsVUNr3QNo7ock7hl1OYHJZvWuRV+HxCaNRNUrbr8GuWYUSNOB51Ml7kLAlSxnmKJMs1fZRxTPlXR/0+XA8zAWahcKvKxRqguoFNVqYEESS/yRoJhLctgwAjx/btSc1a4BXCwIDFXNFVBGyZiVcLnh9PG6WWXI2YRWSbXmoBG3QN8Dtdpz54qoCpCA7IVWijWBHVXiVbyIn9XmTMFCdMXIFZQ7mzzk6K+894taPSRsia305LCJ2/h1df8bLsw5zcXmjXjZpkxM7rK5nJqx6IiaZ94GmeRER3OQxKTxxBuoZvcWcn9+ni+FtA2EzJuMBxbWLh+jinfqqieLkoOPHeBzAN6YyaPuUQje/dT4tjdf95V+wuojfu/TqIk/o7WwMPgfYWP2tlj0R5GwoA3ZocZRXZYRP/gg1Cje6wCQCOiIPsFC5g= + - secure: xqB2LwI1qbrPUIYXtaOnIoBX5b1h1ydxOvy5Cu1sS/R2t1BfYHFX5oH0/0Z23bfpQBpzEweXA3145xyjg1Q2vJiN2ebPLmMPduWdjp1be/4xWCnkftZuGW7LDEFg3zuREUMKdfDhkb0uQ5gzIte3TvGh/tJwfxwUHVHQEl1aqPYqbRHRqoLJZiuhgIH+17su5mBFfu/62xXMP8zImLUq4WLrmbmMszLWg3IOu+oawpMXuDsjoxkucdFjmo2rsVUNr3QNo7ock7hl1OYHJZvWuRV+HxCaNRNUrbr8GuWYUSNOB51Ml7kLAlSxnmKJMs1fZRxTPlXR/0+XA8zAWahcKvKxRqguoFNVqYEESS/yRoJhLctgwAjx/btSc1a4BXCwIDFXNFVBGyZiVcLnh9PG6WWXI2YRWSbXmoBG3QN8Dtdpz54qoCpCA7IVWijWBHVXiVbyIn9XmTMFCdMXIFZQ7mzzk6K+894taPSRsia305LCJ2/h1df8bLsw5zcXmjXjZpkxM7rK5nJqx6IiaZ94GmeRER3OQxKTxxBuoZvcWcn9+ni+FtA2EzJuMBxbWLh+jinfqqieLkoOPHeBzAN6YyaPuUQje/dT4tjdf95V+wuojfu/TqIk/o7WwMPgfYWP2tlj0R5GwoA3ZocZRXZYRP/gg1Cje6wCQCOiIPsFC5g= diff --git a/flytestdlib/Makefile b/flytestdlib/Makefile index 623663f5f1..211f908f0a 100644 --- a/flytestdlib/Makefile +++ b/flytestdlib/Makefile @@ -22,3 +22,8 @@ compile: gen-config: which pflags || (go get github.com/lyft/flytestdlib/cli/pflags) @go generate ./... + +.PHONY: test_unit_codecov +test_unit_codecov: + go test ./... -race -coverprofile=coverage.txt -covermode=atomic; curl -s https://codecov.io/bash > codecov_bash.sh; bash codecov_bash.sh + From 1b96fb4bea24b45c21de4eb21e7801a878ec6da8 Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Wed, 24 Apr 2019 16:32:32 -0700 Subject: [PATCH 040/191] More Badges: Activity, Code coverage, report card (#15) * More badges for activity reporting * no links for activity --- flytestdlib/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flytestdlib/README.md b/flytestdlib/README.md index 2e979e460d..085e2c914b 100644 --- a/flytestdlib/README.md +++ b/flytestdlib/README.md @@ -4,6 +4,10 @@ Common Go Tools [![Build Status](https://travis-ci.org/lyft/flytestdlib.svg?branch=master)](https://travis-ci.org/lyft/flytestdlib) [![GoDoc](https://godoc.org/github.com/lyft/flytestdlib?status.svg)](https://godoc.org/github.com/lyft/flytestdlib) [![License](https://img.shields.io/badge/LICENSE-Apache2.0-ff69b4.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) +[![CodeCoverage](https://img.shields.io/codecov/c/github/lyft/flytestdlib.svg)](https://codecov.io/gh/lyft/flytestdlib) +[![Go Report Card](https://goreportcard.com/badge/github.com/lyft/flytestdlib)](https://goreportcard.com/report/github.com/lyft/flytestdlib) +![Commit activity](https://img.shields.io/github/commit-activity/w/lyft/flytestdlib.svg?style=plastic) +![Commit since last releast](https://img.shields.io/github/commits-since/lyft/flytestdlib/latest.svg?style=plastic) Shared components we found ourselves building time and time again, so we collected them in one place! From f99988b07b232172656ec0e745b52618a2e857bf Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Fri, 26 Apr 2019 11:29:22 -0700 Subject: [PATCH 041/191] Fix Godownloader generated script (#14) * Add godownloader script * Update README.md * typo * Fix generated godownloader script * Default download to /Users/hamabuelfutuh/src/go/bin --- flytestdlib/godownloader.sh | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) mode change 100644 => 100755 flytestdlib/godownloader.sh diff --git a/flytestdlib/godownloader.sh b/flytestdlib/godownloader.sh old mode 100644 new mode 100755 index 679511f30b..44093b6d07 --- a/flytestdlib/godownloader.sh +++ b/flytestdlib/godownloader.sh @@ -26,7 +26,7 @@ parse_args() { #BINDIR is ./bin unless set be ENV # over-ridden by flag below - BINDIR=${BINDIR:-./bin} + BINDIR=${BINDIR:-${GOPATH}/bin} while getopts "b:dh?x" arg; do case "$arg" in b) BINDIR="$OPTARG" ;; @@ -66,10 +66,13 @@ is_supported_platform() { case "$platform" in linux/amd64) found=0 ;; linux/386) found=0 ;; + linux/x86_64) found=0 ;; windows/amd64) found=0 ;; windows/386) found=0 ;; + windows/x86_64) found=0 ;; darwin/amd64) found=0 ;; darwin/386) found=0 ;; + darwin/x86_64) found=0 ;; esac return $found } @@ -99,11 +102,28 @@ tag_to_version() { } adjust_format() { # change format (tar.gz or zip) based on OS - true + FORMAT="tar.gz" + case "$os" in + darwin) return 0 ;; + dragonfly) return 0 ;; + freebsd) return 0 ;; + linux) return 0 ;; + android) return 0 ;; + nacl) return 0 ;; + netbsd) return 0 ;; + openbsd) return 0 ;; + plan9) return 0 ;; + solaris) return 0 ;; + esac + FORMAT="zip" + return 0 } adjust_os() { # adjust archive name based on OS - true + case "$os" in + darwin) OS="macOS"; + esac + return 0; } adjust_arch() { # adjust archive name based on ARCH @@ -177,7 +197,7 @@ uname_os() { uname_arch() { arch=$(uname -m) case $arch in - x86_64) arch="amd64" ;; + x86_64) arch="x86_64" ;; x86) arch="386" ;; i686) arch="386" ;; i386) arch="386" ;; @@ -223,6 +243,7 @@ uname_arch_check() { mips64le) return 0 ;; s390x) return 0 ;; amd64p32) return 0 ;; + x86_64) return 0 ;; esac log_crit "uname_arch_check '$(uname -m)' got converted to '$arch' which is not a GOARCH value. Please file bug report at https://github.com/client9/shlib" return 1 @@ -371,11 +392,12 @@ adjust_arch log_info "found version: ${VERSION} for ${TAG}/${OS}/${ARCH}" -NAME= +NAME=${PROJECT_NAME}_${VERSION}_${OS}_${ARCH} TARBALL=${NAME}.${FORMAT} TARBALL_URL=${GITHUB_DOWNLOAD}/${TAG}/${TARBALL} CHECKSUM=checksums.txt CHECKSUM_URL=${GITHUB_DOWNLOAD}/${TAG}/${CHECKSUM} +log_info "Tarball url: ${TARBALL_URL}" execute From a12bdcf8746c91398c1e127aa9dfe12590d44d85 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 30 Apr 2019 11:12:36 -0700 Subject: [PATCH 042/191] Race condition in logger.SetConfig (#16) * remove globalconfig variable to avoid data race * Add WithRoutineLabel * rename * simplify logger a bit * format * doc --- flytestdlib/config/section.go | 4 + flytestdlib/contextutils/context.go | 37 ++- flytestdlib/contextutils/context_test.go | 10 + flytestdlib/logger/config.go | 39 +-- flytestdlib/logger/config_test.go | 10 +- flytestdlib/logger/logger.go | 298 +++++++++++------------ flytestdlib/logger/logger_test.go | 63 +---- flytestdlib/profutils/server.go | 9 +- 8 files changed, 217 insertions(+), 253 deletions(-) diff --git a/flytestdlib/config/section.go b/flytestdlib/config/section.go index 41fddd0c1b..34f5f7a5dd 100644 --- a/flytestdlib/config/section.go +++ b/flytestdlib/config/section.go @@ -199,6 +199,10 @@ func (r *section) SetConfig(c Config) error { r.lockObj.Lock() defer r.lockObj.Unlock() + if reflect.TypeOf(c).Kind() != reflect.Ptr { + return fmt.Errorf("config must be a Pointer") + } + if !DeepEqual(r.config, c) { r.config = c r.isDirty.Store(true) diff --git a/flytestdlib/contextutils/context.go b/flytestdlib/contextutils/context.go index b5a9c00fa2..e5be11e219 100644 --- a/flytestdlib/contextutils/context.go +++ b/flytestdlib/contextutils/context.go @@ -4,22 +4,24 @@ package contextutils import ( "context" "fmt" + "runtime/pprof" ) type Key string const ( - AppNameKey Key = "app_name" - NamespaceKey Key = "ns" - TaskTypeKey Key = "tasktype" - ProjectKey Key = "project" - DomainKey Key = "domain" - WorkflowIDKey Key = "wf" - NodeIDKey Key = "node" - TaskIDKey Key = "task" - ExecIDKey Key = "exec_id" - JobIDKey Key = "job_id" - PhaseKey Key = "phase" + AppNameKey Key = "app_name" + NamespaceKey Key = "ns" + TaskTypeKey Key = "tasktype" + ProjectKey Key = "project" + DomainKey Key = "domain" + WorkflowIDKey Key = "wf" + NodeIDKey Key = "node" + TaskIDKey Key = "task" + ExecIDKey Key = "exec_id" + JobIDKey Key = "job_id" + PhaseKey Key = "phase" + RoutineLabelKey Key = "routine" ) func (k Key) String() string { @@ -35,6 +37,7 @@ var logKeys = []Key{ WorkflowIDKey, TaskTypeKey, PhaseKey, + RoutineLabelKey, } // Gets a new context with namespace set. @@ -98,6 +101,14 @@ func WithTaskType(ctx context.Context, taskType string) context.Context { return context.WithValue(ctx, TaskTypeKey, taskType) } +// Gets a new context with Go Routine label key set and a label assigned to the context using pprof.Labels. +// You can then call pprof.SetGoroutineLabels(ctx) to annotate the current go-routine and have that show up in +// pprof analysis. +func WithGoroutineLabel(ctx context.Context, routineLabel string) context.Context { + ctx = pprof.WithLabels(ctx, pprof.Labels(RoutineLabelKey.String(), routineLabel)) + return context.WithValue(ctx, RoutineLabelKey, routineLabel) +} + func addFieldIfNotNil(ctx context.Context, m map[string]interface{}, fieldKey Key) { val := ctx.Value(fieldKey) if val != nil { @@ -110,6 +121,7 @@ func addStringFieldWithDefaults(ctx context.Context, m map[string]string, fieldK if val == nil { val = "" } + m[fieldKey.String()] = val.(string) } @@ -120,6 +132,7 @@ func GetLogFields(ctx context.Context) map[string]interface{} { for _, k := range logKeys { addFieldIfNotNil(ctx, res, k) } + return res } @@ -128,6 +141,7 @@ func Value(ctx context.Context, key Key) string { if val != nil { return val.(string) } + return "" } @@ -136,5 +150,6 @@ func Values(ctx context.Context, keys ...Key) map[string]string { for _, k := range keys { addStringFieldWithDefaults(ctx, res, k) } + return res } diff --git a/flytestdlib/contextutils/context_test.go b/flytestdlib/contextutils/context_test.go index 99d29d3e3d..d65c2a2be3 100644 --- a/flytestdlib/contextutils/context_test.go +++ b/flytestdlib/contextutils/context_test.go @@ -2,6 +2,7 @@ package contextutils import ( "context" + "runtime/pprof" "testing" "github.com/stretchr/testify/assert" @@ -111,3 +112,12 @@ func TestValues(t *testing.T) { assert.Equal(t, "flyte", m[WorkflowIDKey.String()]) assert.Equal(t, "", m[ProjectKey.String()]) } + +func TestWithGoroutineLabel(t *testing.T) { + ctx := context.Background() + ctx = WithGoroutineLabel(ctx, "my_routine_123") + pprof.SetGoroutineLabels(ctx) + m := Values(ctx, RoutineLabelKey) + assert.Equal(t, 1, len(m)) + assert.Equal(t, "my_routine_123", m[RoutineLabelKey.String()]) +} diff --git a/flytestdlib/logger/config.go b/flytestdlib/logger/config.go index 1c665ac523..993c624579 100644 --- a/flytestdlib/logger/config.go +++ b/flytestdlib/logger/config.go @@ -21,12 +21,18 @@ const ( jsonDataKey string = "json" ) -var defaultConfig = &Config{ - Formatter: FormatterConfig{ - Type: FormatterJSON, - }, - Level: InfoLevel, -} +var ( + defaultConfig = &Config{ + Formatter: FormatterConfig{ + Type: FormatterJSON, + }, + Level: InfoLevel, + } + + configSection = config.MustRegisterSectionWithUpdates(configSectionKey, defaultConfig, func(ctx context.Context, newValue config.Config) { + onConfigUpdated(*newValue.(*Config)) + }) +) // Global logger config. type Config struct { @@ -47,13 +53,18 @@ type FormatterConfig struct { Type FormatterType `json:"type" pflag:",Sets logging format type."` } -var globalConfig = Config{} - // Sets global logger config -func SetConfig(cfg Config) { - globalConfig = cfg +func SetConfig(cfg *Config) error { + if err := configSection.SetConfig(cfg); err != nil { + return err + } - onConfigUpdated(cfg) + onConfigUpdated(*cfg) + return nil +} + +func GetConfig() *Config { + return configSection.GetConfig().(*Config) } // Level type. @@ -78,9 +89,3 @@ const ( // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel ) - -func init() { - config.MustRegisterSectionWithUpdates(configSectionKey, defaultConfig, func(ctx context.Context, newValue config.Config) { - SetConfig(*newValue.(*Config)) - }) -} diff --git a/flytestdlib/logger/config_test.go b/flytestdlib/logger/config_test.go index 7d2d3782b1..08be8dec6a 100644 --- a/flytestdlib/logger/config_test.go +++ b/flytestdlib/logger/config_test.go @@ -1,10 +1,14 @@ package logger -import "testing" +import ( + "testing" + + "github.com/stretchr/testify/assert" +) func TestSetConfig(t *testing.T) { type args struct { - cfg Config + cfg *Config } tests := []struct { name string @@ -14,7 +18,7 @@ func TestSetConfig(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - SetConfig(tt.args.cfg) + assert.NoError(t, SetConfig(tt.args.cfg)) }) } } diff --git a/flytestdlib/logger/logger.go b/flytestdlib/logger/logger.go index 29aadc8bf8..3d8eccc2db 100644 --- a/flytestdlib/logger/logger.go +++ b/flytestdlib/logger/logger.go @@ -17,7 +17,12 @@ import ( //go:generate gotests -w -all $FILE -const indentLevelKey contextutils.Key = "LoggerIndentLevel" +const ( + indentLevelKey contextutils.Key = "LoggerIndentLevel" + sourceCodeKey string = "src" +) + +var noopLogger = NoopLogger{} func onConfigUpdated(cfg Config) { logrus.SetLevel(logrus.Level(cfg.Level)) @@ -44,51 +49,35 @@ func onConfigUpdated(cfg Config) { } func getSourceLocation() string { - if globalConfig.IncludeSourceCode { - _, file, line, ok := runtime.Caller(3) - if !ok { - file = "???" - line = 1 - } else { - slash := strings.LastIndex(file, "/") - if slash >= 0 { - file = file[slash+1:] - } + // The reason we pass 3 here: 0 means this function (getSourceLocation), 1 means the getLogger function (only caller + // to getSourceLocation, 2 means the logging function (e.g. Debugln), and 3 means the caller for the logging function. + _, file, line, ok := runtime.Caller(3) + if !ok { + file = "???" + line = 1 + } else { + slash := strings.LastIndex(file, "/") + if slash >= 0 { + file = file[slash+1:] } - - return fmt.Sprintf("[%v:%v] ", file, line) } - return "" + return fmt.Sprintf("%v:%v", file, line) } -func wrapHeader(ctx context.Context, args ...interface{}) []interface{} { - args = append([]interface{}{getIndent(ctx)}, args...) - - if globalConfig.IncludeSourceCode { - return append( - []interface{}{ - fmt.Sprintf("%v", getSourceLocation()), - }, - args...) +func getLogger(ctx context.Context) logrus.FieldLogger { + cfg := GetConfig() + if cfg.Mute { + return noopLogger } - return args -} - -func wrapHeaderForMessage(ctx context.Context, message string) string { - message = fmt.Sprintf("%v%v", getIndent(ctx), message) - - if globalConfig.IncludeSourceCode { - return fmt.Sprintf("%v%v", getSourceLocation(), message) + entry := logrus.WithFields(logrus.Fields(contextutils.GetLogFields(ctx))) + if cfg.IncludeSourceCode { + entry = entry.WithField(sourceCodeKey, getSourceLocation()) } - return message -} + entry.Level = logrus.Level(cfg.Level) -func getLogger(ctx context.Context) *logrus.Entry { - entry := logrus.WithFields(logrus.Fields(contextutils.GetLogFields(ctx))) - entry.Level = logrus.Level(globalConfig.Level) return entry } @@ -107,231 +96,218 @@ func getIndent(ctx context.Context) string { // Gets a value indicating whether logs at this level will be written to the logger. This is particularly useful to avoid // computing log messages unnecessarily. -func IsLoggable(ctx context.Context, level Level) bool { - return getLogger(ctx).Level >= logrus.Level(level) +func IsLoggable(_ context.Context, level Level) bool { + return GetConfig().Level >= level } // Debug logs a message at level Debug on the standard logger. func Debug(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Debug(wrapHeader(ctx, args)...) + getLogger(ctx).Debug(args...) } // Print logs a message at level Info on the standard logger. func Print(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Print(wrapHeader(ctx, args)...) + getLogger(ctx).Print(args...) } // Info logs a message at level Info on the standard logger. func Info(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Info(wrapHeader(ctx, args)...) + getLogger(ctx).Info(args...) } // Warn logs a message at level Warn on the standard logger. func Warn(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Warn(wrapHeader(ctx, args)...) + getLogger(ctx).Warn(args...) } // Warning logs a message at level Warn on the standard logger. func Warning(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Warning(wrapHeader(ctx, args)...) + getLogger(ctx).Warning(args...) } // Error logs a message at level Error on the standard logger. func Error(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Error(wrapHeader(ctx, args)...) + getLogger(ctx).Error(args...) } // Panic logs a message at level Panic on the standard logger. func Panic(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Panic(wrapHeader(ctx, args)...) + getLogger(ctx).Panic(args...) } // Fatal logs a message at level Fatal on the standard logger. func Fatal(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Fatal(wrapHeader(ctx, args)...) + getLogger(ctx).Fatal(args...) } // Debugf logs a message at level Debug on the standard logger. func Debugf(ctx context.Context, format string, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Debugf(wrapHeaderForMessage(ctx, format), args...) + getLogger(ctx).Debugf(format, args...) } // Printf logs a message at level Info on the standard logger. func Printf(ctx context.Context, format string, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Printf(wrapHeaderForMessage(ctx, format), args...) + getLogger(ctx).Printf(format, args...) } // Infof logs a message at level Info on the standard logger. func Infof(ctx context.Context, format string, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Infof(wrapHeaderForMessage(ctx, format), args...) + getLogger(ctx).Infof(format, args...) } // InfofNoCtx logs a formatted message without context. func InfofNoCtx(format string, args ...interface{}) { - if globalConfig.Mute { - return - } - getLogger(context.TODO()).Infof(format, args...) } // Warnf logs a message at level Warn on the standard logger. func Warnf(ctx context.Context, format string, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Warnf(wrapHeaderForMessage(ctx, format), args...) + getLogger(ctx).Warnf(format, args...) } // Warningf logs a message at level Warn on the standard logger. func Warningf(ctx context.Context, format string, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Warningf(wrapHeaderForMessage(ctx, format), args...) + getLogger(ctx).Warningf(format, args...) } // Errorf logs a message at level Error on the standard logger. func Errorf(ctx context.Context, format string, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Errorf(wrapHeaderForMessage(ctx, format), args...) + getLogger(ctx).Errorf(format, args...) } // Panicf logs a message at level Panic on the standard logger. func Panicf(ctx context.Context, format string, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Panicf(wrapHeaderForMessage(ctx, format), args...) + getLogger(ctx).Panicf(format, args...) } // Fatalf logs a message at level Fatal on the standard logger. func Fatalf(ctx context.Context, format string, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Fatalf(wrapHeaderForMessage(ctx, format), args...) + getLogger(ctx).Fatalf(format, args...) } // Debugln logs a message at level Debug on the standard logger. func Debugln(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Debugln(wrapHeader(ctx, args)...) + getLogger(ctx).Debugln(args...) } // Println logs a message at level Info on the standard logger. func Println(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Println(wrapHeader(ctx, args)...) + getLogger(ctx).Println(args...) } // Infoln logs a message at level Info on the standard logger. func Infoln(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Infoln(wrapHeader(ctx, args)...) + getLogger(ctx).Infoln(args...) } // Warnln logs a message at level Warn on the standard logger. func Warnln(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Warnln(wrapHeader(ctx, args)...) + getLogger(ctx).Warnln(args...) } // Warningln logs a message at level Warn on the standard logger. func Warningln(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Warningln(wrapHeader(ctx, args)...) + getLogger(ctx).Warningln(args...) } // Errorln logs a message at level Error on the standard logger. func Errorln(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Errorln(wrapHeader(ctx, args)...) + getLogger(ctx).Errorln(args...) } // Panicln logs a message at level Panic on the standard logger. func Panicln(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } - - getLogger(ctx).Panicln(wrapHeader(ctx, args)...) + getLogger(ctx).Panicln(args...) } // Fatalln logs a message at level Fatal on the standard logger. func Fatalln(ctx context.Context, args ...interface{}) { - if globalConfig.Mute { - return - } + getLogger(ctx).Fatalln(args...) +} + +type NoopLogger struct { +} + +func (NoopLogger) WithField(key string, value interface{}) *logrus.Entry { + return nil +} + +func (NoopLogger) WithFields(fields logrus.Fields) *logrus.Entry { + return nil +} + +func (NoopLogger) WithError(err error) *logrus.Entry { + return nil +} + +func (NoopLogger) Debugf(format string, args ...interface{}) { +} + +func (NoopLogger) Infof(format string, args ...interface{}) { +} + +func (NoopLogger) Warnf(format string, args ...interface{}) { +} + +func (NoopLogger) Warningf(format string, args ...interface{}) { +} + +func (NoopLogger) Errorf(format string, args ...interface{}) { +} + +func (NoopLogger) Debug(args ...interface{}) { +} + +func (NoopLogger) Info(args ...interface{}) { +} + +func (NoopLogger) Warn(args ...interface{}) { +} + +func (NoopLogger) Warning(args ...interface{}) { +} + +func (NoopLogger) Error(args ...interface{}) { +} + +func (NoopLogger) Debugln(args ...interface{}) { +} + +func (NoopLogger) Infoln(args ...interface{}) { +} + +func (NoopLogger) Warnln(args ...interface{}) { +} + +func (NoopLogger) Warningln(args ...interface{}) { +} + +func (NoopLogger) Errorln(args ...interface{}) { +} + +func (NoopLogger) Print(...interface{}) { +} + +func (NoopLogger) Printf(string, ...interface{}) { +} + +func (NoopLogger) Println(...interface{}) { +} + +func (NoopLogger) Fatal(...interface{}) { +} + +func (NoopLogger) Fatalf(string, ...interface{}) { +} + +func (NoopLogger) Fatalln(...interface{}) { +} + +func (NoopLogger) Panic(...interface{}) { +} + +func (NoopLogger) Panicf(string, ...interface{}) { +} - getLogger(ctx).Fatalln(wrapHeader(ctx, args)...) +func (NoopLogger) Panicln(...interface{}) { } diff --git a/flytestdlib/logger/logger_test.go b/flytestdlib/logger/logger_test.go index 75c73a9432..ce81002046 100644 --- a/flytestdlib/logger/logger_test.go +++ b/flytestdlib/logger/logger_test.go @@ -6,7 +6,6 @@ package logger import ( "context" "reflect" - "strings" "testing" "github.com/sirupsen/logrus" @@ -14,46 +13,11 @@ import ( ) func init() { - SetConfig(Config{ + if err := SetConfig(&Config{ Level: InfoLevel, IncludeSourceCode: true, - }) -} - -func Test_getSourceLocation(t *testing.T) { - tests := []struct { - name string - want string - }{ - {"current", " "}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := getSourceLocation(); !strings.HasSuffix(got, tt.want) { - t.Errorf("getSourceLocation() = %v, want %v", got, tt.want) - } - }) - } -} - -func Test_wrapHeaderForMessage(t *testing.T) { - type args struct { - message string - } - tests := []struct { - name string - args args - want string - }{ - {"no args", args{message: ""}, " "}, - {"1 arg", args{message: "hello"}, " hello"}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := wrapHeaderForMessage(context.TODO(), tt.args.message); !strings.HasSuffix(got, tt.want) { - t.Errorf("wrapHeaderForMessage() = %v, want %v", got, tt.want) - } - }) + }); err != nil { + panic(err) } } @@ -488,27 +452,6 @@ func TestPanicln(t *testing.T) { } } -func Test_wrapHeader(t *testing.T) { - type args struct { - ctx context.Context - args []interface{} - } - tests := []struct { - name string - args args - want []interface{} - }{ - // TODO: Add test cases. - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := wrapHeader(tt.args.ctx, tt.args.args...); !reflect.DeepEqual(got, tt.want) { - t.Errorf("wrapHeader() = %v, want %v", got, tt.want) - } - }) - } -} - func Test_getLogger(t *testing.T) { type args struct { ctx context.Context diff --git a/flytestdlib/profutils/server.go b/flytestdlib/profutils/server.go index fe0157fca9..a1681c191d 100644 --- a/flytestdlib/profutils/server.go +++ b/flytestdlib/profutils/server.go @@ -61,7 +61,14 @@ func healtcheckHandler(w http.ResponseWriter, req *http.Request) { // Handler that returns a JSON response indicating the Build Version information (refer to #version module) func versionHandler(w http.ResponseWriter, req *http.Request) { - err := WriteJSONResponse(w, http.StatusOK, BuildVersion{Build: version.Build, Version: version.Version, Timestamp: version.BuildTime}) + err := WriteJSONResponse( + w, + http.StatusOK, + BuildVersion{ + Build: version.Build, + Version: version.Version, + Timestamp: version.BuildTime, + }) if err != nil { panic(err) } From 6ed22f3d5b87e88d9e4ab2fb7122bb8f2e5a2c52 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Tue, 30 Apr 2019 11:18:41 -0700 Subject: [PATCH 043/191] Scoop update for flytestdlib version v0.2.3 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index b708048a40..4e010cb572 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.2", + "version": "0.2.3", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.2/flytestdlib_0.2.2_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.3/flytestdlib_0.2.3_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "3693ea92f967aa57568d1b646be44a8871261578e489113b2ff8d1926d47bf17" + "hash": "ac46479a6b1391b673b830bf0530beb2430a16f468c1d59a74301409c408d5f4" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.2/flytestdlib_0.2.2_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.3/flytestdlib_0.2.3_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "c073e0dce9b45630bdd862eb7c1a45bc000c664e7d25f74be2ca0768a516cf3d" + "hash": "80ccbd8fc038c66ee1d86724d401a8c58e496c859b8269d0ecf82b2ecf2db54b" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 35afe44d8a1d282717a1e3d7717290d5f7e8ece8 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Mon, 6 May 2019 14:59:15 -0700 Subject: [PATCH 044/191] Scoop update for flytestdlib version v0.2.4 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 4e010cb572..90a16b2775 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.3", + "version": "0.2.4", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.3/flytestdlib_0.2.3_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.4/flytestdlib_0.2.4_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "ac46479a6b1391b673b830bf0530beb2430a16f468c1d59a74301409c408d5f4" + "hash": "4677e67045c65d71d026dcf7910bd7af6d59b062eef0754a368b19528995796d" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.3/flytestdlib_0.2.3_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.4/flytestdlib_0.2.4_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "80ccbd8fc038c66ee1d86724d401a8c58e496c859b8269d0ecf82b2ecf2db54b" + "hash": "6cfd92c39d98390995034bf2bbdba41920d5388787f18146dd62feb56d4a1b7b" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From be32824b2d27bd5bc7fc0df416f9b844de9a1930 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 8 May 2019 13:39:26 -0700 Subject: [PATCH 045/191] InitialzePFlags doesn't add flags for sub-sections (#17) * Allow InitializePFlags to recursively discover sub-section flags * Add unit test --- flytestdlib/config/tests/accessor_test.go | 30 +++++++++++++++++++++++ flytestdlib/config/viper/viper.go | 13 ++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index e6f93095a1..18a81e5f11 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -159,6 +159,36 @@ func TestAccessor_InitializePflags(t *testing.T) { assert.Equal(t, 4, otherC.IntValue) assert.Equal(t, []string{"default value"}, otherC.StringArrayWithDefaults) }) + + t.Run(fmt.Sprintf("[%v] Sub-sections", provider(config.Options{}).ID()), func(t *testing.T) { + reg := config.NewRootSection() + sec, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + _, err = sec.RegisterSection("nested", &OtherComponentConfig{}) + assert.NoError(t, err) + + v := provider(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "nested_config.yaml")}, + RootSection: reg, + }) + + set := pflag.NewFlagSet("test", pflag.ExitOnError) + v.InitializePflags(set) + assert.NoError(t, set.Parse([]string{"--my-component.nested.int-val=3"})) + assert.True(t, set.Parsed()) + + flagValue, err := set.GetInt("my-component.nested.int-val") + assert.NoError(t, err) + assert.Equal(t, 3, flagValue) + + assert.NoError(t, v.UpdateConfig(context.TODO())) + r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) + assert.Equal(t, "Hello World", r.StringValue) + + nested := sec.GetSection("nested").GetConfig().(*OtherComponentConfig) + assert.Equal(t, 3, nested.IntValue) + }) } } diff --git a/flytestdlib/config/viper/viper.go b/flytestdlib/config/viper/viper.go index 05a5378ec7..c9df21fabc 100644 --- a/flytestdlib/config/viper/viper.go +++ b/flytestdlib/config/viper/viper.go @@ -64,9 +64,18 @@ func (v viperAccessor) InitializePflags(cmdFlags *pflag.FlagSet) { } func (v viperAccessor) addSectionsPFlags(flags *pflag.FlagSet) (err error) { - for key, section := range v.rootConfig.GetSections() { + return v.addSubsectionsPFlags(flags, "", v.rootConfig) +} + +func (v viperAccessor) addSubsectionsPFlags(flags *pflag.FlagSet, rootKey string, root config.Section) error { + for key, section := range root.GetSections() { + prefix := rootKey + key + keyDelim if asPFlagProvider, ok := section.GetConfig().(config.PFlagProvider); ok { - flags.AddFlagSet(asPFlagProvider.GetPFlagSet(key + keyDelim)) + flags.AddFlagSet(asPFlagProvider.GetPFlagSet(prefix)) + } + + if err := v.addSubsectionsPFlags(flags, prefix, section); err != nil { + return err } } From 0da638dc8a8126aed8338fa7367cdc8382248430 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Wed, 8 May 2019 13:45:05 -0700 Subject: [PATCH 046/191] Scoop update for flytestdlib version v0.2.5 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 90a16b2775..92058464fd 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.4", + "version": "0.2.5", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.4/flytestdlib_0.2.4_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.5/flytestdlib_0.2.5_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "4677e67045c65d71d026dcf7910bd7af6d59b062eef0754a368b19528995796d" + "hash": "94a8fdd1306fcb515f0fa473eaf769d16f3fcbcacba24c0e65b965b316b171d6" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.4/flytestdlib_0.2.4_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.5/flytestdlib_0.2.5_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "6cfd92c39d98390995034bf2bbdba41920d5388787f18146dd62feb56d4a1b7b" + "hash": "37d491a54ef214961e77dc39a7b332214748cffd6d73f02c220fe02c721413dd" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 3fae7a3c0bc386eb32a586e5b70117333ab8c3c8 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Thu, 30 May 2019 13:57:38 -0700 Subject: [PATCH 047/191] Fix s3 container initialization: don't error when container creation succeeds (#19) --- flytestdlib/storage/s3store.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flytestdlib/storage/s3store.go b/flytestdlib/storage/s3store.go index 3c96730e0a..c2a6d9e290 100644 --- a/flytestdlib/storage/s3store.go +++ b/flytestdlib/storage/s3store.go @@ -68,8 +68,9 @@ func newS3RawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error) logger.Infof(context.TODO(), "Storage init-container already exists [%v].", cfg.InitContainer) return NewStowRawStore(s3FQN(c.Name()), c, metricsScope) } + return emptyStore, fmt.Errorf("unable to initialize container [%v]. Error: %v", cfg.InitContainer, err) } - return emptyStore, fmt.Errorf("unable to initialize container [%v]. Error: %v", cfg.InitContainer, err) + return NewStowRawStore(s3FQN(c.Name()), c, metricsScope) } return emptyStore, err } From e03f2b7ac1e13bab82dce31d07c02b30db5d4513 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 6 Jun 2019 13:23:51 -0700 Subject: [PATCH 048/191] Call onChange on first config load (#20) * Call onChange on first config load * Ensure we have a repro in unit test & lint --- flytestdlib/config/tests/accessor_test.go | 25 +++++++++++++++++++++++ flytestdlib/config/viper/viper.go | 14 ++++++------- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index 18a81e5f11..11511f7a61 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -331,6 +331,31 @@ func TestAccessor_UpdateConfig(t *testing.T) { }) t.Run(fmt.Sprintf("[%v] Change handler", provider(config.Options{}).ID()), func(t *testing.T) { + configFile := tempFileName("config-*.yaml") + defer func() { assert.NoError(t, os.Remove(configFile)) }() + cfg, err := populateConfigData(configFile) + assert.NoError(t, err) + + reg := config.NewRootSection() + called := false + _, err = reg.RegisterSectionWithUpdates(MyComponentSectionKey, &cfg.MyComponentConfig, + func(ctx context.Context, newValue config.Config) { + called = true + }) + assert.NoError(t, err) + + opts := config.Options{ + SearchPaths: []string{configFile}, + RootSection: reg, + } + v := provider(opts) + err = v.UpdateConfig(context.TODO()) + assert.NoError(t, err) + + assert.True(t, called) + }) + + t.Run(fmt.Sprintf("[%v] Change handler on change", provider(config.Options{}).ID()), func(t *testing.T) { configFile := tempFileName("config-*.yaml") defer func() { assert.NoError(t, os.Remove(configFile)) }() _, err := populateConfigData(configFile) diff --git a/flytestdlib/config/viper/viper.go b/flytestdlib/config/viper/viper.go index c9df21fabc..3b44211f31 100644 --- a/flytestdlib/config/viper/viper.go +++ b/flytestdlib/config/viper/viper.go @@ -149,7 +149,7 @@ func (v viperAccessor) updateConfig(ctx context.Context, r config.Section) error }) } - return v.RefreshFromConfig(ctx, r) + return v.RefreshFromConfig(ctx, r, true) } func (v viperAccessor) UpdateConfig(ctx context.Context) error { @@ -287,7 +287,7 @@ func decode(input interface{}, config *mapstructure.DecoderConfig) error { func (v viperAccessor) configChangeHandler() { ctx := context.Background() - err := v.RefreshFromConfig(ctx, v.rootConfig) + err := v.RefreshFromConfig(ctx, v.rootConfig, false) if err != nil { // TODO: Retry? panic? logger.Printf(ctx, "Failed to update config. Error: %v", err) @@ -296,20 +296,20 @@ func (v viperAccessor) configChangeHandler() { } } -func (v viperAccessor) RefreshFromConfig(ctx context.Context, r config.Section) error { +func (v viperAccessor) RefreshFromConfig(ctx context.Context, r config.Section, forceSendUpdates bool) error { err := v.parseViperConfig(r) if err != nil { return err } - v.sendUpdatedEvents(ctx, r, "") + v.sendUpdatedEvents(ctx, r, forceSendUpdates, "") return nil } -func (v viperAccessor) sendUpdatedEvents(ctx context.Context, root config.Section, sectionKey config.SectionKey) { +func (v viperAccessor) sendUpdatedEvents(ctx context.Context, root config.Section, forceSend bool, sectionKey config.SectionKey) { for key, section := range root.GetSections() { - if !section.GetConfigChangedAndClear() { + if !section.GetConfigChangedAndClear() && !forceSend { logger.Infof(ctx, "Config section [%v] hasn't changed.", sectionKey+key) } else if section.GetConfigUpdatedHandler() == nil { logger.Infof(ctx, "Config section [%v] updated. No update handler registered.", sectionKey+key) @@ -318,7 +318,7 @@ func (v viperAccessor) sendUpdatedEvents(ctx context.Context, root config.Sectio section.GetConfigUpdatedHandler()(ctx, section.GetConfig()) } - v.sendUpdatedEvents(ctx, section, sectionKey+key+keyDelim) + v.sendUpdatedEvents(ctx, section, forceSend, sectionKey+key+keyDelim) } } From 2a8caf22a40a600de32fb4cf7b39eaed3256805c Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Thu, 6 Jun 2019 13:32:46 -0700 Subject: [PATCH 049/191] Scoop update for flytestdlib version v0.2.6 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 92058464fd..b88d443d77 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.5", + "version": "0.2.6", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.5/flytestdlib_0.2.5_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.6/flytestdlib_0.2.6_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "94a8fdd1306fcb515f0fa473eaf769d16f3fcbcacba24c0e65b965b316b171d6" + "hash": "2cb866af98ded87b014b76c7077cd69004b0d02c9eec7301d812f8979ea8b26b" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.5/flytestdlib_0.2.5_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.6/flytestdlib_0.2.6_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "37d491a54ef214961e77dc39a7b332214748cffd6d73f02c220fe02c721413dd" + "hash": "0e201ad563922638e9c86ce75672c2acc8e3c2eba4a2868b2d34fc183a767a12" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 3964f0125ef3a14c0af09b4d84193894ae845dae Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 11 Jun 2019 10:32:04 -0700 Subject: [PATCH 050/191] Fix copy implementation (#23) --- flytestdlib/storage/copy_impl.go | 1 + 1 file changed, 1 insertion(+) diff --git a/flytestdlib/storage/copy_impl.go b/flytestdlib/storage/copy_impl.go index 43f97f026f..4ac132a229 100644 --- a/flytestdlib/storage/copy_impl.go +++ b/flytestdlib/storage/copy_impl.go @@ -39,6 +39,7 @@ func (c copyImpl) CopyRaw(ctx context.Context, source, destination DataReference return err } + rc = ioutils.NewBytesReadCloser(raw) length = int64(len(raw)) } From 662d42107a3ce54e64ade3935b24ff36577e0c7f Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Tue, 11 Jun 2019 10:37:49 -0700 Subject: [PATCH 051/191] Scoop update for flytestdlib version v0.2.7 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index b88d443d77..8fd5487df2 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.6", + "version": "0.2.7", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.6/flytestdlib_0.2.6_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.7/flytestdlib_0.2.7_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "2cb866af98ded87b014b76c7077cd69004b0d02c9eec7301d812f8979ea8b26b" + "hash": "03799847f32b1694d8c51d6bcf0cde70eed22a3fca6516d8921644ec9b6f48b2" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.6/flytestdlib_0.2.6_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.7/flytestdlib_0.2.7_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "0e201ad563922638e9c86ce75672c2acc8e3c2eba4a2868b2d34fc183a767a12" + "hash": "6a2678cd81bde9130717c8bff4f7c1b1d3f28cfe33f705609ba2b95542645cbe" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From bb2445fae5cfc0b3806e69018761196bca2d0726 Mon Sep 17 00:00:00 2001 From: Anand Swaminathan Date: Tue, 11 Jun 2019 14:42:48 -0700 Subject: [PATCH 052/191] Expose Log writer that can be used with external libraries (#22) * Flinkk8soperator needs Log writer to be passed to --- flytestdlib/logger/logger.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flytestdlib/logger/logger.go b/flytestdlib/logger/logger.go index 3d8eccc2db..f1c847542c 100644 --- a/flytestdlib/logger/logger.go +++ b/flytestdlib/logger/logger.go @@ -5,6 +5,7 @@ package logger import ( "context" + "io" "github.com/lyft/flytestdlib/contextutils" @@ -81,6 +82,12 @@ func getLogger(ctx context.Context) logrus.FieldLogger { return entry } +// Returns a standard io.PipeWriter that logs using the same logger configurations in this package. +func GetLogWriter(ctx context.Context) *io.PipeWriter { + logger := getLogger(ctx) + return logger.(*logrus.Entry).Writer() +} + func WithIndent(ctx context.Context, additionalIndent string) context.Context { indentLevel := getIndent(ctx) + additionalIndent return context.WithValue(ctx, indentLevelKey, indentLevel) From e190203e38ed21aeef1cc280b546189a15f7e883 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Tue, 11 Jun 2019 15:03:55 -0700 Subject: [PATCH 053/191] Scoop update for flytestdlib version v0.2.8 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 8fd5487df2..4cf7fabf81 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.7", + "version": "0.2.8", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.7/flytestdlib_0.2.7_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.8/flytestdlib_0.2.8_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "03799847f32b1694d8c51d6bcf0cde70eed22a3fca6516d8921644ec9b6f48b2" + "hash": "5deaa24c632a8aab444d7c6b02b04cc20f864cba9f190f84de1295f359bbbe82" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.7/flytestdlib_0.2.7_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.8/flytestdlib_0.2.8_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "6a2678cd81bde9130717c8bff4f7c1b1d3f28cfe33f705609ba2b95542645cbe" + "hash": "4526711f5d3504576bedc9c8db5ad41029f30c3e336e1d42231c4a8ad62af3a3" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 975e9ee33d694ce11368332a48e0752907a4eb1d Mon Sep 17 00:00:00 2001 From: Anand Swaminathan Date: Mon, 1 Jul 2019 14:32:37 -0700 Subject: [PATCH 054/191] Upgrade Client go and implement new methods (#25) * Upgrade Client go and implement new methods --- flytestdlib/Gopkg.lock | 28 ++++++++++++++-------------- flytestdlib/Gopkg.toml | 4 ++-- flytestdlib/promutils/workqueue.go | 20 ++++++++++++++++++++ 3 files changed, 36 insertions(+), 16 deletions(-) diff --git a/flytestdlib/Gopkg.lock b/flytestdlib/Gopkg.lock index c2d2438f89..0fcc602f6f 100644 --- a/flytestdlib/Gopkg.lock +++ b/flytestdlib/Gopkg.lock @@ -127,14 +127,6 @@ revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" version = "v1.0.0" -[[projects]] - branch = "master" - digest = "1:1ba1d79f2810270045c328ae5d674321db34e3aae468eb4233883b473c5c0467" - name = "github.com/golang/glog" - packages = ["."] - pruneopts = "UT" - revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998" - [[projects]] digest = "1:9d6dc4d6de69b330d0de86494d6db90c09848c003d5db748f40c925f865c8534" name = "github.com/golang/protobuf" @@ -465,7 +457,7 @@ version = "v2.2.2" [[projects]] - digest = "1:5922c4db083d03579c576df514f096003f422b602aeb30028aedd892b69a4876" + digest = "1:074fb0a8da1e416b8a201e8e664c303ae610f316ffd615b678b636d27c225412" name = "k8s.io/apimachinery" packages = [ "pkg/util/clock", @@ -474,16 +466,24 @@ "pkg/util/wait", ] pruneopts = "UT" - revision = "103fd098999dc9c0c88536f5c9ad2e5da39373ae" - version = "kubernetes-1.11.2" + revision = "2b1284ed4c93a43499e781493253e2ac5959c4fd" + version = "kubernetes-1.13.1" [[projects]] - digest = "1:8d66fef1249b9b2105840377af3bab078604d3c298058f563685e88d2a9e6ad3" + digest = "1:b6412f8acd9a9fc6fb67302c24966618b16501b9d769a20bee42ce61e510c92c" name = "k8s.io/client-go" packages = ["util/workqueue"] pruneopts = "UT" - revision = "1f13a808da65775f22cbf47862c4e5898d8f4ca1" - version = "kubernetes-1.11.2" + revision = "8d9ed539ba3134352c586810e749e58df4e94e4f" + version = "kubernetes-1.13.1" + +[[projects]] + digest = "1:c283ca5951eb7d723d3300762f96ff94c2ea11eaceb788279e2b7327f92e4f2a" + name = "k8s.io/klog" + packages = ["."] + pruneopts = "UT" + revision = "d98d8acdac006fb39831f1b25640813fef9c314f" + version = "v0.3.3" [solve-meta] analyzer-name = "dep" diff --git a/flytestdlib/Gopkg.toml b/flytestdlib/Gopkg.toml index 3d6cf08f6f..fdf90bba03 100644 --- a/flytestdlib/Gopkg.toml +++ b/flytestdlib/Gopkg.toml @@ -57,11 +57,11 @@ [[constraint]] name = "k8s.io/apimachinery" - version = "kubernetes-1.11.2" + version = "kubernetes-1.13.1" [[constraint]] name = "k8s.io/client-go" - version = "kubernetes-1.11.2" + version = "kubernetes-1.13.1" [[constraint]] name = "github.com/graymeta/stow" diff --git a/flytestdlib/promutils/workqueue.go b/flytestdlib/promutils/workqueue.go index 24de6a0053..1911c0894c 100644 --- a/flytestdlib/promutils/workqueue.go +++ b/flytestdlib/promutils/workqueue.go @@ -31,6 +31,26 @@ func init() { type prometheusMetricsProvider struct{} +func (prometheusMetricsProvider) NewUnfinishedWorkSecondsMetric(name string) workqueue.SettableGaugeMetric { + unfinishedWork := prometheus.NewGauge(prometheus.GaugeOpts{ + Subsystem: name, + Name: "unfinished_work_s", + Help: "How many seconds of work in progress in workqueue: " + name, + }) + prometheus.MustRegister(unfinishedWork) + return unfinishedWork +} + +func (prometheusMetricsProvider) NewLongestRunningProcessorMicrosecondsMetric(name string) workqueue.SettableGaugeMetric { + unfinishedWork := prometheus.NewGauge(prometheus.GaugeOpts{ + Subsystem: name, + Name: "longest_running_processor_us", + Help: "How many microseconds longest running processor from workqueue" + name + " takes.", + }) + prometheus.MustRegister(unfinishedWork) + return unfinishedWork +} + func (prometheusMetricsProvider) NewDepthMetric(name string) workqueue.GaugeMetric { depth := prometheus.NewGauge(prometheus.GaugeOpts{ Subsystem: name, From b5e6bfd17909777eddf7189a4e2ee16fea162ff3 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Mon, 1 Jul 2019 14:46:35 -0700 Subject: [PATCH 055/191] Scoop update for flytestdlib version v0.2.9 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 4cf7fabf81..25372948f8 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.8", + "version": "0.2.9", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.8/flytestdlib_0.2.8_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.9/flytestdlib_0.2.9_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "5deaa24c632a8aab444d7c6b02b04cc20f864cba9f190f84de1295f359bbbe82" + "hash": "d11a94af2328f0971b5010619d143c4f6f847e4b204fe671ba849a131ac68b7c" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.8/flytestdlib_0.2.8_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.9/flytestdlib_0.2.9_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "4526711f5d3504576bedc9c8db5ad41029f30c3e336e1d42231c4a8ad62af3a3" + "hash": "d78c7e1f7f3d35afaa49a770e0a4c1e55678923bc7bb5e7b7f698fe8efd2f349" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 00f5d1a38bcb37b8f28159b26aad6ed981ed7c76 Mon Sep 17 00:00:00 2001 From: Anand Swaminathan Date: Tue, 2 Jul 2019 16:55:52 -0700 Subject: [PATCH 056/191] Set provider only if all methods are implemented (#26) * Set provider only if all methods of interface are implemented --- flytestdlib/promutils/workqueue.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/flytestdlib/promutils/workqueue.go b/flytestdlib/promutils/workqueue.go index 1911c0894c..f7bdd055f0 100644 --- a/flytestdlib/promutils/workqueue.go +++ b/flytestdlib/promutils/workqueue.go @@ -17,6 +17,8 @@ limitations under the License. package promutils import ( + "fmt" + "k8s.io/client-go/util/workqueue" "github.com/prometheus/client_golang/prometheus" @@ -26,7 +28,14 @@ import ( // prometheus metrics. To use this package, you just have to import it. func init() { - workqueue.SetProvider(prometheusMetricsProvider{}) + var provider interface{} //nolint + provider = prometheusMetricsProvider{} + if p, casted := provider.(workqueue.MetricsProvider); casted { + workqueue.SetProvider(p) + } else { + // This case happens in future versions of client-go where the interface has added methods + fmt.Println("Warn: No metricsProvider set for the workqueue") + } } type prometheusMetricsProvider struct{} From ed2c0a30d3a98b4d9b95b273933e2ba3d02af5b7 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Tue, 2 Jul 2019 17:16:20 -0700 Subject: [PATCH 057/191] Scoop update for flytestdlib version v0.2.10 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 25372948f8..20e5425e3a 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.9", + "version": "0.2.10", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.9/flytestdlib_0.2.9_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.10/flytestdlib_0.2.10_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "d11a94af2328f0971b5010619d143c4f6f847e4b204fe671ba849a131ac68b7c" + "hash": "0581a128328931280f2d60ff885dd1a2063776a622a710135ce846d66be442e1" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.9/flytestdlib_0.2.9_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.10/flytestdlib_0.2.10_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "d78c7e1f7f3d35afaa49a770e0a4c1e55678923bc7bb5e7b7f698fe8efd2f349" + "hash": "061dd31294bc2498d8cb939f164ca7518e23ea14978d7ea06244c3d43ea3b9e6" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 112e471ac7c464d48aad313450cc17a70f0cc15a Mon Sep 17 00:00:00 2001 From: matthewphsmith Date: Mon, 8 Jul 2019 11:41:24 -0700 Subject: [PATCH 058/191] Add lp as an optional label for stats (#24) * Add lp as an optional label for stats * goimports * Add lp as log key * Allow for testing of singleton metric keys * remove init() function from test package since it is unclear what the effects of that would be based on ordering of tests --- flytestdlib/contextutils/context.go | 7 +++++++ flytestdlib/contextutils/context_test.go | 7 +++++++ flytestdlib/promutils/labeled/counter_test.go | 7 ++++++- flytestdlib/promutils/labeled/keys.go | 17 ++++++++++++++--- flytestdlib/promutils/labeled/keys_test.go | 3 ++- flytestdlib/promutils/labeled/stopwatch_test.go | 1 + flytestdlib/storage/cached_rawstore_test.go | 11 +++++++---- flytestdlib/utils/marshal_utils_test.go | 2 +- 8 files changed, 45 insertions(+), 10 deletions(-) diff --git a/flytestdlib/contextutils/context.go b/flytestdlib/contextutils/context.go index e5be11e219..fd0b5fac0b 100644 --- a/flytestdlib/contextutils/context.go +++ b/flytestdlib/contextutils/context.go @@ -22,6 +22,7 @@ const ( JobIDKey Key = "job_id" PhaseKey Key = "phase" RoutineLabelKey Key = "routine" + LaunchPlanIDKey Key = "lp" ) func (k Key) String() string { @@ -38,6 +39,7 @@ var logKeys = []Key{ TaskTypeKey, PhaseKey, RoutineLabelKey, + LaunchPlanIDKey, } // Gets a new context with namespace set. @@ -85,6 +87,11 @@ func WithWorkflowID(ctx context.Context, workflow string) context.Context { return context.WithValue(ctx, WorkflowIDKey, workflow) } +// Gets a new context with a launch plan ID set. +func WithLaunchPlanID(ctx context.Context, launchPlan string) context.Context { + return context.WithValue(ctx, LaunchPlanIDKey, launchPlan) +} + // Get new context with Project and Domain values set func WithProjectDomain(ctx context.Context, project, domain string) context.Context { c := context.WithValue(ctx, ProjectKey, project) diff --git a/flytestdlib/contextutils/context_test.go b/flytestdlib/contextutils/context_test.go index d65c2a2be3..e2effe3a6b 100644 --- a/flytestdlib/contextutils/context_test.go +++ b/flytestdlib/contextutils/context_test.go @@ -69,6 +69,13 @@ func TestWithWorkflowID(t *testing.T) { assert.Equal(t, "flyte", ctx.Value(WorkflowIDKey)) } +func TestWithLaunchPlanID(t *testing.T) { + ctx := context.Background() + assert.Nil(t, ctx.Value(LaunchPlanIDKey)) + ctx = WithLaunchPlanID(ctx, "flytelp") + assert.Equal(t, "flytelp", ctx.Value(LaunchPlanIDKey)) +} + func TestWithNodeID(t *testing.T) { ctx := context.Background() assert.Nil(t, ctx.Value(NodeIDKey)) diff --git a/flytestdlib/promutils/labeled/counter_test.go b/flytestdlib/promutils/labeled/counter_test.go index 130b8217a2..e427026b43 100644 --- a/flytestdlib/promutils/labeled/counter_test.go +++ b/flytestdlib/promutils/labeled/counter_test.go @@ -10,8 +10,9 @@ import ( ) func TestLabeledCounter(t *testing.T) { + UnsetMetricKeys() assert.NotPanics(t, func() { - SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) + SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey, contextutils.LaunchPlanIDKey) }) scope := promutils.NewTestScope() @@ -28,4 +29,8 @@ func TestLabeledCounter(t *testing.T) { ctx = contextutils.WithTaskID(ctx, "task") c.Inc(ctx) c.Add(ctx, 1.0) + + ctx = contextutils.WithLaunchPlanID(ctx, "lp") + c.Inc(ctx) + c.Add(ctx, 1.0) } diff --git a/flytestdlib/promutils/labeled/keys.go b/flytestdlib/promutils/labeled/keys.go index d8c8683750..7727a0dfa3 100644 --- a/flytestdlib/promutils/labeled/keys.go +++ b/flytestdlib/promutils/labeled/keys.go @@ -15,11 +15,11 @@ var ( // Metric Keys to label metrics with. These keys get pulled from context if they are present. Use contextutils to fill // them in. - metricKeys = make([]contextutils.Key, 0) + metricKeys []contextutils.Key // :(, we have to create a separate list to satisfy the MustNewCounterVec API as it accepts string only - metricStringKeys = make([]string, 0) - metricKeysAreSet = sync.Once{} + metricStringKeys []string + metricKeysAreSet sync.Once ) // Sets keys to use with labeled metrics. The values of these keys will be pulled from context at runtime. @@ -45,3 +45,14 @@ func SetMetricKeys(keys ...contextutils.Key) { func GetUnlabeledMetricName(metricName string) string { return metricName + "_unlabeled" } + +// Warning: This function is not thread safe and should be used for testing only outside of this package. +func UnsetMetricKeys() { + metricKeys = make([]contextutils.Key, 0) + metricStringKeys = make([]string, 0) + metricKeysAreSet = sync.Once{} +} + +func init() { + UnsetMetricKeys() +} diff --git a/flytestdlib/promutils/labeled/keys_test.go b/flytestdlib/promutils/labeled/keys_test.go index 4a8600aea3..6699ab2af6 100644 --- a/flytestdlib/promutils/labeled/keys_test.go +++ b/flytestdlib/promutils/labeled/keys_test.go @@ -8,8 +8,9 @@ import ( ) func TestMetricKeys(t *testing.T) { + UnsetMetricKeys() input := []contextutils.Key{ - contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey, + contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey, contextutils.LaunchPlanIDKey, } assert.NotPanics(t, func() { SetMetricKeys(input...) }) diff --git a/flytestdlib/promutils/labeled/stopwatch_test.go b/flytestdlib/promutils/labeled/stopwatch_test.go index d5adf0eade..1d8a69d561 100644 --- a/flytestdlib/promutils/labeled/stopwatch_test.go +++ b/flytestdlib/promutils/labeled/stopwatch_test.go @@ -11,6 +11,7 @@ import ( ) func TestLabeledStopWatch(t *testing.T) { + UnsetMetricKeys() assert.NotPanics(t, func() { SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) }) diff --git a/flytestdlib/storage/cached_rawstore_test.go b/flytestdlib/storage/cached_rawstore_test.go index 316f999bf7..c5225aa790 100644 --- a/flytestdlib/storage/cached_rawstore_test.go +++ b/flytestdlib/storage/cached_rawstore_test.go @@ -18,11 +18,8 @@ import ( "github.com/stretchr/testify/assert" ) -func init() { - labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) -} - func TestNewCachedStore(t *testing.T) { + resetMetricKeys() t.Run("CachingDisabled", func(t *testing.T) { testScope := promutils.NewTestScope() @@ -50,6 +47,11 @@ func TestNewCachedStore(t *testing.T) { }) } +func resetMetricKeys() { + labeled.UnsetMetricKeys() + labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) +} + func dummyCacheStore(t *testing.T, store RawStore, scope promutils.Scope) *cachedRawStore { cfg := &Config{ Cache: CachingConfig{ @@ -86,6 +88,7 @@ func (d *dummyStore) WriteRaw(ctx context.Context, reference DataReference, size } func TestCachedRawStore(t *testing.T) { + resetMetricKeys() ctx := context.TODO() k1 := DataReference("k1") k2 := DataReference("k2") diff --git a/flytestdlib/utils/marshal_utils_test.go b/flytestdlib/utils/marshal_utils_test.go index 4ac0fc130b..4295f5a14d 100644 --- a/flytestdlib/utils/marshal_utils_test.go +++ b/flytestdlib/utils/marshal_utils_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes/struct" + structpb "github.com/golang/protobuf/ptypes/struct" ) type SimpleType struct { From bfca9591809fd778448910c91f08a11854b78d11 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 25 Jul 2019 21:00:00 -0700 Subject: [PATCH 059/191] Return errors from cached raw store (#28) * Return errors from cached raw store * gracefully ignore cache write errors in ReadProtobuf and WriteProtobuf * fix fixture * Wrapf the use of ErrExceedsLimit * nosec math/rand * add test with caching failures for protobuf store * log and add metrics to record failures not caused by ErrFailedToWriteCache --- flytestdlib/errors/error.go | 113 ++++++++++++++++++++ flytestdlib/errors/error_test.go | 47 ++++++++ flytestdlib/storage/cached_rawstore.go | 8 +- flytestdlib/storage/cached_rawstore_test.go | 26 +++++ flytestdlib/storage/protobuf_store.go | 36 ++++--- flytestdlib/storage/protobuf_store_test.go | 82 ++++++++++++++ flytestdlib/storage/stow_store.go | 4 +- flytestdlib/storage/utils.go | 20 +++- flytestdlib/storage/utils_test.go | 49 +++++++++ 9 files changed, 365 insertions(+), 20 deletions(-) create mode 100644 flytestdlib/errors/error.go create mode 100644 flytestdlib/errors/error_test.go create mode 100644 flytestdlib/storage/utils_test.go diff --git a/flytestdlib/errors/error.go b/flytestdlib/errors/error.go new file mode 100644 index 0000000000..6abb08d3cf --- /dev/null +++ b/flytestdlib/errors/error.go @@ -0,0 +1,113 @@ +// Contains utilities to use to create and consume simple errors. +package errors + +import ( + "fmt" + + "github.com/pkg/errors" +) + +// A generic error code type. +type ErrorCode = string + +type err struct { + code ErrorCode + message string +} + +func (e *err) Error() string { + return fmt.Sprintf("[%v] %v", e.code, e.message) +} + +func (e *err) Code() ErrorCode { + return e.code +} + +type errorWithCause struct { + *err + cause error +} + +func (e *errorWithCause) Error() string { + return fmt.Sprintf("%v, caused by: %v", e.err.Error(), errors.Cause(e)) +} + +func (e *errorWithCause) Cause() error { + return e.cause +} + +// Creates a new error using an error code and a message. +func Errorf(errorCode ErrorCode, msgFmt string, args ...interface{}) error { + return &err{ + code: errorCode, + message: fmt.Sprintf(msgFmt, args...), + } +} + +// Wraps a root cause error with another. This is useful to unify an error type in a package. +func Wrapf(code ErrorCode, cause error, msgFmt string, args ...interface{}) error { + return &errorWithCause{ + err: &err{ + code: code, + message: fmt.Sprintf(msgFmt, args...), + }, + cause: cause, + } +} + +// Gets the error code of the passed error if it has one. +func GetErrorCode(e error) (code ErrorCode, found bool) { + type coder interface { + Code() ErrorCode + } + + er, ok := e.(coder) + if ok { + return er.Code(), true + } + + return +} + +// Gets whether error is caused by another error with errCode. +func IsCausedBy(e error, errCode ErrorCode) bool { + type causer interface { + Cause() error + } + + for e != nil { + if code, found := GetErrorCode(e); found && code == errCode { + return true + } + + cause, ok := e.(causer) + if !ok { + break + } + + e = cause.Cause() + } + + return false +} + +func IsCausedByError(e, e2 error) bool { + type causer interface { + Cause() error + } + + for e != nil { + if e == e2 { + return true + } + + cause, ok := e.(causer) + if !ok { + break + } + + e = cause.Cause() + } + + return false +} diff --git a/flytestdlib/errors/error_test.go b/flytestdlib/errors/error_test.go new file mode 100644 index 0000000000..b3e3dd0a51 --- /dev/null +++ b/flytestdlib/errors/error_test.go @@ -0,0 +1,47 @@ +package errors + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestErrorf(t *testing.T) { + e := Errorf("Code1", "msg") + assert.NotNil(t, e) + assert.Equal(t, "[Code1] msg", e.Error()) +} + +func TestWrapf(t *testing.T) { + e := Wrapf("Code1", fmt.Errorf("test error"), "msg") + assert.NotNil(t, e) + assert.Equal(t, "[Code1] msg, caused by: test error", e.Error()) +} + +func TestGetErrorCode(t *testing.T) { + e := Errorf("Code1", "msg") + assert.NotNil(t, e) + code, found := GetErrorCode(e) + assert.True(t, found) + assert.Equal(t, "Code1", code) +} + +func TestIsCausedBy(t *testing.T) { + e := Errorf("Code1", "msg") + assert.NotNil(t, e) + + e = Wrapf("Code2", e, "msg") + assert.True(t, IsCausedBy(e, "Code1")) + assert.True(t, IsCausedBy(e, "Code2")) +} + +func TestIsCausedByError(t *testing.T) { + eRoot := Errorf("Code1", "msg") + assert.NotNil(t, eRoot) + e1 := Wrapf("Code2", eRoot, "msg") + assert.True(t, IsCausedByError(e1, eRoot)) + e2 := Wrapf("Code3", e1, "msg") + assert.True(t, IsCausedByError(e2, eRoot)) + assert.True(t, IsCausedByError(e2, e1)) +} diff --git a/flytestdlib/storage/cached_rawstore.go b/flytestdlib/storage/cached_rawstore.go index 2b539d7bb1..e9d83df6cd 100644 --- a/flytestdlib/storage/cached_rawstore.go +++ b/flytestdlib/storage/cached_rawstore.go @@ -7,6 +7,8 @@ import ( "runtime/debug" "time" + "github.com/lyft/flytestdlib/errors" + "github.com/prometheus/client_golang/prometheus" "github.com/lyft/flytestdlib/promutils" @@ -75,11 +77,11 @@ func (s *cachedRawStore) ReadRaw(ctx context.Context, reference DataReference) ( err = s.cache.Set(key, b, 0) if err != nil { - // TODO Ignore errors in writing to cache? logger.Debugf(ctx, "Failed to Cache the metadata") + err = errors.Wrapf(ErrFailedToWriteCache, err, "Failed to Cache the metadata") } - return ioutils.NewBytesReadCloser(b), nil + return ioutils.NewBytesReadCloser(b), err } // Stores a raw byte array. @@ -94,9 +96,9 @@ func (s *cachedRawStore) WriteRaw(ctx context.Context, reference DataReference, err = s.cache.Set([]byte(reference), buf.Bytes(), neverExpire) if err != nil { s.metrics.CacheWriteError.Inc() + err = errors.Wrapf(ErrFailedToWriteCache, err, "Failed to Cache the metadata") } - // TODO ignore errors? return err } diff --git a/flytestdlib/storage/cached_rawstore_test.go b/flytestdlib/storage/cached_rawstore_test.go index c5225aa790..6949119627 100644 --- a/flytestdlib/storage/cached_rawstore_test.go +++ b/flytestdlib/storage/cached_rawstore_test.go @@ -6,6 +6,7 @@ import ( "fmt" "io" "io/ioutil" + "math/rand" "runtime/debug" "testing" @@ -92,8 +93,12 @@ func TestCachedRawStore(t *testing.T) { ctx := context.TODO() k1 := DataReference("k1") k2 := DataReference("k2") + bigK := DataReference("bigK") d1 := []byte("abc") d2 := []byte("xyz") + bigD := make([]byte, 1.5*1024*1024) + // #nosec G404 + rand.Read(bigD) writeCalled := false readCalled := false store := &dummyStore{ @@ -113,6 +118,11 @@ func TestCachedRawStore(t *testing.T) { assert.NoError(t, err) assert.Equal(t, d2, b) return nil + } else if reference == "bigK" { + b, err := ioutil.ReadAll(raw) + assert.NoError(t, err) + assert.Equal(t, bigD, b) + return nil } return fmt.Errorf("err") }, @@ -123,6 +133,8 @@ func TestCachedRawStore(t *testing.T) { readCalled = true if reference == "k1" { return ioutils.NewBytesReadCloser(d1), nil + } else if reference == "bigK" { + return ioutils.NewBytesReadCloser(bigD), nil } return nil, fmt.Errorf("err") }, @@ -182,4 +194,18 @@ func TestCachedRawStore(t *testing.T) { assert.False(t, readCalled) }) + t.Run("WriteAndReadBigData", func(t *testing.T) { + writeCalled = false + readCalled = false + err := cStore.WriteRaw(ctx, bigK, int64(len(bigD)), Options{}, bytes.NewReader(bigD)) + assert.True(t, writeCalled) + assert.True(t, IsFailedWriteToCache(err)) + + o, err := cStore.ReadRaw(ctx, bigK) + assert.True(t, IsFailedWriteToCache(err)) + b, err := ioutil.ReadAll(o) + assert.NoError(t, err) + assert.Equal(t, bigD, b) + assert.True(t, readCalled) + }) } diff --git a/flytestdlib/storage/protobuf_store.go b/flytestdlib/storage/protobuf_store.go index ba11d3311c..6b09a0e6eb 100644 --- a/flytestdlib/storage/protobuf_store.go +++ b/flytestdlib/storage/protobuf_store.go @@ -17,11 +17,13 @@ import ( ) type protoMetrics struct { - FetchLatency promutils.StopWatch - MarshalTime promutils.StopWatch - UnmarshalTime promutils.StopWatch - MarshalFailure prometheus.Counter - UnmarshalFailure prometheus.Counter + FetchLatency promutils.StopWatch + MarshalTime promutils.StopWatch + UnmarshalTime promutils.StopWatch + MarshalFailure prometheus.Counter + UnmarshalFailure prometheus.Counter + WriteFailureUnrelatedToCache prometheus.Counter + ReadFailureUnrelatedToCache prometheus.Counter } // Implements ProtobufStore to marshal and unmarshal protobufs to/from a RawStore @@ -32,7 +34,9 @@ type DefaultProtobufStore struct { func (s DefaultProtobufStore) ReadProtobuf(ctx context.Context, reference DataReference, msg proto.Message) error { rc, err := s.ReadRaw(ctx, reference) - if err != nil { + if err != nil && !IsFailedWriteToCache(err) { + logger.Errorf(ctx, "Failed to read from the raw store. Error: %v", err) + s.metrics.ReadFailureUnrelatedToCache.Inc() return errs.Wrap(err, fmt.Sprintf("path:%v", reference)) } @@ -68,18 +72,26 @@ func (s DefaultProtobufStore) WriteProtobuf(ctx context.Context, reference DataR return err } - return s.WriteRaw(ctx, reference, int64(len(raw)), opts, bytes.NewReader(raw)) + err = s.WriteRaw(ctx, reference, int64(len(raw)), opts, bytes.NewReader(raw)) + if err != nil && !IsFailedWriteToCache(err) { + logger.Errorf(ctx, "Failed to write to the raw store. Error: %v", err) + s.metrics.WriteFailureUnrelatedToCache.Inc() + return err + } + return nil } func NewDefaultProtobufStore(store RawStore, metricsScope promutils.Scope) DefaultProtobufStore { return DefaultProtobufStore{ RawStore: store, metrics: &protoMetrics{ - FetchLatency: metricsScope.MustNewStopWatch("proto_fetch", "Time to read data before unmarshalling", time.Millisecond), - MarshalTime: metricsScope.MustNewStopWatch("marshal", "Time incurred in marshalling data before writing", time.Millisecond), - UnmarshalTime: metricsScope.MustNewStopWatch("unmarshal", "Time incurred in unmarshalling received data", time.Millisecond), - MarshalFailure: metricsScope.MustNewCounter("marshal_failure", "Failures when marshalling"), - UnmarshalFailure: metricsScope.MustNewCounter("unmarshal_failure", "Failures when unmarshalling"), + FetchLatency: metricsScope.MustNewStopWatch("proto_fetch", "Time to read data before unmarshalling", time.Millisecond), + MarshalTime: metricsScope.MustNewStopWatch("marshal", "Time incurred in marshalling data before writing", time.Millisecond), + UnmarshalTime: metricsScope.MustNewStopWatch("unmarshal", "Time incurred in unmarshalling received data", time.Millisecond), + MarshalFailure: metricsScope.MustNewCounter("marshal_failure", "Failures when marshalling"), + UnmarshalFailure: metricsScope.MustNewCounter("unmarshal_failure", "Failures when unmarshalling"), + WriteFailureUnrelatedToCache: metricsScope.MustNewCounter("write_failure_unrelated_to_cache", "Raw store write failures that are not caused by ErrFailedToWriteCache"), + ReadFailureUnrelatedToCache: metricsScope.MustNewCounter("read_failure_unrelated_to_cache", "Raw store read failures that are not caused by ErrFailedToWriteCache"), }, } } diff --git a/flytestdlib/storage/protobuf_store_test.go b/flytestdlib/storage/protobuf_store_test.go index 160239bb73..44ac0c4084 100644 --- a/flytestdlib/storage/protobuf_store_test.go +++ b/flytestdlib/storage/protobuf_store_test.go @@ -2,11 +2,15 @@ package storage import ( "context" + "fmt" + "io" + "math/rand" "testing" "github.com/lyft/flytestdlib/promutils" "github.com/golang/protobuf/proto" + errs "github.com/pkg/errors" "github.com/stretchr/testify/assert" ) @@ -14,6 +18,10 @@ type mockProtoMessage struct { X int64 `protobuf:"varint,2,opt,name=x,json=x,proto3" json:"x,omitempty"` } +type mockBigDataProtoMessage struct { + X []byte `protobuf:"bytes,1,opt,name=X,proto3" json:"X,omitempty"` +} + func (mockProtoMessage) Reset() { } @@ -24,6 +32,16 @@ func (m mockProtoMessage) String() string { func (mockProtoMessage) ProtoMessage() { } +func (mockBigDataProtoMessage) Reset() { +} + +func (m mockBigDataProtoMessage) String() string { + return proto.CompactTextString(m) +} + +func (mockBigDataProtoMessage) ProtoMessage() { +} + func TestDefaultProtobufStore_ReadProtobuf(t *testing.T) { t.Run("Read after Write", func(t *testing.T) { testScope := promutils.NewTestScope() @@ -39,3 +57,67 @@ func TestDefaultProtobufStore_ReadProtobuf(t *testing.T) { assert.Equal(t, int64(5), m.X) }) } + +func TestDefaultProtobufStore_BigDataReadAfterWrite(t *testing.T) { + t.Run("Read after Write with Big Data", func(t *testing.T) { + testScope := promutils.NewTestScope() + + s, err := NewDataStore( + &Config{ + Type: TypeMemory, + Cache: CachingConfig{ + MaxSizeMegabytes: 1, + TargetGCPercent: 20, + }, + }, testScope) + assert.NoError(t, err) + + bigD := make([]byte, 1.5*1024*1024) + // #nosec G404 + rand.Read(bigD) + + mockMessage := &mockBigDataProtoMessage{X: bigD} + + err = s.WriteProtobuf(context.TODO(), DataReference("bigK"), Options{}, mockMessage) + assert.NoError(t, err) + + m := &mockBigDataProtoMessage{} + err = s.ReadProtobuf(context.TODO(), DataReference("bigK"), m) + assert.NoError(t, err) + assert.Equal(t, bigD, m.X) + + }) +} + +func TestDefaultProtobufStore_HardErrors(t *testing.T) { + ctx := context.TODO() + k1 := DataReference("k1") + dummyHeadErrorMsg := "Dummy head error" + dummyWriteErrorMsg := "Dummy write error" + dummyReadErrorMsg := "Dummy read error" + store := &dummyStore{ + HeadCb: func(ctx context.Context, reference DataReference) (Metadata, error) { + return MemoryMetadata{}, fmt.Errorf(dummyHeadErrorMsg) + }, + WriteRawCb: func(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error { + return fmt.Errorf(dummyWriteErrorMsg) + }, + ReadRawCb: func(ctx context.Context, reference DataReference) (io.ReadCloser, error) { + return nil, fmt.Errorf(dummyReadErrorMsg) + }, + } + testScope := promutils.NewTestScope() + pbErroneousStore := NewDefaultProtobufStore(store, testScope) + t.Run("Test if hard write errors are handled correctly", func(t *testing.T) { + err := pbErroneousStore.WriteProtobuf(ctx, k1, Options{}, &mockProtoMessage{X: 5}) + assert.False(t, IsFailedWriteToCache(err)) + assert.Equal(t, dummyWriteErrorMsg, errs.Cause(err).Error()) + }) + + t.Run("Test if hard read errors are handled correctly", func(t *testing.T) { + m := &mockProtoMessage{} + err := pbErroneousStore.ReadProtobuf(ctx, k1, m) + assert.False(t, IsFailedWriteToCache(err)) + assert.Equal(t, dummyReadErrorMsg, errs.Cause(err).Error()) + }) +} diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index b13170bf09..e156f376da 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -5,6 +5,8 @@ import ( "io" "time" + "github.com/lyft/flytestdlib/errors" + "github.com/prometheus/client_golang/prometheus" "github.com/lyft/flytestdlib/promutils" @@ -116,7 +118,7 @@ func (s *StowStore) ReadRaw(ctx context.Context, reference DataReference) (io.Re } if sizeBytes/MiB > GetConfig().Limits.GetLimitMegabytes { - return nil, ErrExceedsLimit + return nil, errors.Wrapf(ErrExceedsLimit, err, "limit exceeded") } return item.Open() diff --git a/flytestdlib/storage/utils.go b/flytestdlib/storage/utils.go index 62fb2aa22c..9b790c6120 100644 --- a/flytestdlib/storage/utils.go +++ b/flytestdlib/storage/utils.go @@ -1,18 +1,26 @@ package storage import ( - "fmt" "os" + errors2 "github.com/lyft/flytestdlib/errors" + "github.com/graymeta/stow" "github.com/pkg/errors" ) -var ErrExceedsLimit = fmt.Errorf("limit exceeded") +var ( + ErrExceedsLimit errors2.ErrorCode = "LIMIT_EXCEEDED" + ErrFailedToWriteCache errors2.ErrorCode = "CACHE_WRITE_FAILED" +) // Gets a value indicating whether the underlying error is a Not Found error. func IsNotFound(err error) bool { - if root := errors.Cause(err); root == stow.ErrNotFound || os.IsNotExist(root) { + if root := errors.Cause(err); os.IsNotExist(root) { + return true + } + + if errors2.IsCausedByError(err, stow.ErrNotFound) { return true } @@ -30,5 +38,9 @@ func IsExists(err error) bool { // Gets a value indicating whether the root cause of error is a "limit exceeded" error. func IsExceedsLimit(err error) bool { - return errors.Cause(err) == ErrExceedsLimit + return errors2.IsCausedBy(err, ErrExceedsLimit) +} + +func IsFailedWriteToCache(err error) bool { + return errors2.IsCausedBy(err, ErrFailedToWriteCache) } diff --git a/flytestdlib/storage/utils_test.go b/flytestdlib/storage/utils_test.go new file mode 100644 index 0000000000..8618310f4a --- /dev/null +++ b/flytestdlib/storage/utils_test.go @@ -0,0 +1,49 @@ +package storage + +import ( + "os" + "syscall" + "testing" + + "github.com/graymeta/stow" + flyteerrors "github.com/lyft/flytestdlib/errors" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" +) + +func TestIsNotFound(t *testing.T) { + sysError := &os.PathError{Err: syscall.ENOENT} + assert.True(t, IsNotFound(sysError)) + flyteError := errors.Wrap(sysError, "Wrapping \"system not found\" error") + assert.True(t, IsNotFound(flyteError)) + secondLevelError := errors.Wrap(flyteError, "Higher level error") + assert.True(t, IsNotFound(secondLevelError)) + + // more for stow errors + stowNotFoundError := stow.ErrNotFound + assert.True(t, IsNotFound(stowNotFoundError)) + flyteError = errors.Wrap(stowNotFoundError, "Wrapping stow.ErrNotFound") + assert.True(t, IsNotFound(flyteError)) + secondLevelError = errors.Wrap(flyteError, "Higher level error wrapper of the stow.ErrNotFound error") + assert.True(t, IsNotFound(secondLevelError)) +} + +func TestIsExceedsLimit(t *testing.T) { + sysError := &os.PathError{Err: syscall.ENOENT} + exceedsLimitError := flyteerrors.Wrapf(ErrExceedsLimit, sysError, "An error wrapped in ErrExceedsLimits") + failedToWriteCacheError := flyteerrors.Wrapf(ErrFailedToWriteCache, sysError, "An error wrapped in ErrFailedToWriteCache") + + assert.True(t, IsExceedsLimit(exceedsLimitError)) + assert.False(t, IsExceedsLimit(failedToWriteCacheError)) + assert.False(t, IsExceedsLimit(sysError)) +} + +func TestIsFailedWriteToCache(t *testing.T) { + sysError := &os.PathError{Err: syscall.ENOENT} + exceedsLimitError := flyteerrors.Wrapf(ErrExceedsLimit, sysError, "An error wrapped in ErrExceedsLimits") + failedToWriteCacheError := flyteerrors.Wrapf(ErrFailedToWriteCache, sysError, "An error wrapped in ErrFailedToWriteCache") + + assert.False(t, IsFailedWriteToCache(exceedsLimitError)) + assert.True(t, IsFailedWriteToCache(failedToWriteCacheError)) + assert.False(t, IsFailedWriteToCache(sysError)) +} From e0a8732c22e0d55b042b55ef4df1d54e88202808 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Thu, 25 Jul 2019 21:07:29 -0700 Subject: [PATCH 060/191] Scoop update for flytestdlib version v1.2.4 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 20e5425e3a..e43a4c2528 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.10", + "version": "1.2.4", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.10/flytestdlib_0.2.10_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v1.2.4/flytestdlib_1.2.4_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "0581a128328931280f2d60ff885dd1a2063776a622a710135ce846d66be442e1" + "hash": "6b52de6cf834a60a07d7755653492541ee4e9079aa594fe2e7157c11e4cfcdfb" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.10/flytestdlib_0.2.10_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v1.2.4/flytestdlib_1.2.4_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "061dd31294bc2498d8cb939f164ca7518e23ea14978d7ea06244c3d43ea3b9e6" + "hash": "cd32add4a68eb23020912d81e9c24ec00f742ab11584f0c15749a96c7937eff9" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From a8b264f7a06b2369ac4ec62f9f6253a7adfaef2e Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Thu, 25 Jul 2019 21:08:45 -0700 Subject: [PATCH 061/191] Scoop update for flytestdlib version v0.2.11 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index e43a4c2528..0246a2c4ef 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "1.2.4", + "version": "0.2.11", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v1.2.4/flytestdlib_1.2.4_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.11/flytestdlib_0.2.11_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "6b52de6cf834a60a07d7755653492541ee4e9079aa594fe2e7157c11e4cfcdfb" + "hash": "4ace26d248fea1f01e59cb613d8353c33800a7f8420dc70b48d50e71d8602ce3" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v1.2.4/flytestdlib_1.2.4_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.11/flytestdlib_0.2.11_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "cd32add4a68eb23020912d81e9c24ec00f742ab11584f0c15749a96c7937eff9" + "hash": "665370f8394034a2dbe9334b1cd698624da2cfaeb353c67d404f10a365042c00" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 0ff342be41ed431781eebfaa9acb99f2769c4296 Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Fri, 26 Jul 2019 22:57:14 -0700 Subject: [PATCH 062/191] Generic StowStore configuration (#29) * Work in progress: Generic Stowstore * Simplifying to use only stowstore * added missing functions * removing deleted reference * Updated pflags * Fixed --- flytestdlib/Gopkg.lock | 396 +++++++++++++++--- flytestdlib/Gopkg.toml | 6 +- flytestdlib/cli/pflags/api/generator.go | 5 + flytestdlib/cli/pflags/api/sample.go | 1 + .../cli/pflags/api/testdata/testtype.go | 2 +- flytestdlib/logger/config_flags.go | 13 +- flytestdlib/logger/config_flags_test.go | 33 ++ flytestdlib/logger/config_test.go | 17 + flytestdlib/storage/config.go | 9 +- flytestdlib/storage/config_flags.go | 15 +- flytestdlib/storage/localstore_test.go | 5 +- flytestdlib/storage/rawstores.go | 5 +- flytestdlib/storage/s3store.go | 103 ----- flytestdlib/storage/s3stsore_test.go | 26 -- flytestdlib/storage/stow_store_test.go | 6 +- flytestdlib/storage/stowstore.go | 130 ++++++ flytestdlib/storage/stowstore_test.go | 53 +++ 17 files changed, 618 insertions(+), 207 deletions(-) delete mode 100644 flytestdlib/storage/s3store.go delete mode 100644 flytestdlib/storage/s3stsore_test.go create mode 100644 flytestdlib/storage/stowstore.go create mode 100644 flytestdlib/storage/stowstore_test.go diff --git a/flytestdlib/Gopkg.lock b/flytestdlib/Gopkg.lock index 0fcc602f6f..38e3251581 100644 --- a/flytestdlib/Gopkg.lock +++ b/flytestdlib/Gopkg.lock @@ -2,7 +2,46 @@ [[projects]] - digest = "1:7fbdc0ca5fc0b0bb66b81ec2fdca82fbe64416742267f11aceb8ed56e6ca3121" + digest = "1:80004fcc5cf64e591486b3e11b406f1e0d17bf85d475d64203c8494f5da4fcd1" + name = "cloud.google.com/go" + packages = ["compute/metadata"] + pruneopts = "UT" + revision = "cdaaf98f9226c39dc162b8e55083b2fbc67b4674" + version = "v0.43.0" + +[[projects]] + digest = "1:6b1426cad7057b717351eacf5b6fe70f053f11aac1ce254bbf2fd72c031719eb" + name = "contrib.go.opencensus.io/exporter/ocagent" + packages = ["."] + pruneopts = "UT" + revision = "dcb33c7f3b7cfe67e8a2cea10207ede1b7c40764" + version = "v0.4.12" + +[[projects]] + digest = "1:94d4ae958b3d2ab476bef4bed53c1dcc3cb0fb2639bd45dd08b40e57139192e5" + name = "github.com/Azure/azure-sdk-for-go" + packages = ["storage"] + pruneopts = "UT" + revision = "2d49bb8f2cee530cc16f1f1a9f0aae763dee257d" + version = "v10.2.1-beta" + +[[projects]] + digest = "1:3818ae0b615fadcb7ae2291f0147c2db42775398347123c2fe4de1d54499b9da" + name = "github.com/Azure/go-autorest" + packages = [ + "autorest", + "autorest/adal", + "autorest/azure", + "autorest/date", + "logger", + "tracing", + ] + pruneopts = "UT" + revision = "2913f263500c4a5b23dada1b46ccd22ac972315f" + version = "v12.3.0" + +[[projects]] + digest = "1:5b029601017603a512847d8ed857cca57b0af863d5289b4c8493d3f25b5425d0" name = "github.com/aws/aws-sdk-go" packages = [ "aws", @@ -32,17 +71,21 @@ "private/protocol", "private/protocol/eventstream", "private/protocol/eventstream/eventstreamapi", + "private/protocol/json/jsonutil", "private/protocol/query", "private/protocol/query/queryutil", "private/protocol/rest", "private/protocol/restxml", "private/protocol/xml/xmlutil", "service/s3", + "service/s3/s3iface", + "service/s3/s3manager", "service/sts", + "service/sts/stsiface", ] pruneopts = "UT" - revision = "81f3829f5a9d041041bdf56e55926691309d7699" - version = "v1.16.26" + revision = "77b6968988559d355ab953b6436eafe6a76e4a92" + version = "v1.21.4" [[projects]] branch = "master" @@ -53,12 +96,27 @@ revision = "d1e3d6079fc16f8f542183fb5b2fdc11d9f00866" [[projects]] - branch = "master" digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d" name = "github.com/beorn7/perks" packages = ["quantile"] pruneopts = "UT" - revision = "3a771d992973f24aa725d07868b467d1ddfceafb" + revision = "4b2b341e8d7715fae06375aa633dbb6e91b3fb46" + version = "v1.0.0" + +[[projects]] + digest = "1:8f5acd4d4462b5136af644d25101f0968a7a94ee90fcb2059cec5b7cc42e0b20" + name = "github.com/census-instrumentation/opencensus-proto" + packages = [ + "gen-go/agent/common/v1", + "gen-go/agent/metrics/v1", + "gen-go/agent/trace/v1", + "gen-go/metrics/v1", + "gen-go/resource/v1", + "gen-go/trace/v1", + ] + pruneopts = "UT" + revision = "d89fa54de508111353cb0b06403c00569be780d8" + version = "v0.2.1" [[projects]] digest = "1:998cf998358a303ac2430c386ba3fd3398477d6013153d3c6e11432765cc9ae6" @@ -69,12 +127,12 @@ version = "v2.0.0" [[projects]] - digest = "1:04179a5bcbecdb18f06cca42e3808ae8560f86ad7fe470fde21206008f0c5e26" + digest = "1:00eb5d8bd96289512920ac43367d5bee76bbca2062da34862a98b26b92741896" name = "github.com/coocood/freecache" packages = ["."] pruneopts = "UT" - revision = "f3233c8095b26cd0dea0b136b931708c05defa08" - version = "v1.0.1" + revision = "3c79a0a23c1940ab4479332fb3e0127265650ce3" + version = "v1.1.0" [[projects]] digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" @@ -84,6 +142,14 @@ revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" version = "v1.1.1" +[[projects]] + digest = "1:76dc72490af7174349349838f2fe118996381b31ea83243812a97e5a0fd5ed55" + name = "github.com/dgrijalva/jwt-go" + packages = ["."] + pruneopts = "UT" + revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e" + version = "v3.2.0" + [[projects]] branch = "master" digest = "1:dc8bf44b7198605c83a4f2bb36a92c4d9f71eab2e8cf8094ce31b0297dd8ea89" @@ -113,11 +179,11 @@ [[projects]] branch = "master" - digest = "1:b9414457752702c53f6afd3838da3d89b9513ada40cdbe9603bdf54b1ceb5014" + digest = "1:78a5b63751bd99054bee07a498f6aa54da0a909922f9365d1aa3339091efa70a" name = "github.com/fsnotify/fsnotify" packages = ["."] pruneopts = "UT" - revision = "ccc981bf80385c528a65fbfdd49bf2d8da22aa23" + revision = "1485a34d5d5723fea214f5710708e19a831720e4" [[projects]] digest = "1:2cd7915ab26ede7d95b8749e6b1f933f1c6d5398030684e6505940a10f31cfda" @@ -128,31 +194,52 @@ version = "v1.0.0" [[projects]] - digest = "1:9d6dc4d6de69b330d0de86494d6db90c09848c003d5db748f40c925f865c8534" + digest = "1:b532ee3f683c057e797694b5bfeb3827d89e6adf41c53dbc80e549bca76364ea" name = "github.com/golang/protobuf" packages = [ "jsonpb", "proto", + "protoc-gen-go/descriptor", + "protoc-gen-go/generator", + "protoc-gen-go/generator/internal/remap", + "protoc-gen-go/plugin", "ptypes", "ptypes/any", "ptypes/duration", "ptypes/struct", "ptypes/timestamp", + "ptypes/wrappers", ] pruneopts = "UT" - revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" - version = "v1.2.0" + revision = "6c65a5562fc06764971b7c5d05c76c75e84bdbf7" + version = "v1.3.2" [[projects]] - digest = "1:3dab0e385faed192353d2150f6a041f4607f04a0e885f4a5a824eee6b676b4b9" + digest = "1:16e1cbd76f0d4152b5573f08f38b451748f74ec59b99a004a7481342b3fc05af" name = "github.com/graymeta/stow" packages = [ ".", + "azure", + "google", "local", + "oracle", "s3", + "swift", + ] + pruneopts = "UT" + revision = "903027f87de7054953efcdb8ba70d5dc02df38c7" + +[[projects]] + digest = "1:3b341cd71012c63aacddabfc70b9110be8e30c553349552ad3f77242843f2d03" + name = "github.com/grpc-ecosystem/grpc-gateway" + packages = [ + "internal", + "runtime", + "utilities", ] pruneopts = "UT" - revision = "77c84b1dd69c41b74fe0a94ca8ee257d85947327" + revision = "ad529a448ba494a88058f9e5be0988713174ac86" + version = "v1.9.5" [[projects]] digest = "1:d15ee511aa0f56baacc1eb4c6b922fa1c03b38413b6be18166b996d82a0156ea" @@ -200,23 +287,23 @@ revision = "c2b33e84" [[projects]] - digest = "1:0a69a1c0db3591fcefb47f115b224592c8dfa4368b7ba9fae509d5e16cdc95c8" + digest = "1:31e761d97c76151dde79e9d28964a812c46efc5baee4085b86f68f0c654450de" name = "github.com/konsorten/go-windows-terminal-sequences" packages = ["."] pruneopts = "UT" - revision = "5c8c8bd35d3832f5d134ae1e1e375b69a4d25242" - version = "v1.0.1" + revision = "f55edac94c9bbba5d6182a4be46d86a2c9b5b50e" + version = "v1.0.2" [[projects]] - digest = "1:53e8c5c79716437e601696140e8b1801aae4204f4ec54a504333702a49572c4f" + digest = "1:2a0da3440db3f2892609d99cd0389c2776a3fef24435f7b7b58bfc9030aa86ca" name = "github.com/magiconair/properties" packages = [ ".", "assert", ] pruneopts = "UT" - revision = "c2353362d570a7bfa228149c62842019201cfb71" - version = "v1.8.0" + revision = "de8848e004dd33dc07a2947b3d76f618a7fc7ef1" + version = "v1.8.1" [[projects]] digest = "1:c658e84ad3916da105a761660dcaeb01e63416c8ec7bc62256a9b411a05fcd67" @@ -227,12 +314,12 @@ version = "v0.0.9" [[projects]] - digest = "1:0981502f9816113c9c8c4ac301583841855c8cf4da8c72f696b3ebedf6d0e4e5" + digest = "1:9b90c7639a41697f3d4ad12d7d67dfacc9a7a4a6e0bbfae4fc72d0da57c28871" name = "github.com/mattn/go-isatty" packages = ["."] pruneopts = "UT" - revision = "6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c" - version = "v0.0.4" + revision = "1311e847b0cb909da63b5fecfb5370aa66236465" + version = "v0.0.8" [[projects]] digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" @@ -251,12 +338,20 @@ version = "v1.1.2" [[projects]] - digest = "1:95741de3af260a92cc5c7f3f3061e85273f5a81b5db20d4bd68da74bd521675e" + branch = "master" + digest = "1:b20de3cce4fa037405a51f29d69872915d88d5358820ec71e3537e1a29b2d8d5" + name = "github.com/ncw/swift" + packages = ["."] + pruneopts = "UT" + revision = "be076bb68c47b6c17b06258ea7778cfeaf185ea5" + +[[projects]] + digest = "1:93131d8002d7025da13582877c32d1fc302486775a1b06f62241741006428c5e" name = "github.com/pelletier/go-toml" packages = ["."] pruneopts = "UT" - revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194" - version = "v1.2.0" + revision = "728039f679cbcd4f6a54e080d2219a4c4928c546" + version = "v1.4.0" [[projects]] digest = "1:cf31692c14422fa27c83a05292eb5cbe0fb2775972e8f1f8446a71549bd8980b" @@ -275,7 +370,7 @@ version = "v1.0.0" [[projects]] - digest = "1:93a746f1060a8acbcf69344862b2ceced80f854170e1caae089b2834c5fbf7f4" + digest = "1:e89f2cdede55684adbe44b5566f55838ad2aee1dff348d14b73ccf733607b671" name = "github.com/prometheus/client_golang" packages = [ "prometheus", @@ -283,8 +378,8 @@ "prometheus/promhttp", ] pruneopts = "UT" - revision = "505eaef017263e299324067d40ca2c48f6a2cf50" - version = "v0.9.2" + revision = "2641b987480bca71fb39738eb8c8b0d577cb1d76" + version = "v0.9.4" [[projects]] branch = "master" @@ -295,7 +390,7 @@ revision = "fd36f4220a901265f90734c3183c5f0c91daa0b8" [[projects]] - digest = "1:35cf6bdf68db765988baa9c4f10cc5d7dda1126a54bd62e252dbcd0b1fc8da90" + digest = "1:8dcedf2e8f06c7f94e48267dea0bc0be261fa97b377f3ae3e87843a92a549481" name = "github.com/prometheus/common" packages = [ "expfmt", @@ -303,40 +398,46 @@ "model", ] pruneopts = "UT" - revision = "cfeb6f9992ffa54aaa4f2170ade4067ee478b250" - version = "v0.2.0" + revision = "31bed53e4047fd6c510e43a941f90cb31be0972a" + version = "v0.6.0" [[projects]] - branch = "master" - digest = "1:5833c61ebbd625a6bad8e5a1ada2b3e13710cf3272046953a2c8915340fe60a3" + digest = "1:366f5aa02ff6c1e2eccce9ca03a22a6d983da89eecff8a89965401764534eb7c" name = "github.com/prometheus/procfs" packages = [ ".", - "internal/util", - "nfs", - "xfs", + "internal/fs", ] pruneopts = "UT" - revision = "316cf8ccfec56d206735d46333ca162eb374da8b" + revision = "3f98efb27840a48a7a2898ec80be07674d19f9c8" + version = "v0.0.3" + +[[projects]] + digest = "1:274f67cb6fed9588ea2521ecdac05a6d62a8c51c074c1fccc6a49a40ba80e925" + name = "github.com/satori/uuid" + packages = ["."] + pruneopts = "UT" + revision = "f58768cc1a7a7e77a3bd49e98cdd21419399b6a3" + version = "v1.2.0" [[projects]] - digest = "1:87c2e02fb01c27060ccc5ba7c5a407cc91147726f8f40b70cceeedbc52b1f3a8" + digest = "1:04457f9f6f3ffc5fea48e71d62f2ca256637dee0a04d710288e27e05c8b41976" name = "github.com/sirupsen/logrus" packages = ["."] pruneopts = "UT" - revision = "e1e72e9de974bd926e5c56f83753fba2df402ce5" - version = "v1.3.0" + revision = "839c75faf7f98a33d445d181f3018b5c3409a45e" + version = "v1.4.2" [[projects]] - digest = "1:3e39bafd6c2f4bf3c76c3bfd16a2e09e016510ad5db90dc02b88e2f565d6d595" + digest = "1:bb495ec276ab82d3dd08504bbc0594a65de8c3b22c6f2aaa92d05b73fbf3a82e" name = "github.com/spf13/afero" packages = [ ".", "mem", ] pruneopts = "UT" - revision = "f4711e4db9e9a1d3887343acb72b2bbfc2f686f5" - version = "v1.2.1" + revision = "588a75ec4f32903aa5e39a2619ba6a4631e28424" + version = "v1.2.2" [[projects]] digest = "1:08d65904057412fc0270fc4812a1c90c594186819243160dc779a402d4b6d0bc" @@ -347,20 +448,20 @@ version = "v1.3.0" [[projects]] - digest = "1:645cabccbb4fa8aab25a956cbcbdf6a6845ca736b2c64e197ca7cbb9d210b939" + digest = "1:e096613fb7cf34743d49af87d197663cfccd61876e2219853005a57baedfa562" name = "github.com/spf13/cobra" packages = ["."] pruneopts = "UT" - revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385" - version = "v0.0.3" + revision = "f2b07da1e2c38d5f12845a4f607e2e1018cbb1f5" + version = "v0.0.5" [[projects]] - digest = "1:68ea4e23713989dc20b1bded5d9da2c5f9be14ff9885beef481848edd18c26cb" + digest = "1:1b753ec16506f5864d26a28b43703c58831255059644351bbcb019b843950900" name = "github.com/spf13/jwalterweatherman" packages = ["."] pruneopts = "UT" - revision = "4a4406e478ca629068e7768fc33f3f044173c0a6" - version = "v1.0.0" + revision = "94f6ae3ed3bceceafa716478c5fbf8d29ca601a1" + version = "v1.1.0" [[projects]] digest = "1:c1b1102241e7f645bc8e0c22ae352e8f0dc6484b6cb4d132fa9f24174e0119e2" @@ -385,39 +486,104 @@ revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" version = "v1.3.0" +[[projects]] + digest = "1:4c93890bbbb5016505e856cb06b5c5a2ff5b7217584d33f2a9071ebef4b5d473" + name = "go.opencensus.io" + packages = [ + ".", + "internal", + "internal/tagencoding", + "metric/metricdata", + "metric/metricproducer", + "plugin/ocgrpc", + "plugin/ochttp", + "plugin/ochttp/propagation/b3", + "plugin/ochttp/propagation/tracecontext", + "resource", + "stats", + "stats/internal", + "stats/view", + "tag", + "trace", + "trace/internal", + "trace/propagation", + "trace/tracestate", + ] + pruneopts = "UT" + revision = "43463a80402d8447b7fce0d2c58edf1687ff0b58" + version = "v0.19.3" + [[projects]] branch = "master" - digest = "1:fde12c4da6237363bf36b81b59aa36a43d28061167ec4acb0d41fc49464e28b9" - name = "golang.org/x/crypto" - packages = ["ssh/terminal"] + digest = "1:eae689808191546269bf951e1e66e0b6bc468be58a0498c0f037feeef2c67bab" + name = "golang.org/x/net" + packages = [ + "context", + "context/ctxhttp", + "http/httpguts", + "http2", + "http2/hpack", + "idna", + "internal/timeseries", + "trace", + ] pruneopts = "UT" - revision = "b01c7a72566457eb1420261cdafef86638fc3861" + revision = "ca1201d0de80cfde86cb01aea620983605dfe99b" [[projects]] branch = "master" - digest = "1:7941e2f16c0833b438cbef7fccfe4f8346f9f7876b42b29717a75d7e8c4800cb" - name = "golang.org/x/sys" + digest = "1:31e33f76456ccf54819ab4a646cf01271d1a99d7712ab84bf1a9e7b61cd2031b" + name = "golang.org/x/oauth2" packages = [ - "unix", - "windows", + ".", + "google", + "internal", + "jws", + "jwt", ] pruneopts = "UT" - revision = "aca44879d5644da7c5b8ec6a1115e9b6ea6c40d9" + revision = "0f29369cfe4552d0e4bcddc57cc75f4d7e672a33" + +[[projects]] + branch = "master" + digest = "1:382bb5a7fb4034db3b6a2d19e5a4a6bcf52f4750530603c01ca18a172fa3089b" + name = "golang.org/x/sync" + packages = ["semaphore"] + pruneopts = "UT" + revision = "112230192c580c3556b8cee6403af37a4fc5f28c" [[projects]] - digest = "1:8029e9743749d4be5bc9f7d42ea1659471767860f0cdc34d37c3111bd308a295" + branch = "master" + digest = "1:5632b0c4d972da51b5914f09fc5c1a8535e9d8d5d937e95ef83c423a0dd67f13" + name = "golang.org/x/sys" + packages = ["unix"] + pruneopts = "UT" + revision = "fae7ac547cb717d141c433a2a173315e216b64c4" + +[[projects]] + digest = "1:8d8faad6b12a3a4c819a3f9618cb6ee1fa1cfc33253abeeea8b55336721e3405" name = "golang.org/x/text" packages = [ + "collate", + "collate/build", + "internal/colltab", "internal/gen", + "internal/language", + "internal/language/compact", + "internal/tag", "internal/triegen", "internal/ucd", + "language", + "secure/bidirule", "transform", + "unicode/bidi", "unicode/cldr", "unicode/norm", + "unicode/rangetable", ] pruneopts = "UT" - revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" - version = "v0.3.0" + revision = "342b2e1fbaa52c93f31447ad2c6abc048c63e475" + version = "v0.3.2" [[projects]] branch = "master" @@ -425,16 +591,15 @@ name = "golang.org/x/time" packages = ["rate"] pruneopts = "UT" - revision = "85acf8d2951cb2a3bde7632f9ff273ef0379bcbd" + revision = "9d24e82272b4f38b78bc8cff74fa936d31ccd8ef" [[projects]] branch = "master" - digest = "1:86d002f2c67e364e097c5047f517ab38cdef342c3c20be53974c1bfd5b191d30" + digest = "1:03cb7931c1d82eb61d91e3a29d672c7e1a5b97dbb64fc7ece8b4ec1016dba4ac" name = "golang.org/x/tools" packages = [ "go/ast/astutil", "go/gcexportdata", - "go/internal/cgo", "go/internal/gcimporter", "go/internal/packagesdriver", "go/packages", @@ -442,11 +607,104 @@ "imports", "internal/fastwalk", "internal/gopathwalk", + "internal/imports", "internal/module", "internal/semver", ] pruneopts = "UT" - revision = "58ecf64b2ccd4e014267d2ea143d23c617ee7e4c" + revision = "8aa4eac1a7c108f74782725e959bedd2b844f738" + +[[projects]] + branch = "master" + digest = "1:6fa791c8aeb0da453e2d3208a20e282bb8c15551a1b91e6672fec99f636a53ca" + name = "google.golang.org/api" + packages = [ + "gensupport", + "googleapi", + "googleapi/internal/uritemplates", + "googleapi/transport", + "internal", + "option", + "storage/v1", + "support/bundler", + "transport/http", + "transport/http/internal/propagation", + ] + pruneopts = "UT" + revision = "069bea57b1be6ad0671a49ea7a1128025a22b73f" + +[[projects]] + digest = "1:498b722d33dde4471e7d6e5d88a5e7132d2a8306fea5ff5ee82d1f418b4f41ed" + name = "google.golang.org/appengine" + packages = [ + ".", + "internal", + "internal/app_identity", + "internal/base", + "internal/datastore", + "internal/log", + "internal/modules", + "internal/remote_api", + "internal/urlfetch", + "urlfetch", + ] + pruneopts = "UT" + revision = "b2f4a3cf3c67576a2ee09e1fe62656a5086ce880" + version = "v1.6.1" + +[[projects]] + branch = "master" + digest = "1:3565a93b7692277a5dea355bc47bd6315754f3246ed07a224be6aec28972a805" + name = "google.golang.org/genproto" + packages = [ + "googleapis/api/httpbody", + "googleapis/rpc/status", + "protobuf/field_mask", + ] + pruneopts = "UT" + revision = "c506a9f9061087022822e8da603a52fc387115a8" + +[[projects]] + digest = "1:cf01ae0753310464677058b125fa31e74fd943781782ada503180ad784fc83d3" + name = "google.golang.org/grpc" + packages = [ + ".", + "balancer", + "balancer/base", + "balancer/roundrobin", + "binarylog/grpc_binarylog_v1", + "codes", + "connectivity", + "credentials", + "credentials/internal", + "encoding", + "encoding/proto", + "grpclog", + "internal", + "internal/backoff", + "internal/balancerload", + "internal/binarylog", + "internal/channelz", + "internal/envconfig", + "internal/grpcrand", + "internal/grpcsync", + "internal/syscall", + "internal/transport", + "keepalive", + "metadata", + "naming", + "peer", + "resolver", + "resolver/dns", + "resolver/passthrough", + "serviceconfig", + "stats", + "status", + "tap", + ] + pruneopts = "UT" + revision = "1d89a3c832915b2314551c1d2a506874d62e53f7" + version = "v1.22.0" [[projects]] digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96" @@ -506,8 +764,12 @@ "github.com/golang/protobuf/ptypes/struct", "github.com/golang/protobuf/ptypes/timestamp", "github.com/graymeta/stow", + "github.com/graymeta/stow/azure", + "github.com/graymeta/stow/google", "github.com/graymeta/stow/local", + "github.com/graymeta/stow/oracle", "github.com/graymeta/stow/s3", + "github.com/graymeta/stow/swift", "github.com/hashicorp/golang-lru", "github.com/magiconair/properties/assert", "github.com/mitchellh/mapstructure", diff --git a/flytestdlib/Gopkg.toml b/flytestdlib/Gopkg.toml index fdf90bba03..c5a397795f 100644 --- a/flytestdlib/Gopkg.toml +++ b/flytestdlib/Gopkg.toml @@ -55,6 +55,10 @@ branch = "master" name = "golang.org/x/time" +[[override]] + branch = "master" + name = "golang.org/x/net" + [[constraint]] name = "k8s.io/apimachinery" version = "kubernetes-1.13.1" @@ -65,7 +69,7 @@ [[constraint]] name = "github.com/graymeta/stow" - revision = "77c84b1dd69c41b74fe0a94ca8ee257d85947327" + revision = "903027f87de7054953efcdb8ba70d5dc02df38c7" [prune] go-tests = true diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index 93a3a040b2..cf043fadb8 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -145,6 +145,11 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue tag.Name = v.Name() } + if tag.DefaultValue == "-" { + logger.Infof(ctx, "Skipping field [%s], as '-' value detected", tag.Name) + continue + } + typ := v.Type() ptr, isPtr := typ.(*types.Pointer) if isPtr { diff --git a/flytestdlib/cli/pflags/api/sample.go b/flytestdlib/cli/pflags/api/sample.go index f1b40e5b74..ca805e7040 100644 --- a/flytestdlib/cli/pflags/api/sample.go +++ b/flytestdlib/cli/pflags/api/sample.go @@ -19,6 +19,7 @@ type TestType struct { StringArray []string `json:"strs" pflag:"[]string{\"12\"%2C\"1\"}"` ComplexJSONArray []ComplexJSONType `json:"complexArr"` StringToJSON ComplexJSONType `json:"c" pflag:",I'm a complex type but can be converted from string."` + IgnoredMap map[string]string `json:"ignored-map" pflag:"-,"` StorageConfig storage.Config `json:"storage"` IntValue *int `json:"i"` } diff --git a/flytestdlib/cli/pflags/api/testdata/testtype.go b/flytestdlib/cli/pflags/api/testdata/testtype.go index ff6b7e63ba..c960f10044 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype.go @@ -48,7 +48,7 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "strs"), []string{"12", "1"}, "") cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "complexArr"), []string{}, "") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "c"), DefaultTestType.mustMarshalJSON(DefaultTestType.StringToJSON), "I'm a complex type but can be converted from string.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.type"), DefaultTestType.StorageConfig.Type, "Sets the type of storage to configure [s3/minio/local/mem].") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.type"), DefaultTestType.StorageConfig.Type, "Sets the type of storage to configure [s3/minio/local/mem/stow].") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.endpoint"), DefaultTestType.StorageConfig.Connection.Endpoint.String(), "URL for storage client to connect to.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.auth-type"), DefaultTestType.StorageConfig.Connection.AuthType, "Auth Type to use [iam, accesskey].") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.access-key"), DefaultTestType.StorageConfig.Connection.AccessKey, "Access key to use. Only required when authtype is set to accesskey.") diff --git a/flytestdlib/logger/config_flags.go b/flytestdlib/logger/config_flags.go index 27be2e3440..4e2c7795e4 100755 --- a/flytestdlib/logger/config_flags.go +++ b/flytestdlib/logger/config_flags.go @@ -4,9 +4,11 @@ package logger import ( - "fmt" + "encoding/json" "reflect" + "fmt" + "github.com/spf13/pflag" ) @@ -26,6 +28,15 @@ func (Config) elemValueOrNil(v interface{}) interface{} { return v } +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + // GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { diff --git a/flytestdlib/logger/config_flags_test.go b/flytestdlib/logger/config_flags_test.go index 853aeac0b0..03b9878515 100755 --- a/flytestdlib/logger/config_flags_test.go +++ b/flytestdlib/logger/config_flags_test.go @@ -221,3 +221,36 @@ func TestConfig_elemValueOrNil(t *testing.T) { }) } } + +func TestConfig_mustMarshalJSON(t *testing.T) { + type fields struct { + IncludeSourceCode bool + Mute bool + Level Level + Formatter FormatterConfig + } + type args struct { + v json.Marshaler + } + tests := []struct { + name string + fields fields + args args + want string + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := Config{ + IncludeSourceCode: tt.fields.IncludeSourceCode, + Mute: tt.fields.Mute, + Level: tt.fields.Level, + Formatter: tt.fields.Formatter, + } + if got := c.mustMarshalJSON(tt.args.v); got != tt.want { + t.Errorf("Config.mustMarshalJSON() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/flytestdlib/logger/config_test.go b/flytestdlib/logger/config_test.go index 08be8dec6a..6da9415904 100644 --- a/flytestdlib/logger/config_test.go +++ b/flytestdlib/logger/config_test.go @@ -1,6 +1,7 @@ package logger import ( + "reflect" "testing" "github.com/stretchr/testify/assert" @@ -22,3 +23,19 @@ func TestSetConfig(t *testing.T) { }) } } + +func TestGetConfig(t *testing.T) { + tests := []struct { + name string + want *Config + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := GetConfig(); !reflect.DeepEqual(got, tt.want) { + t.Errorf("GetConfig() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/flytestdlib/storage/config.go b/flytestdlib/storage/config.go index 780ef12ac9..863931ac17 100644 --- a/flytestdlib/storage/config.go +++ b/flytestdlib/storage/config.go @@ -20,6 +20,7 @@ const ( TypeS3 Type = "s3" TypeLocal Type = "local" TypeMinio Type = "minio" + TypeStow Type = "stow" ) const ( @@ -43,8 +44,9 @@ var ( // A common storage config. type Config struct { - Type Type `json:"type" pflag:",Sets the type of storage to configure [s3/minio/local/mem]."` + Type Type `json:"type" pflag:",Sets the type of storage to configure [s3/minio/local/mem/stow]."` Connection ConnectionConfig `json:"connection"` + Stow *StowConfig `json:"stow,omitempty"` InitContainer string `json:"container" pflag:",Initial container to create -if it doesn't exist-.'"` // Caching is recommended to improve the performance of underlying systems. It caches the metadata and resolving // inputs is accelerated. The size of the cache is large so understand how to configure the cache. @@ -64,6 +66,11 @@ type ConnectionConfig struct { DisableSSL bool `json:"disable-ssl" pflag:",Disables SSL connection. Should only be used for development."` } +type StowConfig struct { + Kind string `json:"kind,omitempty" pflag:"-,Kind of Stow backend to use. Refer to github/graymeta/stow"` + Config map[string]string `json:"config,omitempty" pflag:"-,Configuration for stow backend. Refer to github/graymeta/stow"` +} + type CachingConfig struct { // Maximum size of the cache where the Blob store data is cached in-memory // Refer to https://github.com/coocood/freecache to understand how to set the value diff --git a/flytestdlib/storage/config_flags.go b/flytestdlib/storage/config_flags.go index 4cde49bec6..50f634eab2 100755 --- a/flytestdlib/storage/config_flags.go +++ b/flytestdlib/storage/config_flags.go @@ -4,9 +4,11 @@ package storage import ( - "fmt" + "encoding/json" "reflect" + "fmt" + "github.com/spf13/pflag" ) @@ -26,11 +28,20 @@ func (Config) elemValueOrNil(v interface{}) interface{} { return v } +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + // GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "type"), defaultConfig.Type, "Sets the type of storage to configure [s3/minio/local/mem].") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "type"), defaultConfig.Type, "Sets the type of storage to configure [s3/minio/local/mem/stow].") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.endpoint"), defaultConfig.Connection.Endpoint.String(), "URL for storage client to connect to.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.auth-type"), defaultConfig.Connection.AuthType, "Auth Type to use [iam, accesskey].") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.access-key"), defaultConfig.Connection.AccessKey, "Access key to use. Only required when authtype is set to accesskey.") diff --git a/flytestdlib/storage/localstore_test.go b/flytestdlib/storage/localstore_test.go index 31f8aabeb2..7295847d5e 100644 --- a/flytestdlib/storage/localstore_test.go +++ b/flytestdlib/storage/localstore_test.go @@ -7,7 +7,9 @@ import ( "path/filepath" "testing" + "github.com/lyft/flytestdlib/contextutils" "github.com/lyft/flytestdlib/promutils" + "github.com/lyft/flytestdlib/promutils/labeled" "github.com/lyft/flytestdlib/config" "github.com/lyft/flytestdlib/internal/utils" @@ -15,6 +17,7 @@ import ( ) func TestNewLocalStore(t *testing.T) { + labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) t.Run("Valid config", func(t *testing.T) { testScope := promutils.NewTestScope() store, err := newLocalRawStore(&Config{ @@ -28,7 +31,7 @@ func TestNewLocalStore(t *testing.T) { assert.NotNil(t, store) // Stow local store expects the full path after the container portion (looks like a bug to me) - rc, err := store.ReadRaw(context.TODO(), DataReference("file://testdata/testdata/config.yaml")) + rc, err := store.ReadRaw(context.TODO(), DataReference("file://testdata/config.yaml")) assert.NoError(t, err) assert.NotNil(t, rc) assert.NoError(t, rc.Close()) diff --git a/flytestdlib/storage/rawstores.go b/flytestdlib/storage/rawstores.go index 4a6d35573c..bb5af8aa24 100644 --- a/flytestdlib/storage/rawstores.go +++ b/flytestdlib/storage/rawstores.go @@ -11,8 +11,9 @@ type dataStoreCreateFn func(cfg *Config, metricsScope promutils.Scope) (RawStore var stores = map[string]dataStoreCreateFn{ TypeMemory: NewInMemoryRawStore, TypeLocal: newLocalRawStore, - TypeMinio: newS3RawStore, - TypeS3: newS3RawStore, + TypeMinio: newStowRawStore, + TypeS3: newStowRawStore, + TypeStow: newStowRawStore, } // Creates a new Data Store with the supplied config. diff --git a/flytestdlib/storage/s3store.go b/flytestdlib/storage/s3store.go deleted file mode 100644 index c2a6d9e290..0000000000 --- a/flytestdlib/storage/s3store.go +++ /dev/null @@ -1,103 +0,0 @@ -package storage - -import ( - "context" - "fmt" - - "github.com/lyft/flytestdlib/promutils" - - "github.com/aws/aws-sdk-go/aws/awserr" - awsS3 "github.com/aws/aws-sdk-go/service/s3" - "github.com/lyft/flytestdlib/logger" - "github.com/pkg/errors" - - "github.com/graymeta/stow" - "github.com/graymeta/stow/s3" -) - -func getStowConfigMap(cfg *Config) stow.ConfigMap { - // Non-nullable fields - stowConfig := stow.ConfigMap{ - s3.ConfigAuthType: cfg.Connection.AuthType, - s3.ConfigRegion: cfg.Connection.Region, - } - - // Fields that differ between minio and real S3 - if endpoint := cfg.Connection.Endpoint.String(); endpoint != "" { - stowConfig[s3.ConfigEndpoint] = endpoint - } - - if accessKey := cfg.Connection.AccessKey; accessKey != "" { - stowConfig[s3.ConfigAccessKeyID] = accessKey - } - - if secretKey := cfg.Connection.SecretKey; secretKey != "" { - stowConfig[s3.ConfigSecretKey] = secretKey - } - - if disableSsl := cfg.Connection.DisableSSL; disableSsl { - stowConfig[s3.ConfigDisableSSL] = "True" - } - - return stowConfig - -} - -func s3FQN(bucket string) DataReference { - return DataReference(fmt.Sprintf("s3://%s", bucket)) -} - -func newS3RawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error) { - if cfg.InitContainer == "" { - return nil, fmt.Errorf("initContainer is required") - } - - loc, err := stow.Dial(s3.Kind, getStowConfigMap(cfg)) - - if err != nil { - return emptyStore, fmt.Errorf("unable to configure the storage for s3. Error: %v", err) - } - - c, err := loc.Container(cfg.InitContainer) - if err != nil { - if IsNotFound(err) || awsBucketIsNotFound(err) { - c, err := loc.CreateContainer(cfg.InitContainer) - if err != nil { - // If the container's already created, move on. Otherwise, fail with error. - if awsBucketAlreadyExists(err) { - logger.Infof(context.TODO(), "Storage init-container already exists [%v].", cfg.InitContainer) - return NewStowRawStore(s3FQN(c.Name()), c, metricsScope) - } - return emptyStore, fmt.Errorf("unable to initialize container [%v]. Error: %v", cfg.InitContainer, err) - } - return NewStowRawStore(s3FQN(c.Name()), c, metricsScope) - } - return emptyStore, err - } - - return NewStowRawStore(s3FQN(c.Name()), c, metricsScope) -} - -func awsBucketIsNotFound(err error) bool { - if IsNotFound(err) { - return true - } - - if awsErr, errOk := errors.Cause(err).(awserr.Error); errOk { - return awsErr.Code() == awsS3.ErrCodeNoSuchBucket - } - - return false -} - -func awsBucketAlreadyExists(err error) bool { - if IsExists(err) { - return true - } - - if awsErr, errOk := errors.Cause(err).(awserr.Error); errOk { - return awsErr.Code() == awsS3.ErrCodeBucketAlreadyOwnedByYou - } - - return false -} diff --git a/flytestdlib/storage/s3stsore_test.go b/flytestdlib/storage/s3stsore_test.go deleted file mode 100644 index 2e8674a834..0000000000 --- a/flytestdlib/storage/s3stsore_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package storage - -import ( - "testing" - - "github.com/lyft/flytestdlib/promutils" - - "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytestdlib/internal/utils" - "github.com/stretchr/testify/assert" -) - -func TestNewS3RawStore(t *testing.T) { - t.Run("Missing required config", func(t *testing.T) { - testScope := promutils.NewTestScope() - _, err := NewDataStore(&Config{ - Type: TypeMinio, - InitContainer: "some-container", - Connection: ConnectionConfig{ - Endpoint: config.URL{URL: utils.MustParseURL("http://minio:9000")}, - }, - }, testScope) - - assert.Error(t, err) - }) -} diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index f0fd282340..bb36827acd 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -102,7 +102,8 @@ func (mockStowItem) Metadata() (map[string]interface{}, error) { func TestStowStore_ReadRaw(t *testing.T) { t.Run("Happy Path", func(t *testing.T) { testScope := promutils.NewTestScope() - s, err := NewStowRawStore(s3FQN("container"), newMockStowContainer("container"), testScope) + fn := fQNFn["s3"] + s, err := NewStowRawStore(fn("container"), newMockStowContainer("container"), testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -119,7 +120,8 @@ func TestStowStore_ReadRaw(t *testing.T) { t.Run("Exceeds limit", func(t *testing.T) { testScope := promutils.NewTestScope() - s, err := NewStowRawStore(s3FQN("container"), newMockStowContainer("container"), testScope) + fn := fQNFn["s3"] + s, err := NewStowRawStore(fn("container"), newMockStowContainer("container"), testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 3*MiB, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) diff --git a/flytestdlib/storage/stowstore.go b/flytestdlib/storage/stowstore.go new file mode 100644 index 0000000000..9249ddec21 --- /dev/null +++ b/flytestdlib/storage/stowstore.go @@ -0,0 +1,130 @@ +package storage + +import ( + "context" + "fmt" + + "github.com/aws/aws-sdk-go/aws/awserr" + awsS3 "github.com/aws/aws-sdk-go/service/s3" + + "github.com/lyft/flytestdlib/logger" + "github.com/lyft/flytestdlib/promutils" + + "github.com/pkg/errors" + + "github.com/graymeta/stow" + "github.com/graymeta/stow/azure" + "github.com/graymeta/stow/google" + "github.com/graymeta/stow/oracle" + "github.com/graymeta/stow/s3" + "github.com/graymeta/stow/swift" +) + +var fQNFn = map[string]func(string) DataReference{ + s3.Kind: func(bucket string) DataReference { + return DataReference(fmt.Sprintf("s3://%s", bucket)) + }, + google.Kind: func(bucket string) DataReference { + return DataReference(fmt.Sprintf("gs://%s", bucket)) + }, + oracle.Kind: func(bucket string) DataReference { + return DataReference(fmt.Sprintf("os://%s", bucket)) + }, + swift.Kind: func(bucket string) DataReference { + return DataReference(fmt.Sprintf("sw://%s", bucket)) + }, + azure.Kind: func(bucket string) DataReference { + return DataReference(fmt.Sprintf("afs://%s", bucket)) + }, +} + +func awsBucketIsNotFound(err error) bool { + if IsNotFound(err) { + return true + } + + if awsErr, errOk := errors.Cause(err).(awserr.Error); errOk { + return awsErr.Code() == awsS3.ErrCodeNoSuchBucket + } + + return false +} + +func awsBucketAlreadyExists(err error) bool { + if IsExists(err) { + return true + } + + if awsErr, errOk := errors.Cause(err).(awserr.Error); errOk { + return awsErr.Code() == awsS3.ErrCodeBucketAlreadyOwnedByYou + } + + return false +} + +func newStowRawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error) { + if cfg.InitContainer == "" { + return nil, fmt.Errorf("initContainer is required") + } + + var cfgMap stow.ConfigMap + var kind string + if cfg.Stow != nil { + kind = cfg.Stow.Kind + cfgMap = stow.ConfigMap(cfg.Stow.Config) + } else { + logger.Warnf(context.TODO(), "stow configuration section missing, defaulting to legacy s3/minio connection config") + // This is for supporting legacy configurations which configure S3 via connection config + kind = s3.Kind + cfgMap = legacyS3ConfigMap(cfg.Connection) + } + + fn, ok := fQNFn[kind] + if !ok { + return nil, errors.Errorf("unsupported stow.kind [%s], add support in flytestdlib?", kind) + } + loc, err := stow.Dial(kind, cfgMap) + if err != nil { + return emptyStore, fmt.Errorf("unable to configure the storage for %s. Error: %v", kind, err) + } + c, err := loc.Container(cfg.InitContainer) + if err != nil { + if IsNotFound(err) || awsBucketIsNotFound(err) { + c, err := loc.CreateContainer(cfg.InitContainer) + // If the container's already created, move on. Otherwise, fail with error. + if err != nil && !awsBucketAlreadyExists(err) { + return emptyStore, fmt.Errorf("unable to initialize container [%v]. Error: %v", cfg.InitContainer, err) + } + return NewStowRawStore(fn(c.Name()), c, metricsScope) + } + return emptyStore, err + } + return NewStowRawStore(fn(c.Name()), c, metricsScope) +} + +func legacyS3ConfigMap(cfg ConnectionConfig) stow.ConfigMap { + // Non-nullable fields + stowConfig := stow.ConfigMap{ + s3.ConfigAuthType: cfg.AuthType, + s3.ConfigRegion: cfg.Region, + } + + // Fields that differ between minio and real S3 + if endpoint := cfg.Endpoint.String(); endpoint != "" { + stowConfig[s3.ConfigEndpoint] = endpoint + } + + if accessKey := cfg.AccessKey; accessKey != "" { + stowConfig[s3.ConfigAccessKeyID] = accessKey + } + + if secretKey := cfg.SecretKey; secretKey != "" { + stowConfig[s3.ConfigSecretKey] = secretKey + } + + if disableSsl := cfg.DisableSSL; disableSsl { + stowConfig[s3.ConfigDisableSSL] = "True" + } + + return stowConfig +} diff --git a/flytestdlib/storage/stowstore_test.go b/flytestdlib/storage/stowstore_test.go new file mode 100644 index 0000000000..283ee71cd4 --- /dev/null +++ b/flytestdlib/storage/stowstore_test.go @@ -0,0 +1,53 @@ +package storage + +import ( + "testing" + + "github.com/graymeta/stow/google" + "github.com/stretchr/testify/assert" + + "github.com/lyft/flytestdlib/config" + "github.com/lyft/flytestdlib/internal/utils" + "github.com/lyft/flytestdlib/promutils" +) + +func Test_newStowRawStore(t *testing.T) { + type args struct { + cfg *Config + metricsScope promutils.Scope + } + tests := []struct { + name string + args args + wantErr bool + }{ + {"fail", args{&Config{}, promutils.NewTestScope()}, true}, + {"google", args{&Config{ + InitContainer: "flyte", + Stow: &StowConfig{ + Kind: google.Kind, + Config: map[string]string{ + google.ConfigProjectId: "x", + google.ConfigScopes: "y", + }, + }, + }, promutils.NewTestScope()}, true}, + {"minio", args{&Config{ + Type: TypeMinio, + InitContainer: "some-container", + Connection: ConnectionConfig{ + Endpoint: config.URL{URL: utils.MustParseURL("http://minio:9000")}, + }, + }, promutils.NewTestScope()}, true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := newStowRawStore(tt.args.cfg, tt.args.metricsScope) + if tt.wantErr { + assert.Error(t, err, "newStowRawStore() error = %v, wantErr %v", err, tt.wantErr) + return + } + assert.NotNil(t, got, "Expected rawstore, found nil!") + }) + } +} From c44f6af150004aba59dc9d750947c741c20f6614 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Fri, 26 Jul 2019 23:05:36 -0700 Subject: [PATCH 063/191] Scoop update for flytestdlib version v0.2.12 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 0246a2c4ef..94df44543b 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.11", + "version": "0.2.12", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.11/flytestdlib_0.2.11_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.12/flytestdlib_0.2.12_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "4ace26d248fea1f01e59cb613d8353c33800a7f8420dc70b48d50e71d8602ce3" + "hash": "26e3f29078de38d766dee6407a21a7302d0d1b8020ed8d11232c497ebcf6edf6" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.11/flytestdlib_0.2.11_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.12/flytestdlib_0.2.12_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "665370f8394034a2dbe9334b1cd698624da2cfaeb353c67d404f10a365042c00" + "hash": "5158ee3d8c8e2d7f0b5a724230d5374cfd3dfcd71c6061cf1c52277c3421e0f0" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From be62dfd236ff99b888e1e01bbc84c6fb769829fb Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Mon, 5 Aug 2019 12:04:34 -0700 Subject: [PATCH 064/191] Better Error logging in case containers misconfigured - Configured container and the data reference may not match. - This causes the metric BadContainer to be incremented, but the logs do not really indicate the problem. --- flytestdlib/storage/stow_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index e156f376da..998fc8a876 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -53,7 +53,7 @@ func (s StowMetadata) Exists() bool { func (s *StowStore) getContainer(container string) (c stow.Container, err error) { if s.Container.Name() != container { s.metrics.BadContainer.Inc() - return nil, stow.ErrNotFound + return nil, errs.Wrapf(stow.ErrNotFound, "Conf container:%v != Passed Container:%v", s.Container.Name(), container) } return s.Container, nil From 96c7a8af5c0b5a51276c762a4d6b9d2918a05a5a Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Mon, 5 Aug 2019 12:16:12 -0700 Subject: [PATCH 065/191] Scoop update for flytestdlib version v0.2.13 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 94df44543b..3c77a94c12 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.12", + "version": "0.2.13", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.12/flytestdlib_0.2.12_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.13/flytestdlib_0.2.13_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "26e3f29078de38d766dee6407a21a7302d0d1b8020ed8d11232c497ebcf6edf6" + "hash": "6786dfc4cc28a253bc2ec1398e38c53970504bc18c4c7f830f25f4a50736d051" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.12/flytestdlib_0.2.12_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.13/flytestdlib_0.2.13_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "5158ee3d8c8e2d7f0b5a724230d5374cfd3dfcd71c6061cf1c52277c3421e0f0" + "hash": "9c753bd02018725a1ec9c277da2556ef929307ec4620ed2ac60e9d700cb22e56" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From faa4fd3437ea16df57368e24c025f76693f99235 Mon Sep 17 00:00:00 2001 From: Chang-Hong Hsu Date: Mon, 5 Aug 2019 15:45:34 -0700 Subject: [PATCH 066/191] Fix exception handling of caching errors for copyImpl (#30) * fix exception handling of caching errors for copyImpl * add test for the fix in copyImpl --- flytestdlib/storage/copy_impl.go | 34 +++++++++++---- flytestdlib/storage/copy_impl_test.go | 60 +++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 7 deletions(-) diff --git a/flytestdlib/storage/copy_impl.go b/flytestdlib/storage/copy_impl.go index 4ac132a229..178938f420 100644 --- a/flytestdlib/storage/copy_impl.go +++ b/flytestdlib/storage/copy_impl.go @@ -2,12 +2,17 @@ package storage import ( "context" + "fmt" "io" "time" + "github.com/lyft/flytestdlib/logger" + "github.com/prometheus/client_golang/prometheus" + "github.com/lyft/flytestdlib/ioutils" "github.com/lyft/flytestdlib/promutils" "github.com/lyft/flytestdlib/promutils/labeled" + errs "github.com/pkg/errors" ) type copyImpl struct { @@ -16,8 +21,10 @@ type copyImpl struct { } type copyMetrics struct { - CopyLatency labeled.StopWatch - ComputeLengthLatency labeled.StopWatch + CopyLatency labeled.StopWatch + ComputeLengthLatency labeled.StopWatch + WriteFailureUnrelatedToCache prometheus.Counter + ReadFailureUnrelatedToCache prometheus.Counter } // A naiive implementation for copy that reads all data locally then writes them to destination. @@ -25,8 +32,11 @@ type copyMetrics struct { // https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectUsingREST.html func (c copyImpl) CopyRaw(ctx context.Context, source, destination DataReference, opts Options) error { rc, err := c.rawStore.ReadRaw(ctx, source) - if err != nil { - return err + + if err != nil && !IsFailedWriteToCache(err) { + logger.Errorf(ctx, "Failed to read from the raw store. Error: %v", err) + c.metrics.ReadFailureUnrelatedToCache.Inc() + return errs.Wrap(err, fmt.Sprintf("path:%v", destination)) } length := int64(0) @@ -43,13 +53,23 @@ func (c copyImpl) CopyRaw(ctx context.Context, source, destination DataReference length = int64(len(raw)) } - return c.rawStore.WriteRaw(ctx, destination, length, Options{}, rc) + err = c.rawStore.WriteRaw(ctx, destination, length, Options{}, rc) + + if err != nil && !IsFailedWriteToCache(err) { + logger.Errorf(ctx, "Failed to write to the raw store. Error: %v", err) + c.metrics.WriteFailureUnrelatedToCache.Inc() + return err + } + + return nil } func newCopyMetrics(scope promutils.Scope) copyMetrics { return copyMetrics{ - CopyLatency: labeled.NewStopWatch("overall", "Overall copy latency", time.Millisecond, scope, labeled.EmitUnlabeledMetric), - ComputeLengthLatency: labeled.NewStopWatch("length", "Latency involved in computing length of content before writing.", time.Millisecond, scope, labeled.EmitUnlabeledMetric), + CopyLatency: labeled.NewStopWatch("overall", "Overall copy latency", time.Millisecond, scope, labeled.EmitUnlabeledMetric), + ComputeLengthLatency: labeled.NewStopWatch("length", "Latency involved in computing length of content before writing.", time.Millisecond, scope, labeled.EmitUnlabeledMetric), + WriteFailureUnrelatedToCache: scope.MustNewCounter("write_failure_unrelated_to_cache", "Raw store write failures that are not caused by ErrFailedToWriteCache"), + ReadFailureUnrelatedToCache: scope.MustNewCounter("read_failure_unrelated_to_cache", "Raw store read failures that are not caused by ErrFailedToWriteCache"), } } diff --git a/flytestdlib/storage/copy_impl_test.go b/flytestdlib/storage/copy_impl_test.go index fc8d78cd1a..ccc44924d6 100644 --- a/flytestdlib/storage/copy_impl_test.go +++ b/flytestdlib/storage/copy_impl_test.go @@ -2,9 +2,13 @@ package storage import ( "context" + "fmt" "io" + "math/rand" "testing" + "github.com/lyft/flytestdlib/errors" + "github.com/lyft/flytestdlib/ioutils" "github.com/lyft/flytestdlib/promutils" "github.com/stretchr/testify/assert" @@ -40,6 +44,7 @@ func newNotSeekerReader(bytesCount int) *notSeekerReader { } func TestCopyRaw(t *testing.T) { + resetMetricKeys() t.Run("Called", func(t *testing.T) { readerCalled := false writerCalled := false @@ -80,3 +85,58 @@ func TestCopyRaw(t *testing.T) { assert.True(t, writerCalled) }) } + +func TestCopyRaw_CachingErrorHandling(t *testing.T) { + resetMetricKeys() + t.Run("CopyRaw with Caching Error", func(t *testing.T) { + readerCalled := false + writerCalled := false + bigD := make([]byte, 1.5*1024*1024) + // #nosec G404 + rand.Read(bigD) + dummyErrorMsg := "Dummy caching error" + + store := dummyStore{ + ReadRawCb: func(ctx context.Context, reference DataReference) (closer io.ReadCloser, e error) { + readerCalled = true + return ioutils.NewBytesReadCloser(bigD), errors.Wrapf(ErrFailedToWriteCache, fmt.Errorf(dummyErrorMsg), "Failed to Cache the metadata") + }, + WriteRawCb: func(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error { + writerCalled = true + return errors.Wrapf(ErrFailedToWriteCache, fmt.Errorf(dummyErrorMsg), "Failed to Cache the metadata") + }, + } + + copier := newCopyImpl(&store, promutils.NewTestScope()) + assert.NoError(t, copier.CopyRaw(context.Background(), DataReference("source.pb"), DataReference("dest.pb"), Options{})) + assert.True(t, readerCalled) + assert.True(t, writerCalled) + }) + + t.Run("CopyRaw with Hard Error", func(t *testing.T) { + readerCalled := false + writerCalled := false + bigD := make([]byte, 1.5*1024*1024) + // #nosec G404 + rand.Read(bigD) + dummyErrorMsg := "Dummy non-caching error" + + store := dummyStore{ + ReadRawCb: func(ctx context.Context, reference DataReference) (closer io.ReadCloser, e error) { + readerCalled = true + return ioutils.NewBytesReadCloser(bigD), fmt.Errorf(dummyErrorMsg) + }, + WriteRawCb: func(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error { + writerCalled = true + return fmt.Errorf(dummyErrorMsg) + }, + } + + copier := newCopyImpl(&store, promutils.NewTestScope()) + err := copier.CopyRaw(context.Background(), DataReference("source.pb"), DataReference("dest.pb"), Options{}) + assert.True(t, readerCalled) + // writerCalled should be false because CopyRaw should error out right after c.rawstore.ReadRaw() when the underlying error is a hard error + assert.False(t, writerCalled) + assert.False(t, IsFailedWriteToCache(err)) + }) +} From cbe9f5f69880443bc5b91953ef445a5c9e3d52f0 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Mon, 5 Aug 2019 15:54:52 -0700 Subject: [PATCH 067/191] Scoop update for flytestdlib version v0.2.14 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 3c77a94c12..691f6d3697 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.13", + "version": "0.2.14", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.13/flytestdlib_0.2.13_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.14/flytestdlib_0.2.14_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "6786dfc4cc28a253bc2ec1398e38c53970504bc18c4c7f830f25f4a50736d051" + "hash": "2bc335843e23bd4644cac685d58433b46e54990fe6102c77172b3b811ba78ac8" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.13/flytestdlib_0.2.13_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.14/flytestdlib_0.2.14_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "9c753bd02018725a1ec9c277da2556ef929307ec4620ed2ac60e9d700cb22e56" + "hash": "44acfc95227ebd871d69298b93c7832cfbe48a545d693a818d888fe379d0c656" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 34229de335cd5bccc216ff5559694fd7884c27a6 Mon Sep 17 00:00:00 2001 From: Chang-Hong Hsu Date: Tue, 6 Aug 2019 10:06:54 -0700 Subject: [PATCH 068/191] improve msg in CopyRaw (#31) --- flytestdlib/storage/copy_impl.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flytestdlib/storage/copy_impl.go b/flytestdlib/storage/copy_impl.go index 178938f420..9bf39e1d66 100644 --- a/flytestdlib/storage/copy_impl.go +++ b/flytestdlib/storage/copy_impl.go @@ -34,7 +34,7 @@ func (c copyImpl) CopyRaw(ctx context.Context, source, destination DataReference rc, err := c.rawStore.ReadRaw(ctx, source) if err != nil && !IsFailedWriteToCache(err) { - logger.Errorf(ctx, "Failed to read from the raw store. Error: %v", err) + logger.Errorf(ctx, "Failed to read from the raw store when copying. Error: %v", err) c.metrics.ReadFailureUnrelatedToCache.Inc() return errs.Wrap(err, fmt.Sprintf("path:%v", destination)) } @@ -56,7 +56,7 @@ func (c copyImpl) CopyRaw(ctx context.Context, source, destination DataReference err = c.rawStore.WriteRaw(ctx, destination, length, Options{}, rc) if err != nil && !IsFailedWriteToCache(err) { - logger.Errorf(ctx, "Failed to write to the raw store. Error: %v", err) + logger.Errorf(ctx, "Failed to write to the raw store when copying. Error: %v", err) c.metrics.WriteFailureUnrelatedToCache.Inc() return err } From 91b48d8e3be5cf0c65281e725cb67cd044e18c55 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Tue, 6 Aug 2019 10:18:09 -0700 Subject: [PATCH 069/191] Scoop update for flytestdlib version v0.2.15 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 691f6d3697..f07bee89c7 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.14", + "version": "0.2.15", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.14/flytestdlib_0.2.14_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.15/flytestdlib_0.2.15_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "2bc335843e23bd4644cac685d58433b46e54990fe6102c77172b3b811ba78ac8" + "hash": "8fa9e2f415e82a14a9c7283be8809ada61cd6da68878228139aeed1d471dc0d9" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.14/flytestdlib_0.2.14_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.15/flytestdlib_0.2.15_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "44acfc95227ebd871d69298b93c7832cfbe48a545d693a818d888fe379d0c656" + "hash": "faf6d8f7f20a3d2453b83eb3d739a3e3c4e6e0e08ddbd1182cb464bd4c2ae5da" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 502d96894ca62eb12d410550c9921e0da5f13f45 Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Thu, 8 Aug 2019 19:22:13 -0700 Subject: [PATCH 070/191] Improve logging in protobuf_store --- flytestdlib/storage/protobuf_store.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flytestdlib/storage/protobuf_store.go b/flytestdlib/storage/protobuf_store.go index 6b09a0e6eb..9b2047bbbb 100644 --- a/flytestdlib/storage/protobuf_store.go +++ b/flytestdlib/storage/protobuf_store.go @@ -35,7 +35,7 @@ type DefaultProtobufStore struct { func (s DefaultProtobufStore) ReadProtobuf(ctx context.Context, reference DataReference, msg proto.Message) error { rc, err := s.ReadRaw(ctx, reference) if err != nil && !IsFailedWriteToCache(err) { - logger.Errorf(ctx, "Failed to read from the raw store. Error: %v", err) + logger.Errorf(ctx, "Failed to read from the raw store [%s] Error: %v", reference, err) s.metrics.ReadFailureUnrelatedToCache.Inc() return errs.Wrap(err, fmt.Sprintf("path:%v", reference)) } @@ -74,7 +74,7 @@ func (s DefaultProtobufStore) WriteProtobuf(ctx context.Context, reference DataR err = s.WriteRaw(ctx, reference, int64(len(raw)), opts, bytes.NewReader(raw)) if err != nil && !IsFailedWriteToCache(err) { - logger.Errorf(ctx, "Failed to write to the raw store. Error: %v", err) + logger.Errorf(ctx, "Failed to write to the raw store [%s] Error: %v", reference, err) s.metrics.WriteFailureUnrelatedToCache.Inc() return err } From 80f8ea736aacf854e5eafb1cf7df8390fd9cc765 Mon Sep 17 00:00:00 2001 From: Chang-Hong Hsu Date: Mon, 12 Aug 2019 14:32:24 -0700 Subject: [PATCH 071/191] add source and destination in CopyRaw's error msg (#33) --- flytestdlib/storage/copy_impl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytestdlib/storage/copy_impl.go b/flytestdlib/storage/copy_impl.go index 9bf39e1d66..56c7d54717 100644 --- a/flytestdlib/storage/copy_impl.go +++ b/flytestdlib/storage/copy_impl.go @@ -34,7 +34,7 @@ func (c copyImpl) CopyRaw(ctx context.Context, source, destination DataReference rc, err := c.rawStore.ReadRaw(ctx, source) if err != nil && !IsFailedWriteToCache(err) { - logger.Errorf(ctx, "Failed to read from the raw store when copying. Error: %v", err) + logger.Errorf(ctx, "Failed to read from the raw store when copying [%v] to [%v]. Error: %v", source, destination, err) c.metrics.ReadFailureUnrelatedToCache.Inc() return errs.Wrap(err, fmt.Sprintf("path:%v", destination)) } From 51c549ce971f021fe7d2177b8dedf19751b06c03 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Mon, 12 Aug 2019 14:40:41 -0700 Subject: [PATCH 072/191] Scoop update for flytestdlib version v0.2.16 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index f07bee89c7..6b17bde2f0 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.15", + "version": "0.2.16", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.15/flytestdlib_0.2.15_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.16/flytestdlib_0.2.16_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "8fa9e2f415e82a14a9c7283be8809ada61cd6da68878228139aeed1d471dc0d9" + "hash": "042389e9e0d08df89d771962b10ed193cd2834a8328d90f307a2acf3bbbb4094" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.15/flytestdlib_0.2.15_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.16/flytestdlib_0.2.16_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "faf6d8f7f20a3d2453b83eb3d739a3e3c4e6e0e08ddbd1182cb464bd4c2ae5da" + "hash": "030581539f3e55c525bbf0157058701cfd7281ef0b40156c4b4049269bc0093b" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 5acf2863e779f24aae052dd84a62ba8816dcdd77 Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Thu, 12 Sep 2019 21:32:24 -0700 Subject: [PATCH 073/191] Mocks for Autorefresh cache and its parts (#36) --- flytestdlib/utils/auto_refresh_cache.go | 2 + flytestdlib/utils/mocks/auto_refresh_cache.go | 56 +++++++++++++++++++ flytestdlib/utils/mocks/cache_item.go | 24 ++++++++ flytestdlib/utils/mocks/rate_limiter.go | 25 +++++++++ flytestdlib/utils/mocks/sequencer.go | 38 +++++++++++++ 5 files changed, 145 insertions(+) create mode 100644 flytestdlib/utils/mocks/auto_refresh_cache.go create mode 100644 flytestdlib/utils/mocks/cache_item.go create mode 100644 flytestdlib/utils/mocks/rate_limiter.go create mode 100644 flytestdlib/utils/mocks/sequencer.go diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index 3453483914..d7d07a18bd 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -11,6 +11,8 @@ import ( "k8s.io/apimachinery/pkg/util/wait" ) +//go:generate mockery -all -case=underscore + // AutoRefreshCache with regular GetOrCreate and Delete along with background asynchronous refresh. Caller provides // callbacks for create, refresh and delete item. // The cache doesn't provide apis to update items. diff --git a/flytestdlib/utils/mocks/auto_refresh_cache.go b/flytestdlib/utils/mocks/auto_refresh_cache.go new file mode 100644 index 0000000000..9c6f13efc2 --- /dev/null +++ b/flytestdlib/utils/mocks/auto_refresh_cache.go @@ -0,0 +1,56 @@ +// Code generated by mockery v1.0.0. DO NOT EDIT. + +package mocks + +import context "context" +import mock "github.com/stretchr/testify/mock" +import utils "github.com/lyft/flytestdlib/utils" + +// AutoRefreshCache is an autogenerated mock type for the AutoRefreshCache type +type AutoRefreshCache struct { + mock.Mock +} + +// Get provides a mock function with given fields: id +func (_m *AutoRefreshCache) Get(id string) utils.CacheItem { + ret := _m.Called(id) + + var r0 utils.CacheItem + if rf, ok := ret.Get(0).(func(string) utils.CacheItem); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(utils.CacheItem) + } + } + + return r0 +} + +// GetOrCreate provides a mock function with given fields: item +func (_m *AutoRefreshCache) GetOrCreate(item utils.CacheItem) (utils.CacheItem, error) { + ret := _m.Called(item) + + var r0 utils.CacheItem + if rf, ok := ret.Get(0).(func(utils.CacheItem) utils.CacheItem); ok { + r0 = rf(item) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(utils.CacheItem) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(utils.CacheItem) error); ok { + r1 = rf(item) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Start provides a mock function with given fields: ctx +func (_m *AutoRefreshCache) Start(ctx context.Context) { + _m.Called(ctx) +} diff --git a/flytestdlib/utils/mocks/cache_item.go b/flytestdlib/utils/mocks/cache_item.go new file mode 100644 index 0000000000..b802e5bbab --- /dev/null +++ b/flytestdlib/utils/mocks/cache_item.go @@ -0,0 +1,24 @@ +// Code generated by mockery v1.0.0. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// CacheItem is an autogenerated mock type for the CacheItem type +type CacheItem struct { + mock.Mock +} + +// ID provides a mock function with given fields: +func (_m *CacheItem) ID() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} diff --git a/flytestdlib/utils/mocks/rate_limiter.go b/flytestdlib/utils/mocks/rate_limiter.go new file mode 100644 index 0000000000..7a10626e92 --- /dev/null +++ b/flytestdlib/utils/mocks/rate_limiter.go @@ -0,0 +1,25 @@ +// Code generated by mockery v1.0.0. DO NOT EDIT. + +package mocks + +import context "context" +import mock "github.com/stretchr/testify/mock" + +// RateLimiter is an autogenerated mock type for the RateLimiter type +type RateLimiter struct { + mock.Mock +} + +// Wait provides a mock function with given fields: ctx +func (_m *RateLimiter) Wait(ctx context.Context) error { + ret := _m.Called(ctx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} diff --git a/flytestdlib/utils/mocks/sequencer.go b/flytestdlib/utils/mocks/sequencer.go new file mode 100644 index 0000000000..0fc724b412 --- /dev/null +++ b/flytestdlib/utils/mocks/sequencer.go @@ -0,0 +1,38 @@ +// Code generated by mockery v1.0.0. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// Sequencer is an autogenerated mock type for the Sequencer type +type Sequencer struct { + mock.Mock +} + +// GetCur provides a mock function with given fields: +func (_m *Sequencer) GetCur() uint64 { + ret := _m.Called() + + var r0 uint64 + if rf, ok := ret.Get(0).(func() uint64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint64) + } + + return r0 +} + +// GetNext provides a mock function with given fields: +func (_m *Sequencer) GetNext() uint64 { + ret := _m.Called() + + var r0 uint64 + if rf, ok := ret.Get(0).(func() uint64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint64) + } + + return r0 +} From c6bd8b787d168bde49d2092613de27d2fbccb7c2 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 25 Sep 2019 13:56:10 -0700 Subject: [PATCH 074/191] Implement batched autorefresh cache (#35) * Implement batched autorefresh cache * wip * Update interface and add a wrapper * Update AutoRefresh interface * add unit tests * PR Comments * lint * Unit tests * unit test --- flytestdlib/cache/auto_refresh.go | 269 ++++++++++++++++++ .../cache/auto_refresh_example_test.go | 126 ++++++++ flytestdlib/cache/auto_refresh_test.go | 103 +++++++ flytestdlib/cache/mocks/AutoRefresh.go | 72 +++++ flytestdlib/cache/mocks/Item.go | 10 + flytestdlib/cache/mocks/ItemWrapper.go | 41 +++ flytestdlib/storage/cached_rawstore_test.go | 3 +- flytestdlib/storage/copy_impl_test.go | 9 +- 8 files changed, 629 insertions(+), 4 deletions(-) create mode 100644 flytestdlib/cache/auto_refresh.go create mode 100644 flytestdlib/cache/auto_refresh_example_test.go create mode 100644 flytestdlib/cache/auto_refresh_test.go create mode 100644 flytestdlib/cache/mocks/AutoRefresh.go create mode 100644 flytestdlib/cache/mocks/Item.go create mode 100644 flytestdlib/cache/mocks/ItemWrapper.go diff --git a/flytestdlib/cache/auto_refresh.go b/flytestdlib/cache/auto_refresh.go new file mode 100644 index 0000000000..e07d54f7d5 --- /dev/null +++ b/flytestdlib/cache/auto_refresh.go @@ -0,0 +1,269 @@ +package cache + +import ( + "context" + "fmt" + "time" + + "github.com/lyft/flytestdlib/contextutils" + + "k8s.io/client-go/util/workqueue" + + "github.com/lyft/flytestdlib/errors" + + "github.com/lyft/flytestdlib/logger" + + lru "github.com/hashicorp/golang-lru" + "github.com/lyft/flytestdlib/promutils" + "github.com/prometheus/client_golang/prometheus" + "k8s.io/apimachinery/pkg/util/wait" +) + +type ItemID = string +type Batch = []ItemWrapper + +const ( + ErrNotFound errors.ErrorCode = "NOT_FOUND" +) + +//go:generate mockery -all + +// AutoRefresh with regular GetOrCreate and Delete along with background asynchronous refresh. Caller provides +// callbacks for create, refresh and delete item. +// The cache doesn't provide apis to update items. +type AutoRefresh interface { + // starts background refresh of items. + Start(ctx context.Context) error + + // Get item by id. + Get(id ItemID) (Item, error) + + // Get object if exists else create it. + GetOrCreate(id ItemID, item Item) (Item, error) +} + +type metrics struct { + SystemErrors prometheus.Counter + Evictions prometheus.Counter + scope promutils.Scope +} + +type Item interface{} + +// Items are wrapped inside an ItemWrapper to be stored in the cache. +type ItemWrapper interface { + GetID() ItemID + GetItem() Item +} + +// Represents the response for the sync func +type ItemSyncResponse struct { + ID ItemID + Item Item + Action SyncAction +} + +// Possible actions for the cache to take as a result of running the sync function on any given cache item +type SyncAction int + +const ( + Unchanged SyncAction = iota + + // The item returned has been updated and should be updated in the cache + Update +) + +// Your implementation of this function for your cache instance is responsible for returning +// 1. The new Item, and +// 2. What action should be taken. The sync function has no insight into your object, and needs to be +// told explicitly if the new item is different from the old one. +type SyncFunc func(ctx context.Context, batch Batch) ( + updatedBatch []ItemSyncResponse, err error) + +// Your implementation of this function for your cache instance is responsible for subdividing +// the list of cache items into batches. +type CreateBatchesFunc func(ctx context.Context, snapshot []ItemWrapper) (batches []Batch, err error) + +type itemWrapper struct { + id ItemID + item Item +} + +func (i itemWrapper) GetID() ItemID { + return i.id +} + +func (i itemWrapper) GetItem() Item { + return i.item +} + +// Thread-safe general purpose auto-refresh cache that watches for updates asynchronously for the keys after they are added to +// the cache. An item can be inserted only once. +// +// Get reads from sync.map while refresh is invoked on a snapshot of keys. Cache eventually catches up on deleted items. +// +// Sync is run as a fixed-interval-scheduled-task, and is skipped if sync from previous cycle is still running. +type autoRefresh struct { + metrics metrics + syncCb SyncFunc + createBatchesCb CreateBatchesFunc + lruMap *lru.Cache + syncPeriod time.Duration + workqueue workqueue.RateLimitingInterface + parallelizm int +} + +func getEvictionFunction(counter prometheus.Counter) func(key interface{}, value interface{}) { + return func(_ interface{}, _ interface{}) { + counter.Inc() + } +} + +func SingleItemBatches(_ context.Context, snapshot []ItemWrapper) (batches []Batch, err error) { + res := make([]Batch, 0, len(snapshot)) + for _, item := range snapshot { + res = append(res, Batch{item}) + } + + return res, nil +} + +func newMetrics(scope promutils.Scope) metrics { + return metrics{ + Evictions: scope.MustNewCounter("lru_evictions", "Counter for evictions from LRU."), + SystemErrors: scope.MustNewCounter("sync_errors", "Counter for sync errors."), + scope: scope, + } +} + +func (w *autoRefresh) Start(ctx context.Context) error { + for i := 0; i < w.parallelizm; i++ { + go func(ctx context.Context) { + err := w.sync(ctx) + if err != nil { + logger.Errorf(ctx, "Failed to sync. Error: %v", err) + } + }(contextutils.WithGoroutineLabel(ctx, fmt.Sprintf("worker-%v", i))) + } + + go wait.Until(func() { + err := w.enqueueBatches(ctx) + if err != nil { + logger.Errorf(ctx, "Failed to sync. Error: %v", err) + } + }, w.syncPeriod, ctx.Done()) + + return nil +} + +func (w *autoRefresh) Get(id ItemID) (Item, error) { + if val, ok := w.lruMap.Get(id); ok { + return val.(Item), nil + } + + return nil, errors.Errorf(ErrNotFound, "Item with id [%v] not found.", id) +} + +// Return the item if exists else create it. +// Create should be invoked only once. recreating the object is not supported. +func (w *autoRefresh) GetOrCreate(id ItemID, item Item) (Item, error) { + if val, ok := w.lruMap.Get(id); ok { + return val.(Item), nil + } + + w.lruMap.Add(id, item) + return item, nil +} + +// This function is called internally by its own timer. Roughly, it will, +// - List keys +// - Create batches of keys based on createBatchesCb +// - Enqueue all the batches into the workqueue +func (w *autoRefresh) enqueueBatches(ctx context.Context) error { + keys := w.lruMap.Keys() + snapshot := make([]ItemWrapper, 0, len(keys)) + for _, k := range keys { + // If not ok, it means evicted between the item was evicted between getting the keys and this update loop + // which is fine, we can just ignore. + if value, ok := w.lruMap.Peek(k); ok { + snapshot = append(snapshot, itemWrapper{ + id: k.(ItemID), + item: value.(Item), + }) + } + } + + batches, err := w.createBatchesCb(ctx, snapshot) + if err != nil { + return err + } + + for _, batch := range batches { + b := batch + w.workqueue.Add(&b) + } + + return nil +} + +// There are w.parallelizm instances of this function running all the time, each one will: +// - Retrieve an item from the workqueue +// - For each batch of the keys, call syncCb, which tells us if the items have been updated +// - If any has, then overwrite the item in the cache. +// +// What happens when the number of things that a user is trying to keep track of exceeds the size +// of the cache? Trivial case where the cache is size 1 and we're trying to keep track of two things. +// * Plugin asks for update on item 1 - cache evicts item 2, stores 1 and returns it unchanged +// * Plugin asks for update on item 2 - cache evicts item 1, stores 2 and returns it unchanged +// * Sync loop updates item 2, repeat +func (w *autoRefresh) sync(ctx context.Context) error { + for { + item, shutdown := w.workqueue.Get() + if shutdown { + return nil + } + + updatedBatch, err := w.syncCb(ctx, *item.(*Batch)) + if err != nil { + logger.Error(ctx, "failed to get latest copy of a batch. Error: %v", err) + continue + } + + for _, item := range updatedBatch { + if item.Action == Update { + // Add adds the item if it has been evicted or updates an existing one. + w.lruMap.Add(item.ID, item.Item) + } + } + } +} + +// Instantiates a new AutoRefresh Cache that syncs items in batches. +func NewAutoRefreshBatchedCache(createBatches CreateBatchesFunc, syncCb SyncFunc, syncRateLimiter workqueue.RateLimiter, + resyncPeriod time.Duration, parallelizm, size int, scope promutils.Scope) (AutoRefresh, error) { + + metrics := newMetrics(scope) + lruCache, err := lru.NewWithEvict(size, getEvictionFunction(metrics.Evictions)) + if err != nil { + return nil, err + } + + cache := &autoRefresh{ + metrics: metrics, + parallelizm: parallelizm, + createBatchesCb: createBatches, + syncCb: syncCb, + lruMap: lruCache, + syncPeriod: resyncPeriod, + workqueue: workqueue.NewNamedRateLimitingQueue(syncRateLimiter, scope.CurrentScope()), + } + + return cache, nil +} + +// Instantiates a new AutoRefresh Cache that syncs items periodically. +func NewAutoRefreshCache(syncCb SyncFunc, syncRateLimiter workqueue.RateLimiter, resyncPeriod time.Duration, + parallelizm, size int, scope promutils.Scope) (AutoRefresh, error) { + + return NewAutoRefreshBatchedCache(SingleItemBatches, syncCb, syncRateLimiter, resyncPeriod, parallelizm, size, scope) +} diff --git a/flytestdlib/cache/auto_refresh_example_test.go b/flytestdlib/cache/auto_refresh_example_test.go new file mode 100644 index 0000000000..1b5873c7ee --- /dev/null +++ b/flytestdlib/cache/auto_refresh_example_test.go @@ -0,0 +1,126 @@ +package cache + +import ( + "context" + "fmt" + "sync" + "time" + + "k8s.io/client-go/util/workqueue" + + "github.com/lyft/flytestdlib/errors" + + "github.com/lyft/flytestdlib/promutils" +) + +type ExampleItemStatus string + +const ( + ExampleStatusNotStarted ExampleItemStatus = "Not-started" + ExampleStatusStarted ExampleItemStatus = "Started" + ExampleStatusSucceeded ExampleItemStatus = "Completed" +) + +type ExampleCacheItem struct { + status ExampleItemStatus + id string +} + +func (e *ExampleCacheItem) ID() string { + return e.id +} + +type ExampleService struct { + jobStatus map[string]ExampleItemStatus + lock sync.RWMutex +} + +func newExampleService() *ExampleService { + return &ExampleService{ + jobStatus: make(map[string]ExampleItemStatus), + lock: sync.RWMutex{}, + } +} + +// advance the status to next, and return +func (f *ExampleService) getStatus(id string) *ExampleCacheItem { + f.lock.Lock() + defer f.lock.Unlock() + if _, ok := f.jobStatus[id]; !ok { + f.jobStatus[id] = ExampleStatusStarted + } + + f.jobStatus[id] = ExampleStatusSucceeded + return &ExampleCacheItem{f.jobStatus[id], id} +} + +func ExampleNewAutoRefreshCache() { + // This auto-refresh cache can be used for cases where keys are created by caller but processed by + // an external service and we want to asynchronously keep track of its progress. + exampleService := newExampleService() + + // define a sync method that the cache can use to auto-refresh in background + syncItemCb := func(ctx context.Context, batch []ItemWrapper) ([]ItemSyncResponse, error) { + updatedItems := make([]ItemSyncResponse, 0, len(batch)) + for _, obj := range batch { + oldItem := obj.GetItem().(*ExampleCacheItem) + newItem := exampleService.getStatus(oldItem.ID()) + if newItem.status != oldItem.status { + updatedItems = append(updatedItems, ItemSyncResponse{ + ID: oldItem.ID(), + Item: newItem, + Action: Update, + }) + } + } + + return updatedItems, nil + } + + // define resync period as time duration we want cache to refresh. We can go as low as we want but cache + // would still be constrained by time it takes to run Sync call for each item. + resyncPeriod := time.Millisecond + + // Since number of items in the cache is dynamic, rate limiter is our knob to control resources we spend on + // sync. + rateLimiter := workqueue.DefaultControllerRateLimiter() + + // since cache refreshes itself asynchronously, it may not notice that an object has been deleted immediately, + // so users of the cache should have the delete logic aware of this shortcoming (eg. not-exists may be a valid + // error during removal if based on status in cache). + cache, err := NewAutoRefreshCache(syncItemCb, rateLimiter, resyncPeriod, 10, 100, promutils.NewTestScope()) + if err != nil { + panic(err) + } + + // start the cache with a context that would be to stop the cache by cancelling the context + ctx, cancel := context.WithCancel(context.Background()) + err = cache.Start(ctx) + if err != nil { + panic(err) + } + + // creating objects that go through a couple of state transitions to reach the final state. + item1 := &ExampleCacheItem{status: ExampleStatusNotStarted, id: "item1"} + item2 := &ExampleCacheItem{status: ExampleStatusNotStarted, id: "item2"} + _, err1 := cache.GetOrCreate(item1.id, item1) + _, err2 := cache.GetOrCreate(item2.id, item2) + if err1 != nil || err2 != nil { + fmt.Printf("unexpected error in create; err1: %v, err2: %v", err1, err2) + } + + // wait for the cache to go through a few refresh cycles and then check status + time.Sleep(resyncPeriod * 10) + item, err := cache.Get(item1.ID()) + if err != nil && errors.IsCausedBy(err, ErrNotFound) { + fmt.Printf("Item1 is no longer in the cache") + } else { + fmt.Printf("Current status for item1 is %v", item.(*ExampleCacheItem).status) + } + + // stop the cache + cancel() + + // Output: + // Current status for item1 is Completed +} diff --git a/flytestdlib/cache/auto_refresh_test.go b/flytestdlib/cache/auto_refresh_test.go new file mode 100644 index 0000000000..77723e068e --- /dev/null +++ b/flytestdlib/cache/auto_refresh_test.go @@ -0,0 +1,103 @@ +package cache + +import ( + "context" + "fmt" + "testing" + "time" + + "k8s.io/client-go/util/workqueue" + + "github.com/lyft/flytestdlib/errors" + + "github.com/lyft/flytestdlib/promutils" + + "github.com/stretchr/testify/assert" +) + +const fakeCacheItemValueLimit = 10 + +type fakeCacheItem struct { + val int +} + +func syncFakeItem(_ context.Context, batch Batch) ([]ItemSyncResponse, error) { + items := make([]ItemSyncResponse, 0, len(batch)) + for _, obj := range batch { + item := obj.GetItem().(fakeCacheItem) + if item.val == fakeCacheItemValueLimit { + // After the item has gone through ten update cycles, leave it unchanged + continue + } + + items = append(items, ItemSyncResponse{ + ID: obj.GetID(), + Item: fakeCacheItem{ + val: item.val + 1, + }, + Action: Update, + }) + } + + return items, nil +} + +func TestCacheTwo(t *testing.T) { + testResyncPeriod := time.Millisecond + rateLimiter := workqueue.DefaultControllerRateLimiter() + + t.Run("normal operation", func(t *testing.T) { + // the size of the cache is at least as large as the number of items we're storing + cache, err := NewAutoRefreshCache(syncFakeItem, rateLimiter, testResyncPeriod, 10, 10, promutils.NewTestScope()) + assert.NoError(t, err) + + ctx, cancel := context.WithCancel(context.Background()) + assert.NoError(t, cache.Start(ctx)) + + // Create ten items in the cache + for i := 1; i <= 10; i++ { + _, err := cache.GetOrCreate(fmt.Sprintf("%d", i), fakeCacheItem{ + val: 0, + }) + assert.NoError(t, err) + } + + // Wait half a second for all resync periods to complete + time.Sleep(500 * time.Millisecond) + for i := 1; i <= 10; i++ { + item, err := cache.Get(fmt.Sprintf("%d", i)) + assert.NoError(t, err) + assert.Equal(t, 10, item.(fakeCacheItem).val) + } + cancel() + }) + + t.Run("Not Found", func(t *testing.T) { + // the size of the cache is at least as large as the number of items we're storing + cache, err := NewAutoRefreshCache(syncFakeItem, rateLimiter, testResyncPeriod, 10, 2, promutils.NewTestScope()) + assert.NoError(t, err) + + ctx, cancel := context.WithCancel(context.Background()) + assert.NoError(t, cache.Start(ctx)) + + // Create ten items in the cache + for i := 1; i <= 10; i++ { + _, err := cache.GetOrCreate(fmt.Sprintf("%d", i), fakeCacheItem{ + val: 0, + }) + assert.NoError(t, err) + } + + notFound := 0 + for i := 1; i <= 10; i++ { + _, err := cache.Get(fmt.Sprintf("%d", i)) + if err != nil && errors.IsCausedBy(err, ErrNotFound) { + notFound++ + } + } + + assert.Equal(t, 8, notFound) + + cancel() + }) +} diff --git a/flytestdlib/cache/mocks/AutoRefresh.go b/flytestdlib/cache/mocks/AutoRefresh.go new file mode 100644 index 0000000000..5ea113bc9a --- /dev/null +++ b/flytestdlib/cache/mocks/AutoRefresh.go @@ -0,0 +1,72 @@ +// Code generated by mockery v1.0.0. DO NOT EDIT. + +package mocks + +import cache "github.com/lyft/flytestdlib/cache" +import context "context" +import mock "github.com/stretchr/testify/mock" + +// AutoRefresh is an autogenerated mock type for the AutoRefresh type +type AutoRefresh struct { + mock.Mock +} + +// Get provides a mock function with given fields: id +func (_m *AutoRefresh) Get(id string) (cache.Item, error) { + ret := _m.Called(id) + + var r0 cache.Item + if rf, ok := ret.Get(0).(func(string) cache.Item); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(cache.Item) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetOrCreate provides a mock function with given fields: id, item +func (_m *AutoRefresh) GetOrCreate(id string, item cache.Item) (cache.Item, error) { + ret := _m.Called(id, item) + + var r0 cache.Item + if rf, ok := ret.Get(0).(func(string, cache.Item) cache.Item); ok { + r0 = rf(id, item) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(cache.Item) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(string, cache.Item) error); ok { + r1 = rf(id, item) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Start provides a mock function with given fields: ctx +func (_m *AutoRefresh) Start(ctx context.Context) error { + ret := _m.Called(ctx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} diff --git a/flytestdlib/cache/mocks/Item.go b/flytestdlib/cache/mocks/Item.go new file mode 100644 index 0000000000..ddb64732ec --- /dev/null +++ b/flytestdlib/cache/mocks/Item.go @@ -0,0 +1,10 @@ +// Code generated by mockery v1.0.0. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// Item is an autogenerated mock type for the Item type +type Item struct { + mock.Mock +} diff --git a/flytestdlib/cache/mocks/ItemWrapper.go b/flytestdlib/cache/mocks/ItemWrapper.go new file mode 100644 index 0000000000..d53cde272e --- /dev/null +++ b/flytestdlib/cache/mocks/ItemWrapper.go @@ -0,0 +1,41 @@ +// Code generated by mockery v1.0.0. DO NOT EDIT. + +package mocks + +import cache "github.com/lyft/flytestdlib/cache" +import mock "github.com/stretchr/testify/mock" + +// ItemWrapper is an autogenerated mock type for the ItemWrapper type +type ItemWrapper struct { + mock.Mock +} + +// GetID provides a mock function with given fields: +func (_m *ItemWrapper) GetID() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// GetItem provides a mock function with given fields: +func (_m *ItemWrapper) GetItem() cache.Item { + ret := _m.Called() + + var r0 cache.Item + if rf, ok := ret.Get(0).(func() cache.Item); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(cache.Item) + } + } + + return r0 +} diff --git a/flytestdlib/storage/cached_rawstore_test.go b/flytestdlib/storage/cached_rawstore_test.go index 6949119627..8ff7dbe820 100644 --- a/flytestdlib/storage/cached_rawstore_test.go +++ b/flytestdlib/storage/cached_rawstore_test.go @@ -98,7 +98,8 @@ func TestCachedRawStore(t *testing.T) { d2 := []byte("xyz") bigD := make([]byte, 1.5*1024*1024) // #nosec G404 - rand.Read(bigD) + _, err := rand.Read(bigD) + assert.NoError(t, err) writeCalled := false readCalled := false store := &dummyStore{ diff --git a/flytestdlib/storage/copy_impl_test.go b/flytestdlib/storage/copy_impl_test.go index ccc44924d6..e81ef7b491 100644 --- a/flytestdlib/storage/copy_impl_test.go +++ b/flytestdlib/storage/copy_impl_test.go @@ -93,7 +93,8 @@ func TestCopyRaw_CachingErrorHandling(t *testing.T) { writerCalled := false bigD := make([]byte, 1.5*1024*1024) // #nosec G404 - rand.Read(bigD) + _, err := rand.Read(bigD) + assert.NoError(t, err) dummyErrorMsg := "Dummy caching error" store := dummyStore{ @@ -118,7 +119,8 @@ func TestCopyRaw_CachingErrorHandling(t *testing.T) { writerCalled := false bigD := make([]byte, 1.5*1024*1024) // #nosec G404 - rand.Read(bigD) + _, err := rand.Read(bigD) + assert.NoError(t, err) dummyErrorMsg := "Dummy non-caching error" store := dummyStore{ @@ -133,7 +135,8 @@ func TestCopyRaw_CachingErrorHandling(t *testing.T) { } copier := newCopyImpl(&store, promutils.NewTestScope()) - err := copier.CopyRaw(context.Background(), DataReference("source.pb"), DataReference("dest.pb"), Options{}) + err = copier.CopyRaw(context.Background(), DataReference("source.pb"), DataReference("dest.pb"), Options{}) + assert.Error(t, err) assert.True(t, readerCalled) // writerCalled should be false because CopyRaw should error out right after c.rawstore.ReadRaw() when the underlying error is a hard error assert.False(t, writerCalled) From f49354964fc3d95e3f83eab5678bd83202204d4b Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 26 Sep 2019 15:09:39 -0700 Subject: [PATCH 075/191] Implement bitset and compact array (#37) * Implement bitset and compact array * Cleanup * PR Comments * Cleanup --- flytestdlib/Gopkg.lock | 211 +++++++++------------ flytestdlib/bitarray/bitset.go | 73 +++++++ flytestdlib/bitarray/bitset_test.go | 60 ++++++ flytestdlib/bitarray/compact_array.go | 130 +++++++++++++ flytestdlib/bitarray/compact_array_test.go | 154 +++++++++++++++ 5 files changed, 510 insertions(+), 118 deletions(-) create mode 100644 flytestdlib/bitarray/bitset.go create mode 100644 flytestdlib/bitarray/bitset_test.go create mode 100644 flytestdlib/bitarray/compact_array.go create mode 100644 flytestdlib/bitarray/compact_array_test.go diff --git a/flytestdlib/Gopkg.lock b/flytestdlib/Gopkg.lock index 38e3251581..0808fed3e5 100644 --- a/flytestdlib/Gopkg.lock +++ b/flytestdlib/Gopkg.lock @@ -2,20 +2,12 @@ [[projects]] - digest = "1:80004fcc5cf64e591486b3e11b406f1e0d17bf85d475d64203c8494f5da4fcd1" + digest = "1:26ee1e365ea8f312ee11e170fc6675bac0dd3d4adf2406e753d0a43527e1afb8" name = "cloud.google.com/go" packages = ["compute/metadata"] pruneopts = "UT" - revision = "cdaaf98f9226c39dc162b8e55083b2fbc67b4674" - version = "v0.43.0" - -[[projects]] - digest = "1:6b1426cad7057b717351eacf5b6fe70f053f11aac1ce254bbf2fd72c031719eb" - name = "contrib.go.opencensus.io/exporter/ocagent" - packages = ["."] - pruneopts = "UT" - revision = "dcb33c7f3b7cfe67e8a2cea10207ede1b7c40764" - version = "v0.4.12" + revision = "264def2dd949cdb8a803bb9f50fa29a67b798a6a" + version = "v0.46.3" [[projects]] digest = "1:94d4ae958b3d2ab476bef4bed53c1dcc3cb0fb2639bd45dd08b40e57139192e5" @@ -26,7 +18,7 @@ version = "v10.2.1-beta" [[projects]] - digest = "1:3818ae0b615fadcb7ae2291f0147c2db42775398347123c2fe4de1d54499b9da" + digest = "1:c3d8d652ba193a848d6d0a6f3caa81e68000aa93d2bde5a4c405c2c1a1d2a434" name = "github.com/Azure/go-autorest" packages = [ "autorest", @@ -37,11 +29,11 @@ "tracing", ] pruneopts = "UT" - revision = "2913f263500c4a5b23dada1b46ccd22ac972315f" - version = "v12.3.0" + revision = "69b4126ece6b5257e2f9b0017007d2334153655f" + version = "v13.0.1" [[projects]] - digest = "1:5b029601017603a512847d8ed857cca57b0af863d5289b4c8493d3f25b5425d0" + digest = "1:59ccee5f27c0cf22f9260f32b6b4215db9feb9194fe55e5d0171ee632c214307" name = "github.com/aws/aws-sdk-go" packages = [ "aws", @@ -65,6 +57,7 @@ "internal/ini", "internal/s3err", "internal/sdkio", + "internal/sdkmath", "internal/sdkrand", "internal/sdkuri", "internal/shareddefaults", @@ -84,8 +77,8 @@ "service/sts/stsiface", ] pruneopts = "UT" - revision = "77b6968988559d355ab953b6436eafe6a76e4a92" - version = "v1.21.4" + revision = "f3c0262d0d7fcb67869af3bd73909e0d030f7288" + version = "v1.25.0" [[projects]] branch = "master" @@ -100,31 +93,16 @@ name = "github.com/beorn7/perks" packages = ["quantile"] pruneopts = "UT" - revision = "4b2b341e8d7715fae06375aa633dbb6e91b3fb46" - version = "v1.0.0" - -[[projects]] - digest = "1:8f5acd4d4462b5136af644d25101f0968a7a94ee90fcb2059cec5b7cc42e0b20" - name = "github.com/census-instrumentation/opencensus-proto" - packages = [ - "gen-go/agent/common/v1", - "gen-go/agent/metrics/v1", - "gen-go/agent/trace/v1", - "gen-go/metrics/v1", - "gen-go/resource/v1", - "gen-go/trace/v1", - ] - pruneopts = "UT" - revision = "d89fa54de508111353cb0b06403c00569be780d8" - version = "v0.2.1" + revision = "37c8de3658fcb183f997c4e13e8337516ab753e6" + version = "v1.0.1" [[projects]] - digest = "1:998cf998358a303ac2430c386ba3fd3398477d6013153d3c6e11432765cc9ae6" + digest = "1:47056e6fe3a3524238d48ddcb6d38bfcfa6db346a11d73d83f1620a8cbf69793" name = "github.com/cespare/xxhash" packages = ["."] pruneopts = "UT" - revision = "3b82fb7d186719faeedd0c2864f868c74fbf79a1" - version = "v2.0.0" + revision = "de209a9ffae3256185a6bb135d1a0ada7b2b5f09" + version = "v2.1.0" [[projects]] digest = "1:00eb5d8bd96289512920ac43367d5bee76bbca2062da34862a98b26b92741896" @@ -194,26 +172,37 @@ version = "v1.0.0" [[projects]] - digest = "1:b532ee3f683c057e797694b5bfeb3827d89e6adf41c53dbc80e549bca76364ea" + branch = "master" + digest = "1:b7cb6054d3dff43b38ad2e92492f220f57ae6087ee797dca298139776749ace8" + name = "github.com/golang/groupcache" + packages = ["lru"] + pruneopts = "UT" + revision = "869f871628b6baa9cfbc11732cdf6546b17c1298" + +[[projects]] + digest = "1:549b3770feea703d7cf55822b7b2e1b1afce35ea5034d9a1388249f3c65fbb98" name = "github.com/golang/protobuf" packages = [ "jsonpb", "proto", - "protoc-gen-go/descriptor", - "protoc-gen-go/generator", - "protoc-gen-go/generator/internal/remap", - "protoc-gen-go/plugin", "ptypes", "ptypes/any", "ptypes/duration", "ptypes/struct", "ptypes/timestamp", - "ptypes/wrappers", ] pruneopts = "UT" revision = "6c65a5562fc06764971b7c5d05c76c75e84bdbf7" version = "v1.3.2" +[[projects]] + digest = "1:766102087520f9d54f2acc72bd6637045900ac735b4a419b128d216f0c5c4876" + name = "github.com/googleapis/gax-go" + packages = ["v2"] + pruneopts = "UT" + revision = "bd5b16380fd03dc758d11cef74ba2e3bc8b0e8c2" + version = "v2.0.5" + [[projects]] digest = "1:16e1cbd76f0d4152b5573f08f38b451748f74ec59b99a004a7481342b3fc05af" name = "github.com/graymeta/stow" @@ -230,27 +219,15 @@ revision = "903027f87de7054953efcdb8ba70d5dc02df38c7" [[projects]] - digest = "1:3b341cd71012c63aacddabfc70b9110be8e30c553349552ad3f77242843f2d03" - name = "github.com/grpc-ecosystem/grpc-gateway" - packages = [ - "internal", - "runtime", - "utilities", - ] - pruneopts = "UT" - revision = "ad529a448ba494a88058f9e5be0988713174ac86" - version = "v1.9.5" - -[[projects]] - digest = "1:d15ee511aa0f56baacc1eb4c6b922fa1c03b38413b6be18166b996d82a0156ea" + digest = "1:c77361e611524ec8f2ad37c408c3c916111a70b6acf806a1200855696bf8fa4d" name = "github.com/hashicorp/golang-lru" packages = [ ".", "simplelru", ] pruneopts = "UT" - revision = "7087cb70de9f7a8bc0a10c375cb0d2280a8edf9c" - version = "v0.5.1" + revision = "7f827b33c0f158ec5dfbba01bb0b14a4541fd81d" + version = "v0.5.3" [[projects]] digest = "1:c0d19ab64b32ce9fe5cf4ddceba78d5bc9807f0016db6b1183599da3dcc24d10" @@ -314,12 +291,12 @@ version = "v0.0.9" [[projects]] - digest = "1:9b90c7639a41697f3d4ad12d7d67dfacc9a7a4a6e0bbfae4fc72d0da57c28871" + digest = "1:36325ebb862e0382f2f14feef409ba9351271b89ada286ae56836c603d43b59c" name = "github.com/mattn/go-isatty" packages = ["."] pruneopts = "UT" - revision = "1311e847b0cb909da63b5fecfb5370aa66236465" - version = "v0.0.8" + revision = "e1f7b56ace729e4a73a29a6b4fac6cd5fcda7ab3" + version = "v0.0.9" [[projects]] digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" @@ -339,11 +316,11 @@ [[projects]] branch = "master" - digest = "1:b20de3cce4fa037405a51f29d69872915d88d5358820ec71e3537e1a29b2d8d5" + digest = "1:2339820c575323b56a7f94146a2549fd344c51c637fa5b8bafae9695ffa6e1a5" name = "github.com/ncw/swift" packages = ["."] pruneopts = "UT" - revision = "be076bb68c47b6c17b06258ea7778cfeaf185ea5" + revision = "a24ef33bc9b7e59ae4bed9e87a51d7bc76122731" [[projects]] digest = "1:93131d8002d7025da13582877c32d1fc302486775a1b06f62241741006428c5e" @@ -387,10 +364,10 @@ name = "github.com/prometheus/client_model" packages = ["go"] pruneopts = "UT" - revision = "fd36f4220a901265f90734c3183c5f0c91daa0b8" + revision = "14fe0d1b01d4d5fc031dd4bec1823bd3ebbe8016" [[projects]] - digest = "1:8dcedf2e8f06c7f94e48267dea0bc0be261fa97b377f3ae3e87843a92a549481" + digest = "1:f119e3205d3a1f0f19dbd7038eb37528e2c6f0933269dc344e305951fb87d632" name = "github.com/prometheus/common" packages = [ "expfmt", @@ -398,19 +375,20 @@ "model", ] pruneopts = "UT" - revision = "31bed53e4047fd6c510e43a941f90cb31be0972a" - version = "v0.6.0" + revision = "287d3e634a1e550c9e463dd7e5a75a422c614505" + version = "v0.7.0" [[projects]] - digest = "1:366f5aa02ff6c1e2eccce9ca03a22a6d983da89eecff8a89965401764534eb7c" + digest = "1:a210815b437763623ecca8eb91e6a0bf4f2d6773c5a6c9aec0e28f19e5fd6deb" name = "github.com/prometheus/procfs" packages = [ ".", "internal/fs", + "internal/util", ] pruneopts = "UT" - revision = "3f98efb27840a48a7a2898ec80be07674d19f9c8" - version = "v0.0.3" + revision = "499c85531f756d1129edd26485a5f73871eeb308" + version = "v0.0.5" [[projects]] digest = "1:274f67cb6fed9588ea2521ecdac05a6d62a8c51c074c1fccc6a49a40ba80e925" @@ -464,12 +442,12 @@ version = "v1.1.0" [[projects]] - digest = "1:c1b1102241e7f645bc8e0c22ae352e8f0dc6484b6cb4d132fa9f24174e0119e2" + digest = "1:524b71991fc7d9246cc7dc2d9e0886ccb97648091c63e30eef619e6862c955dd" name = "github.com/spf13/pflag" packages = ["."] pruneopts = "UT" - revision = "298182f68c66c05229eb03ac171abe6e309ee79a" - version = "v1.0.3" + revision = "2e9d26c8c37aae03e3f9d4e90b7116f5accb7cab" + version = "v1.0.5" [[projects]] digest = "1:2532daa308722c7b65f4566e634dac2ddfaa0a398a17d8418e96ef2af3939e37" @@ -479,15 +457,26 @@ revision = "ae103d7e593e371c69e832d5eb3347e2b80cbbc9" [[projects]] - digest = "1:972c2427413d41a1e06ca4897e8528e5a1622894050e2f527b38ddf0f343f759" + digest = "1:ac83cf90d08b63ad5f7e020ef480d319ae890c208f8524622a2f3136e2686b02" + name = "github.com/stretchr/objx" + packages = ["."] + pruneopts = "UT" + revision = "477a77ecc69700c7cdeb1fa9e129548e1c1c393c" + version = "v0.1.1" + +[[projects]] + digest = "1:ad527ce5c6b2426790449db7663fe53f8bb647f9387295406794c8be001238da" name = "github.com/stretchr/testify" - packages = ["assert"] + packages = [ + "assert", + "mock", + ] pruneopts = "UT" - revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" - version = "v1.3.0" + revision = "221dbe5ed46703ee255b1da0dec05086f5035f62" + version = "v1.4.0" [[projects]] - digest = "1:4c93890bbbb5016505e856cb06b5c5a2ff5b7217584d33f2a9071ebef4b5d473" + digest = "1:b984f402fbabb0e9eb0476f0ecfa51d0b2ff11cd0ac03538d6284091033b39ae" name = "go.opencensus.io" packages = [ ".", @@ -495,10 +484,8 @@ "internal/tagencoding", "metric/metricdata", "metric/metricproducer", - "plugin/ocgrpc", "plugin/ochttp", "plugin/ochttp/propagation/b3", - "plugin/ochttp/propagation/tracecontext", "resource", "stats", "stats/internal", @@ -510,12 +497,12 @@ "trace/tracestate", ] pruneopts = "UT" - revision = "43463a80402d8447b7fce0d2c58edf1687ff0b58" - version = "v0.19.3" + revision = "59d1ce35d30f3c25ba762169da2a37eab6ffa041" + version = "v0.22.1" [[projects]] branch = "master" - digest = "1:eae689808191546269bf951e1e66e0b6bc468be58a0498c0f037feeef2c67bab" + digest = "1:7a4eaae8773e8fccca11c5c60d5393235e2dc880356f1dc6bc753b114f17e0e6" name = "golang.org/x/net" packages = [ "context", @@ -528,7 +515,7 @@ "trace", ] pruneopts = "UT" - revision = "ca1201d0de80cfde86cb01aea620983605dfe99b" + revision = "c00fd9afed17cfdca9b3e1e3b8de7ef2b3f0347b" [[projects]] branch = "master" @@ -546,19 +533,11 @@ [[projects]] branch = "master" - digest = "1:382bb5a7fb4034db3b6a2d19e5a4a6bcf52f4750530603c01ca18a172fa3089b" - name = "golang.org/x/sync" - packages = ["semaphore"] - pruneopts = "UT" - revision = "112230192c580c3556b8cee6403af37a4fc5f28c" - -[[projects]] - branch = "master" - digest = "1:5632b0c4d972da51b5914f09fc5c1a8535e9d8d5d937e95ef83c423a0dd67f13" + digest = "1:1b90e63244513e8514749f45da58e89350d35cb3e12416ce6ed95f41c2a1f177" name = "golang.org/x/sys" packages = ["unix"] pruneopts = "UT" - revision = "fae7ac547cb717d141c433a2a173315e216b64c4" + revision = "855e68c8590b0d6a9d08863d2982eb8aeddd98d3" [[projects]] digest = "1:8d8faad6b12a3a4c819a3f9618cb6ee1fa1cfc33253abeeea8b55336721e3405" @@ -587,15 +566,15 @@ [[projects]] branch = "master" - digest = "1:9fdc2b55e8e0fafe4b41884091e51e77344f7dc511c5acedcfd98200003bff90" + digest = "1:cdd088b35bbf78713a6861a44a1bbe97e581861b6b8835c7f2211bbeca3671f6" name = "golang.org/x/time" packages = ["rate"] pruneopts = "UT" - revision = "9d24e82272b4f38b78bc8cff74fa936d31ccd8ef" + revision = "c4c64cad1fd0a1a8dab2523e04e61d35308e131e" [[projects]] branch = "master" - digest = "1:03cb7931c1d82eb61d91e3a29d672c7e1a5b97dbb64fc7ece8b4ec1016dba4ac" + digest = "1:629a44e89cce8a4849ea4dfee1ac9fe25e8a1b7d6c2f8a01ca83b38eadce0317" name = "golang.org/x/tools" packages = [ "go/ast/astutil", @@ -612,29 +591,28 @@ "internal/semver", ] pruneopts = "UT" - revision = "8aa4eac1a7c108f74782725e959bedd2b844f738" + revision = "a8d5d34286bd3ab7c348812aa4699f674c05245b" [[projects]] branch = "master" - digest = "1:6fa791c8aeb0da453e2d3208a20e282bb8c15551a1b91e6672fec99f636a53ca" + digest = "1:23dcfdf20aa5a3b0233ebd8b9f7b2e688c80086506980eca96731c7adb09e235" name = "google.golang.org/api" packages = [ - "gensupport", "googleapi", "googleapi/internal/uritemplates", "googleapi/transport", "internal", + "internal/gensupport", "option", "storage/v1", - "support/bundler", "transport/http", "transport/http/internal/propagation", ] pruneopts = "UT" - revision = "069bea57b1be6ad0671a49ea7a1128025a22b73f" + revision = "6a149848833881cf9a0f77f7595c64550f285d87" [[projects]] - digest = "1:498b722d33dde4471e7d6e5d88a5e7132d2a8306fea5ff5ee82d1f418b4f41ed" + digest = "1:066bca8a35b34227298f7f02ab5a4b2523dcea43ad72af4c69c3451e8fd8e56b" name = "google.golang.org/appengine" packages = [ ".", @@ -649,23 +627,19 @@ "urlfetch", ] pruneopts = "UT" - revision = "b2f4a3cf3c67576a2ee09e1fe62656a5086ce880" - version = "v1.6.1" + revision = "c71d63e301d75423acb410203c747cad31e9a5e7" + version = "v1.6.3" [[projects]] branch = "master" - digest = "1:3565a93b7692277a5dea355bc47bd6315754f3246ed07a224be6aec28972a805" + digest = "1:583a0c80f5e3a9343d33aea4aead1e1afcc0043db66fdf961ddd1fe8cd3a4faf" name = "google.golang.org/genproto" - packages = [ - "googleapis/api/httpbody", - "googleapis/rpc/status", - "protobuf/field_mask", - ] + packages = ["googleapis/rpc/status"] pruneopts = "UT" - revision = "c506a9f9061087022822e8da603a52fc387115a8" + revision = "7ee9db18f195a533914d703fa8b21f3518ffd7f2" [[projects]] - digest = "1:cf01ae0753310464677058b125fa31e74fd943781782ada503180ad784fc83d3" + digest = "1:6cd77d0b616d2dcebd363dfecba593f27b0151fc82cdb5fbfb96c5a7cfbc95b5" name = "google.golang.org/grpc" packages = [ ".", @@ -703,8 +677,8 @@ "tap", ] pruneopts = "UT" - revision = "1d89a3c832915b2314551c1d2a506874d62e53f7" - version = "v1.22.0" + revision = "f6d0f9ee430895e87ef1ceb5ac8f39725bafceef" + version = "v1.24.0" [[projects]] digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96" @@ -736,12 +710,12 @@ version = "kubernetes-1.13.1" [[projects]] - digest = "1:c283ca5951eb7d723d3300762f96ff94c2ea11eaceb788279e2b7327f92e4f2a" + digest = "1:93e82f25d75aba18436ad1ac042cb49493f096011f2541075721ed6f9e05c044" name = "k8s.io/klog" packages = ["."] pruneopts = "UT" - revision = "d98d8acdac006fb39831f1b25640813fef9c314f" - version = "v0.3.3" + revision = "2ca9ad30301bf30a8a6e0fa2110db6b8df699a91" + version = "v1.0.0" [solve-meta] analyzer-name = "dep" @@ -781,6 +755,7 @@ "github.com/spf13/pflag", "github.com/spf13/viper", "github.com/stretchr/testify/assert", + "github.com/stretchr/testify/mock", "golang.org/x/time/rate", "golang.org/x/tools/imports", "k8s.io/apimachinery/pkg/util/rand", diff --git a/flytestdlib/bitarray/bitset.go b/flytestdlib/bitarray/bitset.go new file mode 100644 index 0000000000..0fc6299e42 --- /dev/null +++ b/flytestdlib/bitarray/bitset.go @@ -0,0 +1,73 @@ +package bitarray + +import ( + "unsafe" +) + +/* #nosec */ +const blockSize = uint(unsafe.Sizeof(Block(0))) * 8 + +type Block uint32 + +// BitSet is a set of bits that can be set, cleared and queried. +type BitSet []Block + +// Ensures that the given bit is set in the BitSet. +func (s *BitSet) Set(i uint) { + if len(*s) < int(i/blockSize+1) { + *s = append(*s, make([]Block, i/blockSize+1)...) + } + + (*s)[i/blockSize] |= 1 << (i % blockSize) +} + +// Ensures that the given bit is cleared (unset) in the BitSet. +func (s *BitSet) Clear(i uint) { + if len(*s) >= int(i/blockSize+1) { + (*s)[i/blockSize] &^= 1 << (i % blockSize) + } +} + +// Returns true if the given bit is set, false if it is cleared. +func (s *BitSet) IsSet(i uint) bool { + if len(*s) < int(i/blockSize+1) { + return false + } + + return (*s)[i/blockSize]&(1<<(i%blockSize)) != 0 +} + +// Returns the number of blocks of the BitSet. +func (s *BitSet) BlockCount() int { + return len(*s) +} + +// Returns the length of the BitSet. +func (s *BitSet) Cap() uint { + return uint(s.BlockCount()) * blockSize +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (s BitSet) DeepCopyInto(out *BitSet) { + in := &s + *out = make(BitSet, len(*in)) + copy(*out, *in) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BitSet. +func (s BitSet) DeepCopy() BitSet { + if s == nil { + return nil + } + + out := new(BitSet) + s.DeepCopyInto(out) + return *out +} + +// Initializes a new BitSet of the specified size. +func NewBitSet(desiredCap uint) *BitSet { + // Create enough blocks to contain the number of intended bits. + a := make(BitSet, ((desiredCap-1)/blockSize)+1) + return &a +} diff --git a/flytestdlib/bitarray/bitset_test.go b/flytestdlib/bitarray/bitset_test.go new file mode 100644 index 0000000000..e2dfa42c2e --- /dev/null +++ b/flytestdlib/bitarray/bitset_test.go @@ -0,0 +1,60 @@ +package bitarray + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +func ExampleBitSet() { + s := new(BitSet) + s.Set(13) + s.Set(45) + s.Clear(13) + fmt.Printf("s.IsSet(13) = %t; s.IsSet(45) = %t; s.IsSet(30) = %t\n", + s.IsSet(13), s.IsSet(45), s.IsSet(30)) + // Output: s.IsSet(13) = false; s.IsSet(45) = true; s.IsSet(30) = false +} + +func TestBitSet_Set(t *testing.T) { + t.Run("Empty Set", func(t *testing.T) { + b := new(BitSet) + b.Set(5) + assert.True(t, b.IsSet(5)) + }) + + t.Run("Auto resize", func(t *testing.T) { + b := new(BitSet) + b.Set(2) + assert.Equal(t, 1, len(*b)) + assert.False(t, b.IsSet(500)) + b.Set(500) + assert.True(t, b.IsSet(2)) + assert.True(t, b.IsSet(500)) + }) +} + +func TestNewBitSet(t *testing.T) { + t.Run("Block size", func(t *testing.T) { + b := NewBitSet(63) + assert.Equal(t, 2, b.BlockCount()) + }) + + t.Run("Bigger than block size", func(t *testing.T) { + b := NewBitSet(100) + assert.Equal(t, 4, b.BlockCount()) + }) +} + +func TestBitSet_Cap(t *testing.T) { + t.Run("Cap == size", func(t *testing.T) { + b := NewBitSet(blockSize * 5) + assert.Equal(t, int(blockSize*5), int(b.Cap())) + }) + + t.Run("Cap > size", func(t *testing.T) { + b := NewBitSet(blockSize*2 + 20) + assert.Equal(t, int(blockSize*3), int(b.Cap())) + }) +} diff --git a/flytestdlib/bitarray/compact_array.go b/flytestdlib/bitarray/compact_array.go new file mode 100644 index 0000000000..827c8c8532 --- /dev/null +++ b/flytestdlib/bitarray/compact_array.go @@ -0,0 +1,130 @@ +// Contains efficient array that stores small-range values (up to uint64) in a bit array to optimize storage. +package bitarray + +import ( + "errors" + "fmt" + "math" + "unsafe" +) + +// The biggest Item size that can fit in CompactArray. +type Item = uint64 + +// Provides a wrapper on top of BitSet to store items of arbitrary size (up to 64 bits each) efficiently. +type CompactArray struct { + *BitSet `json:",inline"` + ItemSize uint `json:"item,omitempty"` + ItemsCount uint `json:"count,omitempty"` +} + +func bitsNeeded(maxValue Item) uint { + return uint(math.Ceil(math.Log2(float64(maxValue + 1)))) +} + +func (a *CompactArray) validateIndex(index int) { + if index < 0 || uint(index) >= a.ItemsCount { + panic(fmt.Sprintf("Attempt to access index [%v] in CompactArray of size [%v]", index, a.ItemsCount)) + } +} + +func (a *CompactArray) validateValue(value Item) { + maxValue := (uint64(1) << a.ItemSize) - 1 + if value > maxValue { + panic(fmt.Sprintf("Value [%v] is too big. Max value is [%v].", value, maxValue)) + } +} + +// Sets item at index to provided value. +func (a *CompactArray) SetItem(index int, value Item) { + a.validateIndex(index) + a.validateValue(value) + bitIndex := uint(index) * a.ItemSize + x := Item(1) + for i := int(a.ItemSize - 1); i >= 0; i-- { + if x&value != 0 { + a.BitSet.Set(bitIndex + uint(i)) + } else { + a.BitSet.Clear(bitIndex + uint(i)) + } + + x <<= 1 + } +} + +// Gets Item at provided index. +func (a *CompactArray) GetItem(index int) Item { + a.validateIndex(index) + bitIndex := uint(index) * a.ItemSize + res := Item(0) + x := Item(1) + for i := int(a.ItemSize - 1); i >= 0; i-- { + if a.BitSet.IsSet(bitIndex + uint(i)) { + res |= x + } + + x <<= 1 + } + + return res +} + +// Gets all items stored in the array. The size of the returned array matches the ItemsCount it was initialized with. +func (a CompactArray) GetItems() []Item { + res := make([]Item, 0, a.ItemsCount) + for i := 0; i < int(a.ItemsCount); i++ { + res = append(res, a.GetItem(i)) + } + + return res +} + +// Gets a string representation of the array contents. This is a relatively expensive operation. +func (a CompactArray) String() string { + res := "[" + for _, item := range a.GetItems() { + res += fmt.Sprintf("%v, ", item) + } + + res += "]" + return res +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (a *CompactArray) DeepCopyInto(out *CompactArray) { + *out = *a + if a.BitSet != nil { + in, out := &a.BitSet, &out.BitSet + *out = new(BitSet) + if **in != nil { + in, out := *in, *out + *out = make([]Block, len(*in)) + copy(*out, *in) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompactArray. +func (a *CompactArray) DeepCopy() *CompactArray { + if a == nil { + return nil + } + out := new(CompactArray) + a.DeepCopyInto(out) + return out +} + +// Creates a new CompactArray of specified size. +func NewCompactArray(size uint, maxValue Item) (CompactArray, error) { + itemSize := bitsNeeded(maxValue) + /* #nosec */ + if uint64(itemSize) >= uint64(unsafe.Sizeof(Item(0))*8) { + return CompactArray{}, errors.New("invalid itemSize, must be less than the size of Item") + } + + return CompactArray{ + BitSet: NewBitSet(size), + ItemsCount: size, + ItemSize: itemSize, + }, nil +} diff --git a/flytestdlib/bitarray/compact_array_test.go b/flytestdlib/bitarray/compact_array_test.go new file mode 100644 index 0000000000..7d41ee7b41 --- /dev/null +++ b/flytestdlib/bitarray/compact_array_test.go @@ -0,0 +1,154 @@ +package bitarray + +import ( + "crypto/rand" + "encoding/binary" + "encoding/json" + "fmt" + "math" + "testing" + + "github.com/stretchr/testify/assert" +) + +func getRandInt() uint64 { + c := 10 + b := make([]byte, c) + _, err := rand.Read(b) + if err != nil { + return 0 + } + + return binary.BigEndian.Uint64(b) +} + +func TestNewItemArray(t *testing.T) { + for itemSize := uint(1); itemSize < 60; itemSize++ { + t.Run(fmt.Sprintf("Item Size %v", itemSize), func(t *testing.T) { + maxItemValue := 1 << (itemSize - 1) + itemsCount := uint(math.Min(float64(200), float64(maxItemValue))) + expected := make([]Item, 0, itemsCount) + + arr, err := NewCompactArray(itemsCount, Item(1)<<(itemSize-1)) + assert.NoError(t, err) + + for i := 0; i < int(itemsCount); i++ { + // Ensure inserted items is in the accepted range (0 -> 1< 1< Date: Tue, 8 Oct 2019 12:42:44 -0700 Subject: [PATCH 076/191] =?UTF-8?q?Fix=20separator=20used=20in=20UrlPath?= =?UTF-8?q?=20to=20'/'=20instead=20of=20OS-dependent=20path=20sep=E2=80=A6?= =?UTF-8?q?=20(#40)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix separator used in UrlPath to '/' instead of OS-dependent path separator * PR Comments * lint --- flytestdlib/storage/url_path.go | 13 ++++++++----- flytestdlib/storage/utils.go | 12 ++++++++++++ flytestdlib/storage/utils_test.go | 26 ++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 5 deletions(-) diff --git a/flytestdlib/storage/url_path.go b/flytestdlib/storage/url_path.go index 94e26e317a..824347f259 100644 --- a/flytestdlib/storage/url_path.go +++ b/flytestdlib/storage/url_path.go @@ -3,26 +3,27 @@ package storage import ( "context" "fmt" + "strings" "github.com/pkg/errors" "net/url" - "os" - "path/filepath" "github.com/lyft/flytestdlib/logger" ) +const separator = "/" + // Implements ReferenceConstructor that assumes paths are URL-compatible. type URLPathConstructor struct { } func ensureEndingPathSeparator(path DataReference) DataReference { - if len(path) > 0 && path[len(path)-1] == os.PathSeparator { + if len(path) > 0 && path[len(path)-1] == separator[0] { return path } - return path + "/" + return path + separator } func (URLPathConstructor) ConstructReference(ctx context.Context, reference DataReference, nestedKeys ...string) (DataReference, error) { @@ -32,7 +33,9 @@ func (URLPathConstructor) ConstructReference(ctx context.Context, reference Data return "", errors.Wrap(err, fmt.Sprintf("Reference is of an invalid format [%v]", reference)) } - rel, err := url.Parse(filepath.Join(nestedKeys...)) + rel, err := url.Parse(strings.Join(MapStrings(func(s string) string { + return strings.Trim(s, separator) + }, nestedKeys...), separator)) if err != nil { logger.Errorf(ctx, "Failed to parse nested keys: %v", reference) return "", errors.Wrap(err, fmt.Sprintf("Reference is of an invalid format [%v]", reference)) diff --git a/flytestdlib/storage/utils.go b/flytestdlib/storage/utils.go index 9b790c6120..e2820c82d9 100644 --- a/flytestdlib/storage/utils.go +++ b/flytestdlib/storage/utils.go @@ -44,3 +44,15 @@ func IsExceedsLimit(err error) bool { func IsFailedWriteToCache(err error) bool { return errors2.IsCausedBy(err, ErrFailedToWriteCache) } + +func MapStrings(mapper func(string) string, strings ...string) []string { + if strings == nil { + return []string{} + } + + for i, str := range strings { + strings[i] = mapper(str) + } + + return strings +} diff --git a/flytestdlib/storage/utils_test.go b/flytestdlib/storage/utils_test.go index 8618310f4a..3263fa703d 100644 --- a/flytestdlib/storage/utils_test.go +++ b/flytestdlib/storage/utils_test.go @@ -47,3 +47,29 @@ func TestIsFailedWriteToCache(t *testing.T) { assert.True(t, IsFailedWriteToCache(failedToWriteCacheError)) assert.False(t, IsFailedWriteToCache(sysError)) } + +func TestMapStrings(t *testing.T) { + t.Run("nothing", func(t *testing.T) { + assert.Equal(t, []string{}, MapStrings(func(s string) string { + return s + })) + }) + + t.Run("one item", func(t *testing.T) { + assert.Equal(t, []string{"item"}, MapStrings(func(s string) string { + return s + }, "item")) + }) + + t.Run("const", func(t *testing.T) { + assert.Equal(t, []string{"something"}, MapStrings(func(s string) string { + return "something" + }, "item")) + }) + + t.Run("half string", func(t *testing.T) { + assert.Equal(t, []string{"thing", "some"}, MapStrings(func(s string) string { + return s[len(s)/2:] + }, "something", "somesome")) + }) +} From e003865c75f16de8b548032dc09305ffe22fa03c Mon Sep 17 00:00:00 2001 From: Anand Swaminathan Date: Wed, 9 Oct 2019 12:33:58 -0700 Subject: [PATCH 077/191] Implementation of Weighted Random List (#39) --- .../random/mocks/WeightedRandomList.go | 81 ++++++ flytestdlib/random/weighted_random_list.go | 138 ++++++++++ .../random/weighted_random_list_test.go | 253 ++++++++++++++++++ 3 files changed, 472 insertions(+) create mode 100644 flytestdlib/random/mocks/WeightedRandomList.go create mode 100644 flytestdlib/random/weighted_random_list.go create mode 100644 flytestdlib/random/weighted_random_list_test.go diff --git a/flytestdlib/random/mocks/WeightedRandomList.go b/flytestdlib/random/mocks/WeightedRandomList.go new file mode 100644 index 0000000000..38c7318065 --- /dev/null +++ b/flytestdlib/random/mocks/WeightedRandomList.go @@ -0,0 +1,81 @@ +// Code generated by mockery v1.0.0. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" +import rand "math/rand" +import random "github.com/lyft/flytestdlib/random" + +// WeightedRandomList is an autogenerated mock type for the WeightedRandomList type +type WeightedRandomList struct { + mock.Mock +} + +// Get provides a mock function with given fields: +func (_m *WeightedRandomList) Get() random.Comparable { + ret := _m.Called() + + var r0 random.Comparable + if rf, ok := ret.Get(0).(func() random.Comparable); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(random.Comparable) + } + } + + return r0 +} + +// GetWithSeed provides a mock function with given fields: seed +func (_m *WeightedRandomList) GetWithSeed(seed rand.Source) (random.Comparable, error) { + ret := _m.Called(seed) + + var r0 random.Comparable + if rf, ok := ret.Get(0).(func(rand.Source) random.Comparable); ok { + r0 = rf(seed) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(random.Comparable) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(rand.Source) error); ok { + r1 = rf(seed) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Len provides a mock function with given fields: +func (_m *WeightedRandomList) Len() int { + ret := _m.Called() + + var r0 int + if rf, ok := ret.Get(0).(func() int); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int) + } + + return r0 +} + +// List provides a mock function with given fields: +func (_m *WeightedRandomList) List() []random.Comparable { + ret := _m.Called() + + var r0 []random.Comparable + if rf, ok := ret.Get(0).(func() []random.Comparable); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]random.Comparable) + } + } + + return r0 +} diff --git a/flytestdlib/random/weighted_random_list.go b/flytestdlib/random/weighted_random_list.go new file mode 100644 index 0000000000..16b3562dc8 --- /dev/null +++ b/flytestdlib/random/weighted_random_list.go @@ -0,0 +1,138 @@ +package random + +import ( + "context" + "fmt" + "math/rand" + "sort" + "time" + + "github.com/lyft/flytestdlib/logger" +) + +//go:generate mockery -all -case=underscore + +// Interface to use the Weighted Random +type WeightedRandomList interface { + Get() Comparable + GetWithSeed(seed rand.Source) (Comparable, error) + List() []Comparable + Len() int +} + +// Interface for items that can be used along with WeightedRandomList +type Comparable interface { + Compare(to Comparable) bool +} + +// Structure of each entry to select from +type Entry struct { + Item Comparable + Weight float32 +} + +type internalEntry struct { + entry Entry + currentTotal float32 +} + +// WeightedRandomList selects elements randomly from the list taking into account individual weights. +// Weight has to be assigned between 0 and 1. +// Support deterministic results when given a particular seed source +type weightedRandomListImpl struct { + entries []internalEntry + totalWeight float32 +} + +func validateEntries(entries []Entry) error { + if len(entries) == 0 { + return fmt.Errorf("entries is empty") + } + for index, entry := range entries { + if entry.Item == nil { + return fmt.Errorf("invalid entry: nil, index %d", index) + } + if entry.Weight < 0 || entry.Weight > float32(1) { + return fmt.Errorf("invalid weight %f, index %d", entry.Weight, index) + } + } + return nil +} + +// Given a list of entries with weights, returns WeightedRandomList +func NewWeightedRandom(ctx context.Context, entries []Entry) (WeightedRandomList, error) { + err := validateEntries(entries) + if err != nil { + return nil, err + } + + sort.Slice(entries, func(i, j int) bool { + return entries[i].Item.Compare(entries[j].Item) + }) + var internalEntries []internalEntry + numberOfEntries := len(entries) + totalWeight := float32(0) + for _, e := range entries { + totalWeight += e.Weight + } + + currentTotal := float32(0) + for _, e := range entries { + if totalWeight == 0 { + // This indicates that none of the entries have weight assigned. + // We will assign equal weights to everyone + currentTotal += 1.0 / float32(numberOfEntries) + } else if e.Weight == 0 { + // Entries which have zero weight are ignored + logger.Debug(ctx, "ignoring entry due to empty weight %v", e) + continue + } + + currentTotal += e.Weight + internalEntries = append(internalEntries, internalEntry{ + entry: e, + currentTotal: currentTotal, + }) + } + + return &weightedRandomListImpl{ + entries: internalEntries, + totalWeight: currentTotal, + }, nil +} + +func (w *weightedRandomListImpl) get(generator *rand.Rand) Comparable { + randomWeight := generator.Float32() * w.totalWeight + for _, e := range w.entries { + if e.currentTotal >= randomWeight && e.currentTotal > 0 { + return e.entry.Item + } + } + return w.entries[len(w.entries)-1].entry.Item +} + +// Returns a random entry based on the weights +func (w *weightedRandomListImpl) Get() Comparable { + randGenerator := rand.New(rand.NewSource(time.Now().UTC().UnixNano())) + return w.get(randGenerator) +} + +// For a given seed, the same entry will be returned all the time. +func (w *weightedRandomListImpl) GetWithSeed(seed rand.Source) (Comparable, error) { + randGenerator := rand.New(seed) + return w.get(randGenerator), nil +} + +// Lists all the entries that are eligible for selection +func (w *weightedRandomListImpl) List() []Comparable { + entries := make([]Comparable, len(w.entries)) + for index, indexedItem := range w.entries { + entries[index] = indexedItem.entry.Item + } + return entries +} + +// Gets the number of items that are being considered for selection. +func (w *weightedRandomListImpl) Len() int { + return len(w.entries) +} diff --git a/flytestdlib/random/weighted_random_list_test.go b/flytestdlib/random/weighted_random_list_test.go new file mode 100644 index 0000000000..dd47ff4258 --- /dev/null +++ b/flytestdlib/random/weighted_random_list_test.go @@ -0,0 +1,253 @@ +package random + +import ( + "context" + "math/rand" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +type testData struct { + key string + val int +} + +func (t testData) Compare(to Comparable) bool { + if strings.Contains(t.key, "sort") { + return t.key < to.(testData).key + } + return t.val < to.(testData).val +} + +func TestDeterministicWeightedRandomStr(t *testing.T) { + item1 := testData{ + key: "sort_key1", + val: 1, + } + item2 := testData{ + key: "sort_key2", + val: 2, + } + entries := []Entry{ + { + Item: item1, + Weight: 0.4, + }, + { + Item: item2, + Weight: 0.6, + }, + } + randWeight, err := NewWeightedRandom(context.Background(), entries) + assert.Nil(t, err) + retItem, err := randWeight.GetWithSeed(rand.NewSource(20)) + assert.Nil(t, err) + assert.Equal(t, item1, retItem) + + assert.Nil(t, err) + for i := 1; i <= 10; i++ { + retItem, err := randWeight.GetWithSeed(rand.NewSource(10)) + assert.Nil(t, err) + assert.Equal(t, item2, retItem) + } +} + +func TestDeterministicWeightedRandomInt(t *testing.T) { + item1 := testData{ + key: "key1", + val: 4, + } + item2 := testData{ + key: "key2", + val: 3, + } + entries := []Entry{ + { + Item: item1, + Weight: 0.4, + }, + { + Item: item2, + Weight: 0.6, + }, + } + randWeight, err := NewWeightedRandom(context.Background(), entries) + assert.Nil(t, err) + rand.NewSource(10) + retItem, err := randWeight.GetWithSeed(rand.NewSource(20)) + assert.Nil(t, err) + assert.Equal(t, item2, retItem) + + for i := 1; i <= 10; i++ { + retItem, err := randWeight.GetWithSeed(rand.NewSource(1)) + assert.Nil(t, err) + assert.Equal(t, item1, retItem) + } +} + +func TestDeterministicWeightedFewZeroWeight(t *testing.T) { + item1 := testData{ + key: "key1", + val: 4, + } + item2 := testData{ + key: "key2", + val: 3, + } + entries := []Entry{ + { + Item: item1, + Weight: 0.4, + }, + { + Item: item2, + }, + } + randWeight, err := NewWeightedRandom(context.Background(), entries) + assert.Nil(t, err) + retItem, err := randWeight.GetWithSeed(rand.NewSource(20)) + assert.Nil(t, err) + assert.Equal(t, item1, retItem) + + for i := 1; i <= 10; i++ { + retItem, err := randWeight.GetWithSeed(rand.NewSource(10)) + assert.Nil(t, err) + assert.Equal(t, item1, retItem) + } +} + +func TestDeterministicWeightedAllZeroWeights(t *testing.T) { + item1 := testData{ + key: "sort_key1", + val: 4, + } + item2 := testData{ + key: "sort_key2", + val: 3, + } + entries := []Entry{ + { + Item: item1, + }, + { + Item: item2, + }, + } + randWeight, err := NewWeightedRandom(context.Background(), entries) + assert.Nil(t, err) + retItem, err := randWeight.GetWithSeed(rand.NewSource(10)) + assert.Nil(t, err) + assert.Equal(t, item2, retItem) + + for i := 1; i <= 10; i++ { + retItem, err := randWeight.GetWithSeed(rand.NewSource(20)) + assert.Nil(t, err) + assert.Equal(t, item1, retItem) + } +} + +func TestDeterministicWeightList(t *testing.T) { + item1 := testData{ + key: "key1", + val: 4, + } + item2 := testData{ + key: "key2", + val: 3, + } + entries := []Entry{ + { + Item: item1, + Weight: 0.3, + }, + { + Item: item2, + }, + } + randWeight, err := NewWeightedRandom(context.Background(), entries) + assert.Nil(t, err) + assert.EqualValues(t, []Comparable{item1}, randWeight.List()) +} + +func TestDeterministicWeightListZeroWeights(t *testing.T) { + item1 := testData{ + key: "key1", + val: 4, + } + item2 := testData{ + key: "key2", + val: 3, + } + entries := []Entry{ + { + Item: item1, + }, + { + Item: item2, + }, + } + randWeight, err := NewWeightedRandom(context.Background(), entries) + assert.Nil(t, err) + assert.EqualValues(t, []Comparable{item2, item1}, randWeight.List()) +} + +func TestDeterministicWeightLen(t *testing.T) { + item1 := testData{ + key: "key1", + } + item2 := testData{ + key: "key2", + } + entries := []Entry{ + { + Item: item1, + }, + { + Item: item2, + }, + } + randWeight, err := NewWeightedRandom(context.Background(), entries) + assert.Nil(t, err) + assert.EqualValues(t, 2, randWeight.Len()) +} + +func TestDeterministicWeightInvalidWeights(t *testing.T) { + item1 := testData{ + key: "key1", + val: 4, + } + item2 := testData{ + key: "key2", + val: 3, + } + entries := []Entry{ + { + Item: item1, + Weight: -3.0, + }, + { + Item: item2, + }, + } + _, err := NewWeightedRandom(context.Background(), entries) + assert.NotNil(t, err) + assert.EqualError(t, err, "invalid weight -3.000000, index 0") +} + +func TestDeterministicWeightInvalidList(t *testing.T) { + item2 := testData{ + key: "key2", + val: 3, + } + entries := []Entry{ + {}, + { + Item: item2, + }, + } + _, err := NewWeightedRandom(context.Background(), entries) + assert.NotNil(t, err) + assert.EqualError(t, err, "invalid entry: nil, index 0") +} From dbe7ff1eddbc6668faa91946778394a30a0dd7d5 Mon Sep 17 00:00:00 2001 From: Anand Swaminathan Date: Fri, 11 Oct 2019 13:23:59 -0700 Subject: [PATCH 078/191] checking in generated weighted_random_list (#41) * checking in generated weighted_random_list * Regenerate everything * Regenerate * Fix lint --- flytestdlib/cache/mocks/AutoRefresh.go | 56 ++++++- flytestdlib/cache/mocks/Item.go | 2 +- flytestdlib/cache/mocks/ItemWrapper.go | 38 ++++- flytestdlib/logger/config_flags_test.go | 66 -------- flytestdlib/logger/logger.go | 2 - .../random/mocks/WeightedRandomList.go | 81 ---------- flytestdlib/random/mocks/comparable.go | 43 +++++ .../random/mocks/weighted_random_list.go | 153 ++++++++++++++++++ flytestdlib/storage/protobuf_store_test.go | 3 +- flytestdlib/utils/mocks/auto_refresh_cache.go | 38 ++++- flytestdlib/utils/mocks/cache_item.go | 20 ++- flytestdlib/utils/mocks/rate_limiter.go | 20 ++- flytestdlib/utils/mocks/sequencer.go | 38 ++++- 13 files changed, 403 insertions(+), 157 deletions(-) delete mode 100644 flytestdlib/random/mocks/WeightedRandomList.go create mode 100644 flytestdlib/random/mocks/comparable.go create mode 100644 flytestdlib/random/mocks/weighted_random_list.go diff --git a/flytestdlib/cache/mocks/AutoRefresh.go b/flytestdlib/cache/mocks/AutoRefresh.go index 5ea113bc9a..933f093f89 100644 --- a/flytestdlib/cache/mocks/AutoRefresh.go +++ b/flytestdlib/cache/mocks/AutoRefresh.go @@ -1,4 +1,4 @@ -// Code generated by mockery v1.0.0. DO NOT EDIT. +// Code generated by mockery v1.0.1. DO NOT EDIT. package mocks @@ -11,6 +11,24 @@ type AutoRefresh struct { mock.Mock } +type AutoRefresh_Get struct { + *mock.Call +} + +func (_m AutoRefresh_Get) Return(_a0 cache.Item, _a1 error) *AutoRefresh_Get { + return &AutoRefresh_Get{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AutoRefresh) OnGet(id string) *AutoRefresh_Get { + c := _m.On("Get", id) + return &AutoRefresh_Get{Call: c} +} + +func (_m *AutoRefresh) OnGetMatch(matchers ...interface{}) *AutoRefresh_Get { + c := _m.On("Get", matchers...) + return &AutoRefresh_Get{Call: c} +} + // Get provides a mock function with given fields: id func (_m *AutoRefresh) Get(id string) (cache.Item, error) { ret := _m.Called(id) @@ -34,6 +52,24 @@ func (_m *AutoRefresh) Get(id string) (cache.Item, error) { return r0, r1 } +type AutoRefresh_GetOrCreate struct { + *mock.Call +} + +func (_m AutoRefresh_GetOrCreate) Return(_a0 cache.Item, _a1 error) *AutoRefresh_GetOrCreate { + return &AutoRefresh_GetOrCreate{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AutoRefresh) OnGetOrCreate(id string, item cache.Item) *AutoRefresh_GetOrCreate { + c := _m.On("GetOrCreate", id, item) + return &AutoRefresh_GetOrCreate{Call: c} +} + +func (_m *AutoRefresh) OnGetOrCreateMatch(matchers ...interface{}) *AutoRefresh_GetOrCreate { + c := _m.On("GetOrCreate", matchers...) + return &AutoRefresh_GetOrCreate{Call: c} +} + // GetOrCreate provides a mock function with given fields: id, item func (_m *AutoRefresh) GetOrCreate(id string, item cache.Item) (cache.Item, error) { ret := _m.Called(id, item) @@ -57,6 +93,24 @@ func (_m *AutoRefresh) GetOrCreate(id string, item cache.Item) (cache.Item, erro return r0, r1 } +type AutoRefresh_Start struct { + *mock.Call +} + +func (_m AutoRefresh_Start) Return(_a0 error) *AutoRefresh_Start { + return &AutoRefresh_Start{Call: _m.Call.Return(_a0)} +} + +func (_m *AutoRefresh) OnStart(ctx context.Context) *AutoRefresh_Start { + c := _m.On("Start", ctx) + return &AutoRefresh_Start{Call: c} +} + +func (_m *AutoRefresh) OnStartMatch(matchers ...interface{}) *AutoRefresh_Start { + c := _m.On("Start", matchers...) + return &AutoRefresh_Start{Call: c} +} + // Start provides a mock function with given fields: ctx func (_m *AutoRefresh) Start(ctx context.Context) error { ret := _m.Called(ctx) diff --git a/flytestdlib/cache/mocks/Item.go b/flytestdlib/cache/mocks/Item.go index ddb64732ec..23dd8c5bb7 100644 --- a/flytestdlib/cache/mocks/Item.go +++ b/flytestdlib/cache/mocks/Item.go @@ -1,4 +1,4 @@ -// Code generated by mockery v1.0.0. DO NOT EDIT. +// Code generated by mockery v1.0.1. DO NOT EDIT. package mocks diff --git a/flytestdlib/cache/mocks/ItemWrapper.go b/flytestdlib/cache/mocks/ItemWrapper.go index d53cde272e..4deb009a8a 100644 --- a/flytestdlib/cache/mocks/ItemWrapper.go +++ b/flytestdlib/cache/mocks/ItemWrapper.go @@ -1,4 +1,4 @@ -// Code generated by mockery v1.0.0. DO NOT EDIT. +// Code generated by mockery v1.0.1. DO NOT EDIT. package mocks @@ -10,6 +10,24 @@ type ItemWrapper struct { mock.Mock } +type ItemWrapper_GetID struct { + *mock.Call +} + +func (_m ItemWrapper_GetID) Return(_a0 string) *ItemWrapper_GetID { + return &ItemWrapper_GetID{Call: _m.Call.Return(_a0)} +} + +func (_m *ItemWrapper) OnGetID() *ItemWrapper_GetID { + c := _m.On("GetID") + return &ItemWrapper_GetID{Call: c} +} + +func (_m *ItemWrapper) OnGetIDMatch(matchers ...interface{}) *ItemWrapper_GetID { + c := _m.On("GetID", matchers...) + return &ItemWrapper_GetID{Call: c} +} + // GetID provides a mock function with given fields: func (_m *ItemWrapper) GetID() string { ret := _m.Called() @@ -24,6 +42,24 @@ func (_m *ItemWrapper) GetID() string { return r0 } +type ItemWrapper_GetItem struct { + *mock.Call +} + +func (_m ItemWrapper_GetItem) Return(_a0 cache.Item) *ItemWrapper_GetItem { + return &ItemWrapper_GetItem{Call: _m.Call.Return(_a0)} +} + +func (_m *ItemWrapper) OnGetItem() *ItemWrapper_GetItem { + c := _m.On("GetItem") + return &ItemWrapper_GetItem{Call: c} +} + +func (_m *ItemWrapper) OnGetItemMatch(matchers ...interface{}) *ItemWrapper_GetItem { + c := _m.On("GetItem", matchers...) + return &ItemWrapper_GetItem{Call: c} +} + // GetItem provides a mock function with given fields: func (_m *ItemWrapper) GetItem() cache.Item { ret := _m.Called() diff --git a/flytestdlib/logger/config_flags_test.go b/flytestdlib/logger/config_flags_test.go index 03b9878515..fd2ce27db2 100755 --- a/flytestdlib/logger/config_flags_test.go +++ b/flytestdlib/logger/config_flags_test.go @@ -188,69 +188,3 @@ func TestConfig_SetFlags(t *testing.T) { }) }) } - -func TestConfig_elemValueOrNil(t *testing.T) { - type fields struct { - IncludeSourceCode bool - Mute bool - Level Level - Formatter FormatterConfig - } - type args struct { - v interface{} - } - tests := []struct { - name string - fields fields - args args - want interface{} - }{ - // TODO: Add test cases. - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - c := Config{ - IncludeSourceCode: tt.fields.IncludeSourceCode, - Mute: tt.fields.Mute, - Level: tt.fields.Level, - Formatter: tt.fields.Formatter, - } - if got := c.elemValueOrNil(tt.args.v); !reflect.DeepEqual(got, tt.want) { - t.Errorf("Config.elemValueOrNil() = %v, want %v", got, tt.want) - } - }) - } -} - -func TestConfig_mustMarshalJSON(t *testing.T) { - type fields struct { - IncludeSourceCode bool - Mute bool - Level Level - Formatter FormatterConfig - } - type args struct { - v json.Marshaler - } - tests := []struct { - name string - fields fields - args args - want string - }{ - // TODO: Add test cases. - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - c := Config{ - IncludeSourceCode: tt.fields.IncludeSourceCode, - Mute: tt.fields.Mute, - Level: tt.fields.Level, - Formatter: tt.fields.Formatter, - } - if got := c.mustMarshalJSON(tt.args.v); got != tt.want { - t.Errorf("Config.mustMarshalJSON() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/flytestdlib/logger/logger.go b/flytestdlib/logger/logger.go index f1c847542c..9c21ae7bd5 100644 --- a/flytestdlib/logger/logger.go +++ b/flytestdlib/logger/logger.go @@ -16,8 +16,6 @@ import ( "github.com/sirupsen/logrus" ) -//go:generate gotests -w -all $FILE - const ( indentLevelKey contextutils.Key = "LoggerIndentLevel" sourceCodeKey string = "src" diff --git a/flytestdlib/random/mocks/WeightedRandomList.go b/flytestdlib/random/mocks/WeightedRandomList.go deleted file mode 100644 index 38c7318065..0000000000 --- a/flytestdlib/random/mocks/WeightedRandomList.go +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by mockery v1.0.0. DO NOT EDIT. - -package mocks - -import mock "github.com/stretchr/testify/mock" -import rand "math/rand" -import random "github.com/lyft/flytestdlib/random" - -// WeightedRandomList is an autogenerated mock type for the WeightedRandomList type -type WeightedRandomList struct { - mock.Mock -} - -// Get provides a mock function with given fields: -func (_m *WeightedRandomList) Get() random.Comparable { - ret := _m.Called() - - var r0 random.Comparable - if rf, ok := ret.Get(0).(func() random.Comparable); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(random.Comparable) - } - } - - return r0 -} - -// GetWithSeed provides a mock function with given fields: seed -func (_m *WeightedRandomList) GetWithSeed(seed rand.Source) (random.Comparable, error) { - ret := _m.Called(seed) - - var r0 random.Comparable - if rf, ok := ret.Get(0).(func(rand.Source) random.Comparable); ok { - r0 = rf(seed) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(random.Comparable) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(rand.Source) error); ok { - r1 = rf(seed) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Len provides a mock function with given fields: -func (_m *WeightedRandomList) Len() int { - ret := _m.Called() - - var r0 int - if rf, ok := ret.Get(0).(func() int); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int) - } - - return r0 -} - -// List provides a mock function with given fields: -func (_m *WeightedRandomList) List() []random.Comparable { - ret := _m.Called() - - var r0 []random.Comparable - if rf, ok := ret.Get(0).(func() []random.Comparable); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]random.Comparable) - } - } - - return r0 -} diff --git a/flytestdlib/random/mocks/comparable.go b/flytestdlib/random/mocks/comparable.go new file mode 100644 index 0000000000..4cd553aba0 --- /dev/null +++ b/flytestdlib/random/mocks/comparable.go @@ -0,0 +1,43 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" +import random "github.com/lyft/flytestdlib/random" + +// Comparable is an autogenerated mock type for the Comparable type +type Comparable struct { + mock.Mock +} + +type Comparable_Compare struct { + *mock.Call +} + +func (_m Comparable_Compare) Return(_a0 bool) *Comparable_Compare { + return &Comparable_Compare{Call: _m.Call.Return(_a0)} +} + +func (_m *Comparable) OnCompare(to random.Comparable) *Comparable_Compare { + c := _m.On("Compare", to) + return &Comparable_Compare{Call: c} +} + +func (_m *Comparable) OnCompareMatch(matchers ...interface{}) *Comparable_Compare { + c := _m.On("Compare", matchers...) + return &Comparable_Compare{Call: c} +} + +// Compare provides a mock function with given fields: to +func (_m *Comparable) Compare(to random.Comparable) bool { + ret := _m.Called(to) + + var r0 bool + if rf, ok := ret.Get(0).(func(random.Comparable) bool); ok { + r0 = rf(to) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} diff --git a/flytestdlib/random/mocks/weighted_random_list.go b/flytestdlib/random/mocks/weighted_random_list.go new file mode 100644 index 0000000000..0860bc2570 --- /dev/null +++ b/flytestdlib/random/mocks/weighted_random_list.go @@ -0,0 +1,153 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" +import rand "math/rand" +import random "github.com/lyft/flytestdlib/random" + +// WeightedRandomList is an autogenerated mock type for the WeightedRandomList type +type WeightedRandomList struct { + mock.Mock +} + +type WeightedRandomList_Get struct { + *mock.Call +} + +func (_m WeightedRandomList_Get) Return(_a0 random.Comparable) *WeightedRandomList_Get { + return &WeightedRandomList_Get{Call: _m.Call.Return(_a0)} +} + +func (_m *WeightedRandomList) OnGet() *WeightedRandomList_Get { + c := _m.On("Get") + return &WeightedRandomList_Get{Call: c} +} + +func (_m *WeightedRandomList) OnGetMatch(matchers ...interface{}) *WeightedRandomList_Get { + c := _m.On("Get", matchers...) + return &WeightedRandomList_Get{Call: c} +} + +// Get provides a mock function with given fields: +func (_m *WeightedRandomList) Get() random.Comparable { + ret := _m.Called() + + var r0 random.Comparable + if rf, ok := ret.Get(0).(func() random.Comparable); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(random.Comparable) + } + } + + return r0 +} + +type WeightedRandomList_GetWithSeed struct { + *mock.Call +} + +func (_m WeightedRandomList_GetWithSeed) Return(_a0 random.Comparable, _a1 error) *WeightedRandomList_GetWithSeed { + return &WeightedRandomList_GetWithSeed{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *WeightedRandomList) OnGetWithSeed(seed rand.Source) *WeightedRandomList_GetWithSeed { + c := _m.On("GetWithSeed", seed) + return &WeightedRandomList_GetWithSeed{Call: c} +} + +func (_m *WeightedRandomList) OnGetWithSeedMatch(matchers ...interface{}) *WeightedRandomList_GetWithSeed { + c := _m.On("GetWithSeed", matchers...) + return &WeightedRandomList_GetWithSeed{Call: c} +} + +// GetWithSeed provides a mock function with given fields: seed +func (_m *WeightedRandomList) GetWithSeed(seed rand.Source) (random.Comparable, error) { + ret := _m.Called(seed) + + var r0 random.Comparable + if rf, ok := ret.Get(0).(func(rand.Source) random.Comparable); ok { + r0 = rf(seed) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(random.Comparable) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(rand.Source) error); ok { + r1 = rf(seed) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type WeightedRandomList_Len struct { + *mock.Call +} + +func (_m WeightedRandomList_Len) Return(_a0 int) *WeightedRandomList_Len { + return &WeightedRandomList_Len{Call: _m.Call.Return(_a0)} +} + +func (_m *WeightedRandomList) OnLen() *WeightedRandomList_Len { + c := _m.On("Len") + return &WeightedRandomList_Len{Call: c} +} + +func (_m *WeightedRandomList) OnLenMatch(matchers ...interface{}) *WeightedRandomList_Len { + c := _m.On("Len", matchers...) + return &WeightedRandomList_Len{Call: c} +} + +// Len provides a mock function with given fields: +func (_m *WeightedRandomList) Len() int { + ret := _m.Called() + + var r0 int + if rf, ok := ret.Get(0).(func() int); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int) + } + + return r0 +} + +type WeightedRandomList_List struct { + *mock.Call +} + +func (_m WeightedRandomList_List) Return(_a0 []random.Comparable) *WeightedRandomList_List { + return &WeightedRandomList_List{Call: _m.Call.Return(_a0)} +} + +func (_m *WeightedRandomList) OnList() *WeightedRandomList_List { + c := _m.On("List") + return &WeightedRandomList_List{Call: c} +} + +func (_m *WeightedRandomList) OnListMatch(matchers ...interface{}) *WeightedRandomList_List { + c := _m.On("List", matchers...) + return &WeightedRandomList_List{Call: c} +} + +// List provides a mock function with given fields: +func (_m *WeightedRandomList) List() []random.Comparable { + ret := _m.Called() + + var r0 []random.Comparable + if rf, ok := ret.Get(0).(func() []random.Comparable); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]random.Comparable) + } + } + + return r0 +} diff --git a/flytestdlib/storage/protobuf_store_test.go b/flytestdlib/storage/protobuf_store_test.go index 44ac0c4084..ca45d80dd1 100644 --- a/flytestdlib/storage/protobuf_store_test.go +++ b/flytestdlib/storage/protobuf_store_test.go @@ -74,7 +74,8 @@ func TestDefaultProtobufStore_BigDataReadAfterWrite(t *testing.T) { bigD := make([]byte, 1.5*1024*1024) // #nosec G404 - rand.Read(bigD) + _, err = rand.Read(bigD) + assert.NoError(t, err) mockMessage := &mockBigDataProtoMessage{X: bigD} diff --git a/flytestdlib/utils/mocks/auto_refresh_cache.go b/flytestdlib/utils/mocks/auto_refresh_cache.go index 9c6f13efc2..39cec72cb3 100644 --- a/flytestdlib/utils/mocks/auto_refresh_cache.go +++ b/flytestdlib/utils/mocks/auto_refresh_cache.go @@ -1,4 +1,4 @@ -// Code generated by mockery v1.0.0. DO NOT EDIT. +// Code generated by mockery v1.0.1. DO NOT EDIT. package mocks @@ -11,6 +11,24 @@ type AutoRefreshCache struct { mock.Mock } +type AutoRefreshCache_Get struct { + *mock.Call +} + +func (_m AutoRefreshCache_Get) Return(_a0 utils.CacheItem) *AutoRefreshCache_Get { + return &AutoRefreshCache_Get{Call: _m.Call.Return(_a0)} +} + +func (_m *AutoRefreshCache) OnGet(id string) *AutoRefreshCache_Get { + c := _m.On("Get", id) + return &AutoRefreshCache_Get{Call: c} +} + +func (_m *AutoRefreshCache) OnGetMatch(matchers ...interface{}) *AutoRefreshCache_Get { + c := _m.On("Get", matchers...) + return &AutoRefreshCache_Get{Call: c} +} + // Get provides a mock function with given fields: id func (_m *AutoRefreshCache) Get(id string) utils.CacheItem { ret := _m.Called(id) @@ -27,6 +45,24 @@ func (_m *AutoRefreshCache) Get(id string) utils.CacheItem { return r0 } +type AutoRefreshCache_GetOrCreate struct { + *mock.Call +} + +func (_m AutoRefreshCache_GetOrCreate) Return(_a0 utils.CacheItem, _a1 error) *AutoRefreshCache_GetOrCreate { + return &AutoRefreshCache_GetOrCreate{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AutoRefreshCache) OnGetOrCreate(item utils.CacheItem) *AutoRefreshCache_GetOrCreate { + c := _m.On("GetOrCreate", item) + return &AutoRefreshCache_GetOrCreate{Call: c} +} + +func (_m *AutoRefreshCache) OnGetOrCreateMatch(matchers ...interface{}) *AutoRefreshCache_GetOrCreate { + c := _m.On("GetOrCreate", matchers...) + return &AutoRefreshCache_GetOrCreate{Call: c} +} + // GetOrCreate provides a mock function with given fields: item func (_m *AutoRefreshCache) GetOrCreate(item utils.CacheItem) (utils.CacheItem, error) { ret := _m.Called(item) diff --git a/flytestdlib/utils/mocks/cache_item.go b/flytestdlib/utils/mocks/cache_item.go index b802e5bbab..5f69a24d7b 100644 --- a/flytestdlib/utils/mocks/cache_item.go +++ b/flytestdlib/utils/mocks/cache_item.go @@ -1,4 +1,4 @@ -// Code generated by mockery v1.0.0. DO NOT EDIT. +// Code generated by mockery v1.0.1. DO NOT EDIT. package mocks @@ -9,6 +9,24 @@ type CacheItem struct { mock.Mock } +type CacheItem_ID struct { + *mock.Call +} + +func (_m CacheItem_ID) Return(_a0 string) *CacheItem_ID { + return &CacheItem_ID{Call: _m.Call.Return(_a0)} +} + +func (_m *CacheItem) OnID() *CacheItem_ID { + c := _m.On("ID") + return &CacheItem_ID{Call: c} +} + +func (_m *CacheItem) OnIDMatch(matchers ...interface{}) *CacheItem_ID { + c := _m.On("ID", matchers...) + return &CacheItem_ID{Call: c} +} + // ID provides a mock function with given fields: func (_m *CacheItem) ID() string { ret := _m.Called() diff --git a/flytestdlib/utils/mocks/rate_limiter.go b/flytestdlib/utils/mocks/rate_limiter.go index 7a10626e92..d1eec57b9d 100644 --- a/flytestdlib/utils/mocks/rate_limiter.go +++ b/flytestdlib/utils/mocks/rate_limiter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v1.0.0. DO NOT EDIT. +// Code generated by mockery v1.0.1. DO NOT EDIT. package mocks @@ -10,6 +10,24 @@ type RateLimiter struct { mock.Mock } +type RateLimiter_Wait struct { + *mock.Call +} + +func (_m RateLimiter_Wait) Return(_a0 error) *RateLimiter_Wait { + return &RateLimiter_Wait{Call: _m.Call.Return(_a0)} +} + +func (_m *RateLimiter) OnWait(ctx context.Context) *RateLimiter_Wait { + c := _m.On("Wait", ctx) + return &RateLimiter_Wait{Call: c} +} + +func (_m *RateLimiter) OnWaitMatch(matchers ...interface{}) *RateLimiter_Wait { + c := _m.On("Wait", matchers...) + return &RateLimiter_Wait{Call: c} +} + // Wait provides a mock function with given fields: ctx func (_m *RateLimiter) Wait(ctx context.Context) error { ret := _m.Called(ctx) diff --git a/flytestdlib/utils/mocks/sequencer.go b/flytestdlib/utils/mocks/sequencer.go index 0fc724b412..ac5843698d 100644 --- a/flytestdlib/utils/mocks/sequencer.go +++ b/flytestdlib/utils/mocks/sequencer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v1.0.0. DO NOT EDIT. +// Code generated by mockery v1.0.1. DO NOT EDIT. package mocks @@ -9,6 +9,24 @@ type Sequencer struct { mock.Mock } +type Sequencer_GetCur struct { + *mock.Call +} + +func (_m Sequencer_GetCur) Return(_a0 uint64) *Sequencer_GetCur { + return &Sequencer_GetCur{Call: _m.Call.Return(_a0)} +} + +func (_m *Sequencer) OnGetCur() *Sequencer_GetCur { + c := _m.On("GetCur") + return &Sequencer_GetCur{Call: c} +} + +func (_m *Sequencer) OnGetCurMatch(matchers ...interface{}) *Sequencer_GetCur { + c := _m.On("GetCur", matchers...) + return &Sequencer_GetCur{Call: c} +} + // GetCur provides a mock function with given fields: func (_m *Sequencer) GetCur() uint64 { ret := _m.Called() @@ -23,6 +41,24 @@ func (_m *Sequencer) GetCur() uint64 { return r0 } +type Sequencer_GetNext struct { + *mock.Call +} + +func (_m Sequencer_GetNext) Return(_a0 uint64) *Sequencer_GetNext { + return &Sequencer_GetNext{Call: _m.Call.Return(_a0)} +} + +func (_m *Sequencer) OnGetNext() *Sequencer_GetNext { + c := _m.On("GetNext") + return &Sequencer_GetNext{Call: c} +} + +func (_m *Sequencer) OnGetNextMatch(matchers ...interface{}) *Sequencer_GetNext { + c := _m.On("GetNext", matchers...) + return &Sequencer_GetNext{Call: c} +} + // GetNext provides a mock function with given fields: func (_m *Sequencer) GetNext() uint64 { ret := _m.Called() From 066b6000f8b819de0c49bc8d10d9a8f57dc1332d Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Wed, 16 Oct 2019 13:27:25 -0700 Subject: [PATCH 079/191] Auto refresh cache ill-formatted log line (#42) - Log line should include the error and should be of type Errorf --- flytestdlib/utils/auto_refresh_cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index d7d07a18bd..9a72d22105 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -137,7 +137,7 @@ func (w *autoRefreshCache) sync(ctx context.Context) { if value, ok := w.lruMap.Peek(k); ok { newItem, result, err := w.syncCb(ctx, value.(CacheItem)) if err != nil { - logger.Error(ctx, "failed to get latest copy of the item %v", k) + logger.Errorf(ctx, "failed to get latest copy of the item %v, error: %s", k, err) } if result == Update { From 2fc433933f31108778f177b64ee26ff7283e99d3 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Thu, 17 Oct 2019 15:40:52 -0700 Subject: [PATCH 080/191] Add cache hit/miss to Autorefresh cache (#43) * Add metrics and name for cache * Mark autorefresh cache as deprecated * Remove items from the workqueue after they're processed --- flytestdlib/cache/auto_refresh.go | 81 +++++++++++++------ .../cache/auto_refresh_example_test.go | 2 +- flytestdlib/cache/auto_refresh_test.go | 45 ++++++++++- flytestdlib/utils/auto_refresh_cache.go | 5 ++ 4 files changed, 104 insertions(+), 29 deletions(-) diff --git a/flytestdlib/cache/auto_refresh.go b/flytestdlib/cache/auto_refresh.go index e07d54f7d5..b9298a384e 100644 --- a/flytestdlib/cache/auto_refresh.go +++ b/flytestdlib/cache/auto_refresh.go @@ -32,7 +32,7 @@ const ( // callbacks for create, refresh and delete item. // The cache doesn't provide apis to update items. type AutoRefresh interface { - // starts background refresh of items. + // Starts background refresh of items. To shutdown the cache, cancel the context. Start(ctx context.Context) error // Get item by id. @@ -43,9 +43,12 @@ type AutoRefresh interface { } type metrics struct { - SystemErrors prometheus.Counter - Evictions prometheus.Counter - scope promutils.Scope + SyncErrors prometheus.Counter + Evictions prometheus.Counter + SyncLatency promutils.StopWatch + CacheHit prometheus.Counter + CacheMiss prometheus.Counter + scope promutils.Scope } type Item interface{} @@ -104,6 +107,7 @@ func (i itemWrapper) GetItem() Item { // // Sync is run as a fixed-interval-scheduled-task, and is skipped if sync from previous cycle is still running. type autoRefresh struct { + name string metrics metrics syncCb SyncFunc createBatchesCb CreateBatchesFunc @@ -130,9 +134,12 @@ func SingleItemBatches(_ context.Context, snapshot []ItemWrapper) (batches []Bat func newMetrics(scope promutils.Scope) metrics { return metrics{ - Evictions: scope.MustNewCounter("lru_evictions", "Counter for evictions from LRU."), - SystemErrors: scope.MustNewCounter("sync_errors", "Counter for sync errors."), - scope: scope, + SyncErrors: scope.MustNewCounter("sync_errors", "Counter for sync errors."), + Evictions: scope.MustNewCounter("lru_evictions", "Counter for evictions from LRU."), + SyncLatency: scope.MustNewStopWatch("latency", "Latency for sync operations.", time.Millisecond), + CacheHit: scope.MustNewCounter("cache_hit", "Counter for cache hits."), + CacheMiss: scope.MustNewCounter("cache_miss", "Counter for cache misses."), + scope: scope, } } @@ -143,24 +150,28 @@ func (w *autoRefresh) Start(ctx context.Context) error { if err != nil { logger.Errorf(ctx, "Failed to sync. Error: %v", err) } - }(contextutils.WithGoroutineLabel(ctx, fmt.Sprintf("worker-%v", i))) + }(contextutils.WithGoroutineLabel(ctx, fmt.Sprintf("%v-worker-%v", w.name, i))) } + enqueueCtx := contextutils.WithGoroutineLabel(ctx, fmt.Sprintf("%v-enqueue", w.name)) + go wait.Until(func() { - err := w.enqueueBatches(ctx) + err := w.enqueueBatches(enqueueCtx) if err != nil { - logger.Errorf(ctx, "Failed to sync. Error: %v", err) + logger.Errorf(enqueueCtx, "Failed to sync. Error: %v", err) } - }, w.syncPeriod, ctx.Done()) + }, w.syncPeriod, enqueueCtx.Done()) return nil } func (w *autoRefresh) Get(id ItemID) (Item, error) { if val, ok := w.lruMap.Get(id); ok { + w.metrics.CacheHit.Inc() return val.(Item), nil } + w.metrics.CacheMiss.Inc() return nil, errors.Errorf(ErrNotFound, "Item with id [%v] not found.", id) } @@ -168,10 +179,12 @@ func (w *autoRefresh) Get(id ItemID) (Item, error) { // Create should be invoked only once. recreating the object is not supported. func (w *autoRefresh) GetOrCreate(id ItemID, item Item) (Item, error) { if val, ok := w.lruMap.Get(id); ok { + w.metrics.CacheHit.Inc() return val.(Item), nil } w.lruMap.Add(id, item) + w.metrics.CacheMiss.Inc() return item, nil } @@ -218,28 +231,43 @@ func (w *autoRefresh) enqueueBatches(ctx context.Context) error { // * Sync loop updates item 2, repeat func (w *autoRefresh) sync(ctx context.Context) error { for { - item, shutdown := w.workqueue.Get() - if shutdown { + select { + case <-ctx.Done(): return nil - } + default: + item, shutdown := w.workqueue.Get() + if shutdown { + return nil + } - updatedBatch, err := w.syncCb(ctx, *item.(*Batch)) - if err != nil { - logger.Error(ctx, "failed to get latest copy of a batch. Error: %v", err) - continue - } + t := w.metrics.SyncLatency.Start() + updatedBatch, err := w.syncCb(ctx, *item.(*Batch)) + + // Since we create batches every time we sync, we will just remove the item from the queue here + // regardless of whether it succeeded the sync or not. + w.workqueue.Forget(item) + w.workqueue.Done(item) + + if err != nil { + w.metrics.SyncErrors.Inc() + logger.Errorf(ctx, "failed to get latest copy of a batch. Error: %v", err) + t.Stop() + continue + } - for _, item := range updatedBatch { - if item.Action == Update { - // Add adds the item if it has been evicted or updates an existing one. - w.lruMap.Add(item.ID, item.Item) + for _, item := range updatedBatch { + if item.Action == Update { + // Add adds the item if it has been evicted or updates an existing one. + w.lruMap.Add(item.ID, item.Item) + } } + t.Stop() } } } // Instantiates a new AutoRefresh Cache that syncs items in batches. -func NewAutoRefreshBatchedCache(createBatches CreateBatchesFunc, syncCb SyncFunc, syncRateLimiter workqueue.RateLimiter, +func NewAutoRefreshBatchedCache(name string, createBatches CreateBatchesFunc, syncCb SyncFunc, syncRateLimiter workqueue.RateLimiter, resyncPeriod time.Duration, parallelizm, size int, scope promutils.Scope) (AutoRefresh, error) { metrics := newMetrics(scope) @@ -249,6 +277,7 @@ func NewAutoRefreshBatchedCache(createBatches CreateBatchesFunc, syncCb SyncFunc } cache := &autoRefresh{ + name: name, metrics: metrics, parallelizm: parallelizm, createBatchesCb: createBatches, @@ -262,8 +291,8 @@ func NewAutoRefreshBatchedCache(createBatches CreateBatchesFunc, syncCb SyncFunc } // Instantiates a new AutoRefresh Cache that syncs items periodically. -func NewAutoRefreshCache(syncCb SyncFunc, syncRateLimiter workqueue.RateLimiter, resyncPeriod time.Duration, +func NewAutoRefreshCache(name string, syncCb SyncFunc, syncRateLimiter workqueue.RateLimiter, resyncPeriod time.Duration, parallelizm, size int, scope promutils.Scope) (AutoRefresh, error) { - return NewAutoRefreshBatchedCache(SingleItemBatches, syncCb, syncRateLimiter, resyncPeriod, parallelizm, size, scope) + return NewAutoRefreshBatchedCache(name, SingleItemBatches, syncCb, syncRateLimiter, resyncPeriod, parallelizm, size, scope) } diff --git a/flytestdlib/cache/auto_refresh_example_test.go b/flytestdlib/cache/auto_refresh_example_test.go index 1b5873c7ee..27fbec281e 100644 --- a/flytestdlib/cache/auto_refresh_example_test.go +++ b/flytestdlib/cache/auto_refresh_example_test.go @@ -88,7 +88,7 @@ func ExampleNewAutoRefreshCache() { // since cache refreshes itself asynchronously, it may not notice that an object has been deleted immediately, // so users of the cache should have the delete logic aware of this shortcoming (eg. not-exists may be a valid // error during removal if based on status in cache). - cache, err := NewAutoRefreshCache(syncItemCb, rateLimiter, resyncPeriod, 10, 100, promutils.NewTestScope()) + cache, err := NewAutoRefreshCache("my-cache", syncItemCb, rateLimiter, resyncPeriod, 10, 100, promutils.NewTestScope()) if err != nil { panic(err) } diff --git a/flytestdlib/cache/auto_refresh_test.go b/flytestdlib/cache/auto_refresh_test.go index 77723e068e..b5df48883d 100644 --- a/flytestdlib/cache/auto_refresh_test.go +++ b/flytestdlib/cache/auto_refresh_test.go @@ -3,9 +3,13 @@ package cache import ( "context" "fmt" + "strconv" + "sync" "testing" "time" + "github.com/lyft/flytestdlib/atomic" + "k8s.io/client-go/util/workqueue" "github.com/lyft/flytestdlib/errors" @@ -48,7 +52,7 @@ func TestCacheTwo(t *testing.T) { t.Run("normal operation", func(t *testing.T) { // the size of the cache is at least as large as the number of items we're storing - cache, err := NewAutoRefreshCache(syncFakeItem, rateLimiter, testResyncPeriod, 10, 10, promutils.NewTestScope()) + cache, err := NewAutoRefreshCache("fake1", syncFakeItem, rateLimiter, testResyncPeriod, 10, 10, promutils.NewTestScope()) assert.NoError(t, err) ctx, cancel := context.WithCancel(context.Background()) @@ -74,7 +78,7 @@ func TestCacheTwo(t *testing.T) { t.Run("Not Found", func(t *testing.T) { // the size of the cache is at least as large as the number of items we're storing - cache, err := NewAutoRefreshCache(syncFakeItem, rateLimiter, testResyncPeriod, 10, 2, promutils.NewTestScope()) + cache, err := NewAutoRefreshCache("fake2", syncFakeItem, rateLimiter, testResyncPeriod, 10, 2, promutils.NewTestScope()) assert.NoError(t, err) ctx, cancel := context.WithCancel(context.Background()) @@ -101,3 +105,40 @@ func TestCacheTwo(t *testing.T) { cancel() }) } + +func TestQueueBuildUp(t *testing.T) { + testResyncPeriod := time.Hour + rateLimiter := workqueue.DefaultControllerRateLimiter() + + syncCount := atomic.NewInt32(0) + m := sync.Map{} + alwaysFailing := func(ctx context.Context, batch Batch) ( + updatedBatch []ItemSyncResponse, err error) { + assert.Len(t, batch, 1) + _, existing := m.LoadOrStore(batch[0].GetID(), 0) + assert.False(t, existing, "Saw %v before", batch[0].GetID()) + if existing { + t.FailNow() + } + + syncCount.Inc() + return nil, fmt.Errorf("expected error") + } + + size := 100 + cache, err := NewAutoRefreshCache("fake2", alwaysFailing, rateLimiter, testResyncPeriod, 10, size, promutils.NewTestScope()) + assert.NoError(t, err) + + ctx := context.Background() + ctx, cancelNow := context.WithCancel(ctx) + defer cancelNow() + + for i := 0; i < size; i++ { + _, err := cache.GetOrCreate(strconv.Itoa(i), "test") + assert.NoError(t, err) + } + + assert.NoError(t, cache.Start(ctx)) + time.Sleep(5 * time.Second) + assert.Equal(t, int32(size), syncCount.Load()) +} diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index 9a72d22105..e9c22e2ed5 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -16,6 +16,7 @@ import ( // AutoRefreshCache with regular GetOrCreate and Delete along with background asynchronous refresh. Caller provides // callbacks for create, refresh and delete item. // The cache doesn't provide apis to update items. +// Deprecated: This utility is deprecated, it has been refactored and moved into `cache` package. type AutoRefreshCache interface { // starts background refresh of items Start(ctx context.Context) @@ -27,11 +28,13 @@ type AutoRefreshCache interface { GetOrCreate(item CacheItem) (CacheItem, error) } +// Deprecated: This utility is deprecated, it has been refactored and moved into `cache` package. type CacheItem interface { ID() string } // Possible actions for the cache to take as a result of running the sync function on any given cache item +// Deprecated: This utility is deprecated, it has been refactored and moved into `cache` package. type CacheSyncAction int const ( @@ -48,6 +51,7 @@ const ( // 1. The new CacheItem, and // 2. What action should be taken. The sync function has no insight into your object, and needs to be // told explicitly if the new item is different from the old one. +// Deprecated: This utility is deprecated, it has been refactored and moved into `cache` package. type CacheSyncItem func(ctx context.Context, obj CacheItem) ( newItem CacheItem, result CacheSyncAction, err error) @@ -57,6 +61,7 @@ func getEvictionFunction(counter prometheus.Counter) func(key interface{}, value } } +// Deprecated: This utility is deprecated, it has been refactored and moved into `cache` package. func NewAutoRefreshCache(syncCb CacheSyncItem, syncRateLimiter RateLimiter, resyncPeriod time.Duration, size int, scope promutils.Scope) (AutoRefreshCache, error) { From 73b83f089904a8fe096b0037caffebb9b2d2a85f Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Mon, 21 Oct 2019 14:11:59 -0700 Subject: [PATCH 081/191] Implement Go 1.13 error interfaces (#44) * Implement Go 1.13 error interfaces * Update comment --- flytestdlib/Gopkg.lock | 71 ++++++++++++++++---------------- flytestdlib/errors/error.go | 15 +++++++ flytestdlib/errors/error_test.go | 21 ++++++++++ 3 files changed, 72 insertions(+), 35 deletions(-) diff --git a/flytestdlib/Gopkg.lock b/flytestdlib/Gopkg.lock index 0808fed3e5..2a1403cb51 100644 --- a/flytestdlib/Gopkg.lock +++ b/flytestdlib/Gopkg.lock @@ -6,8 +6,8 @@ name = "cloud.google.com/go" packages = ["compute/metadata"] pruneopts = "UT" - revision = "264def2dd949cdb8a803bb9f50fa29a67b798a6a" - version = "v0.46.3" + revision = "cfe8f6d1fe6976d03af790d7a8b9bf6aa73287bd" + version = "v0.47.0" [[projects]] digest = "1:94d4ae958b3d2ab476bef4bed53c1dcc3cb0fb2639bd45dd08b40e57139192e5" @@ -18,7 +18,7 @@ version = "v10.2.1-beta" [[projects]] - digest = "1:c3d8d652ba193a848d6d0a6f3caa81e68000aa93d2bde5a4c405c2c1a1d2a434" + digest = "1:0f857a863c24bb1c277a5f3f8cb8a30e65b841405f69590132ee23ed9e7e6fbe" name = "github.com/Azure/go-autorest" packages = [ "autorest", @@ -29,11 +29,11 @@ "tracing", ] pruneopts = "UT" - revision = "69b4126ece6b5257e2f9b0017007d2334153655f" - version = "v13.0.1" + revision = "740293c019d8314ce3378d456b4327fa646297e6" + version = "v13.2.0" [[projects]] - digest = "1:59ccee5f27c0cf22f9260f32b6b4215db9feb9194fe55e5d0171ee632c214307" + digest = "1:d6d2147f37d72e0eb77c60830247f7ce48252815b651f527cd7ea4b2c030daca" name = "github.com/aws/aws-sdk-go" packages = [ "aws", @@ -77,8 +77,8 @@ "service/sts/stsiface", ] pruneopts = "UT" - revision = "f3c0262d0d7fcb67869af3bd73909e0d030f7288" - version = "v1.25.0" + revision = "4b77f7c2f7303e8c757947ae8aff6a33dce7b8d1" + version = "v1.25.16" [[projects]] branch = "master" @@ -148,20 +148,20 @@ version = "v1.7.0" [[projects]] - digest = "1:060e2ff7ee3e51b4a0fadf46308033bfe3b8030af6a8078ec26916e2e9b2fdc3" + digest = "1:095ce7caddb44305037c22444736794a96b7f54b2420546b08594aef2e68617b" name = "github.com/fatih/structtag" packages = ["."] pruneopts = "UT" - revision = "76ae1d6d2117609598c7d4e8f3e938145f204e8f" - version = "v1.0.0" + revision = "3878f9fb88e63e26ea1e6c97ab985cb55452fee5" + version = "v1.1.0" [[projects]] branch = "master" - digest = "1:78a5b63751bd99054bee07a498f6aa54da0a909922f9365d1aa3339091efa70a" + digest = "1:925a2ad8acf10a486cdae4366eaf45847b16d6d7448e654814d8f1d51adeefe4" name = "github.com/fsnotify/fsnotify" packages = ["."] pruneopts = "UT" - revision = "1485a34d5d5723fea214f5710708e19a831720e4" + revision = "4bf2d1fec78374803a39307bfb8d340688f4f28e" [[projects]] digest = "1:2cd7915ab26ede7d95b8749e6b1f933f1c6d5398030684e6505940a10f31cfda" @@ -177,7 +177,7 @@ name = "github.com/golang/groupcache" packages = ["lru"] pruneopts = "UT" - revision = "869f871628b6baa9cfbc11732cdf6546b17c1298" + revision = "404acd9df4cc9859d64fb9eed42e5c026187287a" [[projects]] digest = "1:549b3770feea703d7cf55822b7b2e1b1afce35ea5034d9a1388249f3c65fbb98" @@ -291,12 +291,12 @@ version = "v0.0.9" [[projects]] - digest = "1:36325ebb862e0382f2f14feef409ba9351271b89ada286ae56836c603d43b59c" + digest = "1:d62282425ffb75047679d7e2c3b980eea7f82c05ef5fb9142ee617ebac6e7432" name = "github.com/mattn/go-isatty" packages = ["."] pruneopts = "UT" - revision = "e1f7b56ace729e4a73a29a6b4fac6cd5fcda7ab3" - version = "v0.0.9" + revision = "88ba11cfdc67c7588b30042edf244b2875f892b6" + version = "v0.0.10" [[projects]] digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" @@ -323,12 +323,12 @@ revision = "a24ef33bc9b7e59ae4bed9e87a51d7bc76122731" [[projects]] - digest = "1:93131d8002d7025da13582877c32d1fc302486775a1b06f62241741006428c5e" + digest = "1:bbd3997f0121200f72b64d7a3826eb8a0b910d6a4c19894c9fe2852b9e5eaf3b" name = "github.com/pelletier/go-toml" packages = ["."] pruneopts = "UT" - revision = "728039f679cbcd4f6a54e080d2219a4c4928c546" - version = "v1.4.0" + revision = "8fe62057ea2d46ce44254c98e84e810044dbe197" + version = "v1.5.0" [[projects]] digest = "1:cf31692c14422fa27c83a05292eb5cbe0fb2775972e8f1f8446a71549bd8980b" @@ -502,7 +502,7 @@ [[projects]] branch = "master" - digest = "1:7a4eaae8773e8fccca11c5c60d5393235e2dc880356f1dc6bc753b114f17e0e6" + digest = "1:2ce67db9864088dee35dab5967f041d2b4ae1c7440dabb44542c1847933fd872" name = "golang.org/x/net" packages = [ "context", @@ -515,7 +515,7 @@ "trace", ] pruneopts = "UT" - revision = "c00fd9afed17cfdca9b3e1e3b8de7ef2b3f0347b" + revision = "ec77196f6094c3492a8b61f2c11cf937f78992ae" [[projects]] branch = "master" @@ -533,11 +533,11 @@ [[projects]] branch = "master" - digest = "1:1b90e63244513e8514749f45da58e89350d35cb3e12416ce6ed95f41c2a1f177" + digest = "1:70b2bf25c4ed23c61dae668e4151d87a7edc5965bc3ccfecd1b9fe5f1752092a" name = "golang.org/x/sys" packages = ["unix"] pruneopts = "UT" - revision = "855e68c8590b0d6a9d08863d2982eb8aeddd98d3" + revision = "3e7259c5e7c2076bb2728047a3df75adb1bad8e5" [[projects]] digest = "1:8d8faad6b12a3a4c819a3f9618cb6ee1fa1cfc33253abeeea8b55336721e3405" @@ -574,7 +574,7 @@ [[projects]] branch = "master" - digest = "1:629a44e89cce8a4849ea4dfee1ac9fe25e8a1b7d6c2f8a01ca83b38eadce0317" + digest = "1:652982a5f8ecd4d5b2628668df8fee776d1fd416b3c24cbdf3a97b786c5bf7e8" name = "golang.org/x/tools" packages = [ "go/ast/astutil", @@ -589,13 +589,14 @@ "internal/imports", "internal/module", "internal/semver", + "internal/span", ] pruneopts = "UT" - revision = "a8d5d34286bd3ab7c348812aa4699f674c05245b" + revision = "ed542cd5b28ad1b474f8ff7ca112cad2c3ac2dc8" [[projects]] branch = "master" - digest = "1:23dcfdf20aa5a3b0233ebd8b9f7b2e688c80086506980eca96731c7adb09e235" + digest = "1:46560ca7f74372b904778dff1892aa163593d5faf8b3b4e4eba0689b72422e73" name = "google.golang.org/api" packages = [ "googleapi", @@ -609,10 +610,10 @@ "transport/http/internal/propagation", ] pruneopts = "UT" - revision = "6a149848833881cf9a0f77f7595c64550f285d87" + revision = "bf72a15fd9e96e2c95d23b53ce419201a6b45f43" [[projects]] - digest = "1:066bca8a35b34227298f7f02ab5a4b2523dcea43ad72af4c69c3451e8fd8e56b" + digest = "1:3c03b58f57452764a4499c55c582346c0ee78c8a5033affe5bdfd9efd3da5bd1" name = "google.golang.org/appengine" packages = [ ".", @@ -627,8 +628,8 @@ "urlfetch", ] pruneopts = "UT" - revision = "c71d63e301d75423acb410203c747cad31e9a5e7" - version = "v1.6.3" + revision = "971852bfffca25b069c31162ae8f247a3dba083b" + version = "v1.6.5" [[projects]] branch = "master" @@ -636,7 +637,7 @@ name = "google.golang.org/genproto" packages = ["googleapis/rpc/status"] pruneopts = "UT" - revision = "7ee9db18f195a533914d703fa8b21f3518ffd7f2" + revision = "548a555dbc03994223efbaba0090152849259498" [[projects]] digest = "1:6cd77d0b616d2dcebd363dfecba593f27b0151fc82cdb5fbfb96c5a7cfbc95b5" @@ -681,12 +682,12 @@ version = "v1.24.0" [[projects]] - digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96" + digest = "1:59f10c1537d2199d9115d946927fe31165959a95190849c82ff11e05803528b0" name = "gopkg.in/yaml.v2" packages = ["."] pruneopts = "UT" - revision = "51d6538a90f86fe93ac480b35f37b2be17fef232" - version = "v2.2.2" + revision = "f221b8435cfb71e54062f6c6e99e9ade30b124d5" + version = "v2.2.4" [[projects]] digest = "1:074fb0a8da1e416b8a201e8e664c303ae610f316ffd615b678b636d27c225412" diff --git a/flytestdlib/errors/error.go b/flytestdlib/errors/error.go index 6abb08d3cf..62f092fc7a 100644 --- a/flytestdlib/errors/error.go +++ b/flytestdlib/errors/error.go @@ -23,6 +23,16 @@ func (e *err) Code() ErrorCode { return e.code } +// Overrides Is to check for error code only. This enables the default package's errors.Is(). +func (e *err) Is(target error) bool { + t, ok := target.(*err) + if !ok { + return false + } + + return e.Code() == t.Code() +} + type errorWithCause struct { *err cause error @@ -36,6 +46,11 @@ func (e *errorWithCause) Cause() error { return e.cause } +// Overrides Unwrap to retrieve the underlying error. This enables the default package's errors.Unwrap(). +func (e *errorWithCause) Unwrap() error { + return e.Cause() +} + // Creates a new error using an error code and a message. func Errorf(errorCode ErrorCode, msgFmt string, args ...interface{}) error { return &err{ diff --git a/flytestdlib/errors/error_test.go b/flytestdlib/errors/error_test.go index b3e3dd0a51..c7b8bd9b84 100644 --- a/flytestdlib/errors/error_test.go +++ b/flytestdlib/errors/error_test.go @@ -1,6 +1,7 @@ package errors import ( + "errors" "fmt" "testing" @@ -45,3 +46,23 @@ func TestIsCausedByError(t *testing.T) { assert.True(t, IsCausedByError(e2, eRoot)) assert.True(t, IsCausedByError(e2, e1)) } + +func TestErrorsIs(t *testing.T) { + eRoot := Errorf("Code1", "msg") + assert.True(t, errors.Is(eRoot, Errorf("Code1", "different msg"))) + + e1 := Wrapf("Code2", eRoot, "Wrapped error") + assert.True(t, errors.Is(e1, Errorf("Code1", "different msg"))) +} + +func TestErrorsUnwrap(t *testing.T) { + eRoot := Errorf("Code1", "msg") + e1 := Wrapf("Code2", eRoot, "Wrapped error") + assert.True(t, errors.Is(e1, Errorf("Code1", "different msg"))) + + newErr := &err{} + assert.True(t, errors.As(e1, &newErr)) + assert.Equal(t, "Code1", newErr.Code()) + + assert.True(t, errors.Is(errors.Unwrap(e1), Errorf("Code1", "different msg"))) +} From 69cde9a457b7c0ca4be9e6e7303ea076c43d4c28 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 22 Oct 2019 15:23:20 -0700 Subject: [PATCH 082/191] Disable GO modules && use go 1.13 (#45) * Disable GO modules && use go 1.13 * Set GO111MODULE=off in Makefile * use the right golang-ci version * More ci fixes * lint * lint --- flytestdlib/.goreleaser.yml | 3 ++- flytestdlib/.travis.yml | 2 +- flytestdlib/Makefile | 1 + .../lyft/golang_test_targets/Makefile | 4 ++-- flytestdlib/cache/auto_refresh.go | 19 ++++++++++++++++++- flytestdlib/cli/pflags/api/generator.go | 3 ++- flytestdlib/cli/pflags/api/utils.go | 15 +++++++-------- flytestdlib/config/config_cmd_test.go | 12 ++++++------ flytestdlib/config/tests/accessor_test.go | 4 ++++ flytestdlib/profutils/server.go | 1 + 10 files changed, 44 insertions(+), 20 deletions(-) diff --git a/flytestdlib/.goreleaser.yml b/flytestdlib/.goreleaser.yml index 6e193fe0e9..b76a7ace86 100644 --- a/flytestdlib/.goreleaser.yml +++ b/flytestdlib/.goreleaser.yml @@ -1,9 +1,10 @@ before: hooks: - - dep ensure -vendor-only + - GO111MODULE=off dep ensure -vendor-only builds: - env: - CGO_ENABLED=0 + - GO111MODULE=off main: ./cli/pflags/main.go binary: pflags goos: diff --git a/flytestdlib/.travis.yml b/flytestdlib/.travis.yml index 2f28738cd9..e7e7d81ff6 100644 --- a/flytestdlib/.travis.yml +++ b/flytestdlib/.travis.yml @@ -1,7 +1,7 @@ sudo: required language: go go: -- '1.11' +- '1.13' jobs: include: - stage: test diff --git a/flytestdlib/Makefile b/flytestdlib/Makefile index 211f908f0a..f94e483ca8 100644 --- a/flytestdlib/Makefile +++ b/flytestdlib/Makefile @@ -1,3 +1,4 @@ +export GO111MODULE=off export REPOSITORY=flytestdlib include boilerplate/lyft/golang_test_targets/Makefile diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile index 04b79ba99e..1a4b1be172 100644 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile @@ -1,6 +1,6 @@ .PHONY: lint lint: #lints the package for common code smells - which golangci-lint || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $$GOPATH/bin v1.11 + which golangci-lint || GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint golangci-lint run # If code is failing goimports linter, this will fix. @@ -28,4 +28,4 @@ test_unit_cover: .PHONY: test_unit_visual test_unit_visual: - go test ./... -coverprofile /tmp/cover.out -covermode=count; go tool cover -html=/tmp/cover.out + go test ./... -coverprofile /tmp/cover.out -covermode=count; go tool cover -html=/tmp/cover.out diff --git a/flytestdlib/cache/auto_refresh.go b/flytestdlib/cache/auto_refresh.go index b9298a384e..a5a655be7f 100644 --- a/flytestdlib/cache/auto_refresh.go +++ b/flytestdlib/cache/auto_refresh.go @@ -229,7 +229,23 @@ func (w *autoRefresh) enqueueBatches(ctx context.Context) error { // * Plugin asks for update on item 1 - cache evicts item 2, stores 1 and returns it unchanged // * Plugin asks for update on item 2 - cache evicts item 1, stores 2 and returns it unchanged // * Sync loop updates item 2, repeat -func (w *autoRefresh) sync(ctx context.Context) error { +func (w *autoRefresh) sync(ctx context.Context) (err error) { + defer func() { + var isErr bool + rVal := recover() + if rVal == nil { + return + } + + if err, isErr = rVal.(error); isErr { + err = fmt.Errorf("worker panic'd and is shutting down. Error: %w", err) + } else { + err = fmt.Errorf("worker panic'd and is shutting down. Panic value: %v", rVal) + } + + logger.Error(ctx, err) + }() + for { select { case <-ctx.Done(): @@ -261,6 +277,7 @@ func (w *autoRefresh) sync(ctx context.Context) error { w.lruMap.Add(item.ID, item.Item) } } + t.Stop() } } diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index cf043fadb8..2588c8dd3b 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -3,6 +3,7 @@ package api import ( "context" "fmt" + "go/token" "go/types" "path/filepath" "strings" @@ -300,7 +301,7 @@ func NewGenerator(pkg, targetTypeName, defaultVariableName string) (*PFlagProvid pkg = gogenutil.StripGopath(pkg) } - targetPackage, err := importer.For("source", nil).Import(pkg) + targetPackage, err := importer.ForCompiler(token.NewFileSet(), "source", nil).Import(pkg) if err != nil { return nil, err } diff --git a/flytestdlib/cli/pflags/api/utils.go b/flytestdlib/cli/pflags/api/utils.go index 16edb50d38..b6a5b75baa 100644 --- a/flytestdlib/cli/pflags/api/utils.go +++ b/flytestdlib/cli/pflags/api/utils.go @@ -21,28 +21,27 @@ func camelCase(str string) string { } func isJSONUnmarshaler(t types.Type) bool { - found, _ := implementsAnyOfMethods(t, "UnmarshalJSON") - return found + return implementsAnyOfMethods(t, "UnmarshalJSON") } func isStringer(t types.Type) bool { - found, _ := implementsAnyOfMethods(t, "String") - return found + return implementsAnyOfMethods(t, "String") } -func implementsAnyOfMethods(t types.Type, methodNames ...string) (found, implementedByPtr bool) { +func implementsAnyOfMethods(t types.Type, methodNames ...string) (found bool) { mset := types.NewMethodSet(t) for _, name := range methodNames { if mset.Lookup(nil, name) != nil { - return true, false + return true } } + mset = types.NewMethodSet(types.NewPointer(t)) for _, name := range methodNames { if mset.Lookup(nil, name) != nil { - return true, true + return true } } - return false, false + return false } diff --git a/flytestdlib/config/config_cmd_test.go b/flytestdlib/config/config_cmd_test.go index d8ef31d298..03546ea9b7 100644 --- a/flytestdlib/config/config_cmd_test.go +++ b/flytestdlib/config/config_cmd_test.go @@ -40,25 +40,25 @@ func newMockAccessor(options Options) Accessor { return MockAccessor{} } -func executeCommandC(root *cobra.Command, args ...string) (c *cobra.Command, output string, err error) { +func executeCommandC(root *cobra.Command, args ...string) (output string, err error) { buf := new(bytes.Buffer) - root.SetOutput(buf) + root.SetOut(buf) root.SetArgs(args) - c, err = root.ExecuteC() + _, err = root.ExecuteC() - return c, buf.String(), err + return buf.String(), err } func TestNewConfigCommand(t *testing.T) { cmd := NewConfigCommand(newMockAccessor) assert.NotNil(t, cmd) - _, output, err := executeCommandC(cmd, CommandDiscover) + output, err := executeCommandC(cmd, CommandDiscover) assert.NoError(t, err) assert.Contains(t, output, "test") - _, output, err = executeCommandC(cmd, CommandValidate) + output, err = executeCommandC(cmd, CommandValidate) assert.NoError(t, err) assert.Contains(t, output, "test") } diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index 11511f7a61..873f2d2fbc 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -461,21 +461,25 @@ func TestAccessor_UpdateConfig(t *testing.T) { func changeSymLink(targetPath, symLink string) error { tmpLink := tempFileName("temp-sym-link-*") if runtime.GOOS == "windows" { + // #nosec G204 err := exec.Command("mklink", filepath.Clean(tmpLink), filepath.Clean(targetPath)).Run() if err != nil { return err } + // #nosec G204 err = exec.Command("copy", "/l", "/y", filepath.Clean(tmpLink), filepath.Clean(symLink)).Run() if err != nil { return err } + // #nosec G204 return exec.Command("del", filepath.Clean(tmpLink)).Run() } //// ln -sfn is not an atomic operation. Under the hood, it first calls the system unlink then symlink calls. During //// that, there will be a brief moment when there is no symlink at all. + // #nosec G204 return exec.Command("ln", "-sfn", filepath.Clean(targetPath), filepath.Clean(symLink)).Run() } diff --git a/flytestdlib/profutils/server.go b/flytestdlib/profutils/server.go index a1681c191d..11af642bd8 100644 --- a/flytestdlib/profutils/server.go +++ b/flytestdlib/profutils/server.go @@ -11,6 +11,7 @@ import ( "github.com/lyft/flytestdlib/version" "github.com/prometheus/client_golang/prometheus/promhttp" + // #nosec G108 _ "net/http/pprof" // Import for pprof server ) From 55122a01d3745ec43f32ede68703f6ec6aaa9e91 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Tue, 22 Oct 2019 21:59:56 -0700 Subject: [PATCH 083/191] Stow copy error shouldn't wrap nil err (#47) * Stow copy error shouldn't wrap nil err * Add unit tests --- flytestdlib/errors/error.go | 30 ++++++++++++++++---------- flytestdlib/errors/error_test.go | 12 +++++++++++ flytestdlib/storage/stow_store.go | 4 ++-- flytestdlib/storage/stow_store_test.go | 3 +++ 4 files changed, 36 insertions(+), 13 deletions(-) diff --git a/flytestdlib/errors/error.go b/flytestdlib/errors/error.go index 62f092fc7a..fb646deb4f 100644 --- a/flytestdlib/errors/error.go +++ b/flytestdlib/errors/error.go @@ -2,9 +2,8 @@ package errors import ( + "errors" "fmt" - - "github.com/pkg/errors" ) // A generic error code type. @@ -25,12 +24,12 @@ func (e *err) Code() ErrorCode { // Overrides Is to check for error code only. This enables the default package's errors.Is(). func (e *err) Is(target error) bool { - t, ok := target.(*err) - if !ok { + eCode, found := GetErrorCode(target) + if !found { return false } - return e.Code() == t.Code() + return e.Code() == eCode } type errorWithCause struct { @@ -39,7 +38,7 @@ type errorWithCause struct { } func (e *errorWithCause) Error() string { - return fmt.Sprintf("%v, caused by: %v", e.err.Error(), errors.Cause(e)) + return fmt.Sprintf("%v, caused by: %v", e.err.Error(), e.Cause()) } func (e *errorWithCause) Cause() error { @@ -90,17 +89,26 @@ func IsCausedBy(e error, errCode ErrorCode) bool { Cause() error } + type wrapped interface { + Unwrap() error + } + for e != nil { if code, found := GetErrorCode(e); found && code == errCode { return true } cause, ok := e.(causer) - if !ok { - break + if ok { + e = cause.Cause() + } else { + cause, ok := e.(wrapped) + if !ok { + break + } + + e = cause.Unwrap() } - - e = cause.Cause() } return false @@ -112,7 +120,7 @@ func IsCausedByError(e, e2 error) bool { } for e != nil { - if e == e2 { + if errors.Is(e, e2) { return true } diff --git a/flytestdlib/errors/error_test.go b/flytestdlib/errors/error_test.go index c7b8bd9b84..e22ce2f28e 100644 --- a/flytestdlib/errors/error_test.go +++ b/flytestdlib/errors/error_test.go @@ -35,16 +35,28 @@ func TestIsCausedBy(t *testing.T) { e = Wrapf("Code2", e, "msg") assert.True(t, IsCausedBy(e, "Code1")) assert.True(t, IsCausedBy(e, "Code2")) + + e = fmt.Errorf("new err caused by: %w", e) + assert.True(t, IsCausedBy(e, "Code1")) + + e = fmt.Errorf("not sharing code err") + assert.False(t, IsCausedBy(e, "Code1")) } func TestIsCausedByError(t *testing.T) { eRoot := Errorf("Code1", "msg") assert.NotNil(t, eRoot) + e1 := Wrapf("Code2", eRoot, "msg") assert.True(t, IsCausedByError(e1, eRoot)) + e2 := Wrapf("Code3", e1, "msg") assert.True(t, IsCausedByError(e2, eRoot)) assert.True(t, IsCausedByError(e2, e1)) + + e3 := fmt.Errorf("default errors. caused by: %w", e2) + assert.True(t, IsCausedByError(e3, eRoot)) + assert.True(t, IsCausedByError(e3, e1)) } func TestErrorsIs(t *testing.T) { diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 998fc8a876..2d7dc27e51 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -117,8 +117,8 @@ func (s *StowStore) ReadRaw(ctx context.Context, reference DataReference) (io.Re return nil, err } - if sizeBytes/MiB > GetConfig().Limits.GetLimitMegabytes { - return nil, errors.Wrapf(ErrExceedsLimit, err, "limit exceeded") + if sizeMbs := sizeBytes / MiB; sizeMbs > GetConfig().Limits.GetLimitMegabytes { + return nil, errors.Errorf(ErrExceedsLimit, "limit exceeded. %vmb > %vmb.", sizeMbs, GetConfig().Limits.GetLimitMegabytes) } return item.Open() diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index bb36827acd..710e410a23 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -9,6 +9,8 @@ import ( "testing" "time" + "github.com/pkg/errors" + "github.com/lyft/flytestdlib/promutils" "github.com/graymeta/stow" @@ -131,5 +133,6 @@ func TestStowStore_ReadRaw(t *testing.T) { _, err = s.ReadRaw(context.TODO(), DataReference("s3://container/path")) assert.Error(t, err) assert.True(t, IsExceedsLimit(err)) + assert.NotNil(t, errors.Cause(err)) }) } From 62c2309a8aeb697856ba76332b9f2738405cef50 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 23 Oct 2019 09:36:31 -0700 Subject: [PATCH 084/191] go-releaser-config (#46) --- flytestdlib/.goreleaser.yml | 2 +- flytestdlib/.travis.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flytestdlib/.goreleaser.yml b/flytestdlib/.goreleaser.yml index b76a7ace86..36add3d079 100644 --- a/flytestdlib/.goreleaser.yml +++ b/flytestdlib/.goreleaser.yml @@ -1,6 +1,6 @@ before: hooks: - - GO111MODULE=off dep ensure -vendor-only + - dep ensure -vendor-only builds: - env: - CGO_ENABLED=0 diff --git a/flytestdlib/.travis.yml b/flytestdlib/.travis.yml index e7e7d81ff6..69d03a8246 100644 --- a/flytestdlib/.travis.yml +++ b/flytestdlib/.travis.yml @@ -19,7 +19,7 @@ jobs: deploy: - provider: script skip_cleanup: true - script: curl -sL https://git.io/goreleaser | bash + script: curl -sL https://git.io/goreleaser | GO111MODULE=off bash on: tags: true condition: "$TRAVIS_OS_NAME = linux" From 66e0317de487274d54e5bda8a5fb6b16f6ad1da0 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 23 Oct 2019 09:44:06 -0700 Subject: [PATCH 085/191] Emit size gauge metric for autorefresh cache (#48) --- flytestdlib/cache/auto_refresh.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flytestdlib/cache/auto_refresh.go b/flytestdlib/cache/auto_refresh.go index a5a655be7f..ed706c92cf 100644 --- a/flytestdlib/cache/auto_refresh.go +++ b/flytestdlib/cache/auto_refresh.go @@ -48,6 +48,7 @@ type metrics struct { SyncLatency promutils.StopWatch CacheHit prometheus.Counter CacheMiss prometheus.Counter + Size prometheus.Gauge scope promutils.Scope } @@ -139,6 +140,7 @@ func newMetrics(scope promutils.Scope) metrics { SyncLatency: scope.MustNewStopWatch("latency", "Latency for sync operations.", time.Millisecond), CacheHit: scope.MustNewCounter("cache_hit", "Counter for cache hits."), CacheMiss: scope.MustNewCounter("cache_miss", "Counter for cache misses."), + Size: scope.MustNewGauge("size", "Current size of the cache"), scope: scope, } } @@ -194,6 +196,8 @@ func (w *autoRefresh) GetOrCreate(id ItemID, item Item) (Item, error) { // - Enqueue all the batches into the workqueue func (w *autoRefresh) enqueueBatches(ctx context.Context) error { keys := w.lruMap.Keys() + w.metrics.Size.Set(float64(len(keys))) + snapshot := make([]ItemWrapper, 0, len(keys)) for _, k := range keys { // If not ok, it means evicted between the item was evicted between getting the keys and this update loop From b957e07b0030c68d1a029b34e7c692e655d4585a Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 23 Oct 2019 11:00:55 -0700 Subject: [PATCH 086/191] Ignore codecoverage files from git (#49) --- flytestdlib/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flytestdlib/.gitignore b/flytestdlib/.gitignore index 00820a03e4..ef22690128 100644 --- a/flytestdlib/.gitignore +++ b/flytestdlib/.gitignore @@ -109,5 +109,8 @@ tags ### GoLand ### .idea/* +### CodeCov ### +codecov_bash.sh +coverage.txt # End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode From 2732b449192327252c4fbc8ef2ba068400fd0305 Mon Sep 17 00:00:00 2001 From: Honnix Date: Fri, 6 Dec 2019 20:29:32 +0100 Subject: [PATCH 087/191] migrate to go module (#50) * migrate to go module * tidy * do not force * try packages * extract into a method --- flytestdlib/.gitignore | 1 + flytestdlib/.goreleaser.yml | 3 +- flytestdlib/.travis.yml | 2 +- flytestdlib/Gopkg.lock | 767 ------------------ flytestdlib/Gopkg.toml | 76 -- flytestdlib/Makefile | 1 - .../lyft/golang_test_targets/Makefile | 5 +- flytestdlib/cli/pflags/api/generator.go | 17 +- flytestdlib/go.mod | 56 ++ flytestdlib/go.sum | 348 ++++++++ 10 files changed, 423 insertions(+), 853 deletions(-) delete mode 100644 flytestdlib/Gopkg.lock delete mode 100644 flytestdlib/Gopkg.toml create mode 100644 flytestdlib/go.mod create mode 100644 flytestdlib/go.sum diff --git a/flytestdlib/.gitignore b/flytestdlib/.gitignore index ef22690128..67d6534498 100644 --- a/flytestdlib/.gitignore +++ b/flytestdlib/.gitignore @@ -80,6 +80,7 @@ anaconda-mode/ *.so *.dylib vendor/ +bin/ # Test binary, build with 'go test -c' *.test diff --git a/flytestdlib/.goreleaser.yml b/flytestdlib/.goreleaser.yml index 36add3d079..dc49d22574 100644 --- a/flytestdlib/.goreleaser.yml +++ b/flytestdlib/.goreleaser.yml @@ -1,10 +1,9 @@ before: hooks: - - dep ensure -vendor-only + - go mod download builds: - env: - CGO_ENABLED=0 - - GO111MODULE=off main: ./cli/pflags/main.go binary: pflags goos: diff --git a/flytestdlib/.travis.yml b/flytestdlib/.travis.yml index 69d03a8246..e7e7d81ff6 100644 --- a/flytestdlib/.travis.yml +++ b/flytestdlib/.travis.yml @@ -19,7 +19,7 @@ jobs: deploy: - provider: script skip_cleanup: true - script: curl -sL https://git.io/goreleaser | GO111MODULE=off bash + script: curl -sL https://git.io/goreleaser | bash on: tags: true condition: "$TRAVIS_OS_NAME = linux" diff --git a/flytestdlib/Gopkg.lock b/flytestdlib/Gopkg.lock deleted file mode 100644 index 2a1403cb51..0000000000 --- a/flytestdlib/Gopkg.lock +++ /dev/null @@ -1,767 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:26ee1e365ea8f312ee11e170fc6675bac0dd3d4adf2406e753d0a43527e1afb8" - name = "cloud.google.com/go" - packages = ["compute/metadata"] - pruneopts = "UT" - revision = "cfe8f6d1fe6976d03af790d7a8b9bf6aa73287bd" - version = "v0.47.0" - -[[projects]] - digest = "1:94d4ae958b3d2ab476bef4bed53c1dcc3cb0fb2639bd45dd08b40e57139192e5" - name = "github.com/Azure/azure-sdk-for-go" - packages = ["storage"] - pruneopts = "UT" - revision = "2d49bb8f2cee530cc16f1f1a9f0aae763dee257d" - version = "v10.2.1-beta" - -[[projects]] - digest = "1:0f857a863c24bb1c277a5f3f8cb8a30e65b841405f69590132ee23ed9e7e6fbe" - name = "github.com/Azure/go-autorest" - packages = [ - "autorest", - "autorest/adal", - "autorest/azure", - "autorest/date", - "logger", - "tracing", - ] - pruneopts = "UT" - revision = "740293c019d8314ce3378d456b4327fa646297e6" - version = "v13.2.0" - -[[projects]] - digest = "1:d6d2147f37d72e0eb77c60830247f7ce48252815b651f527cd7ea4b2c030daca" - name = "github.com/aws/aws-sdk-go" - packages = [ - "aws", - "aws/awserr", - "aws/awsutil", - "aws/client", - "aws/client/metadata", - "aws/corehandlers", - "aws/credentials", - "aws/credentials/ec2rolecreds", - "aws/credentials/endpointcreds", - "aws/credentials/processcreds", - "aws/credentials/stscreds", - "aws/csm", - "aws/defaults", - "aws/ec2metadata", - "aws/endpoints", - "aws/request", - "aws/session", - "aws/signer/v4", - "internal/ini", - "internal/s3err", - "internal/sdkio", - "internal/sdkmath", - "internal/sdkrand", - "internal/sdkuri", - "internal/shareddefaults", - "private/protocol", - "private/protocol/eventstream", - "private/protocol/eventstream/eventstreamapi", - "private/protocol/json/jsonutil", - "private/protocol/query", - "private/protocol/query/queryutil", - "private/protocol/rest", - "private/protocol/restxml", - "private/protocol/xml/xmlutil", - "service/s3", - "service/s3/s3iface", - "service/s3/s3manager", - "service/sts", - "service/sts/stsiface", - ] - pruneopts = "UT" - revision = "4b77f7c2f7303e8c757947ae8aff6a33dce7b8d1" - version = "v1.25.16" - -[[projects]] - branch = "master" - digest = "1:a6609679ca468a89b711934f16b346e99f6ec344eadd2f7b00b1156785dd1236" - name = "github.com/benlaurie/objecthash" - packages = ["go/objecthash"] - pruneopts = "UT" - revision = "d1e3d6079fc16f8f542183fb5b2fdc11d9f00866" - -[[projects]] - digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d" - name = "github.com/beorn7/perks" - packages = ["quantile"] - pruneopts = "UT" - revision = "37c8de3658fcb183f997c4e13e8337516ab753e6" - version = "v1.0.1" - -[[projects]] - digest = "1:47056e6fe3a3524238d48ddcb6d38bfcfa6db346a11d73d83f1620a8cbf69793" - name = "github.com/cespare/xxhash" - packages = ["."] - pruneopts = "UT" - revision = "de209a9ffae3256185a6bb135d1a0ada7b2b5f09" - version = "v2.1.0" - -[[projects]] - digest = "1:00eb5d8bd96289512920ac43367d5bee76bbca2062da34862a98b26b92741896" - name = "github.com/coocood/freecache" - packages = ["."] - pruneopts = "UT" - revision = "3c79a0a23c1940ab4479332fb3e0127265650ce3" - version = "v1.1.0" - -[[projects]] - digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" - name = "github.com/davecgh/go-spew" - packages = ["spew"] - pruneopts = "UT" - revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" - version = "v1.1.1" - -[[projects]] - digest = "1:76dc72490af7174349349838f2fe118996381b31ea83243812a97e5a0fd5ed55" - name = "github.com/dgrijalva/jwt-go" - packages = ["."] - pruneopts = "UT" - revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e" - version = "v3.2.0" - -[[projects]] - branch = "master" - digest = "1:dc8bf44b7198605c83a4f2bb36a92c4d9f71eab2e8cf8094ce31b0297dd8ea89" - name = "github.com/ernesto-jimenez/gogen" - packages = [ - "gogenutil", - "imports", - ] - pruneopts = "UT" - revision = "d7d4131e6607813977e78297a6060f360f056a97" - -[[projects]] - digest = "1:865079840386857c809b72ce300be7580cb50d3d3129ce11bf9aa6ca2bc1934a" - name = "github.com/fatih/color" - packages = ["."] - pruneopts = "UT" - revision = "5b77d2a35fb0ede96d138fc9a99f5c9b6aef11b4" - version = "v1.7.0" - -[[projects]] - digest = "1:095ce7caddb44305037c22444736794a96b7f54b2420546b08594aef2e68617b" - name = "github.com/fatih/structtag" - packages = ["."] - pruneopts = "UT" - revision = "3878f9fb88e63e26ea1e6c97ab985cb55452fee5" - version = "v1.1.0" - -[[projects]] - branch = "master" - digest = "1:925a2ad8acf10a486cdae4366eaf45847b16d6d7448e654814d8f1d51adeefe4" - name = "github.com/fsnotify/fsnotify" - packages = ["."] - pruneopts = "UT" - revision = "4bf2d1fec78374803a39307bfb8d340688f4f28e" - -[[projects]] - digest = "1:2cd7915ab26ede7d95b8749e6b1f933f1c6d5398030684e6505940a10f31cfda" - name = "github.com/ghodss/yaml" - packages = ["."] - pruneopts = "UT" - revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" - version = "v1.0.0" - -[[projects]] - branch = "master" - digest = "1:b7cb6054d3dff43b38ad2e92492f220f57ae6087ee797dca298139776749ace8" - name = "github.com/golang/groupcache" - packages = ["lru"] - pruneopts = "UT" - revision = "404acd9df4cc9859d64fb9eed42e5c026187287a" - -[[projects]] - digest = "1:549b3770feea703d7cf55822b7b2e1b1afce35ea5034d9a1388249f3c65fbb98" - name = "github.com/golang/protobuf" - packages = [ - "jsonpb", - "proto", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/struct", - "ptypes/timestamp", - ] - pruneopts = "UT" - revision = "6c65a5562fc06764971b7c5d05c76c75e84bdbf7" - version = "v1.3.2" - -[[projects]] - digest = "1:766102087520f9d54f2acc72bd6637045900ac735b4a419b128d216f0c5c4876" - name = "github.com/googleapis/gax-go" - packages = ["v2"] - pruneopts = "UT" - revision = "bd5b16380fd03dc758d11cef74ba2e3bc8b0e8c2" - version = "v2.0.5" - -[[projects]] - digest = "1:16e1cbd76f0d4152b5573f08f38b451748f74ec59b99a004a7481342b3fc05af" - name = "github.com/graymeta/stow" - packages = [ - ".", - "azure", - "google", - "local", - "oracle", - "s3", - "swift", - ] - pruneopts = "UT" - revision = "903027f87de7054953efcdb8ba70d5dc02df38c7" - -[[projects]] - digest = "1:c77361e611524ec8f2ad37c408c3c916111a70b6acf806a1200855696bf8fa4d" - name = "github.com/hashicorp/golang-lru" - packages = [ - ".", - "simplelru", - ] - pruneopts = "UT" - revision = "7f827b33c0f158ec5dfbba01bb0b14a4541fd81d" - version = "v0.5.3" - -[[projects]] - digest = "1:c0d19ab64b32ce9fe5cf4ddceba78d5bc9807f0016db6b1183599da3dcc24d10" - name = "github.com/hashicorp/hcl" - packages = [ - ".", - "hcl/ast", - "hcl/parser", - "hcl/printer", - "hcl/scanner", - "hcl/strconv", - "hcl/token", - "json/parser", - "json/scanner", - "json/token", - ] - pruneopts = "UT" - revision = "8cb6e5b959231cc1119e43259c4a608f9c51a241" - version = "v1.0.0" - -[[projects]] - digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be" - name = "github.com/inconshreveable/mousetrap" - packages = ["."] - pruneopts = "UT" - revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" - version = "v1.0" - -[[projects]] - digest = "1:bb81097a5b62634f3e9fec1014657855610c82d19b9a40c17612e32651e35dca" - name = "github.com/jmespath/go-jmespath" - packages = ["."] - pruneopts = "UT" - revision = "c2b33e84" - -[[projects]] - digest = "1:31e761d97c76151dde79e9d28964a812c46efc5baee4085b86f68f0c654450de" - name = "github.com/konsorten/go-windows-terminal-sequences" - packages = ["."] - pruneopts = "UT" - revision = "f55edac94c9bbba5d6182a4be46d86a2c9b5b50e" - version = "v1.0.2" - -[[projects]] - digest = "1:2a0da3440db3f2892609d99cd0389c2776a3fef24435f7b7b58bfc9030aa86ca" - name = "github.com/magiconair/properties" - packages = [ - ".", - "assert", - ] - pruneopts = "UT" - revision = "de8848e004dd33dc07a2947b3d76f618a7fc7ef1" - version = "v1.8.1" - -[[projects]] - digest = "1:c658e84ad3916da105a761660dcaeb01e63416c8ec7bc62256a9b411a05fcd67" - name = "github.com/mattn/go-colorable" - packages = ["."] - pruneopts = "UT" - revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072" - version = "v0.0.9" - -[[projects]] - digest = "1:d62282425ffb75047679d7e2c3b980eea7f82c05ef5fb9142ee617ebac6e7432" - name = "github.com/mattn/go-isatty" - packages = ["."] - pruneopts = "UT" - revision = "88ba11cfdc67c7588b30042edf244b2875f892b6" - version = "v0.0.10" - -[[projects]] - digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" - name = "github.com/matttproud/golang_protobuf_extensions" - packages = ["pbutil"] - pruneopts = "UT" - revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" - version = "v1.0.1" - -[[projects]] - digest = "1:53bc4cd4914cd7cd52139990d5170d6dc99067ae31c56530621b18b35fc30318" - name = "github.com/mitchellh/mapstructure" - packages = ["."] - pruneopts = "UT" - revision = "3536a929edddb9a5b34bd6861dc4a9647cb459fe" - version = "v1.1.2" - -[[projects]] - branch = "master" - digest = "1:2339820c575323b56a7f94146a2549fd344c51c637fa5b8bafae9695ffa6e1a5" - name = "github.com/ncw/swift" - packages = ["."] - pruneopts = "UT" - revision = "a24ef33bc9b7e59ae4bed9e87a51d7bc76122731" - -[[projects]] - digest = "1:bbd3997f0121200f72b64d7a3826eb8a0b910d6a4c19894c9fe2852b9e5eaf3b" - name = "github.com/pelletier/go-toml" - packages = ["."] - pruneopts = "UT" - revision = "8fe62057ea2d46ce44254c98e84e810044dbe197" - version = "v1.5.0" - -[[projects]] - digest = "1:cf31692c14422fa27c83a05292eb5cbe0fb2775972e8f1f8446a71549bd8980b" - name = "github.com/pkg/errors" - packages = ["."] - pruneopts = "UT" - revision = "ba968bfe8b2f7e042a574c888954fccecfa385b4" - version = "v0.8.1" - -[[projects]] - digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - pruneopts = "UT" - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - digest = "1:e89f2cdede55684adbe44b5566f55838ad2aee1dff348d14b73ccf733607b671" - name = "github.com/prometheus/client_golang" - packages = [ - "prometheus", - "prometheus/internal", - "prometheus/promhttp", - ] - pruneopts = "UT" - revision = "2641b987480bca71fb39738eb8c8b0d577cb1d76" - version = "v0.9.4" - -[[projects]] - branch = "master" - digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4" - name = "github.com/prometheus/client_model" - packages = ["go"] - pruneopts = "UT" - revision = "14fe0d1b01d4d5fc031dd4bec1823bd3ebbe8016" - -[[projects]] - digest = "1:f119e3205d3a1f0f19dbd7038eb37528e2c6f0933269dc344e305951fb87d632" - name = "github.com/prometheus/common" - packages = [ - "expfmt", - "internal/bitbucket.org/ww/goautoneg", - "model", - ] - pruneopts = "UT" - revision = "287d3e634a1e550c9e463dd7e5a75a422c614505" - version = "v0.7.0" - -[[projects]] - digest = "1:a210815b437763623ecca8eb91e6a0bf4f2d6773c5a6c9aec0e28f19e5fd6deb" - name = "github.com/prometheus/procfs" - packages = [ - ".", - "internal/fs", - "internal/util", - ] - pruneopts = "UT" - revision = "499c85531f756d1129edd26485a5f73871eeb308" - version = "v0.0.5" - -[[projects]] - digest = "1:274f67cb6fed9588ea2521ecdac05a6d62a8c51c074c1fccc6a49a40ba80e925" - name = "github.com/satori/uuid" - packages = ["."] - pruneopts = "UT" - revision = "f58768cc1a7a7e77a3bd49e98cdd21419399b6a3" - version = "v1.2.0" - -[[projects]] - digest = "1:04457f9f6f3ffc5fea48e71d62f2ca256637dee0a04d710288e27e05c8b41976" - name = "github.com/sirupsen/logrus" - packages = ["."] - pruneopts = "UT" - revision = "839c75faf7f98a33d445d181f3018b5c3409a45e" - version = "v1.4.2" - -[[projects]] - digest = "1:bb495ec276ab82d3dd08504bbc0594a65de8c3b22c6f2aaa92d05b73fbf3a82e" - name = "github.com/spf13/afero" - packages = [ - ".", - "mem", - ] - pruneopts = "UT" - revision = "588a75ec4f32903aa5e39a2619ba6a4631e28424" - version = "v1.2.2" - -[[projects]] - digest = "1:08d65904057412fc0270fc4812a1c90c594186819243160dc779a402d4b6d0bc" - name = "github.com/spf13/cast" - packages = ["."] - pruneopts = "UT" - revision = "8c9545af88b134710ab1cd196795e7f2388358d7" - version = "v1.3.0" - -[[projects]] - digest = "1:e096613fb7cf34743d49af87d197663cfccd61876e2219853005a57baedfa562" - name = "github.com/spf13/cobra" - packages = ["."] - pruneopts = "UT" - revision = "f2b07da1e2c38d5f12845a4f607e2e1018cbb1f5" - version = "v0.0.5" - -[[projects]] - digest = "1:1b753ec16506f5864d26a28b43703c58831255059644351bbcb019b843950900" - name = "github.com/spf13/jwalterweatherman" - packages = ["."] - pruneopts = "UT" - revision = "94f6ae3ed3bceceafa716478c5fbf8d29ca601a1" - version = "v1.1.0" - -[[projects]] - digest = "1:524b71991fc7d9246cc7dc2d9e0886ccb97648091c63e30eef619e6862c955dd" - name = "github.com/spf13/pflag" - packages = ["."] - pruneopts = "UT" - revision = "2e9d26c8c37aae03e3f9d4e90b7116f5accb7cab" - version = "v1.0.5" - -[[projects]] - digest = "1:2532daa308722c7b65f4566e634dac2ddfaa0a398a17d8418e96ef2af3939e37" - name = "github.com/spf13/viper" - packages = ["."] - pruneopts = "UT" - revision = "ae103d7e593e371c69e832d5eb3347e2b80cbbc9" - -[[projects]] - digest = "1:ac83cf90d08b63ad5f7e020ef480d319ae890c208f8524622a2f3136e2686b02" - name = "github.com/stretchr/objx" - packages = ["."] - pruneopts = "UT" - revision = "477a77ecc69700c7cdeb1fa9e129548e1c1c393c" - version = "v0.1.1" - -[[projects]] - digest = "1:ad527ce5c6b2426790449db7663fe53f8bb647f9387295406794c8be001238da" - name = "github.com/stretchr/testify" - packages = [ - "assert", - "mock", - ] - pruneopts = "UT" - revision = "221dbe5ed46703ee255b1da0dec05086f5035f62" - version = "v1.4.0" - -[[projects]] - digest = "1:b984f402fbabb0e9eb0476f0ecfa51d0b2ff11cd0ac03538d6284091033b39ae" - name = "go.opencensus.io" - packages = [ - ".", - "internal", - "internal/tagencoding", - "metric/metricdata", - "metric/metricproducer", - "plugin/ochttp", - "plugin/ochttp/propagation/b3", - "resource", - "stats", - "stats/internal", - "stats/view", - "tag", - "trace", - "trace/internal", - "trace/propagation", - "trace/tracestate", - ] - pruneopts = "UT" - revision = "59d1ce35d30f3c25ba762169da2a37eab6ffa041" - version = "v0.22.1" - -[[projects]] - branch = "master" - digest = "1:2ce67db9864088dee35dab5967f041d2b4ae1c7440dabb44542c1847933fd872" - name = "golang.org/x/net" - packages = [ - "context", - "context/ctxhttp", - "http/httpguts", - "http2", - "http2/hpack", - "idna", - "internal/timeseries", - "trace", - ] - pruneopts = "UT" - revision = "ec77196f6094c3492a8b61f2c11cf937f78992ae" - -[[projects]] - branch = "master" - digest = "1:31e33f76456ccf54819ab4a646cf01271d1a99d7712ab84bf1a9e7b61cd2031b" - name = "golang.org/x/oauth2" - packages = [ - ".", - "google", - "internal", - "jws", - "jwt", - ] - pruneopts = "UT" - revision = "0f29369cfe4552d0e4bcddc57cc75f4d7e672a33" - -[[projects]] - branch = "master" - digest = "1:70b2bf25c4ed23c61dae668e4151d87a7edc5965bc3ccfecd1b9fe5f1752092a" - name = "golang.org/x/sys" - packages = ["unix"] - pruneopts = "UT" - revision = "3e7259c5e7c2076bb2728047a3df75adb1bad8e5" - -[[projects]] - digest = "1:8d8faad6b12a3a4c819a3f9618cb6ee1fa1cfc33253abeeea8b55336721e3405" - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/language", - "internal/language/compact", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable", - ] - pruneopts = "UT" - revision = "342b2e1fbaa52c93f31447ad2c6abc048c63e475" - version = "v0.3.2" - -[[projects]] - branch = "master" - digest = "1:cdd088b35bbf78713a6861a44a1bbe97e581861b6b8835c7f2211bbeca3671f6" - name = "golang.org/x/time" - packages = ["rate"] - pruneopts = "UT" - revision = "c4c64cad1fd0a1a8dab2523e04e61d35308e131e" - -[[projects]] - branch = "master" - digest = "1:652982a5f8ecd4d5b2628668df8fee776d1fd416b3c24cbdf3a97b786c5bf7e8" - name = "golang.org/x/tools" - packages = [ - "go/ast/astutil", - "go/gcexportdata", - "go/internal/gcimporter", - "go/internal/packagesdriver", - "go/packages", - "go/types/typeutil", - "imports", - "internal/fastwalk", - "internal/gopathwalk", - "internal/imports", - "internal/module", - "internal/semver", - "internal/span", - ] - pruneopts = "UT" - revision = "ed542cd5b28ad1b474f8ff7ca112cad2c3ac2dc8" - -[[projects]] - branch = "master" - digest = "1:46560ca7f74372b904778dff1892aa163593d5faf8b3b4e4eba0689b72422e73" - name = "google.golang.org/api" - packages = [ - "googleapi", - "googleapi/internal/uritemplates", - "googleapi/transport", - "internal", - "internal/gensupport", - "option", - "storage/v1", - "transport/http", - "transport/http/internal/propagation", - ] - pruneopts = "UT" - revision = "bf72a15fd9e96e2c95d23b53ce419201a6b45f43" - -[[projects]] - digest = "1:3c03b58f57452764a4499c55c582346c0ee78c8a5033affe5bdfd9efd3da5bd1" - name = "google.golang.org/appengine" - packages = [ - ".", - "internal", - "internal/app_identity", - "internal/base", - "internal/datastore", - "internal/log", - "internal/modules", - "internal/remote_api", - "internal/urlfetch", - "urlfetch", - ] - pruneopts = "UT" - revision = "971852bfffca25b069c31162ae8f247a3dba083b" - version = "v1.6.5" - -[[projects]] - branch = "master" - digest = "1:583a0c80f5e3a9343d33aea4aead1e1afcc0043db66fdf961ddd1fe8cd3a4faf" - name = "google.golang.org/genproto" - packages = ["googleapis/rpc/status"] - pruneopts = "UT" - revision = "548a555dbc03994223efbaba0090152849259498" - -[[projects]] - digest = "1:6cd77d0b616d2dcebd363dfecba593f27b0151fc82cdb5fbfb96c5a7cfbc95b5" - name = "google.golang.org/grpc" - packages = [ - ".", - "balancer", - "balancer/base", - "balancer/roundrobin", - "binarylog/grpc_binarylog_v1", - "codes", - "connectivity", - "credentials", - "credentials/internal", - "encoding", - "encoding/proto", - "grpclog", - "internal", - "internal/backoff", - "internal/balancerload", - "internal/binarylog", - "internal/channelz", - "internal/envconfig", - "internal/grpcrand", - "internal/grpcsync", - "internal/syscall", - "internal/transport", - "keepalive", - "metadata", - "naming", - "peer", - "resolver", - "resolver/dns", - "resolver/passthrough", - "serviceconfig", - "stats", - "status", - "tap", - ] - pruneopts = "UT" - revision = "f6d0f9ee430895e87ef1ceb5ac8f39725bafceef" - version = "v1.24.0" - -[[projects]] - digest = "1:59f10c1537d2199d9115d946927fe31165959a95190849c82ff11e05803528b0" - name = "gopkg.in/yaml.v2" - packages = ["."] - pruneopts = "UT" - revision = "f221b8435cfb71e54062f6c6e99e9ade30b124d5" - version = "v2.2.4" - -[[projects]] - digest = "1:074fb0a8da1e416b8a201e8e664c303ae610f316ffd615b678b636d27c225412" - name = "k8s.io/apimachinery" - packages = [ - "pkg/util/clock", - "pkg/util/rand", - "pkg/util/runtime", - "pkg/util/wait", - ] - pruneopts = "UT" - revision = "2b1284ed4c93a43499e781493253e2ac5959c4fd" - version = "kubernetes-1.13.1" - -[[projects]] - digest = "1:b6412f8acd9a9fc6fb67302c24966618b16501b9d769a20bee42ce61e510c92c" - name = "k8s.io/client-go" - packages = ["util/workqueue"] - pruneopts = "UT" - revision = "8d9ed539ba3134352c586810e749e58df4e94e4f" - version = "kubernetes-1.13.1" - -[[projects]] - digest = "1:93e82f25d75aba18436ad1ac042cb49493f096011f2541075721ed6f9e05c044" - name = "k8s.io/klog" - packages = ["."] - pruneopts = "UT" - revision = "2ca9ad30301bf30a8a6e0fa2110db6b8df699a91" - version = "v1.0.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/aws/aws-sdk-go/aws/awserr", - "github.com/aws/aws-sdk-go/service/s3", - "github.com/benlaurie/objecthash/go/objecthash", - "github.com/coocood/freecache", - "github.com/ernesto-jimenez/gogen/gogenutil", - "github.com/ernesto-jimenez/gogen/imports", - "github.com/fatih/color", - "github.com/fatih/structtag", - "github.com/fsnotify/fsnotify", - "github.com/ghodss/yaml", - "github.com/golang/protobuf/jsonpb", - "github.com/golang/protobuf/proto", - "github.com/golang/protobuf/ptypes", - "github.com/golang/protobuf/ptypes/duration", - "github.com/golang/protobuf/ptypes/struct", - "github.com/golang/protobuf/ptypes/timestamp", - "github.com/graymeta/stow", - "github.com/graymeta/stow/azure", - "github.com/graymeta/stow/google", - "github.com/graymeta/stow/local", - "github.com/graymeta/stow/oracle", - "github.com/graymeta/stow/s3", - "github.com/graymeta/stow/swift", - "github.com/hashicorp/golang-lru", - "github.com/magiconair/properties/assert", - "github.com/mitchellh/mapstructure", - "github.com/pkg/errors", - "github.com/prometheus/client_golang/prometheus", - "github.com/prometheus/client_golang/prometheus/promhttp", - "github.com/sirupsen/logrus", - "github.com/spf13/cobra", - "github.com/spf13/pflag", - "github.com/spf13/viper", - "github.com/stretchr/testify/assert", - "github.com/stretchr/testify/mock", - "golang.org/x/time/rate", - "golang.org/x/tools/imports", - "k8s.io/apimachinery/pkg/util/rand", - "k8s.io/apimachinery/pkg/util/wait", - "k8s.io/client-go/util/workqueue", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/flytestdlib/Gopkg.toml b/flytestdlib/Gopkg.toml deleted file mode 100644 index c5a397795f..0000000000 --- a/flytestdlib/Gopkg.toml +++ /dev/null @@ -1,76 +0,0 @@ -[[constraint]] - name = "github.com/aws/aws-sdk-go" - version = "1.15.0" - -[[constraint]] - name = "github.com/coocood/freecache" - version = "1.0.1" - -[[constraint]] - branch = "master" - name = "github.com/ernesto-jimenez/gogen" - -[[constraint]] - name = "github.com/fatih/color" - version = "1.7.0" - -[[constraint]] - name = "github.com/fatih/structtag" - version = "1.0.0" - -[[constraint]] - branch = "master" - name = "github.com/fsnotify/fsnotify" - -[[constraint]] - name = "github.com/golang/protobuf" - version = "1.1.0" - -[[constraint]] - name = "github.com/mitchellh/mapstructure" - version = "1.1.2" - -[[constraint]] - name = "github.com/pkg/errors" - version = "0.8.0" - -[[constraint]] - name = "github.com/prometheus/client_golang" - version = "^0.9.0" - -[[constraint]] - name = "github.com/spf13/cobra" - version = "0.0.3" - -[[constraint]] - name = "github.com/spf13/pflag" - version = "1.0.1" - -[[constraint]] - name = "github.com/spf13/viper" - # Viper only fixed symlink config watching after this SHA. move to a proper semVer when one is available. - revision = "ae103d7e593e371c69e832d5eb3347e2b80cbbc9" - -[[constraint]] - branch = "master" - name = "golang.org/x/time" - -[[override]] - branch = "master" - name = "golang.org/x/net" - -[[constraint]] - name = "k8s.io/apimachinery" - version = "kubernetes-1.13.1" - -[[constraint]] - name = "k8s.io/client-go" - version = "kubernetes-1.13.1" - -[[constraint]] - name = "github.com/graymeta/stow" - revision = "903027f87de7054953efcdb8ba70d5dc02df38c7" - -[prune] - go-tests = true - unused-packages = true diff --git a/flytestdlib/Makefile b/flytestdlib/Makefile index f94e483ca8..211f908f0a 100644 --- a/flytestdlib/Makefile +++ b/flytestdlib/Makefile @@ -1,4 +1,3 @@ -export GO111MODULE=off export REPOSITORY=flytestdlib include boilerplate/lyft/golang_test_targets/Makefile diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile index 1a4b1be172..dccbe02248 100644 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile @@ -1,6 +1,6 @@ .PHONY: lint lint: #lints the package for common code smells - which golangci-lint || GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint + which golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint golangci-lint run # If code is failing goimports linter, this will fix. @@ -11,8 +11,7 @@ goimports: .PHONY: install install: #download dependencies (including test deps) for the package - which dep || (curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh) - dep ensure + go mod download .PHONY: test_unit test_unit: diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index 2588c8dd3b..08e7a0ef0d 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -3,14 +3,13 @@ package api import ( "context" "fmt" - "go/token" "go/types" "path/filepath" "strings" "github.com/lyft/flytestdlib/logger" - "go/importer" + "golang.org/x/tools/go/packages" "github.com/ernesto-jimenez/gogen/gogenutil" ) @@ -301,7 +300,7 @@ func NewGenerator(pkg, targetTypeName, defaultVariableName string) (*PFlagProvid pkg = gogenutil.StripGopath(pkg) } - targetPackage, err := importer.ForCompiler(token.NewFileSet(), "source", nil).Import(pkg) + targetPackage, err := loadPackage(pkg) if err != nil { return nil, err } @@ -338,6 +337,18 @@ func NewGenerator(pkg, targetTypeName, defaultVariableName string) (*PFlagProvid }, nil } +func loadPackage(pkg string) (*types.Package, error) { + config := &packages.Config{ + Mode: packages.NeedTypes | packages.NeedTypesInfo, + } + loadedPkgs, err := packages.Load(config, pkg) + if err != nil { + return nil, err + } + targetPackage := loadedPkgs[0].Types + return targetPackage, nil +} + func (g PFlagProviderGenerator) GetTargetPackage() *types.Package { return g.pkg } diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod new file mode 100644 index 0000000000..3050fc89c9 --- /dev/null +++ b/flytestdlib/go.mod @@ -0,0 +1,56 @@ +module github.com/lyft/flytestdlib + +go 1.13 + +require ( + cloud.google.com/go v0.47.0 // indirect + github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.9.2 // indirect + github.com/aws/aws-sdk-go v1.25.16 + github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 // indirect + github.com/coocood/freecache v1.1.0 + github.com/dnaeon/go-vcr v1.0.1 // indirect + github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 + github.com/fatih/color v1.7.0 + github.com/fatih/structtag v1.1.0 + github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 + github.com/ghodss/yaml v1.0.0 + github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc // indirect + github.com/golang/protobuf v1.3.2 + github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7 + github.com/hashicorp/golang-lru v0.5.3 + github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect + github.com/magiconair/properties v1.8.1 + github.com/mattn/go-colorable v0.0.9 // indirect + github.com/mattn/go-isatty v0.0.10 // indirect + github.com/mitchellh/mapstructure v1.1.2 + github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7 // indirect + github.com/pelletier/go-toml v1.5.0 // indirect + github.com/pkg/errors v0.8.1 + github.com/prometheus/client_golang v1.0.0 + github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect + github.com/prometheus/common v0.7.0 // indirect + github.com/prometheus/procfs v0.0.5 // indirect + github.com/satori/uuid v1.2.0 // indirect + github.com/sirupsen/logrus v1.4.2 + github.com/spf13/afero v1.2.2 // indirect + github.com/spf13/cobra v0.0.5 + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 + github.com/spf13/viper v1.3.2 + github.com/stretchr/testify v1.4.0 + go.opencensus.io v0.22.1 // indirect + golang.org/x/net v0.0.0-20191021144547-ec77196f6094 // indirect + golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2 // indirect + golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 + golang.org/x/tools v0.0.0-20191204011308-9611592c72f6 + google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9 // indirect + google.golang.org/appengine v1.6.5 // indirect + google.golang.org/grpc v1.24.0 // indirect + k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93 + k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31 + k8s.io/klog v1.0.0 // indirect +) diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum new file mode 100644 index 0000000000..4df02b53ed --- /dev/null +++ b/flytestdlib/go.sum @@ -0,0 +1,348 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.47.0 h1:1JUtpcY9E7+eTospEwWS2QXP3DEn7poB3E2j0jN74mM= +cloud.google.com/go v0.47.0/go.mod h1:5p3Ky/7f3N10VBkhuR5LFtddroTiMyjZV/Kj5qOQFxU= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible h1:/x4W7ZQV4PHJYnLUgKubojM8T+zlFEDdaBazAnA/QCY= +github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-autorest/autorest v0.9.2 h1:6AWuh3uWrsZJcNoCHrCF/+g4aKPCU39kaMO6/qrnK/4= +github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/aws/aws-sdk-go v1.25.16 h1:k7Fy6T/uNuLX6zuayU/TJoP7yMgGcJSkZpF7QVjwYpA= +github.com/aws/aws-sdk-go v1.25.16/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 h1:VRtJdDi2lqc3MFwmouppm2jlm6icF+7H3WYKpLENMTo= +github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coocood/freecache v1.1.0 h1:ENiHOsWdj1BrrlPwblhbn4GdAsMymK3pZORJ+bJGAjA= +github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +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 h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= +github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structtag v1.1.0 h1:6j4mUV/ES2duvnAzKMFkN6/A5mCaNYPD3xfbAkLLOF8= +github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 h1:SmsgwFZy9pdTk/k8BZz40D3P5umP5+Ejt3hAi0paBNQ= +github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc h1:55rEp52jU6bkyslZ1+C/7NGfpQsEc6pxGLAGDOctqbw= +github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/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 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7 h1:oIYi27Ruo2k5dxukdOisCSZrowkg70jxxuaPZck9+ic= +github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7/go.mod h1:B24dekNjtWVeREK+dyMHtI22d85VzCT+sX5bVWDtjoA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= +github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +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/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7 h1:2FttUGr9cza0JNOUDHeVWo4wVGk92m8bralgdbAeYJY= +github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.5.0 h1:5BakdOZdtKJ1FFk6QdL8iSGrMWsXgchNJcrnarjbmJQ= +github.com/pelletier/go-toml v1.5.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/satori/uuid v1.2.0 h1:6TFY4nxn5XwBx0gDfzbEMCNT6k4N/4FNIuN8RACZ0KI= +github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.1 h1:8dP3SGL7MPB94crU3bEPplMPe83FI4EouesJUeFHv50= +go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191021144547-ec77196f6094 h1:5O4U9trLjNpuhpynaDsqwCk+Tw6seqJz1EbqbnzHrc8= +golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2 h1:nq114VpM8lsSlP+lyUbANecYHYiFcSNFtqcBlxRV+gA= +golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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/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-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w= +golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191010171213-8abd42400456/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a h1:UuQ+70Pi/ZdWHuP4v457pkXeOynTdgd/4enxeIO/98k= +golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191204011308-9611592c72f6 h1:BP62y4oUl8+/CvHuvVqHIPmVRixgDl6y6a+tR7pXXIA= +golang.org/x/tools v0.0.0-20191204011308-9611592c72f6/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9 h1:DcDldKT1PaijNBNDNPaGtfl+LvUHR1xsw5DpipSI1CE= +google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93 h1:tT6oQBi0qwLbbZSfDkdIsb23EwaLY85hoAV4SpXfdao= +k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= +k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31 h1:OH3z6khCtxnJBAc0C5CMYWLl1CoK5R5fngX7wrwdN5c= +k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From 4e01a7f3cc0da1c3ec3bf004d133da4ae6508982 Mon Sep 17 00:00:00 2001 From: Honnix Date: Wed, 11 Dec 2019 01:06:35 +0100 Subject: [PATCH 088/191] Fix go module change (#51) workaround golang/go#30515 --- flytestdlib/boilerplate/lyft/golang_test_targets/Makefile | 3 ++- flytestdlib/go.sum | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile index dccbe02248..85d52d1ac4 100644 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile @@ -1,6 +1,7 @@ .PHONY: lint lint: #lints the package for common code smells - which golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint + # install outside of current module, workaround https://github.com/golang/go/issues/30515 + which golangci-lint || (cd /tmp && go get github.com/golangci/golangci-lint/cmd/golangci-lint && cd -) golangci-lint run # If code is failing goimports linter, this will fix. diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index 4df02b53ed..0c6e852ead 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -293,8 +293,6 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191010171213-8abd42400456/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a h1:UuQ+70Pi/ZdWHuP4v457pkXeOynTdgd/4enxeIO/98k= -golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191204011308-9611592c72f6 h1:BP62y4oUl8+/CvHuvVqHIPmVRixgDl6y6a+tR7pXXIA= golang.org/x/tools v0.0.0-20191204011308-9611592c72f6/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 448e974eb93b8f6d507474e0c5687297da855e7e Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 18 Dec 2019 13:43:32 -0800 Subject: [PATCH 089/191] Add revision key to exported log fields (#52) --- flytestdlib/contextutils/context.go | 33 +++++++++++++++++------------ 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/flytestdlib/contextutils/context.go b/flytestdlib/contextutils/context.go index fd0b5fac0b..af6e2e018f 100644 --- a/flytestdlib/contextutils/context.go +++ b/flytestdlib/contextutils/context.go @@ -10,19 +10,20 @@ import ( type Key string const ( - AppNameKey Key = "app_name" - NamespaceKey Key = "ns" - TaskTypeKey Key = "tasktype" - ProjectKey Key = "project" - DomainKey Key = "domain" - WorkflowIDKey Key = "wf" - NodeIDKey Key = "node" - TaskIDKey Key = "task" - ExecIDKey Key = "exec_id" - JobIDKey Key = "job_id" - PhaseKey Key = "phase" - RoutineLabelKey Key = "routine" - LaunchPlanIDKey Key = "lp" + AppNameKey Key = "app_name" + NamespaceKey Key = "ns" + TaskTypeKey Key = "tasktype" + ProjectKey Key = "project" + DomainKey Key = "domain" + WorkflowIDKey Key = "wf" + NodeIDKey Key = "node" + TaskIDKey Key = "task" + ExecIDKey Key = "exec_id" + JobIDKey Key = "job_id" + PhaseKey Key = "phase" + RoutineLabelKey Key = "routine" + LaunchPlanIDKey Key = "lp" + ResourceVersionKey Key = "res_ver" ) func (k Key) String() string { @@ -40,6 +41,12 @@ var logKeys = []Key{ PhaseKey, RoutineLabelKey, LaunchPlanIDKey, + ResourceVersionKey, +} + +// Gets a new context with the resource version set. +func WithResourceVersion(ctx context.Context, resourceVersion string) context.Context { + return context.WithValue(ctx, ResourceVersionKey, resourceVersion) } // Gets a new context with namespace set. From 64d8448516fc2823163e8eb7a6e53e9f4db024b5 Mon Sep 17 00:00:00 2001 From: Honnix Date: Fri, 24 Jan 2020 18:25:17 +0100 Subject: [PATCH 090/191] incorporate latest boilerplate changes (#53) This reflects changes done in https://github.com/lyft/boilerplate/pull/4 --- flytestdlib/Makefile | 7 +- .../lyft/golang_support_tools/go.mod | 12 + .../lyft/golang_support_tools/go.sum | 553 ++++++++++++++++++ .../lyft/golang_support_tools/tools.go | 10 + .../lyft/golang_test_targets/Makefile | 29 +- .../lyft/golang_test_targets/Readme.rst | 4 +- .../golang_test_targets/download_tooling.sh | 36 ++ .../lyft/golang_test_targets/goimports | 5 + flytestdlib/boilerplate/update.cfg | 1 + flytestdlib/boilerplate/update.sh | 54 ++ 10 files changed, 700 insertions(+), 11 deletions(-) create mode 100644 flytestdlib/boilerplate/lyft/golang_support_tools/go.mod create mode 100644 flytestdlib/boilerplate/lyft/golang_support_tools/go.sum create mode 100644 flytestdlib/boilerplate/lyft/golang_support_tools/tools.go create mode 100755 flytestdlib/boilerplate/lyft/golang_test_targets/download_tooling.sh create mode 100755 flytestdlib/boilerplate/update.sh diff --git a/flytestdlib/Makefile b/flytestdlib/Makefile index 211f908f0a..49ab0b4de5 100644 --- a/flytestdlib/Makefile +++ b/flytestdlib/Makefile @@ -1,6 +1,10 @@ export REPOSITORY=flytestdlib include boilerplate/lyft/golang_test_targets/Makefile +.PHONY: update_boilerplate +update_boilerplate: + @boilerplate/update.sh + # Generate golden files. Add test packages that generate golden files here. golden: go test ./cli/pflags/api -update @@ -19,8 +23,7 @@ compile: mkdir -p ./bin go build -o pflags ./cli/pflags/main.go && mv ./pflags ./bin -gen-config: - which pflags || (go get github.com/lyft/flytestdlib/cli/pflags) +gen-config: download_tooling @go generate ./... .PHONY: test_unit_codecov diff --git a/flytestdlib/boilerplate/lyft/golang_support_tools/go.mod b/flytestdlib/boilerplate/lyft/golang_support_tools/go.mod new file mode 100644 index 0000000000..56d7330b49 --- /dev/null +++ b/flytestdlib/boilerplate/lyft/golang_support_tools/go.mod @@ -0,0 +1,12 @@ +module github.com/lyft/boilerplate + +go 1.13 + +require ( + github.com/golangci/golangci-lint v1.22.2 + github.com/lyft/flytestdlib v0.2.31 + github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 + github.com/alvaroloes/enumer v1.1.2 +) + +replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 diff --git a/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum b/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum new file mode 100644 index 0000000000..86abf26515 --- /dev/null +++ b/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum @@ -0,0 +1,553 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.47.0 h1:1JUtpcY9E7+eTospEwWS2QXP3DEn7poB3E2j0jN74mM= +cloud.google.com/go v0.47.0/go.mod h1:5p3Ky/7f3N10VBkhuR5LFtddroTiMyjZV/Kj5qOQFxU= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible h1:/x4W7ZQV4PHJYnLUgKubojM8T+zlFEDdaBazAnA/QCY= +github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-autorest/autorest v0.9.2 h1:6AWuh3uWrsZJcNoCHrCF/+g4aKPCU39kaMO6/qrnK/4= +github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us= +github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/aws/aws-sdk-go v1.25.16 h1:k7Fy6T/uNuLX6zuayU/TJoP7yMgGcJSkZpF7QVjwYpA= +github.com/aws/aws-sdk-go v1.25.16/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bombsimon/wsl/v2 v2.0.0 h1:+Vjcn+/T5lSrO8Bjzhk4v14Un/2UyCA1E3V5j9nwTkQ= +github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coocood/freecache v1.1.0 h1:ENiHOsWdj1BrrlPwblhbn4GdAsMymK3pZORJ+bJGAjA= +github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +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 h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 h1:qxIJwfSemSCqhG3/lEw1Rm+wYbegjuKsqy0ZqnIpL14= +github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0/go.mod h1:KfdIkmkpVY3n2sc1ykFj01uMviOiXH2HMhUCvA5FYGg= +github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= +github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structtag v1.1.0 h1:6j4mUV/ES2duvnAzKMFkN6/A5mCaNYPD3xfbAkLLOF8= +github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 h1:SmsgwFZy9pdTk/k8BZz40D3P5umP5+Ejt3hAi0paBNQ= +github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-critic/go-critic v0.4.0 h1:sXD3pix0wDemuPuSlrXpJNNYXlUiKiysLrtPVQmxkzI= +github.com/go-critic/go-critic v0.4.0/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-lintpack/lintpack v0.5.2 h1:DI5mA3+eKdWeJ40nU4d6Wc26qmdG8RCi/btYq0TuRN0= +github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0 h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= +github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= +github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= +github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= +github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg= +github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= +github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.0 h1:zKymWyA1TRYvqYrYDrfEMZULyrhcnGY3x7LDKU2XQaA= +github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b h1:ekuhfTjngPhisSjOJ0QWKpPQE8/rbknHaes6WVJj5Hw= +github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc h1:55rEp52jU6bkyslZ1+C/7NGfpQsEc6pxGLAGDOctqbw= +github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/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 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6 h1:YYWNAGTKWhKpcLLt7aSj/odlKrSrelQwlovBpDuf19w= +github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= +github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3 h1:pe9JHs3cHHDQgOFXJJdYkK6fLz2PWyYtP4hthoCMvs8= +github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= +github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee h1:J2XAy40+7yz70uaOiMbNnluTg7gyQhtGqLQncQh+4J8= +github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= +github.com/golangci/golangci-lint v1.22.2 h1:iaihss3Tf6NvZVjun3lHimKSgofPV1+FqE/cbehoiRQ= +github.com/golangci/golangci-lint v1.22.2/go.mod h1:2Bj42k6hPQFTRxkDb7S3TQ+EsnumZXOmIYNqlQrp0FI= +github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc h1:gLLhTLMk2/SutryVJ6D4VZCU3CUqr8YloG7FPIBWFpI= +github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770 h1:EL/O5HGrF7Jaq0yNhBLucz9hTuRzj2LdwGBOaENgxIk= +github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 h1:leSNB7iYzLYSSx3J/s5sVf4Drkc68W2wm4Ixh/mr0us= +github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= +github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0 h1:HVfrLniijszjS1aiNg8JbBMO2+E1WIQ+j/gL4SQqGPg= +github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3 h1:JVnpOZS+qxli+rgVl98ILOXVNbW+kb5wcxeGx8ShUIw= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7 h1:oIYi27Ruo2k5dxukdOisCSZrowkg70jxxuaPZck9+ic= +github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7/go.mod h1:B24dekNjtWVeREK+dyMHtI22d85VzCT+sX5bVWDtjoA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/lyft/flytestdlib v0.2.31 h1:JAOSGwy/wLprhq1KR9zxekBqnKdSlAQQG1x4KQe+hlI= +github.com/lyft/flytestdlib v0.2.31/go.mod h1:/fqNXKCGChEvMzcRapVq6vDM69Vlusl+bCj7foToaUQ= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb h1:RHba4YImhrUVQDHUCe2BNSOz4tVy2yGyXhvYDvxGgeE= +github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +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/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E= +github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= +github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7 h1:2FttUGr9cza0JNOUDHeVWo4wVGk92m8bralgdbAeYJY= +github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.5.0 h1:5BakdOZdtKJ1FFk6QdL8iSGrMWsXgchNJcrnarjbmJQ= +github.com/pelletier/go-toml v1.5.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/satori/uuid v1.2.0 h1:6TFY4nxn5XwBx0gDfzbEMCNT6k4N/4FNIuN8RACZ0KI= +github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU= +github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d h1:BzRvVq1EHuIjxpijCEKpAxzKUUMurOQ4sknehIATRh8= +github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d/go.mod h1:w5+eXa0mYznDkHaMCXA4XYffjlH+cy1oyKbfzJXa2Do= +github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= +github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sourcegraph/go-diff v0.5.1 h1:gO6i5zugwzo1RVTvgvfwCOSVegNuvnNi6bAD1QCmkHs= +github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= +github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q= +github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tommy-muehle/go-mnd v1.1.1 h1:4D0wuPKjOTiK2garzuPGGvm4zZ/wLYDOH8TJSABC7KU= +github.com/tommy-muehle/go-mnd v1.1.1/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ultraware/funlen v0.0.2 h1:Av96YVBwwNSe4MLR7iI/BIa3VyI7/djnto/pK3Uxbdo= +github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg= +github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= +github.com/uudashr/gocognit v1.0.1 h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjPs= +github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= +github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.1 h1:8dP3SGL7MPB94crU3bEPplMPe83FI4EouesJUeFHv50= +go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191021144547-ec77196f6094 h1:5O4U9trLjNpuhpynaDsqwCk+Tw6seqJz1EbqbnzHrc8= +golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2 h1:nq114VpM8lsSlP+lyUbANecYHYiFcSNFtqcBlxRV+gA= +golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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/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-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w= +golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/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-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190930201159-7c411dea38b0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191010171213-8abd42400456/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191204011308-9611592c72f6 h1:BP62y4oUl8+/CvHuvVqHIPmVRixgDl6y6a+tR7pXXIA= +golang.org/x/tools v0.0.0-20191204011308-9611592c72f6/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9 h1:DcDldKT1PaijNBNDNPaGtfl+LvUHR1xsw5DpipSI1CE= +google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +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/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93 h1:tT6oQBi0qwLbbZSfDkdIsb23EwaLY85hoAV4SpXfdao= +k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= +k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31 h1:OH3z6khCtxnJBAc0C5CMYWLl1CoK5R5fngX7wrwdN5c= +k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= +mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f h1:Cq7MalBHYACRd6EesksG1Q8EoIAKOsiZviGKbOLIej4= +mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 h1:JPJh2pk3+X4lXAkZIk2RuE/7/FoK9maXw+TNPJhVS/c= +sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/flytestdlib/boilerplate/lyft/golang_support_tools/tools.go b/flytestdlib/boilerplate/lyft/golang_support_tools/tools.go new file mode 100644 index 0000000000..4310b39d79 --- /dev/null +++ b/flytestdlib/boilerplate/lyft/golang_support_tools/tools.go @@ -0,0 +1,10 @@ +// +build tools + +package tools + +import ( + _ "github.com/golangci/golangci-lint/cmd/golangci-lint" + _ "github.com/lyft/flytestdlib/cli/pflags" + _ "github.com/vektra/mockery/cmd/mockery" + _ "github.com/alvaroloes/enumer" +) diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile index 85d52d1ac4..641c45ca7a 100644 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile @@ -1,8 +1,16 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + + +.PHONY: download_tooling +download_tooling: #download dependencies (including test deps) for the package + @boilerplate/lyft/golang_test_targets/download_tooling.sh + .PHONY: lint -lint: #lints the package for common code smells - # install outside of current module, workaround https://github.com/golang/go/issues/30515 - which golangci-lint || (cd /tmp && go get github.com/golangci/golangci-lint/cmd/golangci-lint && cd -) - golangci-lint run +lint: download_tooling #lints the package for common code smells + GL_DEBUG=linters_output,env golangci-lint run --deadline=5m --exclude deprecated -v # If code is failing goimports linter, this will fix. # skips 'vendor' @@ -10,10 +18,16 @@ lint: #lints the package for common code smells goimports: @boilerplate/lyft/golang_test_targets/goimports -.PHONY: install -install: #download dependencies (including test deps) for the package +.PHONY: mod_download +mod_download: #download dependencies (including test deps) for the package go mod download +.PHONY: install +install: download_tooling mod_download + +.PHONY: show +show: go list -m all + .PHONY: test_unit test_unit: go test -cover ./... -race @@ -28,4 +42,5 @@ test_unit_cover: .PHONY: test_unit_visual test_unit_visual: - go test ./... -coverprofile /tmp/cover.out -covermode=count; go tool cover -html=/tmp/cover.out + go test ./... -coverprofile /tmp/cover.out -covermode=count; go tool cover -html=/tmp/cover.out + diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Readme.rst b/flytestdlib/boilerplate/lyft/golang_test_targets/Readme.rst index acc5744f59..3466e30c55 100644 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/Readme.rst +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/Readme.rst @@ -1,7 +1,7 @@ Golang Test Targets ~~~~~~~~~~~~~~~~~~~ -Provides an ``install`` make target that uses ``dep`` install golang dependencies. +Provides an ``install`` make target that uses ``go mod`` to install golang dependencies. Provides a ``lint`` make target that uses golangci to lint your code. @@ -17,7 +17,7 @@ Provides a ``test_benchmark`` target for benchmark tests. Add ``lyft/golang_test_targets`` to your ``boilerplate/update.cfg`` file. -Make sure you're using ``dep`` for dependency management. +Make sure you're using ``go mod`` for dependency management. Provide a ``.golangci`` configuration (the lint target requires it). diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/download_tooling.sh b/flytestdlib/boilerplate/lyft/golang_test_targets/download_tooling.sh new file mode 100755 index 0000000000..ab56c7e481 --- /dev/null +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/download_tooling.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# Everything in this file needs to be installed outside of current module +# The reason we cannot turn off module entirely and install is that we need the replace statement in go.mod +# because we are installing a mockery fork. Turning it off would result installing the original not the fork. +# We also want to version all the other tools. We also want to be able to run go mod tidy without removing the version +# pins. To facilitate this, we're maintaining two sets of go.mod/sum files - the second one only for tooling. This is +# the same approach that go 1.14 will take as well. +# See: +# https://github.com/lyft/flyte/issues/129 +# https://github.com/golang/go/issues/30515 for some background context +# https://github.com/go-modules-by-example/index/blob/5ec250b4b78114a55001bd7c9cb88f6e07270ea5/010_tools/README.md + +set -e + +# List of tools to go get +# In the format of ":" or ":" if no cli +tools=( + "github.com/vektra/mockery/cmd/mockery" + "github.com/lyft/flytestdlib/cli/pflags" + "github.com/golangci/golangci-lint/cmd/golangci-lint" + "github.com/alvaroloes/enumer" +) + +tmp_dir=$(mktemp -d -t gotooling-XXX) +echo "Using temp directory ${tmp_dir}" +cp -R boilerplate/lyft/golang_support_tools/* $tmp_dir +pushd "$tmp_dir" + +for tool in "${tools[@]}" +do + echo "Installing ${tool}" + GO111MODULE=on go install $tool +done + +popd diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/goimports b/flytestdlib/boilerplate/lyft/golang_test_targets/goimports index 11d3c9af06..160525a8cc 100755 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/goimports +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/goimports @@ -1,3 +1,8 @@ #!/usr/bin/env bash +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*") diff --git a/flytestdlib/boilerplate/update.cfg b/flytestdlib/boilerplate/update.cfg index f861a23ccd..5c54f64c93 100644 --- a/flytestdlib/boilerplate/update.cfg +++ b/flytestdlib/boilerplate/update.cfg @@ -1,2 +1,3 @@ lyft/golang_test_targets lyft/golangci_file +lyft/golang_support_tools diff --git a/flytestdlib/boilerplate/update.sh b/flytestdlib/boilerplate/update.sh new file mode 100755 index 0000000000..a8c05705e3 --- /dev/null +++ b/flytestdlib/boilerplate/update.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +OUT="$(mktemp -d)" +git clone git@github.com:lyft/boilerplate.git "${OUT}" + +echo "Updating the update.sh script." +cp "${OUT}/boilerplate/update.sh" "${DIR}/update.sh" +echo "" + + +CONFIG_FILE="${DIR}/update.cfg" +README="https://github.com/lyft/boilerplate/blob/master/Readme.rst" + +if [ ! -f "$CONFIG_FILE" ]; then + echo "$CONFIG_FILE not found." + echo "This file is required in order to select which features to include." + echo "See $README for more details." + exit 1 +fi + +if [ -z "$REPOSITORY" ]; then + echo '$REPOSITORY is required to run this script' + echo "See $README for more details." + exit 1 +fi + +while read directory; do + # TODO: Skip empty lines, whitespace only lines, and comment lines + echo "***********************************************************************************" + echo "$directory is configured in update.cfg." + echo "-----------------------------------------------------------------------------------" + echo "syncing files from source." + dir_path="${OUT}/boilerplate/${directory}" + rm -rf "${DIR}/${directory}" + mkdir -p $(dirname "${DIR}/${directory}") + cp -r "$dir_path" "${DIR}/${directory}" + if [ -f "${DIR}/${directory}/update.sh" ]; then + echo "executing ${DIR}/${directory}/update.sh" + "${DIR}/${directory}/update.sh" + fi + echo "***********************************************************************************" + echo "" +done < "$CONFIG_FILE" + +rm -rf "${OUT}" From 5082024b6305f35c158015fcc64644b3a35c3bcf Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Fri, 24 Jan 2020 12:55:03 -0800 Subject: [PATCH 091/191] go get update (#54) --- flytestdlib/go.mod | 68 +++++----- flytestdlib/go.sum | 316 +++++++++++++++++++++++++++++++++++++-------- 2 files changed, 293 insertions(+), 91 deletions(-) diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 3050fc89c9..8c98f3324c 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -3,54 +3,52 @@ module github.com/lyft/flytestdlib go 1.13 require ( - cloud.google.com/go v0.47.0 // indirect - github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.9.2 // indirect - github.com/aws/aws-sdk-go v1.25.16 + cloud.google.com/go v0.52.0 // indirect + github.com/Azure/azure-sdk-for-go v38.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.9.4 // indirect + github.com/Azure/go-autorest/autorest/adal v0.8.1 // indirect + github.com/Azure/go-autorest/autorest/to v0.3.0 // indirect + github.com/aws/aws-sdk-go v1.28.9 github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 - github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash v1.1.0 // indirect - github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 // indirect github.com/coocood/freecache v1.1.0 github.com/dnaeon/go-vcr v1.0.1 // indirect github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 - github.com/fatih/color v1.7.0 - github.com/fatih/structtag v1.1.0 + github.com/fatih/color v1.9.0 + github.com/fatih/structtag v1.2.0 github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 github.com/ghodss/yaml v1.0.0 - github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect github.com/golang/protobuf v1.3.2 - github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7 - github.com/hashicorp/golang-lru v0.5.3 + github.com/graymeta/stow v0.2.4 + github.com/hashicorp/golang-lru v0.5.4 github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect github.com/magiconair/properties v1.8.1 - github.com/mattn/go-colorable v0.0.9 // indirect - github.com/mattn/go-isatty v0.0.10 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect github.com/mitchellh/mapstructure v1.1.2 - github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7 // indirect - github.com/pelletier/go-toml v1.5.0 // indirect - github.com/pkg/errors v0.8.1 - github.com/prometheus/client_golang v1.0.0 - github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect - github.com/prometheus/common v0.7.0 // indirect - github.com/prometheus/procfs v0.0.5 // indirect - github.com/satori/uuid v1.2.0 // indirect + github.com/pelletier/go-toml v1.6.0 // indirect + github.com/pkg/errors v0.9.1 + github.com/prometheus/client_golang v1.3.0 + github.com/prometheus/common v0.9.1 // indirect github.com/sirupsen/logrus v1.4.2 - github.com/spf13/afero v1.2.2 // indirect + github.com/spf13/cast v1.3.1 // indirect github.com/spf13/cobra v0.0.5 github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.3.2 + github.com/spf13/viper v1.6.2 + github.com/stretchr/objx v0.2.0 // indirect github.com/stretchr/testify v1.4.0 - go.opencensus.io v0.22.1 // indirect - golang.org/x/net v0.0.0-20191021144547-ec77196f6094 // indirect - golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2 // indirect - golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 - golang.org/x/tools v0.0.0-20191204011308-9611592c72f6 - google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9 // indirect - google.golang.org/appengine v1.6.5 // indirect - google.golang.org/grpc v1.24.0 // indirect - k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93 - k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31 - k8s.io/klog v1.0.0 // indirect + golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 // indirect + golang.org/x/time v0.0.0-20191024005414-555d28b269f0 + golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4 + google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150 // indirect + gopkg.in/ini.v1 v1.51.1 // indirect + gopkg.in/yaml.v2 v2.2.8 // indirect + k8s.io/apimachinery v0.17.2 + k8s.io/client-go v11.0.0+incompatible ) + +// Pin the version of client-go to something that's compatible with katrogan's fork of api and apimachinery +// Type the following +// replace k8s.io/client-go => k8s.io/client-go kubernetes-1.16.2 +// and it will be replaced with the 'sha' variant of the version +replace k8s.io/client-go => k8s.io/client-go v0.0.0-20191016111102-bec269661e48 diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index 0c6e852ead..8ab3e38c1b 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -5,24 +5,35 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.47.0 h1:1JUtpcY9E7+eTospEwWS2QXP3DEn7poB3E2j0jN74mM= -cloud.google.com/go v0.47.0/go.mod h1:5p3Ky/7f3N10VBkhuR5LFtddroTiMyjZV/Kj5qOQFxU= +cloud.google.com/go v0.52.0 h1:GGslhk/BU052LPlnI1vpp3fcbUs+hQ3E+Doti/3/vF8= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible h1:/x4W7ZQV4PHJYnLUgKubojM8T+zlFEDdaBazAnA/QCY= -github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-autorest/autorest v0.9.2 h1:6AWuh3uWrsZJcNoCHrCF/+g4aKPCU39kaMO6/qrnK/4= -github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v38.2.0+incompatible h1:ZeCdp1E/V5lI8oLR/BjWQh0OW9aFBYlgXGKRVIWNPXY= +github.com/Azure/azure-sdk-for-go v38.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.4 h1:1cM+NmKw91+8h5vfjgzK4ZGLuN72k87XVZBWyGwNjUM= +github.com/Azure/go-autorest/autorest v0.9.4/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk= +github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8= +github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= @@ -30,66 +41,100 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aws/aws-sdk-go v1.25.16 h1:k7Fy6T/uNuLX6zuayU/TJoP7yMgGcJSkZpF7QVjwYpA= -github.com/aws/aws-sdk-go v1.25.16/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.28.8 h1:kPGnElMdW0GDc54Giy1lcE/3gAr2Gzl6cMjYKoBNFhw= +github.com/aws/aws-sdk-go v1.28.8/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.28.9 h1:grIuBQc+p3dTRXerh5+2OxSuWFi0iXuxbFdTSg0jaW0= +github.com/aws/aws-sdk-go v1.28.9/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 h1:VRtJdDi2lqc3MFwmouppm2jlm6icF+7H3WYKpLENMTo= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/coocood/freecache v1.1.0 h1:ENiHOsWdj1BrrlPwblhbn4GdAsMymK3pZORJ+bJGAjA= github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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 h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= -github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structtag v1.1.0 h1:6j4mUV/ES2duvnAzKMFkN6/A5mCaNYPD3xfbAkLLOF8= -github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 h1:SmsgwFZy9pdTk/k8BZz40D3P5umP5+Ejt3hAi0paBNQ= github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc h1:55rEp52jU6bkyslZ1+C/7NGfpQsEc6pxGLAGDOctqbw= -github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 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 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= @@ -99,32 +144,65 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ 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/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7 h1:oIYi27Ruo2k5dxukdOisCSZrowkg70jxxuaPZck9+ic= -github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7/go.mod h1:B24dekNjtWVeREK+dyMHtI22d85VzCT+sX5bVWDtjoA= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/graymeta/stow v0.2.4 h1:qDGstknYXqcnmBQ5TRJtxD9Qv1MuRbYRhLoSMeUDs7U= +github.com/graymeta/stow v0.2.4/go.mod h1:+0vRL9oMECKjPMP7OeVWl8EIqRCpFwDlth3mrAeV2Kw= +github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -134,49 +212,89 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= 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/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7 h1:2FttUGr9cza0JNOUDHeVWo4wVGk92m8bralgdbAeYJY= -github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/ncw/swift v1.0.49 h1:eQaKIjSt/PXLKfYgzg01nevmO+CMXfXGRhB1gOhDs7E= +github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.5.0 h1:5BakdOZdtKJ1FFk6QdL8iSGrMWsXgchNJcrnarjbmJQ= -github.com/pelletier/go-toml v1.5.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= +github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0 h1:miYCvYqFXtl/J9FIy8eNpBfYthAEFg+Ys0XyUVEcDsc= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 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 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/satori/uuid v1.2.0 h1:6TFY4nxn5XwBx0gDfzbEMCNT6k4N/4FNIuN8RACZ0KI= -github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU= +github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= @@ -184,39 +302,62 @@ github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= +github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.1 h1:8dP3SGL7MPB94crU3bEPplMPe83FI4EouesJUeFHv50= -go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= +go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -225,64 +366,91 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191021144547-ec77196f6094 h1:5O4U9trLjNpuhpynaDsqwCk+Tw6seqJz1EbqbnzHrc8= -golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 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-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/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= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2 h1:nq114VpM8lsSlP+lyUbANecYHYiFcSNFtqcBlxRV+gA= -golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/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/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-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w= -golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/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-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -291,17 +459,21 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191010171213-8abd42400456/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191204011308-9611592c72f6 h1:BP62y4oUl8+/CvHuvVqHIPmVRixgDl6y6a+tR7pXXIA= -golang.org/x/tools v0.0.0-20191204011308-9611592c72f6/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4 h1:BPUNhs1Rsd9Ly0hbjDwBxaNBrAyo/CKpkMcA3pkTwgg= +golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9 h1:DcDldKT1PaijNBNDNPaGtfl+LvUHR1xsw5DpipSI1CE= -google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0 h1:yzlyyDW/J0w8yNFJIhiAJy4kq74S+1DOLdawELNxFMA= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -316,31 +488,63 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150 h1:VPpdpQkGvFicX9yo4G5oxZPi9ALBnEOZblPSa/Wa2m4= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.51.1 h1:GyboHr4UqMiLUybYjd22ZjQIKEJEpgtLXtuGbR21Oho= +gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= +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/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93 h1:tT6oQBi0qwLbbZSfDkdIsb23EwaLY85hoAV4SpXfdao= -k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= -k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31 h1:OH3z6khCtxnJBAc0C5CMYWLl1CoK5R5fngX7wrwdN5c= -k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/api v0.0.0-20191016110408-35e52d86657a/go.mod h1:/L5qH+AD540e7Cetbui1tuJeXdmNhO8jM6VkXeDdDhQ= +k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= +k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= +k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4= +k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= +k8s.io/client-go v0.0.0-20191016111102-bec269661e48 h1:C2XVy2z0dV94q9hSSoCuTPp1KOG7IegvbdXuz9VGxoU= +k8s.io/client-go v0.0.0-20191016111102-bec269661e48/go.mod h1:hrwktSwYGI4JK+TJA3dMaFyyvHVi/aLarVHpbs8bgCU= +k8s.io/client-go v0.17.2/go.mod h1:QAzRgsa0C2xl4/eVpeVAZMvikCn8Nm81yqVx3Kk9XYI= +k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= +k8s.io/client-go v11.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= From 5e10d2df9bc93f75484c69e90fc77f2ef9bcc568 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Fri, 24 Jan 2020 18:13:24 -0800 Subject: [PATCH 092/191] Ensure Prometheus Objectives are populated (#55) * Ensure Objectives are populated * Move to vars --- flytestdlib/promutils/scope.go | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/flytestdlib/promutils/scope.go b/flytestdlib/promutils/scope.go index d32fab4cfa..30456c8e1a 100644 --- a/flytestdlib/promutils/scope.go +++ b/flytestdlib/promutils/scope.go @@ -12,6 +12,11 @@ import ( const defaultScopeDelimiterStr = ":" const defaultMetricDelimiterStr = "_" +var ( + defaultObjectives = map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001} + defaultBuckets = []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10} +) + func panicIfError(err error) { if err != nil { panic("Failed to register metrics. Error: " + err.Error()) @@ -222,8 +227,9 @@ func (m metricsScope) MustNewGaugeVec(name, description string, labelNames ...st func (m metricsScope) NewSummary(name, description string) (prometheus.Summary, error) { s := prometheus.NewSummary( prometheus.SummaryOpts{ - Name: m.NewScopedMetricName(name), - Help: description, + Name: m.NewScopedMetricName(name), + Help: description, + Objectives: defaultObjectives, }, ) @@ -239,8 +245,9 @@ func (m metricsScope) MustNewSummary(name, description string) prometheus.Summar func (m metricsScope) NewSummaryVec(name, description string, labelNames ...string) (*prometheus.SummaryVec, error) { s := prometheus.NewSummaryVec( prometheus.SummaryOpts{ - Name: m.NewScopedMetricName(name), - Help: description, + Name: m.NewScopedMetricName(name), + Help: description, + Objectives: defaultObjectives, }, labelNames, ) @@ -256,8 +263,9 @@ func (m metricsScope) MustNewSummaryVec(name, description string, labelNames ... func (m metricsScope) NewHistogram(name, description string) (prometheus.Histogram, error) { h := prometheus.NewHistogram( prometheus.HistogramOpts{ - Name: m.NewScopedMetricName(name), - Help: description, + Name: m.NewScopedMetricName(name), + Help: description, + Buckets: defaultBuckets, }, ) return h, prometheus.Register(h) @@ -272,8 +280,9 @@ func (m metricsScope) MustNewHistogram(name, description string) prometheus.Hist func (m metricsScope) NewHistogramVec(name, description string, labelNames ...string) (*prometheus.HistogramVec, error) { h := prometheus.NewHistogramVec( prometheus.HistogramOpts{ - Name: m.NewScopedMetricName(name), - Help: description, + Name: m.NewScopedMetricName(name), + Help: description, + Buckets: defaultBuckets, }, labelNames, ) From 0eabe40dde4ed8e1a6d16c51112a45950ed60ff0 Mon Sep 17 00:00:00 2001 From: Chang-Hong Hsu Date: Mon, 27 Jan 2020 15:00:00 -0800 Subject: [PATCH 093/191] NewSummary functions with Custom Objectives (#56) * upgrade dependency, and add new summary creation function that takes custom objectives * fix test * refactor the newly added functions * add what objectives mean to the comments * add comments to SummaryOptions --- .../lyft/golang_support_tools/go.mod | 2 +- .../lyft/golang_support_tools/go.sum | 3 ++ flytestdlib/promutils/scope.go | 28 +++++++++++++++++-- flytestdlib/promutils/scope_test.go | 3 ++ 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/flytestdlib/boilerplate/lyft/golang_support_tools/go.mod b/flytestdlib/boilerplate/lyft/golang_support_tools/go.mod index 56d7330b49..6816461a59 100644 --- a/flytestdlib/boilerplate/lyft/golang_support_tools/go.mod +++ b/flytestdlib/boilerplate/lyft/golang_support_tools/go.mod @@ -3,10 +3,10 @@ module github.com/lyft/boilerplate go 1.13 require ( + github.com/alvaroloes/enumer v1.1.2 github.com/golangci/golangci-lint v1.22.2 github.com/lyft/flytestdlib v0.2.31 github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 - github.com/alvaroloes/enumer v1.1.2 ) replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 diff --git a/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum b/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum index 86abf26515..1ac6f1f0c3 100644 --- a/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum +++ b/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum @@ -39,6 +39,7 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/aws/aws-sdk-go v1.25.16 h1:k7Fy6T/uNuLX6zuayU/TJoP7yMgGcJSkZpF7QVjwYpA= github.com/aws/aws-sdk-go v1.25.16/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= @@ -262,6 +263,7 @@ github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1/go.mod h1:eD5JxqMiuNYyFNmyY9rkJ/slN8y59oEu4Ei7F8OoKWQ= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.5.0 h1:5BakdOZdtKJ1FFk6QdL8iSGrMWsXgchNJcrnarjbmJQ= @@ -468,6 +470,7 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524210228-3d17549cdc6b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= diff --git a/flytestdlib/promutils/scope.go b/flytestdlib/promutils/scope.go index 30456c8e1a..f1854b920a 100644 --- a/flytestdlib/promutils/scope.go +++ b/flytestdlib/promutils/scope.go @@ -113,6 +113,13 @@ func (s Timer) Stop() float64 { return scaled } +// A SummaryOptions represents a set of options that can be supplied when creating a new prometheus summary metric +type SummaryOptions struct { + // An Objectives defines the quantile rank estimates with their respective absolute errors. + // Refer to https://godoc.org/github.com/prometheus/client_golang/prometheus#SummaryOpts for details + Objectives map[float64]float64 +} + // A Scope represents a prefix in Prometheus. It is nestable, thus every metric that is published does not need to // provide a prefix, but just the name of the metric. As long as the Scope is used to create a new instance of the metric // The prefix (or scope) is automatically set. @@ -133,6 +140,11 @@ type Scope interface { NewSummary(name, description string) (prometheus.Summary, error) MustNewSummary(name, description string) prometheus.Summary + // Creates new prometheus.Summary metric with custom options, such as a custom set of objectives (i.e., target quantiles). + // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information + NewSummaryWithOptions(name, description string, options SummaryOptions) (prometheus.Summary, error) + MustNewSummaryWithOptions(name, description string, options SummaryOptions) prometheus.Summary + // Creates new prometheus.SummaryVec metric with the prefix as the CurrentScope // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information NewSummaryVec(name, description string, labelNames ...string) (*prometheus.SummaryVec, error) @@ -225,19 +237,29 @@ func (m metricsScope) MustNewGaugeVec(name, description string, labelNames ...st } func (m metricsScope) NewSummary(name, description string) (prometheus.Summary, error) { + return m.NewSummaryWithOptions(name, description, SummaryOptions{Objectives: defaultObjectives}) +} + +func (m metricsScope) MustNewSummary(name, description string) prometheus.Summary { + s, err := m.NewSummary(name, description) + panicIfError(err) + return s +} + +func (m metricsScope) NewSummaryWithOptions(name, description string, options SummaryOptions) (prometheus.Summary, error) { s := prometheus.NewSummary( prometheus.SummaryOpts{ Name: m.NewScopedMetricName(name), Help: description, - Objectives: defaultObjectives, + Objectives: options.Objectives, }, ) return s, prometheus.Register(s) } -func (m metricsScope) MustNewSummary(name, description string) prometheus.Summary { - s, err := m.NewSummary(name, description) +func (m metricsScope) MustNewSummaryWithOptions(name, description string, options SummaryOptions) prometheus.Summary { + s, err := m.NewSummaryWithOptions(name, description, options) panicIfError(err) return s } diff --git a/flytestdlib/promutils/scope_test.go b/flytestdlib/promutils/scope_test.go index cb076ee980..610f29f2e4 100644 --- a/flytestdlib/promutils/scope_test.go +++ b/flytestdlib/promutils/scope_test.go @@ -74,6 +74,9 @@ func TestMetricsScope(t *testing.T) { t.Run("Summary", func(t *testing.T) { m := s.MustNewSummary("xs", description) assert.Equal(t, `Desc{fqName: "test:xs", help: "some x", constLabels: {}, variableLabels: []}`, m.Desc().String()) + mco, err := s.NewSummaryWithOptions("xsco", description, SummaryOptions{Objectives: map[float64]float64{0.5: 0.05, 1.0: 0.0}}) + assert.Nil(t, err) + assert.Equal(t, `Desc{fqName: "test:xsco", help: "some x", constLabels: {}, variableLabels: []}`, mco.Desc().String()) mv := s.MustNewSummaryVec("xsv", description) assert.NotNil(t, mv) assert.Panics(t, func() { From 965258a08b8a8a755e17569a5a51176e2823b158 Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Wed, 11 Mar 2020 11:07:00 -0700 Subject: [PATCH 094/191] Add standardized pull_request_template for Flyte (#57) --- flytestdlib/.golangci.yml | 5 ++++ .../lyft/golang_support_tools/go.sum | 2 ++ .../lyft/golang_test_targets/Makefile | 3 +- .../lyft/golangci_file/.golangci.yml | 30 +++++++++++++++++++ .../boilerplate/lyft/golangci_file/Readme.rst | 8 +++++ .../boilerplate/lyft/golangci_file/update.sh | 14 +++++++++ .../lyft/pull_request_template/Readme.rst | 8 +++++ .../pull_request_template.md | 26 ++++++++++++++++ .../lyft/pull_request_template/update.sh | 12 ++++++++ flytestdlib/boilerplate/update.cfg | 1 + flytestdlib/pull_request_template.md | 26 ++++++++++++++++ 11 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 flytestdlib/boilerplate/lyft/golangci_file/.golangci.yml create mode 100644 flytestdlib/boilerplate/lyft/golangci_file/Readme.rst create mode 100755 flytestdlib/boilerplate/lyft/golangci_file/update.sh create mode 100644 flytestdlib/boilerplate/lyft/pull_request_template/Readme.rst create mode 100644 flytestdlib/boilerplate/lyft/pull_request_template/pull_request_template.md create mode 100755 flytestdlib/boilerplate/lyft/pull_request_template/update.sh create mode 100644 flytestdlib/pull_request_template.md diff --git a/flytestdlib/.golangci.yml b/flytestdlib/.golangci.yml index dbfea73e09..a414f33f79 100644 --- a/flytestdlib/.golangci.yml +++ b/flytestdlib/.golangci.yml @@ -1,3 +1,8 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + run: skip-dirs: - pkg/client diff --git a/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum b/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum index 1ac6f1f0c3..81e0469630 100644 --- a/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum +++ b/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum @@ -39,6 +39,7 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/aws/aws-sdk-go v1.25.16 h1:k7Fy6T/uNuLX6zuayU/TJoP7yMgGcJSkZpF7QVjwYpA= @@ -263,6 +264,7 @@ github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 h1:/I3lTljEEDNYLho3/FUB7iD/oc2cEFgVmbHzV+O0PtU= github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1/go.mod h1:eD5JxqMiuNYyFNmyY9rkJ/slN8y59oEu4Ei7F8OoKWQ= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile index 641c45ca7a..529b79bd1d 100644 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile @@ -26,7 +26,8 @@ mod_download: #download dependencies (including test deps) for the package install: download_tooling mod_download .PHONY: show -show: go list -m all +show: + go list -m all .PHONY: test_unit test_unit: diff --git a/flytestdlib/boilerplate/lyft/golangci_file/.golangci.yml b/flytestdlib/boilerplate/lyft/golangci_file/.golangci.yml new file mode 100644 index 0000000000..a414f33f79 --- /dev/null +++ b/flytestdlib/boilerplate/lyft/golangci_file/.golangci.yml @@ -0,0 +1,30 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + +run: + skip-dirs: + - pkg/client + +linters: + disable-all: true + enable: + - deadcode + - errcheck + - gas + - goconst + - goimports + - golint + - gosimple + - govet + - ineffassign + - misspell + - nakedret + - staticcheck + - structcheck + - typecheck + - unconvert + - unparam + - unused + - varcheck diff --git a/flytestdlib/boilerplate/lyft/golangci_file/Readme.rst b/flytestdlib/boilerplate/lyft/golangci_file/Readme.rst new file mode 100644 index 0000000000..ba5d2b61ce --- /dev/null +++ b/flytestdlib/boilerplate/lyft/golangci_file/Readme.rst @@ -0,0 +1,8 @@ +GolangCI File +~~~~~~~~~~~~~ + +Provides a ``.golangci`` file with the linters we've agreed upon. + +**To Enable:** + +Add ``lyft/golangci_file`` to your ``boilerplate/update.cfg`` file. diff --git a/flytestdlib/boilerplate/lyft/golangci_file/update.sh b/flytestdlib/boilerplate/lyft/golangci_file/update.sh new file mode 100755 index 0000000000..9e9e6c1f46 --- /dev/null +++ b/flytestdlib/boilerplate/lyft/golangci_file/update.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +# Clone the .golangci file +echo " - copying ${DIR}/.golangci to the root directory." +cp ${DIR}/.golangci.yml ${DIR}/../../../.golangci.yml diff --git a/flytestdlib/boilerplate/lyft/pull_request_template/Readme.rst b/flytestdlib/boilerplate/lyft/pull_request_template/Readme.rst new file mode 100644 index 0000000000..b85a4ea121 --- /dev/null +++ b/flytestdlib/boilerplate/lyft/pull_request_template/Readme.rst @@ -0,0 +1,8 @@ +Pull Request Template +~~~~~~~~~~~~~~~~~~~~~ + +Provides a Pull Request template. + +**To Enable:** + +Add ``lyft/golang_test_targets`` to your ``boilerplate/update.cfg`` file. diff --git a/flytestdlib/boilerplate/lyft/pull_request_template/pull_request_template.md b/flytestdlib/boilerplate/lyft/pull_request_template/pull_request_template.md new file mode 100644 index 0000000000..d2becf38b7 --- /dev/null +++ b/flytestdlib/boilerplate/lyft/pull_request_template/pull_request_template.md @@ -0,0 +1,26 @@ +# TL;DR +_Please replace this text with a description of what this PR accomplishes._ + +## Type + - [ ] Bug Fix + - [ ] Feature + - [ ] Plugin + +## Are all requirements met? + + - [ ] Code completed + - [ ] Smoke tested + - [ ] Unit tests added + - [ ] Code documentation added + - [ ] Any pending items have an associated Issue + +## Complete description + _How did you fix the bug, make the feature etc. Link to any design docs etc_ + +## Tracking Issue +https://github.com/lyft/flyte/issues/ + +## Follow-up issue +_NA_ +OR +_https://github.com/lyft/flyte/issues/_ diff --git a/flytestdlib/boilerplate/lyft/pull_request_template/update.sh b/flytestdlib/boilerplate/lyft/pull_request_template/update.sh new file mode 100755 index 0000000000..13f0c3b57d --- /dev/null +++ b/flytestdlib/boilerplate/lyft/pull_request_template/update.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +cp ${DIR}/pull_request_template.md ${DIR}/../../../pull_request_template.md diff --git a/flytestdlib/boilerplate/update.cfg b/flytestdlib/boilerplate/update.cfg index 5c54f64c93..a1b1bff989 100644 --- a/flytestdlib/boilerplate/update.cfg +++ b/flytestdlib/boilerplate/update.cfg @@ -1,3 +1,4 @@ lyft/golang_test_targets lyft/golangci_file lyft/golang_support_tools +lyft/pull_request_template diff --git a/flytestdlib/pull_request_template.md b/flytestdlib/pull_request_template.md new file mode 100644 index 0000000000..d2becf38b7 --- /dev/null +++ b/flytestdlib/pull_request_template.md @@ -0,0 +1,26 @@ +# TL;DR +_Please replace this text with a description of what this PR accomplishes._ + +## Type + - [ ] Bug Fix + - [ ] Feature + - [ ] Plugin + +## Are all requirements met? + + - [ ] Code completed + - [ ] Smoke tested + - [ ] Unit tests added + - [ ] Code documentation added + - [ ] Any pending items have an associated Issue + +## Complete description + _How did you fix the bug, make the feature etc. Link to any design docs etc_ + +## Tracking Issue +https://github.com/lyft/flyte/issues/ + +## Follow-up issue +_NA_ +OR +_https://github.com/lyft/flyte/issues/_ From b44143b6772107413f3d36cbdcc0f661c294e919 Mon Sep 17 00:00:00 2001 From: Honnix Date: Tue, 17 Mar 2020 17:20:55 +0100 Subject: [PATCH 095/191] separate commands in Makefile (#59) --- flytestdlib/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flytestdlib/Makefile b/flytestdlib/Makefile index 49ab0b4de5..003dc5c1fb 100644 --- a/flytestdlib/Makefile +++ b/flytestdlib/Makefile @@ -28,5 +28,5 @@ gen-config: download_tooling .PHONY: test_unit_codecov test_unit_codecov: - go test ./... -race -coverprofile=coverage.txt -covermode=atomic; curl -s https://codecov.io/bash > codecov_bash.sh; bash codecov_bash.sh - + go test ./... -race -coverprofile=coverage.txt -covermode=atomic + curl -s https://codecov.io/bash > codecov_bash.sh && bash codecov_bash.sh From ded32aaa000adc80ff193dfde99c2628ed30c36e Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Fri, 20 Mar 2020 13:22:01 -0700 Subject: [PATCH 096/191] Add a failure type label to failure metrics in storage package (#60) Adds failure type as a tag on head, read and write failures emitted by storage package. --- flytestdlib/contextutils/context.go | 11 +++ flytestdlib/promutils/labeled/counter.go | 14 +++- .../promutils/labeled/metric_option.go | 9 +++ flytestdlib/promutils/labeled/stopwatch.go | 16 +++- flytestdlib/storage/stow_store.go | 74 +++++++++++-------- flytestdlib/storage/utils.go | 27 +++++-- 6 files changed, 105 insertions(+), 46 deletions(-) diff --git a/flytestdlib/contextutils/context.go b/flytestdlib/contextutils/context.go index af6e2e018f..9bc6a48d79 100644 --- a/flytestdlib/contextutils/context.go +++ b/flytestdlib/contextutils/context.go @@ -44,6 +44,17 @@ var logKeys = []Key{ ResourceVersionKey, } +// MetricKeysFromStrings is a convenience method to convert a slice of strings into a slice of Keys +func MetricKeysFromStrings(keys []string) []Key { + res := make([]Key, 0, len(keys)) + + for _, k := range keys { + res = append(res, Key(k)) + } + + return res +} + // Gets a new context with the resource version set. func WithResourceVersion(ctx context.Context, resourceVersion string) context.Context { return context.WithValue(ctx, ResourceVersionKey, resourceVersion) diff --git a/flytestdlib/promutils/labeled/counter.go b/flytestdlib/promutils/labeled/counter.go index c68ce02d23..0b5a956c81 100644 --- a/flytestdlib/promutils/labeled/counter.go +++ b/flytestdlib/promutils/labeled/counter.go @@ -14,6 +14,7 @@ type Counter struct { *prometheus.CounterVec prometheus.Counter + additionalLabels []contextutils.Key } // Inc increments the counter by 1. Use Add to increment it by arbitrary non-negative values. The data point will be @@ -33,7 +34,7 @@ func (c Counter) Inc(ctx context.Context) { // Add adds the given value to the counter. It panics if the value is < 0.. The data point will be labeled with values // from context. See labeled.SetMetricsKeys for information about to configure that. func (c Counter) Add(ctx context.Context, v float64) { - counter, err := c.CounterVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + counter, err := c.CounterVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, c.additionalLabels...)...)) if err != nil { panic(err.Error()) } @@ -51,15 +52,20 @@ func NewCounter(name, description string, scope promutils.Scope, opts ...MetricO panic(ErrNeverSet) } - c := Counter{ - CounterVec: scope.MustNewCounterVec(name, description, metricStringKeys...), - } + c := Counter{} for _, opt := range opts { if _, emitUnlabeledMetric := opt.(EmitUnlabeledMetricOption); emitUnlabeledMetric { c.Counter = scope.MustNewCounter(GetUnlabeledMetricName(name), description) + } else if additionalLabels, casted := opt.(AdditionalLabelsOption); casted { + c.CounterVec = scope.MustNewCounterVec(name, description, append(metricStringKeys, additionalLabels.Labels...)...) + c.additionalLabels = contextutils.MetricKeysFromStrings(additionalLabels.Labels) } } + if c.CounterVec == nil { + c.CounterVec = scope.MustNewCounterVec(name, description, metricStringKeys...) + } + return c } diff --git a/flytestdlib/promutils/labeled/metric_option.go b/flytestdlib/promutils/labeled/metric_option.go index 08fb2f76f9..458a2852da 100644 --- a/flytestdlib/promutils/labeled/metric_option.go +++ b/flytestdlib/promutils/labeled/metric_option.go @@ -13,3 +13,12 @@ type EmitUnlabeledMetricOption struct { func (EmitUnlabeledMetricOption) isMetricOption() {} var EmitUnlabeledMetric = EmitUnlabeledMetricOption{} + +// AdditionalLabelsOption instructs the labeled metric to expect additional labels scoped for this just this metric +// in the context passed. +type AdditionalLabelsOption struct { + // A collection of labels to look for in the passed context. + Labels []string +} + +func (AdditionalLabelsOption) isMetricOption() {} diff --git a/flytestdlib/promutils/labeled/stopwatch.go b/flytestdlib/promutils/labeled/stopwatch.go index 90e29971f9..2166be1489 100644 --- a/flytestdlib/promutils/labeled/stopwatch.go +++ b/flytestdlib/promutils/labeled/stopwatch.go @@ -16,6 +16,8 @@ type StopWatch struct { // through a flag in the constructor, we initialize this additional untagged stopwatch to compute percentiles // across tags. promutils.StopWatch + + additionalLabels []contextutils.Key } // Start creates a new Instance of the StopWatch called a Timer that is closeable/stoppable. @@ -46,7 +48,7 @@ func (c StopWatch) Start(ctx context.Context) Timer { // Observes specified duration between the start and end time. The data point will be labeled with values from context. // See labeled.SetMetricsKeys for information about to configure that. func (c StopWatch) Observe(ctx context.Context, start, end time.Time) { - w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, c.additionalLabels...)...)) if err != nil { panic(err.Error()) } @@ -73,15 +75,21 @@ func NewStopWatch(name, description string, scale time.Duration, scope promutils panic(ErrNeverSet) } - sw := StopWatch{ - StopWatchVec: scope.MustNewStopWatchVec(name, description, scale, metricStringKeys...), - } + sw := StopWatch{} for _, opt := range opts { if _, emitUnableMetric := opt.(EmitUnlabeledMetricOption); emitUnableMetric { sw.StopWatch = scope.MustNewStopWatch(GetUnlabeledMetricName(name), description, scale) + } else if additionalLabels, casted := opt.(AdditionalLabelsOption); casted { + sw.StopWatchVec = scope.MustNewStopWatchVec(name, description, scale, + append(metricStringKeys, additionalLabels.Labels...)...) + sw.additionalLabels = contextutils.MetricKeysFromStrings(additionalLabels.Labels) } } + if sw.StopWatchVec == nil { + sw.StopWatchVec = scope.MustNewStopWatchVec(name, description, scale, metricStringKeys...) + } + return sw } diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 2d7dc27e51..62aa0ecf6e 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -5,9 +5,11 @@ import ( "io" "time" - "github.com/lyft/flytestdlib/errors" + "github.com/lyft/flytestdlib/contextutils" + + "github.com/lyft/flytestdlib/promutils/labeled" - "github.com/prometheus/client_golang/prometheus" + "github.com/lyft/flytestdlib/errors" "github.com/lyft/flytestdlib/promutils" @@ -15,18 +17,22 @@ import ( errs "github.com/pkg/errors" ) +const ( + FailureTypeLabel contextutils.Key = "failure_type" +) + type stowMetrics struct { - BadReference prometheus.Counter - BadContainer prometheus.Counter + BadReference labeled.Counter + BadContainer labeled.Counter - HeadFailure prometheus.Counter - HeadLatency promutils.StopWatch + HeadFailure labeled.Counter + HeadLatency labeled.StopWatch - ReadFailure prometheus.Counter - ReadOpenLatency promutils.StopWatch + ReadFailure labeled.Counter + ReadOpenLatency labeled.StopWatch - WriteFailure prometheus.Counter - WriteLatency promutils.StopWatch + WriteFailure labeled.Counter + WriteLatency labeled.StopWatch } // Implements DataStore to talk to stow location store. @@ -50,9 +56,9 @@ func (s StowMetadata) Exists() bool { return s.exists } -func (s *StowStore) getContainer(container string) (c stow.Container, err error) { +func (s *StowStore) getContainer(ctx context.Context, container string) (c stow.Container, err error) { if s.Container.Name() != container { - s.metrics.BadContainer.Inc() + s.metrics.BadContainer.Inc(ctx) return nil, errs.Wrapf(stow.ErrNotFound, "Conf container:%v != Passed Container:%v", s.Container.Name(), container) } @@ -62,16 +68,16 @@ func (s *StowStore) getContainer(container string) (c stow.Container, err error) func (s *StowStore) Head(ctx context.Context, reference DataReference) (Metadata, error) { _, c, k, err := reference.Split() if err != nil { - s.metrics.BadReference.Inc() + s.metrics.BadReference.Inc(ctx) return nil, err } - container, err := s.getContainer(c) + container, err := s.getContainer(ctx, c) if err != nil { return nil, err } - t := s.metrics.HeadLatency.Start() + t := s.metrics.HeadLatency.Start(ctx) item, err := container.Item(k) if err == nil { if _, err = item.Metadata(); err == nil { @@ -85,29 +91,31 @@ func (s *StowStore) Head(ctx context.Context, reference DataReference) (Metadata } } } - s.metrics.HeadFailure.Inc() + if IsNotFound(err) { return StowMetadata{exists: false}, nil } + + incFailureCounterForError(ctx, s.metrics.HeadFailure, err) return StowMetadata{exists: false}, errs.Wrapf(err, "path:%v", k) } func (s *StowStore) ReadRaw(ctx context.Context, reference DataReference) (io.ReadCloser, error) { _, c, k, err := reference.Split() if err != nil { - s.metrics.BadReference.Inc() + s.metrics.BadReference.Inc(ctx) return nil, err } - container, err := s.getContainer(c) + container, err := s.getContainer(ctx, c) if err != nil { return nil, err } - t := s.metrics.ReadOpenLatency.Start() + t := s.metrics.ReadOpenLatency.Start(ctx) item, err := container.Item(k) if err != nil { - s.metrics.ReadFailure.Inc() + incFailureCounterForError(ctx, s.metrics.ReadFailure, err) return nil, err } t.Stop() @@ -127,21 +135,22 @@ func (s *StowStore) ReadRaw(ctx context.Context, reference DataReference) (io.Re func (s *StowStore) WriteRaw(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error { _, c, k, err := reference.Split() if err != nil { - s.metrics.BadReference.Inc() + s.metrics.BadReference.Inc(ctx) return err } - container, err := s.getContainer(c) + container, err := s.getContainer(ctx, c) if err != nil { return err } - t := s.metrics.WriteLatency.Start() + t := s.metrics.WriteLatency.Start(ctx) _, err = container.Put(k, raw, size, opts.Metadata) if err != nil { - s.metrics.WriteFailure.Inc() + incFailureCounterForError(ctx, s.metrics.WriteFailure, err) return errs.Wrapf(err, "Failed to write data [%vb] to path [%v].", size, k) } + t.Stop() return nil @@ -152,21 +161,22 @@ func (s *StowStore) GetBaseContainerFQN(ctx context.Context) DataReference { } func NewStowRawStore(containerBaseFQN DataReference, container stow.Container, metricsScope promutils.Scope) (*StowStore, error) { + failureTypeOption := labeled.AdditionalLabelsOption{Labels: []string{FailureTypeLabel.String()}} self := &StowStore{ Container: container, containerBaseFQN: containerBaseFQN, metrics: &stowMetrics{ - BadReference: metricsScope.MustNewCounter("bad_key", "Indicates the provided storage reference/key is incorrectly formatted"), - BadContainer: metricsScope.MustNewCounter("bad_container", "Indicates request for a container that has not been initialized"), + BadReference: labeled.NewCounter("bad_key", "Indicates the provided storage reference/key is incorrectly formatted", metricsScope, labeled.EmitUnlabeledMetric), + BadContainer: labeled.NewCounter("bad_container", "Indicates request for a container that has not been initialized", metricsScope, labeled.EmitUnlabeledMetric), - HeadFailure: metricsScope.MustNewCounter("head_failure", "Indicates failure in HEAD for a given reference"), - HeadLatency: metricsScope.MustNewStopWatch("head", "Indicates time to fetch metadata using the Head API", time.Millisecond), + HeadFailure: labeled.NewCounter("head_failure", "Indicates failure in HEAD for a given reference", metricsScope, labeled.EmitUnlabeledMetric), + HeadLatency: labeled.NewStopWatch("head", "Indicates time to fetch metadata using the Head API", time.Millisecond, metricsScope, labeled.EmitUnlabeledMetric), - ReadFailure: metricsScope.MustNewCounter("read_failure", "Indicates failure in GET for a given reference"), - ReadOpenLatency: metricsScope.MustNewStopWatch("read_open", "Indicates time to first byte when reading", time.Millisecond), + ReadFailure: labeled.NewCounter("read_failure", "Indicates failure in GET for a given reference", metricsScope, labeled.EmitUnlabeledMetric, failureTypeOption), + ReadOpenLatency: labeled.NewStopWatch("read_open", "Indicates time to first byte when reading", time.Millisecond, metricsScope, labeled.EmitUnlabeledMetric), - WriteFailure: metricsScope.MustNewCounter("write_failure", "Indicates failure in storing/PUT for a given reference"), - WriteLatency: metricsScope.MustNewStopWatch("write", "Time to write an object irrespective of size", time.Millisecond), + WriteFailure: labeled.NewCounter("write_failure", "Indicates failure in storing/PUT for a given reference", metricsScope, labeled.EmitUnlabeledMetric, failureTypeOption), + WriteLatency: labeled.NewStopWatch("write", "Time to write an object irrespective of size", time.Millisecond, metricsScope, labeled.EmitUnlabeledMetric), }, } diff --git a/flytestdlib/storage/utils.go b/flytestdlib/storage/utils.go index e2820c82d9..bf5b1567ec 100644 --- a/flytestdlib/storage/utils.go +++ b/flytestdlib/storage/utils.go @@ -1,17 +1,23 @@ package storage import ( + "context" "os" - errors2 "github.com/lyft/flytestdlib/errors" + stdErrs "github.com/lyft/flytestdlib/errors" + "github.com/lyft/flytestdlib/promutils/labeled" "github.com/graymeta/stow" "github.com/pkg/errors" ) var ( - ErrExceedsLimit errors2.ErrorCode = "LIMIT_EXCEEDED" - ErrFailedToWriteCache errors2.ErrorCode = "CACHE_WRITE_FAILED" + ErrExceedsLimit stdErrs.ErrorCode = "LIMIT_EXCEEDED" + ErrFailedToWriteCache stdErrs.ErrorCode = "CACHE_WRITE_FAILED" +) + +const ( + genericFailureTypeLabel = "Generic" ) // Gets a value indicating whether the underlying error is a Not Found error. @@ -20,7 +26,7 @@ func IsNotFound(err error) bool { return true } - if errors2.IsCausedByError(err, stow.ErrNotFound) { + if stdErrs.IsCausedByError(err, stow.ErrNotFound) { return true } @@ -38,11 +44,11 @@ func IsExists(err error) bool { // Gets a value indicating whether the root cause of error is a "limit exceeded" error. func IsExceedsLimit(err error) bool { - return errors2.IsCausedBy(err, ErrExceedsLimit) + return stdErrs.IsCausedBy(err, ErrExceedsLimit) } func IsFailedWriteToCache(err error) bool { - return errors2.IsCausedBy(err, ErrFailedToWriteCache) + return stdErrs.IsCausedBy(err, ErrFailedToWriteCache) } func MapStrings(mapper func(string) string, strings ...string) []string { @@ -56,3 +62,12 @@ func MapStrings(mapper func(string) string, strings ...string) []string { return strings } + +func incFailureCounterForError(ctx context.Context, counter labeled.Counter, err error) { + errCode, found := stdErrs.GetErrorCode(err) + if found { + counter.Inc(context.WithValue(ctx, FailureTypeLabel, errCode)) + } else { + counter.Inc(context.WithValue(ctx, FailureTypeLabel, genericFailureTypeLabel)) + } +} From 629391cfde06204312de2f844516a2456cd91d4e Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Fri, 20 Mar 2020 13:31:43 -0700 Subject: [PATCH 097/191] Scoop update for flytestdlib version v0.3.3 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 6b17bde2f0..36209b9ec6 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.2.16", + "version": "0.3.3", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.16/flytestdlib_0.2.16_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.3/flytestdlib_0.3.3_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "042389e9e0d08df89d771962b10ed193cd2834a8328d90f307a2acf3bbbb4094" + "hash": "e86b77cea458fb5e9d5f5d75fdbbebdef5be1fe211ba562d352f8177a3bf9e0c" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.2.16/flytestdlib_0.2.16_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.3/flytestdlib_0.3.3_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "030581539f3e55c525bbf0157058701cfd7281ef0b40156c4b4049269bc0093b" + "hash": "528dfd69ab173eeed680654a5bc2ab703728646501b3fcc54f600bd3368b7586" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 5e7cc49d129ca1bf8510dbc302e9efe9cd93ffc8 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 15 Apr 2020 13:11:35 -0700 Subject: [PATCH 098/191] [Storage] Allow setting http headers for default http client (#61) Exposes a config in storage config section to allow setting http headers to the default http client. This is because some of the underlying storage systems (e.g. s3 stow) doesn't allow setting some settings (e.g. ACL) and the only way to support that is through setting HTTP HEADERS that AWS S3 respects. --- flytestdlib/cache/mocks/AutoRefresh.go | 10 +++- flytestdlib/cache/mocks/ItemWrapper.go | 6 +- flytestdlib/cli/pflags/api/generator_test.go | 2 +- .../cli/pflags/api/testdata/testtype.go | 1 + .../cli/pflags/api/testdata/testtype_test.go | 22 +++++++ flytestdlib/go.sum | 9 --- flytestdlib/random/mocks/comparable.go | 6 +- .../random/mocks/weighted_random_list.go | 10 +++- flytestdlib/storage/config.go | 11 +++- flytestdlib/storage/config_flags.go | 1 + flytestdlib/storage/config_flags_test.go | 22 +++++++ flytestdlib/storage/rawstores.go | 45 ++++++++++++++ flytestdlib/storage/rawstores_test.go | 60 +++++++++++++++++++ flytestdlib/storage/stowstore.go | 4 ++ flytestdlib/storage/testdata/config.yaml | 3 + flytestdlib/tests/testdata/combined.yaml | 3 + flytestdlib/utils/mocks/auto_refresh_cache.go | 9 ++- flytestdlib/utils/mocks/rate_limiter.go | 7 ++- 18 files changed, 204 insertions(+), 27 deletions(-) create mode 100644 flytestdlib/storage/rawstores_test.go diff --git a/flytestdlib/cache/mocks/AutoRefresh.go b/flytestdlib/cache/mocks/AutoRefresh.go index 933f093f89..c7a52d02fa 100644 --- a/flytestdlib/cache/mocks/AutoRefresh.go +++ b/flytestdlib/cache/mocks/AutoRefresh.go @@ -2,9 +2,13 @@ package mocks -import cache "github.com/lyft/flytestdlib/cache" -import context "context" -import mock "github.com/stretchr/testify/mock" +import ( + context "context" + + cache "github.com/lyft/flytestdlib/cache" + + mock "github.com/stretchr/testify/mock" +) // AutoRefresh is an autogenerated mock type for the AutoRefresh type type AutoRefresh struct { diff --git a/flytestdlib/cache/mocks/ItemWrapper.go b/flytestdlib/cache/mocks/ItemWrapper.go index 4deb009a8a..768941d870 100644 --- a/flytestdlib/cache/mocks/ItemWrapper.go +++ b/flytestdlib/cache/mocks/ItemWrapper.go @@ -2,8 +2,10 @@ package mocks -import cache "github.com/lyft/flytestdlib/cache" -import mock "github.com/stretchr/testify/mock" +import ( + cache "github.com/lyft/flytestdlib/cache" + mock "github.com/stretchr/testify/mock" +) // ItemWrapper is an autogenerated mock type for the ItemWrapper type type ItemWrapper struct { diff --git a/flytestdlib/cli/pflags/api/generator_test.go b/flytestdlib/cli/pflags/api/generator_test.go index 26f77a64e0..6826f34f13 100644 --- a/flytestdlib/cli/pflags/api/generator_test.go +++ b/flytestdlib/cli/pflags/api/generator_test.go @@ -78,7 +78,7 @@ func TestNewGenerator(t *testing.T) { goldenOutput, err := ioutil.ReadFile(filepath.Clean(goldenFilePath)) assert.NoError(t, err) - assert.Equal(t, goldenOutput, codeBytes) + assert.Equal(t, string(goldenOutput), string(codeBytes)) goldenTestOutput, err := ioutil.ReadFile(filepath.Clean(goldenTestFilePath)) assert.NoError(t, err) diff --git a/flytestdlib/cli/pflags/api/testdata/testtype.go b/flytestdlib/cli/pflags/api/testdata/testtype.go index c960f10044..f07780dbff 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype.go @@ -59,6 +59,7 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.max_size_mbs"), DefaultTestType.StorageConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.target_gc_percent"), DefaultTestType.StorageConfig.Cache.TargetGCPercent, "Sets the garbage collection target percentage.") cmdFlags.Int64(fmt.Sprintf("%v%v", prefix, "storage.limits.maxDownloadMBs"), DefaultTestType.StorageConfig.Limits.GetLimitMegabytes, "Maximum allowed download size (in MBs) per call.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.defaultHttpClient.timeout"), DefaultTestType.StorageConfig.DefaultHTTPClient.Timeout.String(), "Sets time out on the http client.") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "i"), DefaultTestType.elemValueOrNil(DefaultTestType.IntValue).(int), "") return cmdFlags } diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_test.go b/flytestdlib/cli/pflags/api/testdata/testtype_test.go index 450e04068b..01b7e644ab 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype_test.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype_test.go @@ -495,6 +495,28 @@ func TestTestType_SetFlags(t *testing.T) { } }) }) + t.Run("Test_storage.defaultHttpClient.timeout", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("storage.defaultHttpClient.timeout"); err == nil { + assert.Equal(t, string(DefaultTestType.StorageConfig.DefaultHTTPClient.Timeout.String()), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := DefaultTestType.StorageConfig.DefaultHTTPClient.Timeout.String() + + cmdFlags.Set("storage.defaultHttpClient.timeout", testValue) + if vString, err := cmdFlags.GetString("storage.defaultHttpClient.timeout"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.DefaultHTTPClient.Timeout) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_i", func(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index 8ab3e38c1b..40358a09b4 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -52,8 +52,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.28.8 h1:kPGnElMdW0GDc54Giy1lcE/3gAr2Gzl6cMjYKoBNFhw= -github.com/aws/aws-sdk-go v1.28.8/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.28.9 h1:grIuBQc+p3dTRXerh5+2OxSuWFi0iXuxbFdTSg0jaW0= github.com/aws/aws-sdk-go v1.28.9/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 h1:VRtJdDi2lqc3MFwmouppm2jlm6icF+7H3WYKpLENMTo= @@ -167,7 +165,6 @@ github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA github.com/graymeta/stow v0.2.4 h1:qDGstknYXqcnmBQ5TRJtxD9Qv1MuRbYRhLoSMeUDs7U= github.com/graymeta/stow v0.2.4/go.mod h1:+0vRL9oMECKjPMP7OeVWl8EIqRCpFwDlth3mrAeV2Kw= github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -350,7 +347,6 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -526,15 +522,11 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= k8s.io/api v0.0.0-20191016110408-35e52d86657a/go.mod h1:/L5qH+AD540e7Cetbui1tuJeXdmNhO8jM6VkXeDdDhQ= -k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4= k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= k8s.io/client-go v0.0.0-20191016111102-bec269661e48 h1:C2XVy2z0dV94q9hSSoCuTPp1KOG7IegvbdXuz9VGxoU= k8s.io/client-go v0.0.0-20191016111102-bec269661e48/go.mod h1:hrwktSwYGI4JK+TJA3dMaFyyvHVi/aLarVHpbs8bgCU= -k8s.io/client-go v0.17.2/go.mod h1:QAzRgsa0C2xl4/eVpeVAZMvikCn8Nm81yqVx3Kk9XYI= -k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= -k8s.io/client-go v11.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -544,7 +536,6 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/flytestdlib/random/mocks/comparable.go b/flytestdlib/random/mocks/comparable.go index 4cd553aba0..a6163e9f98 100644 --- a/flytestdlib/random/mocks/comparable.go +++ b/flytestdlib/random/mocks/comparable.go @@ -2,8 +2,10 @@ package mocks -import mock "github.com/stretchr/testify/mock" -import random "github.com/lyft/flytestdlib/random" +import ( + random "github.com/lyft/flytestdlib/random" + mock "github.com/stretchr/testify/mock" +) // Comparable is an autogenerated mock type for the Comparable type type Comparable struct { diff --git a/flytestdlib/random/mocks/weighted_random_list.go b/flytestdlib/random/mocks/weighted_random_list.go index 0860bc2570..490d5e3632 100644 --- a/flytestdlib/random/mocks/weighted_random_list.go +++ b/flytestdlib/random/mocks/weighted_random_list.go @@ -2,9 +2,13 @@ package mocks -import mock "github.com/stretchr/testify/mock" -import rand "math/rand" -import random "github.com/lyft/flytestdlib/random" +import ( + rand "math/rand" + + mock "github.com/stretchr/testify/mock" + + random "github.com/lyft/flytestdlib/random" +) // WeightedRandomList is an autogenerated mock type for the WeightedRandomList type type WeightedRandomList struct { diff --git a/flytestdlib/storage/config.go b/flytestdlib/storage/config.go index 863931ac17..36074c39b3 100644 --- a/flytestdlib/storage/config.go +++ b/flytestdlib/storage/config.go @@ -52,8 +52,15 @@ type Config struct { // inputs is accelerated. The size of the cache is large so understand how to configure the cache. // TODO provide some default config choices // If this section is skipped, Caching is disabled - Cache CachingConfig `json:"cache"` - Limits LimitsConfig `json:"limits" pflag:",Sets limits for stores."` + Cache CachingConfig `json:"cache"` + Limits LimitsConfig `json:"limits" pflag:",Sets limits for stores."` + DefaultHTTPClient HTTPClientConfig `json:"defaultHttpClient" pflag:",Sets the default http client config."` +} + +// HTTPClientConfig encapsulates common settings that can be applied to an HTTP Client. +type HTTPClientConfig struct { + Headers map[string][]string `json:"headers" pflag:"-,Sets http headers to set on the http client."` + Timeout config.Duration `json:"timeout" pflag:"timeout,Sets time out on the http client."` } // Defines connection configurations. diff --git a/flytestdlib/storage/config_flags.go b/flytestdlib/storage/config_flags.go index 50f634eab2..91dcf4dfd4 100755 --- a/flytestdlib/storage/config_flags.go +++ b/flytestdlib/storage/config_flags.go @@ -52,5 +52,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.max_size_mbs"), defaultConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.target_gc_percent"), defaultConfig.Cache.TargetGCPercent, "Sets the garbage collection target percentage.") cmdFlags.Int64(fmt.Sprintf("%v%v", prefix, "limits.maxDownloadMBs"), defaultConfig.Limits.GetLimitMegabytes, "Maximum allowed download size (in MBs) per call.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "defaultHttpClient.timeout"), defaultConfig.DefaultHTTPClient.Timeout.String(), "Sets time out on the http client.") return cmdFlags } diff --git a/flytestdlib/storage/config_flags_test.go b/flytestdlib/storage/config_flags_test.go index 4809b6b78a..a47ea887d3 100755 --- a/flytestdlib/storage/config_flags_test.go +++ b/flytestdlib/storage/config_flags_test.go @@ -341,4 +341,26 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_defaultHttpClient.timeout", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("defaultHttpClient.timeout"); err == nil { + assert.Equal(t, string(defaultConfig.DefaultHTTPClient.Timeout.String()), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := defaultConfig.DefaultHTTPClient.Timeout.String() + + cmdFlags.Set("defaultHttpClient.timeout", testValue) + if vString, err := cmdFlags.GetString("defaultHttpClient.timeout"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.DefaultHTTPClient.Timeout) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytestdlib/storage/rawstores.go b/flytestdlib/storage/rawstores.go index bb5af8aa24..89f5e78f0b 100644 --- a/flytestdlib/storage/rawstores.go +++ b/flytestdlib/storage/rawstores.go @@ -2,6 +2,7 @@ package storage import ( "fmt" + "net/http" "github.com/lyft/flytestdlib/promutils" ) @@ -16,8 +17,52 @@ var stores = map[string]dataStoreCreateFn{ TypeStow: newStowRawStore, } +type proxyTransport struct { + http.RoundTripper + defaultHeaders map[string][]string +} + +func (p proxyTransport) RoundTrip(r *http.Request) (resp *http.Response, err error) { + applyDefaultHeaders(r, p.defaultHeaders) + return p.RoundTripper.RoundTrip(r) +} + +func applyDefaultHeaders(r *http.Request, headers map[string][]string) { + if r.Header == nil { + r.Header = http.Header{} + } + + for key, values := range headers { + for _, val := range values { + r.Header.Add(key, val) + } + } +} + +func createHTTPClient(cfg HTTPClientConfig) *http.Client { + c := &http.Client{ + Timeout: cfg.Timeout.Duration, + } + + if len(cfg.Headers) > 0 { + c.Transport = &proxyTransport{ + RoundTripper: http.DefaultTransport, + defaultHeaders: cfg.Headers, + } + } + + return c +} + // Creates a new Data Store with the supplied config. func NewDataStore(cfg *Config, metricsScope promutils.Scope) (s *DataStore, err error) { + defaultClient := http.DefaultClient + defer func() { + http.DefaultClient = defaultClient + }() + + http.DefaultClient = createHTTPClient(cfg.DefaultHTTPClient) + var rawStore RawStore if fn, found := stores[cfg.Type]; found { rawStore, err = fn(cfg, metricsScope) diff --git a/flytestdlib/storage/rawstores_test.go b/flytestdlib/storage/rawstores_test.go new file mode 100644 index 0000000000..d5b32f4fb2 --- /dev/null +++ b/flytestdlib/storage/rawstores_test.go @@ -0,0 +1,60 @@ +package storage + +import ( + "net/http" + "testing" + "time" + + "github.com/lyft/flytestdlib/config" + + "github.com/stretchr/testify/assert" +) + +func Test_createHTTPClient(t *testing.T) { + t.Run("empty", func(t *testing.T) { + client := createHTTPClient(HTTPClientConfig{}) + assert.Nil(t, client.Transport) + }) + + t.Run("Some headers", func(t *testing.T) { + m := map[string][]string{ + "Header1": {"val1", "val2"}, + } + + client := createHTTPClient(HTTPClientConfig{ + Headers: m, + }) + + assert.NotNil(t, client.Transport) + proxyTransport, casted := client.Transport.(*proxyTransport) + assert.True(t, casted) + assert.Equal(t, m, proxyTransport.defaultHeaders) + }) + + t.Run("Set empty timeout", func(t *testing.T) { + client := createHTTPClient(HTTPClientConfig{ + Timeout: config.Duration{}, + }) + + assert.Zero(t, client.Timeout) + }) + + t.Run("Set timeout", func(t *testing.T) { + client := createHTTPClient(HTTPClientConfig{ + Timeout: config.Duration{Duration: 2 * time.Second}, + }) + + assert.Equal(t, 2*time.Second, client.Timeout) + }) +} + +func Test_applyDefaultHeaders(t *testing.T) { + input := map[string][]string{ + "Header1": {"val1", "val2"}, + } + + r := &http.Request{} + applyDefaultHeaders(r, input) + + assert.Equal(t, http.Header(input), r.Header) +} diff --git a/flytestdlib/storage/stowstore.go b/flytestdlib/storage/stowstore.go index 9249ddec21..6b98d3ed49 100644 --- a/flytestdlib/storage/stowstore.go +++ b/flytestdlib/storage/stowstore.go @@ -83,10 +83,12 @@ func newStowRawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error if !ok { return nil, errors.Errorf("unsupported stow.kind [%s], add support in flytestdlib?", kind) } + loc, err := stow.Dial(kind, cfgMap) if err != nil { return emptyStore, fmt.Errorf("unable to configure the storage for %s. Error: %v", kind, err) } + c, err := loc.Container(cfg.InitContainer) if err != nil { if IsNotFound(err) || awsBucketIsNotFound(err) { @@ -97,8 +99,10 @@ func newStowRawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error } return NewStowRawStore(fn(c.Name()), c, metricsScope) } + return emptyStore, err } + return NewStowRawStore(fn(c.Name()), c, metricsScope) } diff --git a/flytestdlib/storage/testdata/config.yaml b/flytestdlib/storage/testdata/config.yaml index d8664ca347..84810ab38a 100755 --- a/flytestdlib/storage/testdata/config.yaml +++ b/flytestdlib/storage/testdata/config.yaml @@ -9,6 +9,9 @@ connection: region: us-east-1 secret-key: miniostorage container: "" +defaultHttpClient: + headers: null + timeout: 0s limits: maxDownloadMBs: 0 type: s3 diff --git a/flytestdlib/tests/testdata/combined.yaml b/flytestdlib/tests/testdata/combined.yaml index 24a463b339..59be6d7abd 100755 --- a/flytestdlib/tests/testdata/combined.yaml +++ b/flytestdlib/tests/testdata/combined.yaml @@ -16,6 +16,9 @@ storage: region: us-east-1 secret-key: miniostorage container: "" + defaultHttpClient: + headers: null + timeout: 0s limits: maxDownloadMBs: 0 type: s3 diff --git a/flytestdlib/utils/mocks/auto_refresh_cache.go b/flytestdlib/utils/mocks/auto_refresh_cache.go index 39cec72cb3..a8e6901121 100644 --- a/flytestdlib/utils/mocks/auto_refresh_cache.go +++ b/flytestdlib/utils/mocks/auto_refresh_cache.go @@ -2,9 +2,12 @@ package mocks -import context "context" -import mock "github.com/stretchr/testify/mock" -import utils "github.com/lyft/flytestdlib/utils" +import ( + context "context" + + utils "github.com/lyft/flytestdlib/utils" + mock "github.com/stretchr/testify/mock" +) // AutoRefreshCache is an autogenerated mock type for the AutoRefreshCache type type AutoRefreshCache struct { diff --git a/flytestdlib/utils/mocks/rate_limiter.go b/flytestdlib/utils/mocks/rate_limiter.go index d1eec57b9d..3ca8993c67 100644 --- a/flytestdlib/utils/mocks/rate_limiter.go +++ b/flytestdlib/utils/mocks/rate_limiter.go @@ -2,8 +2,11 @@ package mocks -import context "context" -import mock "github.com/stretchr/testify/mock" +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) // RateLimiter is an autogenerated mock type for the RateLimiter type type RateLimiter struct { From d7811ca15231fa8d328076386333e5bd11c9c78d Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Wed, 15 Apr 2020 13:18:21 -0700 Subject: [PATCH 099/191] Scoop update for flytestdlib version v0.3.4 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 36209b9ec6..264c4b534f 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.3.3", + "version": "0.3.4", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.3/flytestdlib_0.3.3_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.4/flytestdlib_0.3.4_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "e86b77cea458fb5e9d5f5d75fdbbebdef5be1fe211ba562d352f8177a3bf9e0c" + "hash": "9bb2b73f2ac7742d3e67950d3d8672f7a8be725bde955f0341210482869a0570" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.3/flytestdlib_0.3.3_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.4/flytestdlib_0.3.4_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "528dfd69ab173eeed680654a5bc2ab703728646501b3fcc54f600bd3368b7586" + "hash": "8e95361a97423492fa66356f87605e8d5eec6b6901878e662aedd0abc0fe52ac" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From e1205ce1808a7b3cec4bb1af4a6ada7fe0e5bc65 Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Thu, 21 May 2020 10:01:07 -0700 Subject: [PATCH 100/191] Labeled gauge (#62) --- flytestdlib/promutils/labeled/gauge.go | 125 ++++++++++++++++++++ flytestdlib/promutils/labeled/gauge_test.go | 67 +++++++++++ 2 files changed, 192 insertions(+) create mode 100644 flytestdlib/promutils/labeled/gauge.go create mode 100644 flytestdlib/promutils/labeled/gauge_test.go diff --git a/flytestdlib/promutils/labeled/gauge.go b/flytestdlib/promutils/labeled/gauge.go new file mode 100644 index 0000000000..d6c3b1ca18 --- /dev/null +++ b/flytestdlib/promutils/labeled/gauge.go @@ -0,0 +1,125 @@ +package labeled + +import ( + "context" + + "github.com/lyft/flytestdlib/contextutils" + "github.com/lyft/flytestdlib/promutils" + "github.com/prometheus/client_golang/prometheus" +) + +// Represents a gauge labeled with values from the context. See labeled.SetMetricsKeys for more information +type Gauge struct { + *prometheus.GaugeVec + + prometheus.Gauge + additionalLabels []contextutils.Key +} + +// Inc increments the gauge by 1. Use Add to increment by arbitrary values. The data point will be +// labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. +func (g Gauge) Inc(ctx context.Context) { + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + if err != nil { + panic(err.Error()) + } + gauge.Inc() + + if g.Gauge != nil { + g.Gauge.Inc() + } +} + +// Add adds the given value to the Gauge. (The value can be negative, resulting in a decrease of the Gauge.) +// The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. +func (g Gauge) Add(ctx context.Context, v float64) { + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + if err != nil { + panic(err.Error()) + } + gauge.Add(v) + + if g.Gauge != nil { + g.Gauge.Add(v) + } +} + +// Set sets the Gauge to an arbitrary value. +// The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. +func (g Gauge) Set(ctx context.Context, v float64) { + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + if err != nil { + panic(err.Error()) + } + gauge.Set(v) + + if g.Gauge != nil { + g.Gauge.Set(v) + } +} + +// Dec decrements the level by 1. Use Sub to decrement by arbitrary values. The data point will be +// labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. +func (g Gauge) Dec(ctx context.Context) { + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + if err != nil { + panic(err.Error()) + } + gauge.Dec() + + if g.Gauge != nil { + g.Gauge.Dec() + } +} + +// Sub adds the given value to the Gauge. The value can be negative, resulting in an increase of the Gauge. +// The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. +func (g Gauge) Sub(ctx context.Context, v float64) { + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + if err != nil { + panic(err.Error()) + } + gauge.Sub(v) + + if g.Gauge != nil { + g.Gauge.Sub(v) + } +} + +// SetToCurrentTime sets the Gauge to the current Unix time in seconds. +func (g Gauge) SetToCurrentTime(ctx context.Context) { + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + if err != nil { + panic(err.Error()) + } + gauge.SetToCurrentTime() + + if g.Gauge != nil { + g.Gauge.SetToCurrentTime() + } +} + +// Creates a new labeled gauge. Label keys must be set before instantiating. If the unlabeled option is given, +// this object will also instantiate and emit another gauge with the given name with an _unlabeled suffix. +// See labeled.SetMetricsKeys for information about to configure that. +func NewGauge(name, description string, scope promutils.Scope, opts ...MetricOption) Gauge { + if len(metricKeys) == 0 { + panic(ErrNeverSet) + } + + g := Gauge{} + for _, opt := range opts { + if _, emitUnlabeledMetric := opt.(EmitUnlabeledMetricOption); emitUnlabeledMetric { + g.Gauge = scope.MustNewGauge(GetUnlabeledMetricName(name), description) + } else if additionalLabels, casted := opt.(AdditionalLabelsOption); casted { + g.GaugeVec = scope.MustNewGaugeVec(name, description, append(metricStringKeys, additionalLabels.Labels...)...) + g.additionalLabels = contextutils.MetricKeysFromStrings(additionalLabels.Labels) + } + } + + if g.GaugeVec == nil { + g.GaugeVec = scope.MustNewGaugeVec(name, description, metricStringKeys...) + } + + return g +} diff --git a/flytestdlib/promutils/labeled/gauge_test.go b/flytestdlib/promutils/labeled/gauge_test.go new file mode 100644 index 0000000000..7c7ff588d5 --- /dev/null +++ b/flytestdlib/promutils/labeled/gauge_test.go @@ -0,0 +1,67 @@ +package labeled + +import ( + "context" + "strings" + "testing" + + "github.com/lyft/flytestdlib/contextutils" + "github.com/lyft/flytestdlib/promutils" + "github.com/prometheus/client_golang/prometheus/testutil" + "github.com/stretchr/testify/assert" +) + +func TestLabeledGauge(t *testing.T) { + UnsetMetricKeys() + assert.NotPanics(t, func() { + SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey, contextutils.LaunchPlanIDKey) + }) + + scope := promutils.NewScope("testscope") + ctx := context.Background() + ctx = contextutils.WithProjectDomain(ctx, "flyte", "dev") + g := NewGauge("unittest", "some desc", scope) + assert.NotNil(t, g) + + g.Inc(ctx) + + const header = ` + # HELP testscope:unittest some desc + # TYPE testscope:unittest gauge + ` + var expected = ` + testscope:unittest{domain="dev",lp="",project="flyte",task="",wf=""} 1 + ` + err := testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + g.Set(ctx, 42) + expected = ` + testscope:unittest{domain="dev",lp="",project="flyte",task="",wf=""} 42 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + g.Add(ctx, 1) + expected = ` + testscope:unittest{domain="dev",lp="",project="flyte",task="",wf=""} 43 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + g.Dec(ctx) + expected = ` + testscope:unittest{domain="dev",lp="",project="flyte",task="",wf=""} 42 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + g.Sub(ctx, 1) + expected = ` + testscope:unittest{domain="dev",lp="",project="flyte",task="",wf=""} 41 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + g.SetToCurrentTime(ctx) +} From 6f328424aee0afd06c7bfe2610ecbf2e4a033520 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Wed, 27 May 2020 20:11:42 -0700 Subject: [PATCH 101/191] Scoop update for flytestdlib version v0.3.5 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 264c4b534f..fffa8ebe5f 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.3.4", + "version": "0.3.5", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.4/flytestdlib_0.3.4_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.5/flytestdlib_0.3.5_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "9bb2b73f2ac7742d3e67950d3d8672f7a8be725bde955f0341210482869a0570" + "hash": "63c0184404214e948278b66a07f5a92a509a6a1c6b52b3bdf5059d00bd616e24" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.4/flytestdlib_0.3.4_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.5/flytestdlib_0.3.5_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "8e95361a97423492fa66356f87605e8d5eec6b6901878e662aedd0abc0fe52ac" + "hash": "d008d8de0b7cfd15fc185d6f208015a5778b88c71735c5a62a0699bfa7075667" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From b6819588cff1f8312360ebf37e61594c09772123 Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Thu, 28 May 2020 15:02:39 -0700 Subject: [PATCH 102/191] Add additional labels if present (#63) # TL;DR Some of the labeled metrics forgot to add the additional labels. ## Type - [x] Bug Fix - [ ] Feature - [ ] Plugin ## Are all requirements met? - [x] Code completed - [x] Smoke tested - [x] Unit tests added - [x] Code documentation added - [x] Any pending items have an associated Issue ## Complete description In all the places where we call GetMetricWith, we now pass the additional labels. ## Tracking Issue NA ## Follow-up issue NA --- flytestdlib/promutils/labeled/counter.go | 2 +- flytestdlib/promutils/labeled/gauge.go | 10 ++-- flytestdlib/promutils/labeled/gauge_test.go | 59 +++++++++++++++++++++ flytestdlib/promutils/labeled/stopwatch.go | 2 +- 4 files changed, 66 insertions(+), 7 deletions(-) diff --git a/flytestdlib/promutils/labeled/counter.go b/flytestdlib/promutils/labeled/counter.go index 0b5a956c81..e68358087b 100644 --- a/flytestdlib/promutils/labeled/counter.go +++ b/flytestdlib/promutils/labeled/counter.go @@ -20,7 +20,7 @@ type Counter struct { // Inc increments the counter by 1. Use Add to increment it by arbitrary non-negative values. The data point will be // labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. func (c Counter) Inc(ctx context.Context) { - counter, err := c.CounterVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + counter, err := c.CounterVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, c.additionalLabels...)...)) if err != nil { panic(err.Error()) } diff --git a/flytestdlib/promutils/labeled/gauge.go b/flytestdlib/promutils/labeled/gauge.go index d6c3b1ca18..2b00f0c9a8 100644 --- a/flytestdlib/promutils/labeled/gauge.go +++ b/flytestdlib/promutils/labeled/gauge.go @@ -19,7 +19,7 @@ type Gauge struct { // Inc increments the gauge by 1. Use Add to increment by arbitrary values. The data point will be // labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. func (g Gauge) Inc(ctx context.Context) { - gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) if err != nil { panic(err.Error()) } @@ -33,7 +33,7 @@ func (g Gauge) Inc(ctx context.Context) { // Add adds the given value to the Gauge. (The value can be negative, resulting in a decrease of the Gauge.) // The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. func (g Gauge) Add(ctx context.Context, v float64) { - gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) if err != nil { panic(err.Error()) } @@ -47,7 +47,7 @@ func (g Gauge) Add(ctx context.Context, v float64) { // Set sets the Gauge to an arbitrary value. // The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. func (g Gauge) Set(ctx context.Context, v float64) { - gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) if err != nil { panic(err.Error()) } @@ -61,7 +61,7 @@ func (g Gauge) Set(ctx context.Context, v float64) { // Dec decrements the level by 1. Use Sub to decrement by arbitrary values. The data point will be // labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. func (g Gauge) Dec(ctx context.Context) { - gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) if err != nil { panic(err.Error()) } @@ -75,7 +75,7 @@ func (g Gauge) Dec(ctx context.Context) { // Sub adds the given value to the Gauge. The value can be negative, resulting in an increase of the Gauge. // The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. func (g Gauge) Sub(ctx context.Context, v float64) { - gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) if err != nil { panic(err.Error()) } diff --git a/flytestdlib/promutils/labeled/gauge_test.go b/flytestdlib/promutils/labeled/gauge_test.go index 7c7ff588d5..119afdca34 100644 --- a/flytestdlib/promutils/labeled/gauge_test.go +++ b/flytestdlib/promutils/labeled/gauge_test.go @@ -65,3 +65,62 @@ func TestLabeledGauge(t *testing.T) { g.SetToCurrentTime(ctx) } + +func TestWithAdditionalLabels(t *testing.T) { + UnsetMetricKeys() + assert.NotPanics(t, func() { + SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey, contextutils.LaunchPlanIDKey) + }) + + scope := promutils.NewScope("testscope") + ctx := context.Background() + ctx = contextutils.WithProjectDomain(ctx, "flyte", "dev") + g := NewGauge("unittestlabeled", "some desc", scope, AdditionalLabelsOption{Labels: []string{"bearing"}}) + assert.NotNil(t, g) + + const header = ` + # HELP testscope:unittestlabeled some desc + # TYPE testscope:unittestlabeled gauge + ` + + g.Inc(ctx) + var expected = ` + testscope:unittestlabeled{bearing="", domain="dev",lp="",project="flyte",task="",wf=""} 1 + ` + err := testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + bearingKey := contextutils.Key("bearing") + ctx = context.WithValue(ctx, bearingKey, "123") + g.Set(ctx, 42) + expected = ` + testscope:unittestlabeled{bearing="", domain="dev",lp="",project="flyte",task="",wf=""} 1 + testscope:unittestlabeled{bearing="123", domain="dev",lp="",project="flyte",task="",wf=""} 42 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + g.Add(ctx, 1) + expected = ` + testscope:unittestlabeled{bearing="", domain="dev",lp="",project="flyte",task="",wf=""} 1 + testscope:unittestlabeled{bearing="123", domain="dev",lp="",project="flyte",task="",wf=""} 43 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + g.Dec(ctx) + expected = ` + testscope:unittestlabeled{bearing="", domain="dev",lp="",project="flyte",task="",wf=""} 1 + testscope:unittestlabeled{bearing="123", domain="dev",lp="",project="flyte",task="",wf=""} 42 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + g.Sub(ctx, 42) + expected = ` + testscope:unittestlabeled{bearing="", domain="dev",lp="",project="flyte",task="",wf=""} 1 + testscope:unittestlabeled{bearing="123", domain="dev",lp="",project="flyte",task="",wf=""} 0 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) +} diff --git a/flytestdlib/promutils/labeled/stopwatch.go b/flytestdlib/promutils/labeled/stopwatch.go index 2166be1489..edab3b7d44 100644 --- a/flytestdlib/promutils/labeled/stopwatch.go +++ b/flytestdlib/promutils/labeled/stopwatch.go @@ -28,7 +28,7 @@ type StopWatch struct { // .... // } func (c StopWatch) Start(ctx context.Context) Timer { - w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, metricKeys...)) + w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, c.additionalLabels...)...)) if err != nil { panic(err.Error()) } From b432920d18dd7fae762b9884fd8d08bf3904452d Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Thu, 28 May 2020 15:09:48 -0700 Subject: [PATCH 103/191] Scoop update for flytestdlib version v0.3.6 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index fffa8ebe5f..96571cad1b 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.3.5", + "version": "0.3.6", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.5/flytestdlib_0.3.5_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.6/flytestdlib_0.3.6_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "63c0184404214e948278b66a07f5a92a509a6a1c6b52b3bdf5059d00bd616e24" + "hash": "dcac12a1ccb11d38d64b973dcdd82705d3be045d5b3c1b9faffe79a983fb85a2" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.5/flytestdlib_0.3.5_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.6/flytestdlib_0.3.6_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "d008d8de0b7cfd15fc185d6f208015a5778b88c71735c5a62a0699bfa7075667" + "hash": "d99c51c3b6dabe206f8c4da432e5d76eb550832978dc3e3d923da94d82861b77" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 4f003ea8a09456006137b4bf7aa302134cc7b6eb Mon Sep 17 00:00:00 2001 From: Honnix Date: Thu, 4 Jun 2020 06:54:47 +0200 Subject: [PATCH 104/191] support regexp config (#58) --- flytestdlib/config/regexp.go | 41 ++++++++++++++ flytestdlib/config/regexp_test.go | 62 ++++++++++++++++++++++ flytestdlib/internal/utils/parsers.go | 11 ++++ flytestdlib/internal/utils/parsers_test.go | 12 +++++ 4 files changed, 126 insertions(+) create mode 100644 flytestdlib/config/regexp.go create mode 100644 flytestdlib/config/regexp_test.go diff --git a/flytestdlib/config/regexp.go b/flytestdlib/config/regexp.go new file mode 100644 index 0000000000..bfb92ee5f9 --- /dev/null +++ b/flytestdlib/config/regexp.go @@ -0,0 +1,41 @@ +package config + +import ( + "encoding/json" + "errors" + "regexp" +) + +// A regexp.Regexp wrapper that can marshal and unmarshal into simple regexp string. +type Regexp struct { + regexp.Regexp +} + +func (r Regexp) MarshalJSON() ([]byte, error) { + return json.Marshal(r.String()) +} + +func (r *Regexp) UnmarshalJSON(b []byte) error { + if len(b) == 0 { + r.Regexp = regexp.Regexp{} + return nil + } + + var v interface{} + if err := json.Unmarshal(b, &v); err != nil { + return err + } + + switch value := v.(type) { + case string: + rc, err := regexp.Compile(value) + if err != nil { + return err + } + + r.Regexp = *rc + return nil + default: + return errors.New("invalid regexp") + } +} diff --git a/flytestdlib/config/regexp_test.go b/flytestdlib/config/regexp_test.go new file mode 100644 index 0000000000..fc468a91c3 --- /dev/null +++ b/flytestdlib/config/regexp_test.go @@ -0,0 +1,62 @@ +package config + +import ( + "encoding/json" + "fmt" + "reflect" + "testing" + + "github.com/lyft/flytestdlib/internal/utils" + + "github.com/stretchr/testify/assert" +) + +func TestRegexp_MarshalJSON(t *testing.T) { + validRegexps := []string{ + "", + ".*", + "^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$", + } + + for i, validRegexp := range validRegexps { + t.Run(fmt.Sprintf("Valid %v", i), func(t *testing.T) { + expected := Regexp{Regexp: utils.MustCompileRegexp(validRegexp)} + + b, err := expected.MarshalJSON() + assert.NoError(t, err) + + actual := Regexp{} + err = actual.UnmarshalJSON(b) + assert.NoError(t, err) + + assert.True(t, reflect.DeepEqual(expected, actual)) + }) + } +} + +func TestRegexp_UnmarshalJSON(t *testing.T) { + invalidValues := []interface{}{ + "^(", + 123, + true, + } + for i, invalidRegexp := range invalidValues { + t.Run(fmt.Sprintf("Invalid %v", i), func(t *testing.T) { + raw, err := json.Marshal(invalidRegexp) + assert.NoError(t, err) + + actual := Regexp{} + err = actual.UnmarshalJSON(raw) + assert.Error(t, err) + }) + } + + t.Run("Empty regexp", func(t *testing.T) { + expected := Regexp{} + + actual := Regexp{} + err := actual.UnmarshalJSON([]byte{}) + assert.NoError(t, err) + assert.True(t, reflect.DeepEqual(expected, actual)) + }) +} diff --git a/flytestdlib/internal/utils/parsers.go b/flytestdlib/internal/utils/parsers.go index c1fcfa3a4a..df7dbafcd9 100644 --- a/flytestdlib/internal/utils/parsers.go +++ b/flytestdlib/internal/utils/parsers.go @@ -2,6 +2,7 @@ package utils import ( "net/url" + "regexp" ) // A utility function to be used in tests. It parses urlString as url.URL or panics if it's invalid. @@ -18,3 +19,13 @@ func MustParseURL(urlString string) url.URL { func RefInt(val int) *int { return &val } + +// A utility function to be used in tests. It compiles regexpString as regexp.Regexp or panics if it's invalid. +func MustCompileRegexp(regexpString string) regexp.Regexp { + r, err := regexp.Compile(regexpString) + if err != nil { + panic(err) + } + + return *r +} diff --git a/flytestdlib/internal/utils/parsers_test.go b/flytestdlib/internal/utils/parsers_test.go index c15202b6ac..12bcb61f33 100644 --- a/flytestdlib/internal/utils/parsers_test.go +++ b/flytestdlib/internal/utils/parsers_test.go @@ -23,3 +23,15 @@ func TestRefUint32(t *testing.T) { res := RefInt(input) assert.Equal(t, input, *res) } + +func TestMustCompileRegexp(t *testing.T) { + t.Run("Valid regexp", func(t *testing.T) { + MustCompileRegexp("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$") + }) + + t.Run("Invalid regexp", func(t *testing.T) { + assert.Panics(t, func() { + MustCompileRegexp("^(") + }) + }) +} From 2fe55b1f675e2299c7c6f028463b28bfbb4bc01e Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Thu, 4 Jun 2020 17:53:04 -0700 Subject: [PATCH 105/191] feature; Dynamic container loading support & Error collection (#64) * feature; Dynamic container loading support * Fix linter * Error migration done too * Update storage/stowstore.go * rename file * Cleaned up the storage package * lint fix * updated config, fixes config --- .../lyft/golang_test_targets/Makefile | 12 +- .../cli/pflags/api/testdata/testtype.go | 3 +- .../cli/pflags/api/testdata/testtype_test.go | 22 ++ flytestdlib/config/errors.go | 29 --- flytestdlib/config/utils.go | 4 +- flytestdlib/config/viper/collection.go | 8 +- flytestdlib/config/viper/viper.go | 11 +- flytestdlib/errors/errors.go | 32 +++ flytestdlib/{config => errors}/errors_test.go | 2 +- flytestdlib/storage/config.go | 13 +- flytestdlib/storage/config_flags.go | 1 + flytestdlib/storage/config_flags_test.go | 22 ++ flytestdlib/storage/localstore.go | 48 ---- flytestdlib/storage/localstore_test.go | 69 ----- flytestdlib/storage/rawstores.go | 2 +- flytestdlib/storage/stow_store.go | 204 +++++++++++++-- flytestdlib/storage/stow_store_test.go | 245 +++++++++++++++++- flytestdlib/storage/stowstore.go | 134 ---------- flytestdlib/storage/stowstore_test.go | 53 ---- 19 files changed, 541 insertions(+), 373 deletions(-) create mode 100644 flytestdlib/errors/errors.go rename flytestdlib/{config => errors}/errors_test.go (98%) delete mode 100644 flytestdlib/storage/localstore.go delete mode 100644 flytestdlib/storage/localstore_test.go delete mode 100644 flytestdlib/storage/stowstore.go delete mode 100644 flytestdlib/storage/stowstore_test.go diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile index 529b79bd1d..5abd2ed607 100644 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile @@ -39,9 +39,15 @@ test_benchmark: .PHONY: test_unit_cover test_unit_cover: - go test ./... -coverprofile /tmp/cover.out -covermode=count; go tool cover -func /tmp/cover.out + go test ./... -coverprofile /tmp/cover.out -covermode=count + go tool cover -func /tmp/cover.out .PHONY: test_unit_visual test_unit_visual: - go test ./... -coverprofile /tmp/cover.out -covermode=count; go tool cover -html=/tmp/cover.out - + go test ./... -coverprofile /tmp/cover.out -covermode=count + go tool cover -html=/tmp/cover.out + +.PHONY: test_unit_codecov +test_unit_codecov: + go test ./... -race -coverprofile=coverage.txt -covermode=atomic + curl -s https://codecov.io/bash > codecov_bash.sh && bash codecov_bash.sh diff --git a/flytestdlib/cli/pflags/api/testdata/testtype.go b/flytestdlib/cli/pflags/api/testdata/testtype.go index f07780dbff..05feb6b62f 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype.go @@ -55,7 +55,8 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.secret-key"), DefaultTestType.StorageConfig.Connection.SecretKey, "Secret to use when accesskey is set.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.region"), DefaultTestType.StorageConfig.Connection.Region, "Region to connect to.") cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "storage.connection.disable-ssl"), DefaultTestType.StorageConfig.Connection.DisableSSL, "Disables SSL connection. Should only be used for development.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.container"), DefaultTestType.StorageConfig.InitContainer, "Initial container to create -if it doesn't exist-.'") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.container"), DefaultTestType.StorageConfig.InitContainer, "Initial container (in s3 a bucket) to create -if it doesn't exist-.'") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "storage.enable-multicontainer"), DefaultTestType.StorageConfig.MultiContainerEnabled, "If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.max_size_mbs"), DefaultTestType.StorageConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.target_gc_percent"), DefaultTestType.StorageConfig.Cache.TargetGCPercent, "Sets the garbage collection target percentage.") cmdFlags.Int64(fmt.Sprintf("%v%v", prefix, "storage.limits.maxDownloadMBs"), DefaultTestType.StorageConfig.Limits.GetLimitMegabytes, "Maximum allowed download size (in MBs) per call.") diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_test.go b/flytestdlib/cli/pflags/api/testdata/testtype_test.go index 01b7e644ab..3854a316a6 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype_test.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype_test.go @@ -429,6 +429,28 @@ func TestTestType_SetFlags(t *testing.T) { } }) }) + t.Run("Test_storage.enable-multicontainer", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("storage.enable-multicontainer"); err == nil { + assert.Equal(t, bool(DefaultTestType.StorageConfig.MultiContainerEnabled), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.enable-multicontainer", testValue) + if vBool, err := cmdFlags.GetBool("storage.enable-multicontainer"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vBool), &actual.StorageConfig.MultiContainerEnabled) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_storage.cache.max_size_mbs", func(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly diff --git a/flytestdlib/config/errors.go b/flytestdlib/config/errors.go index b46459a9f9..1db207b8c1 100644 --- a/flytestdlib/config/errors.go +++ b/flytestdlib/config/errors.go @@ -6,32 +6,3 @@ var ( ErrStrictModeValidation = fmt.Errorf("failed strict mode check") ErrChildConfigOverridesConfig = fmt.Errorf("child config attempts to override an existing native config property") ) - -// A helper object that collects errors. -type ErrorCollection []error - -func (e ErrorCollection) Error() string { - res := "" - for _, err := range e { - res = fmt.Sprintf("%v\n%v", res, err.Error()) - } - - return res -} - -func (e ErrorCollection) ErrorOrDefault() error { - if len(e) == 0 { - return nil - } - - return e -} - -func (e *ErrorCollection) Append(err error) bool { - if err != nil { - *e = append(*e, err) - return true - } - - return false -} diff --git a/flytestdlib/config/utils.go b/flytestdlib/config/utils.go index fcd833ff75..6dbb9bdea6 100644 --- a/flytestdlib/config/utils.go +++ b/flytestdlib/config/utils.go @@ -6,6 +6,8 @@ import ( "reflect" "github.com/pkg/errors" + + stdLibErrs "github.com/lyft/flytestdlib/errors" ) // Uses Json marshal/unmarshal to make a deep copy of a config object. @@ -42,7 +44,7 @@ func toInterface(config Config) (interface{}, error) { // Builds a generic map out of the root section config and its sub-sections configs. func AllConfigsAsMap(root Section) (m map[string]interface{}, err error) { - errs := ErrorCollection{} + errs := stdLibErrs.ErrorCollection{} allConfigs := make(map[string]interface{}, len(root.GetSections())) if root.GetConfig() != nil { rootConfig, err := toInterface(root.GetConfig()) diff --git a/flytestdlib/config/viper/collection.go b/flytestdlib/config/viper/collection.go index 680052f494..d10e423fb2 100644 --- a/flytestdlib/config/viper/collection.go +++ b/flytestdlib/config/viper/collection.go @@ -7,7 +7,7 @@ import ( "os" "strings" - "github.com/lyft/flytestdlib/config" + "github.com/lyft/flytestdlib/errors" "github.com/lyft/flytestdlib/logger" @@ -38,7 +38,7 @@ type CollectionProxy struct { } func (c *CollectionProxy) BindPFlags(flags *pflag.FlagSet) error { - err := config.ErrorCollection{} + err := errors.ErrorCollection{} for _, v := range c.underlying { err.Append(v.BindPFlags(flags)) } @@ -49,7 +49,7 @@ func (c *CollectionProxy) BindPFlags(flags *pflag.FlagSet) error { } func (c *CollectionProxy) BindEnv(input ...string) error { - err := config.ErrorCollection{} + err := errors.ErrorCollection{} for _, v := range c.underlying { err.Append(v.BindEnv(input...)) } @@ -72,7 +72,7 @@ func (c *CollectionProxy) AutomaticEnv() { } func (c CollectionProxy) ReadInConfig() error { - err := config.ErrorCollection{} + err := errors.ErrorCollection{} for _, v := range c.underlying { err.Append(v.ReadInConfig()) } diff --git a/flytestdlib/config/viper/viper.go b/flytestdlib/config/viper/viper.go index 3b44211f31..c44ea37d69 100644 --- a/flytestdlib/config/viper/viper.go +++ b/flytestdlib/config/viper/viper.go @@ -11,10 +11,13 @@ import ( "github.com/pkg/errors" + stdLibErrs "github.com/lyft/flytestdlib/errors" + + "github.com/spf13/cobra" + "github.com/lyft/flytestdlib/config" "github.com/lyft/flytestdlib/config/files" "github.com/lyft/flytestdlib/logger" - "github.com/spf13/cobra" "github.com/fsnotify/fsnotify" "github.com/mitchellh/mapstructure" @@ -94,7 +97,7 @@ func (v viperAccessor) bindViperConfigsFromEnv(root config.Section) (err error) } func (v viperAccessor) bindViperConfigsEnvDepth(m map[string]interface{}, prefix string) error { - errs := config.ErrorCollection{} + errs := stdLibErrs.ErrorCollection{} for key, val := range m { subKey := prefix + key if asMap, ok := val.(map[string]interface{}); ok { @@ -120,7 +123,7 @@ func (v viperAccessor) updateConfig(ctx context.Context, r config.Section) error // If a config file is found, read it in. if err = v.viper.ReadInConfig(); err == nil { logger.Printf(ctx, "Using config file: %+v", v.viper.ConfigFilesUsed()) - } else if asErrorCollection, ok := err.(config.ErrorCollection); ok { + } else if asErrorCollection, ok := err.(stdLibErrs.ErrorCollection); ok { shouldWatchChanges = false for i, e := range asErrorCollection { if _, isNotFound := errors.Cause(e).(viperLib.ConfigFileNotFoundError); isNotFound { @@ -196,7 +199,7 @@ func (v viperAccessor) parseViperConfig(root config.Section) error { } func (v viperAccessor) parseViperConfigRecursive(root config.Section, settings interface{}) error { - errs := config.ErrorCollection{} + errs := stdLibErrs.ErrorCollection{} var mine interface{} myKeysCount := 0 if asMap, casted := settings.(map[string]interface{}); casted { diff --git a/flytestdlib/errors/errors.go b/flytestdlib/errors/errors.go new file mode 100644 index 0000000000..c1c23c6511 --- /dev/null +++ b/flytestdlib/errors/errors.go @@ -0,0 +1,32 @@ +package errors + +import "fmt" + +// A helper object that collects errors. +type ErrorCollection []error + +func (e ErrorCollection) Error() string { + res := "" + for _, err := range e { + res = fmt.Sprintf("%v\n%v", res, err.Error()) + } + + return res +} + +func (e ErrorCollection) ErrorOrDefault() error { + if len(e) == 0 { + return nil + } + + return e +} + +func (e *ErrorCollection) Append(err error) bool { + if err != nil { + *e = append(*e, err) + return true + } + + return false +} diff --git a/flytestdlib/config/errors_test.go b/flytestdlib/errors/errors_test.go similarity index 98% rename from flytestdlib/config/errors_test.go rename to flytestdlib/errors/errors_test.go index 4dc1e72876..939cc79a4a 100644 --- a/flytestdlib/config/errors_test.go +++ b/flytestdlib/errors/errors_test.go @@ -1,4 +1,4 @@ -package config +package errors import ( "fmt" diff --git a/flytestdlib/storage/config.go b/flytestdlib/storage/config.go index 36074c39b3..cc830181d5 100644 --- a/flytestdlib/storage/config.go +++ b/flytestdlib/storage/config.go @@ -39,15 +39,20 @@ var ( Region: "us-east-1", AuthType: "iam", }, + MultiContainerEnabled: false, } ) // A common storage config. type Config struct { - Type Type `json:"type" pflag:",Sets the type of storage to configure [s3/minio/local/mem/stow]."` - Connection ConnectionConfig `json:"connection"` - Stow *StowConfig `json:"stow,omitempty"` - InitContainer string `json:"container" pflag:",Initial container to create -if it doesn't exist-.'"` + Type Type `json:"type" pflag:",Sets the type of storage to configure [s3/minio/local/mem/stow]."` + Connection ConnectionConfig `json:"connection"` + Stow *StowConfig `json:"stow,omitempty"` + // Container here is misleading, it refers to a Bucket (AWS S3) like blobstore entity. In some terms it could be a table + InitContainer string `json:"container" pflag:",Initial container (in s3 a bucket) to create -if it doesn't exist-.'"` + // By default if this is not enabled, multiple containers are not supported by the storage layer. Only the configured `container` InitContainer will be allowed to requests data from. But, if enabled then data will be loaded to written to any + // container specified in the DataReference. + MultiContainerEnabled bool `json:"enable-multicontainer" pflag:",If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered"` // Caching is recommended to improve the performance of underlying systems. It caches the metadata and resolving // inputs is accelerated. The size of the cache is large so understand how to configure the cache. // TODO provide some default config choices diff --git a/flytestdlib/storage/config_flags.go b/flytestdlib/storage/config_flags.go index 91dcf4dfd4..42cdb7bcb0 100755 --- a/flytestdlib/storage/config_flags.go +++ b/flytestdlib/storage/config_flags.go @@ -49,6 +49,7 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.region"), defaultConfig.Connection.Region, "Region to connect to.") cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "connection.disable-ssl"), defaultConfig.Connection.DisableSSL, "Disables SSL connection. Should only be used for development.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "container"), defaultConfig.InitContainer, "Initial container to create -if it doesn't exist-.'") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "enable-multicontainer"), defaultConfig.MultiContainerEnabled, "If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.max_size_mbs"), defaultConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.target_gc_percent"), defaultConfig.Cache.TargetGCPercent, "Sets the garbage collection target percentage.") cmdFlags.Int64(fmt.Sprintf("%v%v", prefix, "limits.maxDownloadMBs"), defaultConfig.Limits.GetLimitMegabytes, "Maximum allowed download size (in MBs) per call.") diff --git a/flytestdlib/storage/config_flags_test.go b/flytestdlib/storage/config_flags_test.go index a47ea887d3..61a7bbdb2b 100755 --- a/flytestdlib/storage/config_flags_test.go +++ b/flytestdlib/storage/config_flags_test.go @@ -275,6 +275,28 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_enable-multicontainer", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("enable-multicontainer"); err == nil { + assert.Equal(t, bool(defaultConfig.MultiContainerEnabled), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("enable-multicontainer", testValue) + if vBool, err := cmdFlags.GetBool("enable-multicontainer"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.MultiContainerEnabled) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_cache.max_size_mbs", func(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly diff --git a/flytestdlib/storage/localstore.go b/flytestdlib/storage/localstore.go deleted file mode 100644 index 450c102a24..0000000000 --- a/flytestdlib/storage/localstore.go +++ /dev/null @@ -1,48 +0,0 @@ -package storage - -import ( - "fmt" - - "github.com/lyft/flytestdlib/promutils" - - "github.com/graymeta/stow" - "github.com/graymeta/stow/local" -) - -func getLocalStowConfigMap(cfg *Config) stow.ConfigMap { - stowConfig := stow.ConfigMap{} - if endpoint := cfg.Connection.Endpoint.String(); endpoint != "" { - stowConfig[local.ConfigKeyPath] = endpoint - } - - return stowConfig -} - -// Creates a Data store backed by Stow-S3 raw store. -func newLocalRawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error) { - if cfg.InitContainer == "" { - return nil, fmt.Errorf("initContainer is required") - } - - loc, err := stow.Dial(local.Kind, getLocalStowConfigMap(cfg)) - - if err != nil { - return emptyStore, fmt.Errorf("unable to configure the storage for local. Error: %v", err) - } - - c, err := loc.Container(cfg.InitContainer) - if err != nil { - if IsNotFound(err) { - c, err = loc.CreateContainer(cfg.InitContainer) - if err != nil && !IsExists(err) { - return emptyStore, fmt.Errorf("unable to initialize container [%v]. Error: %v", cfg.InitContainer, err) - } - - return NewStowRawStore(DataReference(c.Name()), c, metricsScope) - } - - return emptyStore, err - } - - return NewStowRawStore(DataReference(c.Name()), c, metricsScope) -} diff --git a/flytestdlib/storage/localstore_test.go b/flytestdlib/storage/localstore_test.go deleted file mode 100644 index 7295847d5e..0000000000 --- a/flytestdlib/storage/localstore_test.go +++ /dev/null @@ -1,69 +0,0 @@ -package storage - -import ( - "context" - "io/ioutil" - "os" - "path/filepath" - "testing" - - "github.com/lyft/flytestdlib/contextutils" - "github.com/lyft/flytestdlib/promutils" - "github.com/lyft/flytestdlib/promutils/labeled" - - "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytestdlib/internal/utils" - "github.com/stretchr/testify/assert" -) - -func TestNewLocalStore(t *testing.T) { - labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) - t.Run("Valid config", func(t *testing.T) { - testScope := promutils.NewTestScope() - store, err := newLocalRawStore(&Config{ - Connection: ConnectionConfig{ - Endpoint: config.URL{URL: utils.MustParseURL("./")}, - }, - InitContainer: "testdata", - }, testScope.NewSubScope("x")) - - assert.NoError(t, err) - assert.NotNil(t, store) - - // Stow local store expects the full path after the container portion (looks like a bug to me) - rc, err := store.ReadRaw(context.TODO(), DataReference("file://testdata/config.yaml")) - assert.NoError(t, err) - assert.NotNil(t, rc) - assert.NoError(t, rc.Close()) - }) - - t.Run("Invalid config", func(t *testing.T) { - testScope := promutils.NewTestScope() - _, err := newLocalRawStore(&Config{}, testScope) - assert.Error(t, err) - }) - - t.Run("Initialize container", func(t *testing.T) { - testScope := promutils.NewTestScope() - tmpDir, err := ioutil.TempDir("", "stdlib_local") - assert.NoError(t, err) - - stats, err := os.Stat(tmpDir) - assert.NoError(t, err) - assert.NotNil(t, stats) - - store, err := newLocalRawStore(&Config{ - Connection: ConnectionConfig{ - Endpoint: config.URL{URL: utils.MustParseURL(tmpDir)}, - }, - InitContainer: "tmp", - }, testScope.NewSubScope("y")) - - assert.NoError(t, err) - assert.NotNil(t, store) - - stats, err = os.Stat(filepath.Join(tmpDir, "tmp")) - assert.NoError(t, err) - assert.True(t, stats.IsDir()) - }) -} diff --git a/flytestdlib/storage/rawstores.go b/flytestdlib/storage/rawstores.go index 89f5e78f0b..9f223884ee 100644 --- a/flytestdlib/storage/rawstores.go +++ b/flytestdlib/storage/rawstores.go @@ -11,7 +11,7 @@ type dataStoreCreateFn func(cfg *Config, metricsScope promutils.Scope) (RawStore var stores = map[string]dataStoreCreateFn{ TypeMemory: NewInMemoryRawStore, - TypeLocal: newLocalRawStore, + TypeLocal: newStowRawStore, TypeMinio: newStowRawStore, TypeS3: newStowRawStore, TypeStow: newStowRawStore, diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 62aa0ecf6e..8ffc670a5a 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -2,11 +2,22 @@ package storage import ( "context" + "fmt" "io" + "sync" "time" - "github.com/lyft/flytestdlib/contextutils" + "github.com/aws/aws-sdk-go/aws/awserr" + s32 "github.com/aws/aws-sdk-go/service/s3" + "github.com/graymeta/stow/azure" + "github.com/graymeta/stow/google" + "github.com/graymeta/stow/local" + "github.com/graymeta/stow/oracle" + "github.com/graymeta/stow/s3" + "github.com/graymeta/stow/swift" + "github.com/lyft/flytestdlib/contextutils" + "github.com/lyft/flytestdlib/logger" "github.com/lyft/flytestdlib/promutils/labeled" "github.com/lyft/flytestdlib/errors" @@ -21,6 +32,54 @@ const ( FailureTypeLabel contextutils.Key = "failure_type" ) +var fQNFn = map[string]func(string) DataReference{ + s3.Kind: func(bucket string) DataReference { + return DataReference(fmt.Sprintf("s3://%s", bucket)) + }, + google.Kind: func(bucket string) DataReference { + return DataReference(fmt.Sprintf("gs://%s", bucket)) + }, + oracle.Kind: func(bucket string) DataReference { + return DataReference(fmt.Sprintf("os://%s", bucket)) + }, + swift.Kind: func(bucket string) DataReference { + return DataReference(fmt.Sprintf("sw://%s", bucket)) + }, + azure.Kind: func(bucket string) DataReference { + return DataReference(fmt.Sprintf("afs://%s", bucket)) + }, + local.Kind: func(bucket string) DataReference { + return DataReference(fmt.Sprintf("file://%s", bucket)) + }, +} + +// Checks if the error is AWS S3 bucket not found error +func awsBucketIsNotFound(err error) bool { + if IsNotFound(err) { + return true + } + + if awsErr, errOk := errs.Cause(err).(awserr.Error); errOk { + return awsErr.Code() == s32.ErrCodeNoSuchBucket + } + + return false +} + +// Checks if the error is AWS S3 bucket already exists error. +func awsBucketAlreadyExists(err error) bool { + if IsExists(err) { + return true + } + + if awsErr, errOk := errs.Cause(err).(awserr.Error); errOk { + return awsErr.Code() == s32.ErrCodeBucketAlreadyOwnedByYou + } + + return false +} + +// Metrics for Stow store type stowMetrics struct { BadReference labeled.Counter BadContainer labeled.Counter @@ -35,14 +94,7 @@ type stowMetrics struct { WriteLatency labeled.StopWatch } -// Implements DataStore to talk to stow location store. -type StowStore struct { - stow.Container - copyImpl - metrics *stowMetrics - containerBaseFQN DataReference -} - +// Metadata that will be returned type StowMetadata struct { exists bool size int64 @@ -56,13 +108,63 @@ func (s StowMetadata) Exists() bool { return s.exists } +// Implements DataStore to talk to stow location store. +type StowStore struct { + copyImpl + loc stow.Location + // This is a default configured container. + baseContainer stow.Container + // If dynamic container loading is enabled, then for any new container that is not the base container + // stowstore will dynamically load the given container + enableDynamicContainerLoading bool + // all dynamically loaded containers will be recorded in this map. It is possible that we may load the same container concurrently multiple times + dynamicContainerMap sync.Map + metrics *stowMetrics + baseContainerFQN DataReference +} + +func (s *StowStore) LoadContainer(ctx context.Context, container string, createIfNotFound bool) (stow.Container, error) { + c, err := s.loc.Container(container) + if err != nil { + if createIfNotFound { + logger.Infof(ctx, "Container [%s] lookup failed, err [%s], will try to create a new one", err) + if IsNotFound(err) || awsBucketIsNotFound(err) { + c, err := s.loc.CreateContainer(container) + // If the container's already created, move on. Otherwise, fail with error. + if err != nil && !awsBucketAlreadyExists(err) && !IsExists(err) { + return nil, fmt.Errorf("unable to initialize container [%v]. Error: %v", container, err) + } + return c, nil + } + } else { + logger.Errorf(ctx, "Container [%s] lookup failed. Error %s", container, err) + } + return nil, err + } + return c, nil +} + func (s *StowStore) getContainer(ctx context.Context, container string) (c stow.Container, err error) { - if s.Container.Name() != container { + if s.baseContainer != nil && s.baseContainer.Name() == container { + return s.baseContainer, nil + } + + if !s.enableDynamicContainerLoading { s.metrics.BadContainer.Inc(ctx) - return nil, errs.Wrapf(stow.ErrNotFound, "Conf container:%v != Passed Container:%v", s.Container.Name(), container) + return nil, errs.Wrapf(stow.ErrNotFound, "Conf container:%v != Passed Container:%v. Dynamic loading is disabled", s.baseContainer.Name(), container) } - return s.Container, nil + iface, ok := s.dynamicContainerMap.Load(container) + if !ok { + c, err := s.LoadContainer(ctx, container, false) + if err != nil { + logger.Errorf(ctx, "failed to load container [%s] dynamically, error %s", container, err) + return nil, err + } + s.dynamicContainerMap.Store(container, c) + return c, nil + } + return iface.(stow.Container), nil } func (s *StowStore) Head(ctx context.Context, reference DataReference) (Metadata, error) { @@ -157,14 +259,16 @@ func (s *StowStore) WriteRaw(ctx context.Context, reference DataReference, size } func (s *StowStore) GetBaseContainerFQN(ctx context.Context) DataReference { - return s.containerBaseFQN + return s.baseContainerFQN } -func NewStowRawStore(containerBaseFQN DataReference, container stow.Container, metricsScope promutils.Scope) (*StowStore, error) { +func NewStowRawStore(baseContainerFQN DataReference, loc stow.Location, enableDynamicContainerLoading bool, metricsScope promutils.Scope) (*StowStore, error) { failureTypeOption := labeled.AdditionalLabelsOption{Labels: []string{FailureTypeLabel.String()}} self := &StowStore{ - Container: container, - containerBaseFQN: containerBaseFQN, + loc: loc, + baseContainerFQN: baseContainerFQN, + enableDynamicContainerLoading: enableDynamicContainerLoading, + dynamicContainerMap: sync.Map{}, metrics: &stowMetrics{ BadReference: labeled.NewCounter("bad_key", "Indicates the provided storage reference/key is incorrectly formatted", metricsScope, labeled.EmitUnlabeledMetric), BadContainer: labeled.NewCounter("bad_container", "Indicates request for a container that has not been initialized", metricsScope, labeled.EmitUnlabeledMetric), @@ -181,6 +285,72 @@ func NewStowRawStore(containerBaseFQN DataReference, container stow.Container, m } self.copyImpl = newCopyImpl(self, metricsScope) - + _, c, _, err := baseContainerFQN.Split() + if err != nil { + return nil, err + } + container, err := self.LoadContainer(context.TODO(), c, true) + if err != nil { + return nil, err + } + self.baseContainer = container return self, nil } + +// Constructor for the StowRawStore +func newStowRawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error) { + if cfg.InitContainer == "" { + return nil, fmt.Errorf("initContainer is required even with `enable-multicontainer`") + } + + var cfgMap stow.ConfigMap + var kind string + if cfg.Stow != nil { + kind = cfg.Stow.Kind + cfgMap = cfg.Stow.Config + } else { + logger.Warnf(context.TODO(), "stow configuration section missing, defaulting to legacy s3/minio connection config") + // This is for supporting legacy configurations which configure S3 via connection config + kind = s3.Kind + cfgMap = legacyS3ConfigMap(cfg.Connection) + } + + fn, ok := fQNFn[kind] + if !ok { + return nil, errs.Errorf("unsupported stow.kind [%s], add support in flytestdlib?", kind) + } + + loc, err := stow.Dial(kind, cfgMap) + if err != nil { + return emptyStore, fmt.Errorf("unable to configure the storage for %s. Error: %v", kind, err) + } + + return NewStowRawStore(fn(cfg.InitContainer), loc, cfg.MultiContainerEnabled, metricsScope) +} + +func legacyS3ConfigMap(cfg ConnectionConfig) stow.ConfigMap { + // Non-nullable fields + stowConfig := stow.ConfigMap{ + s3.ConfigAuthType: cfg.AuthType, + s3.ConfigRegion: cfg.Region, + } + + // Fields that differ between minio and real S3 + if endpoint := cfg.Endpoint.String(); endpoint != "" { + stowConfig[s3.ConfigEndpoint] = endpoint + } + + if accessKey := cfg.AccessKey; accessKey != "" { + stowConfig[s3.ConfigAccessKeyID] = accessKey + } + + if secretKey := cfg.SecretKey; secretKey != "" { + stowConfig[s3.ConfigSecretKey] = secretKey + } + + if disableSsl := cfg.DisableSSL; disableSsl { + stowConfig[s3.ConfigDisableSSL] = "True" + } + + return stowConfig +} diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index 710e410a23..e3ebc0286b 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -3,20 +3,38 @@ package storage import ( "bytes" "context" + "fmt" "io" "io/ioutil" "net/url" + "os" + "path/filepath" "testing" "time" + "github.com/graymeta/stow/google" + "github.com/graymeta/stow/local" "github.com/pkg/errors" - "github.com/lyft/flytestdlib/promutils" - "github.com/graymeta/stow" "github.com/stretchr/testify/assert" + + "github.com/lyft/flytestdlib/config" + "github.com/lyft/flytestdlib/contextutils" + "github.com/lyft/flytestdlib/internal/utils" + "github.com/lyft/flytestdlib/promutils" + "github.com/lyft/flytestdlib/promutils/labeled" ) +type mockStowLoc struct { + stow.Location + ContainerCb func(id string) (stow.Container, error) +} + +func (m mockStowLoc) Container(id string) (stow.Container, error) { + return m.ContainerCb(id) +} + type mockStowContainer struct { id string items map[string]mockStowItem @@ -102,10 +120,20 @@ func (mockStowItem) Metadata() (map[string]interface{}, error) { } func TestStowStore_ReadRaw(t *testing.T) { + labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) + + const container = "container" t.Run("Happy Path", func(t *testing.T) { testScope := promutils.NewTestScope() fn := fQNFn["s3"] - s, err := NewStowRawStore(fn("container"), newMockStowContainer("container"), testScope) + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, false, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -123,7 +151,14 @@ func TestStowStore_ReadRaw(t *testing.T) { t.Run("Exceeds limit", func(t *testing.T) { testScope := promutils.NewTestScope() fn := fQNFn["s3"] - s, err := NewStowRawStore(fn("container"), newMockStowContainer("container"), testScope) + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, false, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 3*MiB, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -135,4 +170,206 @@ func TestStowStore_ReadRaw(t *testing.T) { assert.True(t, IsExceedsLimit(err)) assert.NotNil(t, errors.Cause(err)) }) + + t.Run("Happy Path multi-container enabled", func(t *testing.T) { + testScope := promutils.NewTestScope() + fn := fQNFn["s3"] + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } else if id == "bad-container" { + return newMockStowContainer("bad-container"), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, true, testScope) + assert.NoError(t, err) + err = s.WriteRaw(context.TODO(), "s3://bad-container/path", 0, Options{}, bytes.NewReader([]byte{})) + assert.NoError(t, err) + metadata, err := s.Head(context.TODO(), "s3://bad-container/path") + if assert.NoError(t, err) { + assert.True(t, metadata.Exists()) + } + raw, err := s.ReadRaw(context.TODO(), "s3://bad-container/path") + assert.NoError(t, err) + rawBytes, err := ioutil.ReadAll(raw) + assert.NoError(t, err) + assert.Equal(t, 0, len(rawBytes)) + assert.Equal(t, DataReference("s3://container"), s.GetBaseContainerFQN(context.TODO())) + }) + + t.Run("Happy Path multi-container bad", func(t *testing.T) { + testScope := promutils.NewTestScope() + fn := fQNFn["s3"] + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, true, testScope) + assert.NoError(t, err) + err = s.WriteRaw(context.TODO(), "s3://bad-container/path", 0, Options{}, bytes.NewReader([]byte{})) + assert.Error(t, err) + _, err = s.Head(context.TODO(), "s3://bad-container/path") + assert.Error(t, err) + _, err = s.ReadRaw(context.TODO(), "s3://bad-container/path") + assert.Error(t, err) + }) +} + +func TestNewLocalStore(t *testing.T) { + labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) + t.Run("Valid config", func(t *testing.T) { + testScope := promutils.NewTestScope() + store, err := newStowRawStore(&Config{ + Stow: &StowConfig{ + Kind: local.Kind, + Config: map[string]string{ + local.ConfigKeyPath: "./", + }, + }, + InitContainer: "testdata", + }, testScope.NewSubScope("x")) + + assert.NoError(t, err) + assert.NotNil(t, store) + + // Stow local store expects the full path after the container portion (looks like a bug to me) + rc, err := store.ReadRaw(context.TODO(), DataReference("file://testdata/config.yaml")) + assert.NoError(t, err) + if assert.NotNil(t, rc) { + assert.NoError(t, rc.Close()) + } + }) + + t.Run("Invalid config", func(t *testing.T) { + testScope := promutils.NewTestScope() + _, err := newStowRawStore(&Config{}, testScope) + assert.Error(t, err) + }) + + t.Run("Initialize container", func(t *testing.T) { + testScope := promutils.NewTestScope() + tmpDir, err := ioutil.TempDir("", "stdlib_local") + assert.NoError(t, err) + + stats, err := os.Stat(tmpDir) + assert.NoError(t, err) + assert.NotNil(t, stats) + + store, err := newStowRawStore(&Config{ + Stow: &StowConfig{ + Kind: local.Kind, + Config: map[string]string{ + local.ConfigKeyPath: tmpDir, + }, + }, + InitContainer: "tmp", + }, testScope.NewSubScope("y")) + + assert.NoError(t, err) + assert.NotNil(t, store) + + stats, err = os.Stat(filepath.Join(tmpDir, "tmp")) + assert.NoError(t, err) + if assert.NotNil(t, stats) { + assert.True(t, stats.IsDir()) + } + }) + + t.Run("missing init container", func(t *testing.T) { + testScope := promutils.NewTestScope() + tmpDir, err := ioutil.TempDir("", "stdlib_local") + assert.NoError(t, err) + + stats, err := os.Stat(tmpDir) + assert.NoError(t, err) + assert.NotNil(t, stats) + + store, err := newStowRawStore(&Config{ + Stow: &StowConfig{ + Kind: local.Kind, + Config: map[string]string{ + local.ConfigKeyPath: tmpDir, + }, + }, + }, testScope.NewSubScope("y")) + + assert.Error(t, err) + assert.Nil(t, store) + }) + + t.Run("multi-container enabled", func(t *testing.T) { + testScope := promutils.NewTestScope() + tmpDir, err := ioutil.TempDir("", "stdlib_local") + assert.NoError(t, err) + + stats, err := os.Stat(tmpDir) + assert.NoError(t, err) + assert.NotNil(t, stats) + + store, err := newStowRawStore(&Config{ + Stow: &StowConfig{ + Kind: local.Kind, + Config: map[string]string{ + local.ConfigKeyPath: tmpDir, + }, + }, + InitContainer: "tmp", + MultiContainerEnabled: true, + }, testScope.NewSubScope("y")) + + assert.NoError(t, err) + assert.NotNil(t, store) + + stats, err = os.Stat(filepath.Join(tmpDir, "tmp")) + assert.NoError(t, err) + if assert.NotNil(t, stats) { + assert.True(t, stats.IsDir()) + } + }) +} + +func Test_newStowRawStore(t *testing.T) { + type args struct { + cfg *Config + metricsScope promutils.Scope + } + tests := []struct { + name string + args args + wantErr bool + }{ + {"fail", args{&Config{}, promutils.NewTestScope()}, true}, + {"google", args{&Config{ + InitContainer: "flyte", + Stow: &StowConfig{ + Kind: google.Kind, + Config: map[string]string{ + google.ConfigProjectId: "x", + google.ConfigScopes: "y", + }, + }, + }, promutils.NewTestScope()}, true}, + {"minio", args{&Config{ + Type: TypeMinio, + InitContainer: "some-container", + Connection: ConnectionConfig{ + Endpoint: config.URL{URL: utils.MustParseURL("http://minio:9000")}, + }, + }, promutils.NewTestScope()}, true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := newStowRawStore(tt.args.cfg, tt.args.metricsScope) + if tt.wantErr { + assert.Error(t, err, "newStowRawStore() error = %v, wantErr %v", err, tt.wantErr) + return + } + assert.NotNil(t, got, "Expected rawstore, found nil!") + }) + } } diff --git a/flytestdlib/storage/stowstore.go b/flytestdlib/storage/stowstore.go deleted file mode 100644 index 6b98d3ed49..0000000000 --- a/flytestdlib/storage/stowstore.go +++ /dev/null @@ -1,134 +0,0 @@ -package storage - -import ( - "context" - "fmt" - - "github.com/aws/aws-sdk-go/aws/awserr" - awsS3 "github.com/aws/aws-sdk-go/service/s3" - - "github.com/lyft/flytestdlib/logger" - "github.com/lyft/flytestdlib/promutils" - - "github.com/pkg/errors" - - "github.com/graymeta/stow" - "github.com/graymeta/stow/azure" - "github.com/graymeta/stow/google" - "github.com/graymeta/stow/oracle" - "github.com/graymeta/stow/s3" - "github.com/graymeta/stow/swift" -) - -var fQNFn = map[string]func(string) DataReference{ - s3.Kind: func(bucket string) DataReference { - return DataReference(fmt.Sprintf("s3://%s", bucket)) - }, - google.Kind: func(bucket string) DataReference { - return DataReference(fmt.Sprintf("gs://%s", bucket)) - }, - oracle.Kind: func(bucket string) DataReference { - return DataReference(fmt.Sprintf("os://%s", bucket)) - }, - swift.Kind: func(bucket string) DataReference { - return DataReference(fmt.Sprintf("sw://%s", bucket)) - }, - azure.Kind: func(bucket string) DataReference { - return DataReference(fmt.Sprintf("afs://%s", bucket)) - }, -} - -func awsBucketIsNotFound(err error) bool { - if IsNotFound(err) { - return true - } - - if awsErr, errOk := errors.Cause(err).(awserr.Error); errOk { - return awsErr.Code() == awsS3.ErrCodeNoSuchBucket - } - - return false -} - -func awsBucketAlreadyExists(err error) bool { - if IsExists(err) { - return true - } - - if awsErr, errOk := errors.Cause(err).(awserr.Error); errOk { - return awsErr.Code() == awsS3.ErrCodeBucketAlreadyOwnedByYou - } - - return false -} - -func newStowRawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error) { - if cfg.InitContainer == "" { - return nil, fmt.Errorf("initContainer is required") - } - - var cfgMap stow.ConfigMap - var kind string - if cfg.Stow != nil { - kind = cfg.Stow.Kind - cfgMap = stow.ConfigMap(cfg.Stow.Config) - } else { - logger.Warnf(context.TODO(), "stow configuration section missing, defaulting to legacy s3/minio connection config") - // This is for supporting legacy configurations which configure S3 via connection config - kind = s3.Kind - cfgMap = legacyS3ConfigMap(cfg.Connection) - } - - fn, ok := fQNFn[kind] - if !ok { - return nil, errors.Errorf("unsupported stow.kind [%s], add support in flytestdlib?", kind) - } - - loc, err := stow.Dial(kind, cfgMap) - if err != nil { - return emptyStore, fmt.Errorf("unable to configure the storage for %s. Error: %v", kind, err) - } - - c, err := loc.Container(cfg.InitContainer) - if err != nil { - if IsNotFound(err) || awsBucketIsNotFound(err) { - c, err := loc.CreateContainer(cfg.InitContainer) - // If the container's already created, move on. Otherwise, fail with error. - if err != nil && !awsBucketAlreadyExists(err) { - return emptyStore, fmt.Errorf("unable to initialize container [%v]. Error: %v", cfg.InitContainer, err) - } - return NewStowRawStore(fn(c.Name()), c, metricsScope) - } - - return emptyStore, err - } - - return NewStowRawStore(fn(c.Name()), c, metricsScope) -} - -func legacyS3ConfigMap(cfg ConnectionConfig) stow.ConfigMap { - // Non-nullable fields - stowConfig := stow.ConfigMap{ - s3.ConfigAuthType: cfg.AuthType, - s3.ConfigRegion: cfg.Region, - } - - // Fields that differ between minio and real S3 - if endpoint := cfg.Endpoint.String(); endpoint != "" { - stowConfig[s3.ConfigEndpoint] = endpoint - } - - if accessKey := cfg.AccessKey; accessKey != "" { - stowConfig[s3.ConfigAccessKeyID] = accessKey - } - - if secretKey := cfg.SecretKey; secretKey != "" { - stowConfig[s3.ConfigSecretKey] = secretKey - } - - if disableSsl := cfg.DisableSSL; disableSsl { - stowConfig[s3.ConfigDisableSSL] = "True" - } - - return stowConfig -} diff --git a/flytestdlib/storage/stowstore_test.go b/flytestdlib/storage/stowstore_test.go deleted file mode 100644 index 283ee71cd4..0000000000 --- a/flytestdlib/storage/stowstore_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package storage - -import ( - "testing" - - "github.com/graymeta/stow/google" - "github.com/stretchr/testify/assert" - - "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytestdlib/internal/utils" - "github.com/lyft/flytestdlib/promutils" -) - -func Test_newStowRawStore(t *testing.T) { - type args struct { - cfg *Config - metricsScope promutils.Scope - } - tests := []struct { - name string - args args - wantErr bool - }{ - {"fail", args{&Config{}, promutils.NewTestScope()}, true}, - {"google", args{&Config{ - InitContainer: "flyte", - Stow: &StowConfig{ - Kind: google.Kind, - Config: map[string]string{ - google.ConfigProjectId: "x", - google.ConfigScopes: "y", - }, - }, - }, promutils.NewTestScope()}, true}, - {"minio", args{&Config{ - Type: TypeMinio, - InitContainer: "some-container", - Connection: ConnectionConfig{ - Endpoint: config.URL{URL: utils.MustParseURL("http://minio:9000")}, - }, - }, promutils.NewTestScope()}, true}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := newStowRawStore(tt.args.cfg, tt.args.metricsScope) - if tt.wantErr { - assert.Error(t, err, "newStowRawStore() error = %v, wantErr %v", err, tt.wantErr) - return - } - assert.NotNil(t, got, "Expected rawstore, found nil!") - }) - } -} From 1b51b7e0215953bbaef44b021a9917656853f421 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Thu, 4 Jun 2020 21:49:41 -0700 Subject: [PATCH 106/191] Scoop update for flytestdlib version v0.3.7 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 96571cad1b..2549357738 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.3.6", + "version": "0.3.7", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.6/flytestdlib_0.3.6_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.7/flytestdlib_0.3.7_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "dcac12a1ccb11d38d64b973dcdd82705d3be045d5b3c1b9faffe79a983fb85a2" + "hash": "1f6f46c67d5564e0f7cb9f8c1e23a6eee704d072058ae88ed4ca4e42e74e6cb6" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.6/flytestdlib_0.3.6_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.7/flytestdlib_0.3.7_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "d99c51c3b6dabe206f8c4da432e5d76eb550832978dc3e3d923da94d82861b77" + "hash": "0f5a0c35bfd1741ce075b77136d698dd91192ee2f3b95189fba2f04a1ecac46d" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From 223ba85a0140c5c2f64605a8a3973626a6451b0e Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Wed, 17 Jun 2020 08:32:37 -0700 Subject: [PATCH 107/191] Completable Futures utility (#65) --- flytestdlib/futures/future.go | 116 +++++++++++++++++++++++++++++ flytestdlib/futures/future_test.go | 85 +++++++++++++++++++++ 2 files changed, 201 insertions(+) create mode 100644 flytestdlib/futures/future.go create mode 100644 flytestdlib/futures/future_test.go diff --git a/flytestdlib/futures/future.go b/flytestdlib/futures/future.go new file mode 100644 index 0000000000..8aad00acb2 --- /dev/null +++ b/flytestdlib/futures/future.go @@ -0,0 +1,116 @@ +// This module implements a simple Async Futures for golang +// Usage: +// f := NewAsyncFuture(childCtx, func(ctx2 context.Context) (interface{}, error) { +// can do large async / non blocking work +// return ... +// } +// f.Ready() // can be checked for completion +// f.Get() .. will block till the given sub-routine returns +package data + +import ( + "context" + "fmt" + "sync" +) + +// Provides a Future API for asynchronous completion of tasks +type Future interface { + // Returns true if the Future is ready and either a value or error is available. Once Ready returns True, Get should return immediately + Ready() bool + // Get is a potentially blocking call, that returns the asynchronously computed value or an error + // If Get is called before Ready() returns True, then it will block till the future has been completed + Get(ctx context.Context) (interface{}, error) +} + +// This is a synchronous future, where the values are available immediately on construction. This is used to maintain a synonymous API with both +// Async and Sync tasks +type SyncFuture struct { + // The actual value + val interface{} + // OR an error + err error +} + +// Always returns true +func (s SyncFuture) Ready() bool { + return true +} + +// returns the previously provided value / error +func (s *SyncFuture) Get(_ context.Context) (interface{}, error) { + return s.val, s.err +} + +// Creates a new "completed" future that matches the async computation api +func NewSyncFuture(val interface{}, err error) *SyncFuture { + return &SyncFuture{ + val: val, + err: err, + } +} + +// ErrAsyncFutureCanceled is returned when the async future is cancelled by invoking the cancel function on the context +var ErrAsyncFutureCanceled = fmt.Errorf("async future was canceled") + +// An asynchronously completing future +type AsyncFuture struct { + sync.Mutex + doneChannel chan bool + cancelFn context.CancelFunc + // The actual value + val interface{} + // Or an error + err error + ready bool +} + +func (f *AsyncFuture) set(val interface{}, err error) { + f.Lock() + defer f.Unlock() + f.val = val + f.err = err + f.ready = true + f.doneChannel <- true +} + +func (f *AsyncFuture) get() (interface{}, error) { + f.Lock() + defer f.Unlock() + return f.val, f.err +} + +// returns whether the future is completed +func (f *AsyncFuture) Ready() bool { + f.Lock() + defer f.Unlock() + return f.ready +} + +// Returns results (interface{} or an error) OR blocks till the results are available. +// If context is cancelled while waiting for results, an ErrAsyncFutureCanceled is returned +func (f *AsyncFuture) Get(ctx context.Context) (interface{}, error) { + select { + case <-ctx.Done(): + f.cancelFn() + return nil, ErrAsyncFutureCanceled + case <-f.doneChannel: + return f.get() + } +} + +// Creates a new Async future, that will call the method `closure` and return the results from the execution of +// this method +func NewAsyncFuture(ctx context.Context, closure func(context.Context) (interface{}, error)) *AsyncFuture { + childCtx, cancel := context.WithCancel(ctx) + f := &AsyncFuture{ + doneChannel: make(chan bool, 1), + cancelFn: cancel, + } + + go func(ctx2 context.Context, fut *AsyncFuture) { + val, err := closure(ctx2) + fut.set(val, err) + }(childCtx, f) + return f +} diff --git a/flytestdlib/futures/future_test.go b/flytestdlib/futures/future_test.go new file mode 100644 index 0000000000..a5923b203b --- /dev/null +++ b/flytestdlib/futures/future_test.go @@ -0,0 +1,85 @@ +package data + +import ( + "context" + "fmt" + "runtime" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func TestNewSyncFuture(t *testing.T) { + type args struct { + val interface{} + err error + } + tests := []struct { + name string + args args + }{ + {"val", args{val: "val"}}, + {"nil-val", args{}}, + {"error", args{err: fmt.Errorf("err")}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := NewSyncFuture(tt.args.val, tt.args.err) + assert.NotNil(t, got) + assert.Equal(t, tt.args.val, got.val) + assert.Equal(t, tt.args.err, got.err) + assert.True(t, got.Ready()) + v, err := got.Get(context.TODO()) + assert.Equal(t, tt.args.val, v) + assert.Equal(t, tt.args.err, err) + }) + } +} + +func TestAsyncFuture(t *testing.T) { + + const val = "val" + t.Run("immediate-return-val", func(t *testing.T) { + v := val + err := fmt.Errorf("err") + af := NewAsyncFuture(context.TODO(), func(ctx context.Context) (interface{}, error) { + return v, err + }) + assert.NotNil(t, af) + rv, rerr := af.Get(context.TODO()) + assert.Equal(t, v, rv) + assert.Equal(t, err, rerr) + assert.True(t, af.Ready()) + }) + + t.Run("wait-return-val", func(t *testing.T) { + v := val + err := fmt.Errorf("err") + af := NewAsyncFuture(context.TODO(), func(ctx context.Context) (interface{}, error) { + time.Sleep(time.Second * 1) + return v, err + }) + runtime.Gosched() + assert.NotNil(t, af) + rv, rerr := af.Get(context.TODO()) + assert.Equal(t, v, rv) + assert.Equal(t, err, rerr) + assert.True(t, af.Ready()) + }) + + t.Run("timeout", func(t *testing.T) { + v := val + ctx := context.TODO() + af := NewAsyncFuture(ctx, func(ctx context.Context) (interface{}, error) { + time.Sleep(time.Second * 5) + return v, nil + }) + runtime.Gosched() + cctx, cancel := context.WithCancel(ctx) + cancel() + _, rerr := af.Get(cctx) + assert.Error(t, rerr) + assert.Equal(t, ErrAsyncFutureCanceled, rerr) + }) +} From a8c0b1cc909b9de9df65821eea68482f1a4ffa0d Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Thu, 18 Jun 2020 14:56:47 -0700 Subject: [PATCH 108/191] Scoop update for flytestdlib version v0.3.8 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 2549357738..3fe3361b9e 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.3.7", + "version": "0.3.8", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.7/flytestdlib_0.3.7_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.8/flytestdlib_0.3.8_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "1f6f46c67d5564e0f7cb9f8c1e23a6eee704d072058ae88ed4ca4e42e74e6cb6" + "hash": "051f862bf048e8ea955d9a39c706a6ab502f37c9dcbdaa35a7c655926d21a447" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.7/flytestdlib_0.3.7_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.8/flytestdlib_0.3.8_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "0f5a0c35bfd1741ce075b77136d698dd91192ee2f3b95189fba2f04a1ecac46d" + "hash": "0d2676e8c435adc7f8eb753209861926e1fbe00e7329a2a03b46756925c72226" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From d16ff82254f55976818f6676c62a9311caf9afc9 Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Thu, 18 Jun 2020 22:33:42 -0700 Subject: [PATCH 109/191] Pkgname was wrong (#66) --- flytestdlib/futures/future.go | 2 +- flytestdlib/futures/future_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flytestdlib/futures/future.go b/flytestdlib/futures/future.go index 8aad00acb2..a90e6907b7 100644 --- a/flytestdlib/futures/future.go +++ b/flytestdlib/futures/future.go @@ -6,7 +6,7 @@ // } // f.Ready() // can be checked for completion // f.Get() .. will block till the given sub-routine returns -package data +package futures import ( "context" diff --git a/flytestdlib/futures/future_test.go b/flytestdlib/futures/future_test.go index a5923b203b..0ff617e298 100644 --- a/flytestdlib/futures/future_test.go +++ b/flytestdlib/futures/future_test.go @@ -1,4 +1,4 @@ -package data +package futures import ( "context" From b47214fea0846559f9022972b3f192b57a5d33d0 Mon Sep 17 00:00:00 2001 From: goreleaserbot Date: Thu, 18 Jun 2020 22:41:07 -0700 Subject: [PATCH 110/191] Scoop update for flytestdlib version v0.3.9 --- flytestdlib/flytestdlib.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flytestdlib/flytestdlib.json b/flytestdlib/flytestdlib.json index 3fe3361b9e..d981fa9c98 100644 --- a/flytestdlib/flytestdlib.json +++ b/flytestdlib/flytestdlib.json @@ -1,19 +1,19 @@ { - "version": "0.3.8", + "version": "0.3.9", "architecture": { "32bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.8/flytestdlib_0.3.8_Windows_i386.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.9/flytestdlib_0.3.9_Windows_i386.zip", "bin": [ "pflags.exe" ], - "hash": "051f862bf048e8ea955d9a39c706a6ab502f37c9dcbdaa35a7c655926d21a447" + "hash": "941f2bedb122cd7af582a196870a8ef1a2857a0c3ac548448f901e5658d83b75" }, "64bit": { - "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.8/flytestdlib_0.3.8_Windows_x86_64.zip", + "url": "https://github.com/lyft/flytestdlib/releases/download/v0.3.9/flytestdlib_0.3.9_Windows_x86_64.zip", "bin": [ "pflags.exe" ], - "hash": "0d2676e8c435adc7f8eb753209861926e1fbe00e7329a2a03b46756925c72226" + "hash": "156cac855fa464b888b0fd41c991a7241e5ca4edc08bad2d2cc47bf5d24792e9" } }, "homepage": "https://godoc.org/github.com/lyft/flytestdlib", From e6692cd53af27d77cdd39c1d2c86358c1e793e0e Mon Sep 17 00:00:00 2001 From: Honnix Date: Tue, 11 Aug 2020 23:13:21 +0200 Subject: [PATCH 111/191] Fix container name logging (#67) --- flytestdlib/storage/stow_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 8ffc670a5a..ce4e6b5c82 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -127,7 +127,7 @@ func (s *StowStore) LoadContainer(ctx context.Context, container string, createI c, err := s.loc.Container(container) if err != nil { if createIfNotFound { - logger.Infof(ctx, "Container [%s] lookup failed, err [%s], will try to create a new one", err) + logger.Infof(ctx, "Container [%s] lookup failed, err [%s], will try to create a new one", container, err) if IsNotFound(err) || awsBucketIsNotFound(err) { c, err := s.loc.CreateContainer(container) // If the container's already created, move on. Otherwise, fail with error. From 063efbb734ee7f1b2bad7f73a16f8523d2f13231 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Sun, 31 Jan 2021 07:53:15 -0800 Subject: [PATCH 112/191] Update CI post migration (#68) * Update CI post migration * Migrate to github workflows * length check * debug * Avoid installing pflags from repo * Update deps * update go action * try import path * update protos * set checkout depth * cleanup * typo in master wf --- flytestdlib/.github/workflows/master.yml | 78 +++ .../.github/workflows/pull_request.yml | 37 ++ flytestdlib/.gitignore | 2 + flytestdlib/.goreleaser.yml | 4 +- flytestdlib/.travis.yml | 28 - flytestdlib/cli/pflags/api/generator.go | 10 + flytestdlib/cli/pflags/api/generator_test.go | 20 +- flytestdlib/go.mod | 79 ++- flytestdlib/go.sum | 584 ++++++++++++++++++ flytestdlib/utils/marshal_utils_test.go | 61 +- flytestdlib/utils/prototest/test_type.pb.go | 150 +++++ flytestdlib/utils/prototest/test_type.proto | 9 + 12 files changed, 961 insertions(+), 101 deletions(-) create mode 100644 flytestdlib/.github/workflows/master.yml create mode 100644 flytestdlib/.github/workflows/pull_request.yml delete mode 100644 flytestdlib/.travis.yml create mode 100644 flytestdlib/utils/prototest/test_type.pb.go create mode 100644 flytestdlib/utils/prototest/test_type.proto diff --git a/flytestdlib/.github/workflows/master.yml b/flytestdlib/.github/workflows/master.yml new file mode 100644 index 0000000000..007243059c --- /dev/null +++ b/flytestdlib/.github/workflows/master.yml @@ -0,0 +1,78 @@ +name: Master + +on: + push: + branches: + - master + +jobs: + bump-version: + name: Bump Version + if: github.event.commits[0].author.name != 'goreleaserbot' + runs-on: ubuntu-latest + outputs: + version: ${{ steps.bump-version.outputs.tag }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Bump version and push tag + id: bump-version + uses: anothrNick/github-tag-action@1.17.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + WITH_V: true + DEFAULT_BUMP: patch + + goreleaser: + name: Goreleaser + runs-on: ubuntu-latest + needs: [bump-version] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.14 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + tests-lint: + name: Run tests and lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Unit Tests + uses: cedrickring/golang-action@1.6.0 + env: + GO111MODULE: "on" + with: + args: make mod_download && make test_unit_codecov + - name: Push CodeCov + uses: codecov/codecov-action@v1 + with: + file: coverage.txt + flags: unittests + fail_ci_if_error: true + - name: Lint + uses: cedrickring/golang-action@1.6.0 + env: + GO111MODULE: "on" + with: + args: make install && make lint + - name: Bench tests + uses: cedrickring/golang-action@1.6.0 + env: + GO111MODULE: "on" + with: + args: make install && make test_benchmark diff --git a/flytestdlib/.github/workflows/pull_request.yml b/flytestdlib/.github/workflows/pull_request.yml new file mode 100644 index 0000000000..b0e05d6fe4 --- /dev/null +++ b/flytestdlib/.github/workflows/pull_request.yml @@ -0,0 +1,37 @@ +name: Pull Request + +on: pull_request + +jobs: + tests-lint: + name: Run tests and lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Unit Tests + uses: cedrickring/golang-action@1.6.0 + env: + GO111MODULE: "on" + with: + args: make mod_download && make test_unit_codecov + - name: Push CodeCov + uses: codecov/codecov-action@v1 + with: + file: coverage.txt + flags: unittests + fail_ci_if_error: true + - name: Lint + uses: cedrickring/golang-action@1.6.0 + env: + GO111MODULE: "on" + with: + args: make install && make lint + - name: Bench tests + uses: cedrickring/golang-action@1.6.0 + env: + GO111MODULE: "on" + with: + args: make install && make test_benchmark diff --git a/flytestdlib/.gitignore b/flytestdlib/.gitignore index 67d6534498..117e214036 100644 --- a/flytestdlib/.gitignore +++ b/flytestdlib/.gitignore @@ -115,3 +115,5 @@ codecov_bash.sh coverage.txt # End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode + +.vscode/* diff --git a/flytestdlib/.goreleaser.yml b/flytestdlib/.goreleaser.yml index dc49d22574..5a552f389b 100644 --- a/flytestdlib/.goreleaser.yml +++ b/flytestdlib/.goreleaser.yml @@ -11,7 +11,7 @@ builds: - windows - darwin ldflags: - - -s -w -X github.com/lyft/flytestdlib/version.Version={{.Version}} -X github.com/lyft/flytestdlib/version.Build={{.ShortCommit}} -X github.com/lyft/flytestdlib/version.BuildTime={{.Date}} + - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} archives: - replacements: darwin: macOS @@ -49,7 +49,7 @@ scoop: # Your app's homepage. # Default is empty. - homepage: "https://godoc.org/github.com/lyft/flytestdlib" + homepage: "https://godoc.org/github.com/flyteorg/flytestdlib" # Your app's description. # Default is empty. diff --git a/flytestdlib/.travis.yml b/flytestdlib/.travis.yml deleted file mode 100644 index e7e7d81ff6..0000000000 --- a/flytestdlib/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -sudo: required -language: go -go: -- '1.13' -jobs: - include: - - stage: test - name: unit tests and coverage - install: make install - script: make test_unit_codecov - - stage: test - name: benchmark tests - install: make install - script: make test_benchmark - - stage: test - install: make install - name: lint - script: make lint -deploy: -- provider: script - skip_cleanup: true - script: curl -sL https://git.io/goreleaser | bash - on: - tags: true - condition: "$TRAVIS_OS_NAME = linux" -env: - global: - - secure: xqB2LwI1qbrPUIYXtaOnIoBX5b1h1ydxOvy5Cu1sS/R2t1BfYHFX5oH0/0Z23bfpQBpzEweXA3145xyjg1Q2vJiN2ebPLmMPduWdjp1be/4xWCnkftZuGW7LDEFg3zuREUMKdfDhkb0uQ5gzIte3TvGh/tJwfxwUHVHQEl1aqPYqbRHRqoLJZiuhgIH+17su5mBFfu/62xXMP8zImLUq4WLrmbmMszLWg3IOu+oawpMXuDsjoxkucdFjmo2rsVUNr3QNo7ock7hl1OYHJZvWuRV+HxCaNRNUrbr8GuWYUSNOB51Ml7kLAlSxnmKJMs1fZRxTPlXR/0+XA8zAWahcKvKxRqguoFNVqYEESS/yRoJhLctgwAjx/btSc1a4BXCwIDFXNFVBGyZiVcLnh9PG6WWXI2YRWSbXmoBG3QN8Dtdpz54qoCpCA7IVWijWBHVXiVbyIn9XmTMFCdMXIFZQ7mzzk6K+894taPSRsia305LCJ2/h1df8bLsw5zcXmjXjZpkxM7rK5nJqx6IiaZ94GmeRER3OQxKTxxBuoZvcWcn9+ni+FtA2EzJuMBxbWLh+jinfqqieLkoOPHeBzAN6YyaPuUQje/dT4tjdf95V+wuojfu/TqIk/o7WwMPgfYWP2tlj0R5GwoA3ZocZRXZYRP/gg1Cje6wCQCOiIPsFC5g= diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index 08e7a0ef0d..bbd2ff0456 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -291,13 +291,16 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue func NewGenerator(pkg, targetTypeName, defaultVariableName string) (*PFlagProviderGenerator, error) { ctx := context.Background() var err error + // Resolve package path if pkg == "" || pkg[0] == '.' { pkg, err = filepath.Abs(filepath.Clean(pkg)) if err != nil { return nil, err } + pkg = gogenutil.StripGopath(pkg) + logger.InfofNoCtx("Loading package from path [%v]", pkg) } targetPackage, err := loadPackage(pkg) @@ -340,11 +343,18 @@ func NewGenerator(pkg, targetTypeName, defaultVariableName string) (*PFlagProvid func loadPackage(pkg string) (*types.Package, error) { config := &packages.Config{ Mode: packages.NeedTypes | packages.NeedTypesInfo, + Logf: logger.InfofNoCtx, } + loadedPkgs, err := packages.Load(config, pkg) if err != nil { return nil, err } + + if len(loadedPkgs) == 0 { + return nil, fmt.Errorf("No packages loaded") + } + targetPackage := loadedPkgs[0].Types return targetPackage, nil } diff --git a/flytestdlib/cli/pflags/api/generator_test.go b/flytestdlib/cli/pflags/api/generator_test.go index 6826f34f13..a22a9ae460 100644 --- a/flytestdlib/cli/pflags/api/generator_test.go +++ b/flytestdlib/cli/pflags/api/generator_test.go @@ -45,19 +45,29 @@ func TestElemValueOrNil(t *testing.T) { } func TestNewGenerator(t *testing.T) { - g, err := NewGenerator(".", "TestType", "DefaultTestType") - assert.NoError(t, err) + g, err := NewGenerator("github.com/lyft/flytestdlib/cli/pflags/api", "TestType", "DefaultTestType") + if !assert.NoError(t, err) { + t.FailNow() + } ctx := context.Background() p, err := g.Generate(ctx) - assert.NoError(t, err) + if !assert.NoError(t, err) { + t.FailNow() + } codeOutput, err := ioutil.TempFile("", "output-*.go") - assert.NoError(t, err) + if !assert.NoError(t, err) { + t.FailNow() + } + defer func() { assert.NoError(t, os.Remove(codeOutput.Name())) }() testOutput, err := ioutil.TempFile("", "output-*_test.go") - assert.NoError(t, err) + if !assert.NoError(t, err) { + t.FailNow() + } + defer func() { assert.NoError(t, os.Remove(testOutput.Name())) }() assert.NoError(t, p.WriteCodeFile(codeOutput.Name())) diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 8c98f3324c..059bc4e1b3 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -3,48 +3,67 @@ module github.com/lyft/flytestdlib go 1.13 require ( - cloud.google.com/go v0.52.0 // indirect - github.com/Azure/azure-sdk-for-go v38.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.9.4 // indirect - github.com/Azure/go-autorest/autorest/adal v0.8.1 // indirect - github.com/Azure/go-autorest/autorest/to v0.3.0 // indirect - github.com/aws/aws-sdk-go v1.28.9 + cloud.google.com/go v0.75.0 // indirect + cloud.google.com/go/storage v1.12.0 // indirect + github.com/Azure/azure-sdk-for-go v51.0.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.17 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect + github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 // indirect + github.com/aws/aws-sdk-go v1.37.1 github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 - github.com/coocood/freecache v1.1.0 - github.com/dnaeon/go-vcr v1.0.1 // indirect + github.com/coocood/freecache v1.1.1 + github.com/coreos/go-etcd v2.0.0+incompatible // indirect + github.com/cpuguy83/go-md2man v1.0.10 // indirect github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 - github.com/fatih/color v1.9.0 + github.com/fatih/color v1.10.0 github.com/fatih/structtag v1.2.0 - github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 + github.com/fsnotify/fsnotify v1.4.9 github.com/ghodss/yaml v1.0.0 + github.com/go-test/deep v1.0.7 github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect - github.com/golang/protobuf v1.3.2 - github.com/graymeta/stow v0.2.4 + github.com/golang/protobuf v1.4.3 + github.com/graymeta/stow v0.2.7 github.com/hashicorp/golang-lru v0.5.4 - github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect - github.com/magiconair/properties v1.8.1 + github.com/magiconair/properties v1.8.4 github.com/mattn/go-isatty v0.0.12 // indirect - github.com/mitchellh/mapstructure v1.1.2 - github.com/pelletier/go-toml v1.6.0 // indirect + github.com/mitchellh/mapstructure v1.4.1 + github.com/ncw/swift v1.0.53 // indirect + github.com/pelletier/go-toml v1.8.1 // indirect github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.3.0 - github.com/prometheus/common v0.9.1 // indirect - github.com/sirupsen/logrus v1.4.2 + github.com/prometheus/client_golang v1.9.0 + github.com/prometheus/procfs v0.3.0 // indirect + github.com/sirupsen/logrus v1.7.0 + github.com/spf13/afero v1.5.1 // indirect github.com/spf13/cast v1.3.1 // indirect - github.com/spf13/cobra v0.0.5 + github.com/spf13/cobra v1.1.1 github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.6.2 - github.com/stretchr/objx v0.2.0 // indirect - github.com/stretchr/testify v1.4.0 - golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 // indirect - golang.org/x/time v0.0.0-20191024005414-555d28b269f0 - golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4 - google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150 // indirect - gopkg.in/ini.v1 v1.51.1 // indirect - gopkg.in/yaml.v2 v2.2.8 // indirect - k8s.io/apimachinery v0.17.2 + github.com/spf13/viper v1.7.1 + github.com/stretchr/objx v0.3.0 // indirect + github.com/stretchr/testify v1.7.0 + github.com/ugorji/go v1.1.4 // indirect + github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 // indirect + github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 // indirect + go.opencensus.io v0.22.6 // indirect + golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect + golang.org/x/mod v0.4.1 // indirect + golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect + golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 // indirect + golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect + golang.org/x/text v0.3.5 // indirect + golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 + golang.org/x/tools v0.1.0 + google.golang.org/api v0.38.0 // indirect + google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 // indirect + google.golang.org/grpc v1.35.0 // indirect + google.golang.org/protobuf v1.25.0 + gopkg.in/ini.v1 v1.62.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/apimachinery v0.20.2 k8s.io/client-go v11.0.0+incompatible + k8s.io/klog v1.0.0 // indirect + k8s.io/klog/v2 v2.5.0 // indirect ) // Pin the version of client-go to something that's compatible with katrogan's fork of api and apimachinery diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index 40358a09b4..ad46a0764e 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -5,61 +5,131 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0 h1:GGslhk/BU052LPlnI1vpp3fcbUs+hQ3E+Doti/3/vF8= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0Ko= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0 h1:XgtDnVJRCPEUG21gjFiRPz4zI1Mjg16R+NYQjfmU4XY= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/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.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0 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.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lUX4= +cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v38.2.0+incompatible h1:ZeCdp1E/V5lI8oLR/BjWQh0OW9aFBYlgXGKRVIWNPXY= github.com/Azure/azure-sdk-for-go v38.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v51.0.0+incompatible h1:p7blnyJSjJqf5jflHbSGhIhEpXIgIFmYZNg5uwqweso= +github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.4 h1:1cM+NmKw91+8h5vfjgzK4ZGLuN72k87XVZBWyGwNjUM= github.com/Azure/go-autorest/autorest v0.9.4/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= +github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= +github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= +github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.28.9 h1:grIuBQc+p3dTRXerh5+2OxSuWFi0iXuxbFdTSg0jaW0= github.com/aws/aws-sdk-go v1.28.9/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= +github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 h1:VRtJdDi2lqc3MFwmouppm2jlm6icF+7H3WYKpLENMTo= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +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= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -70,16 +140,31 @@ github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgk github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coocood/freecache v1.1.0 h1:ENiHOsWdj1BrrlPwblhbn4GdAsMymK3pZORJ+bJGAjA= github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= +github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= +github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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= @@ -89,38 +174,82 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +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= github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 h1:SmsgwFZy9pdTk/k8BZz40D3P5umP5+Ejt3hAi0paBNQ= github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= +github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -132,11 +261,28 @@ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4er github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 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 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -145,121 +291,245 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw 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/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= 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.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graymeta/stow v0.2.4 h1:qDGstknYXqcnmBQ5TRJtxD9Qv1MuRbYRhLoSMeUDs7U= github.com/graymeta/stow v0.2.4/go.mod h1:+0vRL9oMECKjPMP7OeVWl8EIqRCpFwDlth3mrAeV2Kw= +github.com/graymeta/stow v0.2.7 h1:b31cB1Ylw/388sYSZxnmpjT2QxC21AaQ8fRnUtE13b4= +github.com/graymeta/stow v0.2.7/go.mod h1:JAs139Zr29qfsecy7b+h9DRsWXbFbsd7LCrbCDYI84k= github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +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/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +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= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= +github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= 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= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/ncw/swift v1.0.49 h1:eQaKIjSt/PXLKfYgzg01nevmO+CMXfXGRhB1gOhDs7E= github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= +github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +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/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +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= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +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/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +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= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0 h1:miYCvYqFXtl/J9FIy8eNpBfYthAEFg+Ys0XyUVEcDsc= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= +github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= 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= @@ -267,46 +537,71 @@ github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= 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.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= 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/prometheus/procfs v0.3.0 h1:Uehi/mxLK0eiUc0H0++5tpMGTexB8wZ598MIgU8VpDM= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.5.1 h1:VHu76Lk0LSP1x254maIu2bplkWpfBWI+B+6fdoZprcg= +github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -314,32 +609,66 @@ github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= +github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +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/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +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/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok= +go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/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= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -347,13 +676,24 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -362,19 +702,34 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0 h1:8pl+sMODzuvGJkmj2W4kZihvVb5mKm8pB/X44PIQHv8= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -384,29 +739,66 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-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-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-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/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/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-20210126194326-f9ce19ea3013 h1:55H5j7lotzuFCEOKDsMch+fRNUQ9DgtyHOUP31FNqKc= +golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013/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/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -419,25 +811,64 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-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-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/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-20201214210602-f9fddec55a1e/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/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +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/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= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/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= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -451,91 +882,244 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4 h1:BPUNhs1Rsd9Ly0hbjDwBxaNBrAyo/CKpkMcA3pkTwgg= golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200828161849-5deb26317202/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20200915173823-2db8f0ff891c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20200918232735-d647fc253266/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-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.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= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0 h1:yzlyyDW/J0w8yNFJIhiAJy4kq74S+1DOLdawELNxFMA= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.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.31.0/go.mod h1:CL+9IBCa2WWU6gRuBWaKqGWLFFwbEUXkfeMkHLQWYWo= +google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +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/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 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150 h1:VPpdpQkGvFicX9yo4G5oxZPi9ALBnEOZblPSa/Wa2m4= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200831141814-d751682dd103/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200914193844-75d14daec038/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200921151605-7abf4a1a14d5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 h1:uLBY0yHDCj2PMQ98KWDSIDFwn9zK2zh+tgWtbvPPBjI= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/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= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= +google.golang.org/grpc v1.35.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= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +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/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/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.51.1 h1:GyboHr4UqMiLUybYjd22ZjQIKEJEpgtLXtuGbR21Oho= gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= 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/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/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= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20191016110408-35e52d86657a/go.mod h1:/L5qH+AD540e7Cetbui1tuJeXdmNhO8jM6VkXeDdDhQ= k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4= k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= +k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= +k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/client-go v0.0.0-20191016111102-bec269661e48 h1:C2XVy2z0dV94q9hSSoCuTPp1KOG7IegvbdXuz9VGxoU= k8s.io/client-go v0.0.0-20191016111102-bec269661e48/go.mod h1:hrwktSwYGI4JK+TJA3dMaFyyvHVi/aLarVHpbs8bgCU= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= +k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/flytestdlib/utils/marshal_utils_test.go b/flytestdlib/utils/marshal_utils_test.go index 4295f5a14d..e9c507d711 100644 --- a/flytestdlib/utils/marshal_utils_test.go +++ b/flytestdlib/utils/marshal_utils_test.go @@ -1,41 +1,20 @@ package utils import ( - "reflect" "testing" + "github.com/go-test/deep" "github.com/stretchr/testify/assert" "github.com/golang/protobuf/proto" structpb "github.com/golang/protobuf/ptypes/struct" + "github.com/lyft/flytestdlib/utils/prototest" ) type SimpleType struct { StringValue string `json:"string_value,omitempty"` } -// Simple proto -type TestProto struct { - StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` -} - -func (m *TestProto) Reset() { *m = TestProto{} } -func (m *TestProto) String() string { return proto.CompactTextString(m) } -func (*TestProto) ProtoMessage() {} -func (*TestProto) Descriptor() ([]byte, []int) { - return []byte{}, []int{0} -} -func (m *TestProto) GetWorkflowID() string { - if m != nil { - return m.StringValue - } - return "" -} - -func init() { - proto.RegisterType((*TestProto)(nil), "test.package.TestProto") -} - func TestMarshalPbToString(t *testing.T) { type args struct { msg proto.Message @@ -46,8 +25,8 @@ func TestMarshalPbToString(t *testing.T) { want string wantErr bool }{ - {"empty", args{msg: &TestProto{}}, "{}", false}, - {"has value", args{msg: &TestProto{StringValue: "hello"}}, `{"stringValue":"hello"}`, false}, + {"empty", args{msg: &prototest.TestProto{}}, "{}", false}, + {"has value", args{msg: &prototest.TestProto{StringValue: "hello"}}, `{"stringValue":"hello"}`, false}, {"nil input", args{msg: nil}, "", true}, } for _, tt := range tests { @@ -74,7 +53,7 @@ func TestMarshalObjToStruct(t *testing.T) { want *structpb.Struct wantErr bool }{ - {"has proto value", args{input: &TestProto{StringValue: "hello"}}, &structpb.Struct{Fields: map[string]*structpb.Value{ + {"has proto value", args{input: &prototest.TestProto{StringValue: "hello"}}, &structpb.Struct{Fields: map[string]*structpb.Value{ "stringValue": {Kind: &structpb.Value_StringValue{StringValue: "hello"}}, }}, false}, {"has struct value", args{input: SimpleType{StringValue: "hello"}}, &structpb.Struct{Fields: map[string]*structpb.Value{ @@ -89,8 +68,8 @@ func TestMarshalObjToStruct(t *testing.T) { t.Errorf("MarshalObjToStruct() error = %v, wantErr %v", err, tt.wantErr) return } - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("MarshalObjToStruct() = %v, want %v", got, tt.want) + if diff := deep.Equal(got, tt.want); diff != nil { + t.Errorf("MarshalObjToStruct() = %v, want %v, diff: %v", got, tt.want, diff) } }) } @@ -107,18 +86,20 @@ func TestUnmarshalStructToPb(t *testing.T) { expected proto.Message wantErr bool }{ - {"empty", args{structObj: &structpb.Struct{Fields: map[string]*structpb.Value{}}, msg: &TestProto{}}, &TestProto{}, false}, + {"empty", args{structObj: &structpb.Struct{Fields: map[string]*structpb.Value{}}, msg: &prototest.TestProto{}}, &prototest.TestProto{}, false}, {"has value", args{structObj: &structpb.Struct{Fields: map[string]*structpb.Value{ "stringValue": {Kind: &structpb.Value_StringValue{StringValue: "hello"}}, - }}, msg: &TestProto{}}, &TestProto{StringValue: "hello"}, false}, + }}, msg: &prototest.TestProto{}}, &prototest.TestProto{StringValue: "hello"}, false}, {"nil input", args{structObj: nil}, nil, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { if err := UnmarshalStructToPb(tt.args.structObj, tt.args.msg); (err != nil) != tt.wantErr { t.Errorf("UnmarshalStructToPb() error = %v, wantErr %v", err, tt.wantErr) + } else if tt.expected == nil { + assert.Nil(t, tt.args.msg) } else { - assert.Equal(t, tt.expected, tt.args.msg) + assert.Equal(t, (tt.expected.(*prototest.TestProto)).StringValue, (tt.args.msg.(*prototest.TestProto)).StringValue) } }) } @@ -134,17 +115,25 @@ func TestMarshalPbToStruct(t *testing.T) { expected *structpb.Struct wantErr bool }{ - {"empty", args{in: &TestProto{}}, &structpb.Struct{Fields: map[string]*structpb.Value{}}, false}, - {"has value", args{in: &TestProto{StringValue: "hello"}}, &structpb.Struct{Fields: map[string]*structpb.Value{ - "stringValue": {Kind: &structpb.Value_StringValue{StringValue: "hello"}}, - }}, false}, + {"empty", args{in: &prototest.TestProto{}}, &structpb.Struct{Fields: map[string]*structpb.Value{}}, false}, + {"has value", + args{ + in: &prototest.TestProto{StringValue: "hello"}, + }, + &structpb.Struct{ + Fields: map[string]*structpb.Value{ + "stringValue": {Kind: &structpb.Value_StringValue{StringValue: "hello"}}, + }, + }, false}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { if got, err := MarshalPbToStruct(tt.args.in); (err != nil) != tt.wantErr { t.Errorf("MarshalPbToStruct() error = %v, wantErr %v", err, tt.wantErr) + } else if len(tt.expected.Fields) == 0 { + assert.Empty(t, got.Fields) } else { - assert.Equal(t, tt.expected.Fields, got.Fields) + assert.Equal(t, tt.expected.Fields["stringValue"].Kind, got.Fields["stringValue"].Kind) } }) } diff --git a/flytestdlib/utils/prototest/test_type.pb.go b/flytestdlib/utils/prototest/test_type.pb.go new file mode 100644 index 0000000000..df4538bd69 --- /dev/null +++ b/flytestdlib/utils/prototest/test_type.pb.go @@ -0,0 +1,150 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: test_type.proto + +package prototest + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type TestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` +} + +func (x *TestProto) Reset() { + *x = TestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_test_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestProto) ProtoMessage() {} + +func (x *TestProto) ProtoReflect() protoreflect.Message { + mi := &file_test_type_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestProto.ProtoReflect.Descriptor instead. +func (*TestProto) Descriptor() ([]byte, []int) { + return file_test_type_proto_rawDescGZIP(), []int{0} +} + +func (x *TestProto) GetStringValue() string { + if x != nil { + return x.StringValue + } + return "" +} + +var File_test_type_proto protoreflect.FileDescriptor + +var file_test_type_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0d, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x22, 0x2e, 0x0a, 0x09, 0x54, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x0a, + 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, + 0x79, 0x66, 0x74, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2f, + 0x75, 0x74, 0x69, 0x6c, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x65, 0x73, 0x74, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_test_type_proto_rawDescOnce sync.Once + file_test_type_proto_rawDescData = file_test_type_proto_rawDesc +) + +func file_test_type_proto_rawDescGZIP() []byte { + file_test_type_proto_rawDescOnce.Do(func() { + file_test_type_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_type_proto_rawDescData) + }) + return file_test_type_proto_rawDescData +} + +var file_test_type_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_test_type_proto_goTypes = []interface{}{ + (*TestProto)(nil), // 0: flyteidl.core.TestProto +} +var file_test_type_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_test_type_proto_init() } +func file_test_type_proto_init() { + if File_test_type_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_test_type_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_test_type_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_test_type_proto_goTypes, + DependencyIndexes: file_test_type_proto_depIdxs, + MessageInfos: file_test_type_proto_msgTypes, + }.Build() + File_test_type_proto = out.File + file_test_type_proto_rawDesc = nil + file_test_type_proto_goTypes = nil + file_test_type_proto_depIdxs = nil +} diff --git a/flytestdlib/utils/prototest/test_type.proto b/flytestdlib/utils/prototest/test_type.proto new file mode 100644 index 0000000000..e9cb0b84c7 --- /dev/null +++ b/flytestdlib/utils/prototest/test_type.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package flyteidl.core; + +option go_package = "github.com/lyft/flytestdlib/utils/prototest"; + +message TestProto { + string string_value = 1; +} From 467e7b4452210f4cbc6a5f844fcc7e5e7307cd2c Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Sun, 31 Jan 2021 10:42:45 -0800 Subject: [PATCH 113/191] Disable scoope publishing --- flytestdlib/.goreleaser.yml | 62 ++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/flytestdlib/.goreleaser.yml b/flytestdlib/.goreleaser.yml index 5a552f389b..4c49f2f96e 100644 --- a/flytestdlib/.goreleaser.yml +++ b/flytestdlib/.goreleaser.yml @@ -11,7 +11,7 @@ builds: - windows - darwin ldflags: - - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} + - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} archives: - replacements: darwin: macOS @@ -20,46 +20,46 @@ archives: 386: i386 amd64: x86_64 format_overrides: - - goos: windows - format: zip + - goos: windows + format: zip checksum: - name_template: 'checksums.txt' + name_template: "checksums.txt" snapshot: name_template: "{{ .Tag }}-next" changelog: sort: asc filters: exclude: - - '^docs:' - - '^test:' -scoop: - # Default is "https://github.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" - # url_template: "http://github.mycompany.com/foo/bar/releases/{{ .Tag }}/{{ .ArtifactName }}" + - "^docs:" + - "^test:" +# scoop: +# # Default is "https://github.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" +# # url_template: "http://github.mycompany.com/foo/bar/releases/{{ .Tag }}/{{ .ArtifactName }}" - # Repository to push the app manifest to. - bucket: - owner: lyft - name: flytestdlib +# # Repository to push the app manifest to. +# bucket: +# owner: lyft +# name: flytestdlib - # Git author used to commit to the repository. - # Defaults are shown. - commit_author: - name: goreleaserbot - email: goreleaser@carlosbecker.com +# # Git author used to commit to the repository. +# # Defaults are shown. +# commit_author: +# name: goreleaserbot +# email: goreleaser@carlosbecker.com - # Your app's homepage. - # Default is empty. - homepage: "https://godoc.org/github.com/flyteorg/flytestdlib" +# # Your app's homepage. +# # Default is empty. +# homepage: "https://godoc.org/github.com/flyteorg/flytestdlib" - # Your app's description. - # Default is empty. - description: "Common Go utilities (Typed-Config, PFlags, Prometheus Metrics,... more)." +# # Your app's description. +# # Default is empty. +# description: "Common Go utilities (Typed-Config, PFlags, Prometheus Metrics,... more)." - # Your app's license - # Default is empty. - license: Apache-2.0 +# # Your app's license +# # Default is empty. +# license: Apache-2.0 - # Persist data between application updates - persist: - - "data" - - "config.toml" +# # Persist data between application updates +# persist: +# - "data" +# - "config.toml" From 67cbb8d596531385d3af4fbf1dfcb8f7e7b90aa3 Mon Sep 17 00:00:00 2001 From: brucearctor <5032356+brucearctor@users.noreply.github.com> Date: Tue, 23 Feb 2021 15:32:15 -0800 Subject: [PATCH 114/191] Rename (#73) * first pass at updating references * update module name * update boilerplate mod * remove version * mor * mockery * maybe * mor * replace replace * trying something * other --- .../lyft/golang_support_tools/tools.go | 4 +- .../golang_test_targets/download_tooling.sh | 2 +- flytestdlib/cache/auto_refresh.go | 8 +- .../cache/auto_refresh_example_test.go | 4 +- flytestdlib/cache/auto_refresh_test.go | 6 +- flytestdlib/cache/mocks/AutoRefresh.go | 2 +- flytestdlib/cache/mocks/ItemWrapper.go | 2 +- flytestdlib/cli/pflags/api/generator.go | 2 +- flytestdlib/cli/pflags/api/generator_test.go | 2 +- flytestdlib/cli/pflags/api/sample.go | 2 +- flytestdlib/cli/pflags/cmd/root.go | 4 +- flytestdlib/cli/pflags/cmd/version.go | 2 +- flytestdlib/cli/pflags/main.go | 2 +- flytestdlib/config/regexp_test.go | 2 +- flytestdlib/config/section.go | 2 +- flytestdlib/config/section_test.go | 2 +- flytestdlib/config/tests/accessor_test.go | 4 +- flytestdlib/config/tests/config_cmd_test.go | 2 +- flytestdlib/config/tests/types_test.go | 4 +- flytestdlib/config/url_test.go | 2 +- flytestdlib/config/utils.go | 2 +- flytestdlib/config/viper/collection.go | 4 +- flytestdlib/config/viper/viper.go | 8 +- flytestdlib/go.mod | 11 +-- flytestdlib/go.sum | 77 +++---------------- flytestdlib/ioutils/timed_readers_test.go | 2 +- flytestdlib/logger/config.go | 2 +- flytestdlib/logger/logger.go | 2 +- flytestdlib/pbhash/pbhash.go | 2 +- flytestdlib/profutils/server.go | 6 +- flytestdlib/profutils/server_test.go | 4 +- flytestdlib/promutils/labeled/counter.go | 4 +- flytestdlib/promutils/labeled/counter_test.go | 4 +- flytestdlib/promutils/labeled/gauge.go | 4 +- flytestdlib/promutils/labeled/gauge_test.go | 4 +- flytestdlib/promutils/labeled/keys.go | 2 +- flytestdlib/promutils/labeled/keys_test.go | 2 +- flytestdlib/promutils/labeled/stopwatch.go | 4 +- .../promutils/labeled/stopwatch_test.go | 4 +- flytestdlib/random/mocks/comparable.go | 2 +- .../random/mocks/weighted_random_list.go | 2 +- flytestdlib/random/weighted_random_list.go | 2 +- flytestdlib/storage/cached_rawstore.go | 8 +- flytestdlib/storage/cached_rawstore_test.go | 8 +- flytestdlib/storage/config.go | 4 +- flytestdlib/storage/config_test.go | 4 +- flytestdlib/storage/copy_impl.go | 8 +- flytestdlib/storage/copy_impl_test.go | 6 +- flytestdlib/storage/mem_store.go | 2 +- flytestdlib/storage/mem_store_test.go | 2 +- flytestdlib/storage/protobuf_store.go | 6 +- flytestdlib/storage/protobuf_store_test.go | 2 +- flytestdlib/storage/rawstores.go | 2 +- flytestdlib/storage/rawstores_test.go | 2 +- flytestdlib/storage/storage_test.go | 2 +- flytestdlib/storage/stow_store.go | 10 +-- flytestdlib/storage/stow_store_test.go | 10 +-- flytestdlib/storage/url_path.go | 2 +- flytestdlib/storage/utils.go | 4 +- flytestdlib/storage/utils_test.go | 2 +- flytestdlib/tests/config_test.go | 10 +-- flytestdlib/utils/auto_refresh_cache.go | 4 +- flytestdlib/utils/marshal_utils_test.go | 2 +- flytestdlib/utils/mocks/auto_refresh_cache.go | 2 +- flytestdlib/utils/prototest/test_type.proto | 2 +- flytestdlib/utils/rate_limiter.go | 2 +- 66 files changed, 127 insertions(+), 193 deletions(-) diff --git a/flytestdlib/boilerplate/lyft/golang_support_tools/tools.go b/flytestdlib/boilerplate/lyft/golang_support_tools/tools.go index 4310b39d79..71163a57d9 100644 --- a/flytestdlib/boilerplate/lyft/golang_support_tools/tools.go +++ b/flytestdlib/boilerplate/lyft/golang_support_tools/tools.go @@ -3,8 +3,8 @@ package tools import ( + _ "github.com/alvaroloes/enumer" + _ "github.com/flyteorg/flytestdlib/cli/pflags" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" - _ "github.com/lyft/flytestdlib/cli/pflags" _ "github.com/vektra/mockery/cmd/mockery" - _ "github.com/alvaroloes/enumer" ) diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/download_tooling.sh b/flytestdlib/boilerplate/lyft/golang_test_targets/download_tooling.sh index ab56c7e481..98f9751fd4 100755 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/download_tooling.sh +++ b/flytestdlib/boilerplate/lyft/golang_test_targets/download_tooling.sh @@ -16,7 +16,7 @@ set -e # List of tools to go get # In the format of ":" or ":" if no cli tools=( - "github.com/vektra/mockery/cmd/mockery" + "github.com/vektra/mockery" "github.com/lyft/flytestdlib/cli/pflags" "github.com/golangci/golangci-lint/cmd/golangci-lint" "github.com/alvaroloes/enumer" diff --git a/flytestdlib/cache/auto_refresh.go b/flytestdlib/cache/auto_refresh.go index ed706c92cf..6360127d34 100644 --- a/flytestdlib/cache/auto_refresh.go +++ b/flytestdlib/cache/auto_refresh.go @@ -5,16 +5,16 @@ import ( "fmt" "time" - "github.com/lyft/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/contextutils" "k8s.io/client-go/util/workqueue" - "github.com/lyft/flytestdlib/errors" + "github.com/flyteorg/flytestdlib/errors" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/promutils" lru "github.com/hashicorp/golang-lru" - "github.com/lyft/flytestdlib/promutils" "github.com/prometheus/client_golang/prometheus" "k8s.io/apimachinery/pkg/util/wait" ) diff --git a/flytestdlib/cache/auto_refresh_example_test.go b/flytestdlib/cache/auto_refresh_example_test.go index 27fbec281e..1f0bd5fc9f 100644 --- a/flytestdlib/cache/auto_refresh_example_test.go +++ b/flytestdlib/cache/auto_refresh_example_test.go @@ -8,9 +8,9 @@ import ( "k8s.io/client-go/util/workqueue" - "github.com/lyft/flytestdlib/errors" + "github.com/flyteorg/flytestdlib/errors" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils" ) type ExampleItemStatus string diff --git a/flytestdlib/cache/auto_refresh_test.go b/flytestdlib/cache/auto_refresh_test.go index b5df48883d..301b5c81a1 100644 --- a/flytestdlib/cache/auto_refresh_test.go +++ b/flytestdlib/cache/auto_refresh_test.go @@ -8,13 +8,13 @@ import ( "testing" "time" - "github.com/lyft/flytestdlib/atomic" + "github.com/flyteorg/flytestdlib/atomic" "k8s.io/client-go/util/workqueue" - "github.com/lyft/flytestdlib/errors" + "github.com/flyteorg/flytestdlib/errors" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/cache/mocks/AutoRefresh.go b/flytestdlib/cache/mocks/AutoRefresh.go index c7a52d02fa..4d07f5486b 100644 --- a/flytestdlib/cache/mocks/AutoRefresh.go +++ b/flytestdlib/cache/mocks/AutoRefresh.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - cache "github.com/lyft/flytestdlib/cache" + cache "github.com/flyteorg/flytestdlib/cache" mock "github.com/stretchr/testify/mock" ) diff --git a/flytestdlib/cache/mocks/ItemWrapper.go b/flytestdlib/cache/mocks/ItemWrapper.go index 768941d870..428490ff41 100644 --- a/flytestdlib/cache/mocks/ItemWrapper.go +++ b/flytestdlib/cache/mocks/ItemWrapper.go @@ -3,7 +3,7 @@ package mocks import ( - cache "github.com/lyft/flytestdlib/cache" + cache "github.com/flyteorg/flytestdlib/cache" mock "github.com/stretchr/testify/mock" ) diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index bbd2ff0456..0fca81ce23 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/logger" "golang.org/x/tools/go/packages" diff --git a/flytestdlib/cli/pflags/api/generator_test.go b/flytestdlib/cli/pflags/api/generator_test.go index a22a9ae460..cbff9382b8 100644 --- a/flytestdlib/cli/pflags/api/generator_test.go +++ b/flytestdlib/cli/pflags/api/generator_test.go @@ -45,7 +45,7 @@ func TestElemValueOrNil(t *testing.T) { } func TestNewGenerator(t *testing.T) { - g, err := NewGenerator("github.com/lyft/flytestdlib/cli/pflags/api", "TestType", "DefaultTestType") + g, err := NewGenerator("github.com/flyteorg/flytestdlib/cli/pflags/api", "TestType", "DefaultTestType") if !assert.NoError(t, err) { t.FailNow() } diff --git a/flytestdlib/cli/pflags/api/sample.go b/flytestdlib/cli/pflags/api/sample.go index ca805e7040..6d8e2ab38d 100644 --- a/flytestdlib/cli/pflags/api/sample.go +++ b/flytestdlib/cli/pflags/api/sample.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" - "github.com/lyft/flytestdlib/storage" + "github.com/flyteorg/flytestdlib/storage" ) var DefaultTestType = &TestType{ diff --git a/flytestdlib/cli/pflags/cmd/root.go b/flytestdlib/cli/pflags/cmd/root.go index d78d4c4d4a..d03c207b5d 100644 --- a/flytestdlib/cli/pflags/cmd/root.go +++ b/flytestdlib/cli/pflags/cmd/root.go @@ -6,8 +6,8 @@ import ( "fmt" "strings" - "github.com/lyft/flytestdlib/cli/pflags/api" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/cli/pflags/api" + "github.com/flyteorg/flytestdlib/logger" "github.com/spf13/cobra" ) diff --git a/flytestdlib/cli/pflags/cmd/version.go b/flytestdlib/cli/pflags/cmd/version.go index 5d15a4d7c1..d3b9fd22a1 100644 --- a/flytestdlib/cli/pflags/cmd/version.go +++ b/flytestdlib/cli/pflags/cmd/version.go @@ -1,7 +1,7 @@ package cmd import ( - "github.com/lyft/flytestdlib/version" + "github.com/flyteorg/flytestdlib/version" "github.com/spf13/cobra" ) diff --git a/flytestdlib/cli/pflags/main.go b/flytestdlib/cli/pflags/main.go index e4c784a7b1..1edd73cbba 100644 --- a/flytestdlib/cli/pflags/main.go +++ b/flytestdlib/cli/pflags/main.go @@ -4,7 +4,7 @@ package main import ( "log" - "github.com/lyft/flytestdlib/cli/pflags/cmd" + "github.com/flyteorg/flytestdlib/cli/pflags/cmd" ) func main() { diff --git a/flytestdlib/config/regexp_test.go b/flytestdlib/config/regexp_test.go index fc468a91c3..ceda744349 100644 --- a/flytestdlib/config/regexp_test.go +++ b/flytestdlib/config/regexp_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - "github.com/lyft/flytestdlib/internal/utils" + "github.com/flyteorg/flytestdlib/internal/utils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/config/section.go b/flytestdlib/config/section.go index 34f5f7a5dd..ee0b516087 100644 --- a/flytestdlib/config/section.go +++ b/flytestdlib/config/section.go @@ -8,7 +8,7 @@ import ( "strings" "sync" - "github.com/lyft/flytestdlib/atomic" + "github.com/flyteorg/flytestdlib/atomic" "github.com/spf13/pflag" ) diff --git a/flytestdlib/config/section_test.go b/flytestdlib/config/section_test.go index 5b314bb339..7a694a9f55 100644 --- a/flytestdlib/config/section_test.go +++ b/flytestdlib/config/section_test.go @@ -12,8 +12,8 @@ import ( "k8s.io/apimachinery/pkg/util/rand" + "github.com/flyteorg/flytestdlib/internal/utils" "github.com/ghodss/yaml" - "github.com/lyft/flytestdlib/internal/utils" "github.com/spf13/pflag" "github.com/stretchr/testify/assert" diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index 873f2d2fbc..e53e4f619e 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -18,8 +18,8 @@ import ( k8sRand "k8s.io/apimachinery/pkg/util/rand" - "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytestdlib/internal/utils" + "github.com/flyteorg/flytestdlib/config" + "github.com/flyteorg/flytestdlib/internal/utils" "github.com/spf13/pflag" "github.com/ghodss/yaml" diff --git a/flytestdlib/config/tests/config_cmd_test.go b/flytestdlib/config/tests/config_cmd_test.go index 3b15268292..05accc36c5 100644 --- a/flytestdlib/config/tests/config_cmd_test.go +++ b/flytestdlib/config/tests/config_cmd_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "github.com/lyft/flytestdlib/config" + "github.com/flyteorg/flytestdlib/config" "github.com/spf13/cobra" "github.com/stretchr/testify/assert" diff --git a/flytestdlib/config/tests/types_test.go b/flytestdlib/config/tests/types_test.go index c6150e93fa..0be368f62c 100644 --- a/flytestdlib/config/tests/types_test.go +++ b/flytestdlib/config/tests/types_test.go @@ -3,8 +3,8 @@ package tests import ( "fmt" - "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytestdlib/config/viper" + "github.com/flyteorg/flytestdlib/config" + "github.com/flyteorg/flytestdlib/config/viper" "github.com/spf13/pflag" ) diff --git a/flytestdlib/config/url_test.go b/flytestdlib/config/url_test.go index e4046b3b16..9cd9841368 100644 --- a/flytestdlib/config/url_test.go +++ b/flytestdlib/config/url_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - "github.com/lyft/flytestdlib/internal/utils" + "github.com/flyteorg/flytestdlib/internal/utils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/config/utils.go b/flytestdlib/config/utils.go index 6dbb9bdea6..d69edc5cca 100644 --- a/flytestdlib/config/utils.go +++ b/flytestdlib/config/utils.go @@ -7,7 +7,7 @@ import ( "github.com/pkg/errors" - stdLibErrs "github.com/lyft/flytestdlib/errors" + stdLibErrs "github.com/flyteorg/flytestdlib/errors" ) // Uses Json marshal/unmarshal to make a deep copy of a config object. diff --git a/flytestdlib/config/viper/collection.go b/flytestdlib/config/viper/collection.go index d10e423fb2..7ef55136b9 100644 --- a/flytestdlib/config/viper/collection.go +++ b/flytestdlib/config/viper/collection.go @@ -7,9 +7,9 @@ import ( "os" "strings" - "github.com/lyft/flytestdlib/errors" + "github.com/flyteorg/flytestdlib/errors" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/logger" viperLib "github.com/spf13/viper" diff --git a/flytestdlib/config/viper/viper.go b/flytestdlib/config/viper/viper.go index c44ea37d69..6f472fef4a 100644 --- a/flytestdlib/config/viper/viper.go +++ b/flytestdlib/config/viper/viper.go @@ -11,13 +11,13 @@ import ( "github.com/pkg/errors" - stdLibErrs "github.com/lyft/flytestdlib/errors" + stdLibErrs "github.com/flyteorg/flytestdlib/errors" "github.com/spf13/cobra" - "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytestdlib/config/files" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/config" + "github.com/flyteorg/flytestdlib/config/files" + "github.com/flyteorg/flytestdlib/logger" "github.com/fsnotify/fsnotify" "github.com/mitchellh/mapstructure" diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 059bc4e1b3..2ae1d793ca 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -1,4 +1,4 @@ -module github.com/lyft/flytestdlib +module github.com/flyteorg/flytestdlib go 1.13 @@ -8,24 +8,19 @@ require ( github.com/Azure/azure-sdk-for-go v51.0.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.17 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect - github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 // indirect github.com/aws/aws-sdk-go v1.37.1 github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 github.com/coocood/freecache v1.1.1 - github.com/coreos/go-etcd v2.0.0+incompatible // indirect - github.com/cpuguy83/go-md2man v1.0.10 // indirect github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 github.com/fatih/color v1.10.0 github.com/fatih/structtag v1.2.0 github.com/fsnotify/fsnotify v1.4.9 github.com/ghodss/yaml v1.0.0 github.com/go-test/deep v1.0.7 - github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect github.com/golang/protobuf v1.4.3 github.com/graymeta/stow v0.2.7 github.com/hashicorp/golang-lru v0.5.4 github.com/magiconair/properties v1.8.4 - github.com/mattn/go-isatty v0.0.12 // indirect github.com/mitchellh/mapstructure v1.4.1 github.com/ncw/swift v1.0.53 // indirect github.com/pelletier/go-toml v1.8.1 // indirect @@ -41,9 +36,6 @@ require ( github.com/spf13/viper v1.7.1 github.com/stretchr/objx v0.3.0 // indirect github.com/stretchr/testify v1.7.0 - github.com/ugorji/go v1.1.4 // indirect - github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 // indirect - github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 // indirect go.opencensus.io v0.22.6 // indirect golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect golang.org/x/mod v0.4.1 // indirect @@ -62,7 +54,6 @@ require ( gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/apimachinery v0.20.2 k8s.io/client-go v11.0.0+incompatible - k8s.io/klog v1.0.0 // indirect k8s.io/klog/v2 v2.5.0 // indirect ) diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index ad46a0764e..7658e41f19 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -42,39 +42,28 @@ cloud.google.com/go/storage v1.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lU cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v38.2.0+incompatible h1:ZeCdp1E/V5lI8oLR/BjWQh0OW9aFBYlgXGKRVIWNPXY= -github.com/Azure/azure-sdk-for-go v38.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v51.0.0+incompatible h1:p7blnyJSjJqf5jflHbSGhIhEpXIgIFmYZNg5uwqweso= github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.4 h1:1cM+NmKw91+8h5vfjgzK4ZGLuN72k87XVZBWyGwNjUM= -github.com/Azure/go-autorest/autorest v0.9.4/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk= -github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8= -github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= +github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= @@ -107,7 +96,6 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= @@ -115,8 +103,6 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.28.9 h1:grIuBQc+p3dTRXerh5+2OxSuWFi0iXuxbFdTSg0jaW0= -github.com/aws/aws-sdk-go v1.28.9/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= @@ -147,21 +133,16 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coocood/freecache v1.1.0 h1:ENiHOsWdj1BrrlPwblhbn4GdAsMymK3pZORJ+bJGAjA= -github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -172,8 +153,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= @@ -197,8 +177,6 @@ github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= @@ -208,8 +186,6 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD 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= -github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 h1:SmsgwFZy9pdTk/k8BZz40D3P5umP5+Ejt3hAi0paBNQ= -github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -296,12 +272,15 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -331,10 +310,7 @@ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51 github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graymeta/stow v0.2.4 h1:qDGstknYXqcnmBQ5TRJtxD9Qv1MuRbYRhLoSMeUDs7U= -github.com/graymeta/stow v0.2.4/go.mod h1:+0vRL9oMECKjPMP7OeVWl8EIqRCpFwDlth3mrAeV2Kw= github.com/graymeta/stow v0.2.7 h1:b31cB1Ylw/388sYSZxnmpjT2QxC21AaQ8fRnUtE13b4= github.com/graymeta/stow v0.2.7/go.mod h1:JAs139Zr29qfsecy7b+h9DRsWXbFbsd7LCrbCDYI84k= github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -381,6 +357,7 @@ github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5i github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -400,13 +377,12 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= @@ -415,7 +391,6 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= @@ -424,14 +399,10 @@ github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -478,7 +449,6 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB 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/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -497,8 +467,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/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= -github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= @@ -542,8 +510,6 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= @@ -561,7 +527,6 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= @@ -593,8 +558,6 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -605,10 +568,6 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= -github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= @@ -635,12 +594,9 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= 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/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -669,7 +625,6 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -678,7 +633,6 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -735,7 +689,6 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -744,7 +697,6 @@ golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -799,10 +751,8 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -901,8 +851,6 @@ golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4 h1:BPUNhs1Rsd9Ly0hbjDwBxaNBrAyo/CKpkMcA3pkTwgg= -golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1051,6 +999,7 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks 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= @@ -1060,8 +1009,6 @@ gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.1 h1:GyboHr4UqMiLUybYjd22ZjQIKEJEpgtLXtuGbR21Oho= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= @@ -1093,8 +1040,6 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20191016110408-35e52d86657a/go.mod h1:/L5qH+AD540e7Cetbui1tuJeXdmNhO8jM6VkXeDdDhQ= k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= -k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4= -k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/client-go v0.0.0-20191016111102-bec269661e48 h1:C2XVy2z0dV94q9hSSoCuTPp1KOG7IegvbdXuz9VGxoU= @@ -1103,16 +1048,14 @@ k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8 k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.4.0 h1:lCJCxf/LIowc2IGS9TPjWDyXY4nOmdGdfcwwDQCOURQ= k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/flytestdlib/ioutils/timed_readers_test.go b/flytestdlib/ioutils/timed_readers_test.go index 7fa74f7241..d7b57110be 100644 --- a/flytestdlib/ioutils/timed_readers_test.go +++ b/flytestdlib/ioutils/timed_readers_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/logger/config.go b/flytestdlib/logger/config.go index 993c624579..b07d79a7f3 100644 --- a/flytestdlib/logger/config.go +++ b/flytestdlib/logger/config.go @@ -3,7 +3,7 @@ package logger import ( "context" - "github.com/lyft/flytestdlib/config" + "github.com/flyteorg/flytestdlib/config" ) //go:generate pflags Config --default-var defaultConfig diff --git a/flytestdlib/logger/logger.go b/flytestdlib/logger/logger.go index 9c21ae7bd5..9d3fab34b5 100644 --- a/flytestdlib/logger/logger.go +++ b/flytestdlib/logger/logger.go @@ -7,7 +7,7 @@ import ( "context" "io" - "github.com/lyft/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/contextutils" "fmt" "runtime" diff --git a/flytestdlib/pbhash/pbhash.go b/flytestdlib/pbhash/pbhash.go index 820b5c511a..adfeca963f 100644 --- a/flytestdlib/pbhash/pbhash.go +++ b/flytestdlib/pbhash/pbhash.go @@ -6,9 +6,9 @@ import ( "encoding/base64" goObjectHash "github.com/benlaurie/objecthash/go/objecthash" + "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" - "github.com/lyft/flytestdlib/logger" ) var marshaller = &jsonpb.Marshaler{} diff --git a/flytestdlib/profutils/server.go b/flytestdlib/profutils/server.go index 11af642bd8..cd69326649 100644 --- a/flytestdlib/profutils/server.go +++ b/flytestdlib/profutils/server.go @@ -6,9 +6,9 @@ import ( "fmt" "net/http" - "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytestdlib/logger" - "github.com/lyft/flytestdlib/version" + "github.com/flyteorg/flytestdlib/config" + "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/version" "github.com/prometheus/client_golang/prometheus/promhttp" // #nosec G108 diff --git a/flytestdlib/profutils/server_test.go b/flytestdlib/profutils/server_test.go index c989bcbbf0..d55193524a 100644 --- a/flytestdlib/profutils/server_test.go +++ b/flytestdlib/profutils/server_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/lyft/flytestdlib/version" + "github.com/flyteorg/flytestdlib/version" - "github.com/lyft/flytestdlib/internal/utils" + "github.com/flyteorg/flytestdlib/internal/utils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/promutils/labeled/counter.go b/flytestdlib/promutils/labeled/counter.go index e68358087b..ca193d1c66 100644 --- a/flytestdlib/promutils/labeled/counter.go +++ b/flytestdlib/promutils/labeled/counter.go @@ -3,8 +3,8 @@ package labeled import ( "context" - "github.com/lyft/flytestdlib/contextutils" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/prometheus/client_golang/prometheus" ) diff --git a/flytestdlib/promutils/labeled/counter_test.go b/flytestdlib/promutils/labeled/counter_test.go index e427026b43..fd656c82e7 100644 --- a/flytestdlib/promutils/labeled/counter_test.go +++ b/flytestdlib/promutils/labeled/counter_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/lyft/flytestdlib/contextutils" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/promutils/labeled/gauge.go b/flytestdlib/promutils/labeled/gauge.go index 2b00f0c9a8..6e08f8e9ea 100644 --- a/flytestdlib/promutils/labeled/gauge.go +++ b/flytestdlib/promutils/labeled/gauge.go @@ -3,8 +3,8 @@ package labeled import ( "context" - "github.com/lyft/flytestdlib/contextutils" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/prometheus/client_golang/prometheus" ) diff --git a/flytestdlib/promutils/labeled/gauge_test.go b/flytestdlib/promutils/labeled/gauge_test.go index 119afdca34..93668d15fc 100644 --- a/flytestdlib/promutils/labeled/gauge_test.go +++ b/flytestdlib/promutils/labeled/gauge_test.go @@ -5,8 +5,8 @@ import ( "strings" "testing" - "github.com/lyft/flytestdlib/contextutils" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/promutils/labeled/keys.go b/flytestdlib/promutils/labeled/keys.go index 7727a0dfa3..0479a45b44 100644 --- a/flytestdlib/promutils/labeled/keys.go +++ b/flytestdlib/promutils/labeled/keys.go @@ -5,7 +5,7 @@ import ( "reflect" "sync" - "github.com/lyft/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/contextutils" ) var ( diff --git a/flytestdlib/promutils/labeled/keys_test.go b/flytestdlib/promutils/labeled/keys_test.go index 6699ab2af6..e6fcce83e5 100644 --- a/flytestdlib/promutils/labeled/keys_test.go +++ b/flytestdlib/promutils/labeled/keys_test.go @@ -3,7 +3,7 @@ package labeled import ( "testing" - "github.com/lyft/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/contextutils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/promutils/labeled/stopwatch.go b/flytestdlib/promutils/labeled/stopwatch.go index edab3b7d44..faccb46227 100644 --- a/flytestdlib/promutils/labeled/stopwatch.go +++ b/flytestdlib/promutils/labeled/stopwatch.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/lyft/flytestdlib/contextutils" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils" ) type StopWatch struct { diff --git a/flytestdlib/promutils/labeled/stopwatch_test.go b/flytestdlib/promutils/labeled/stopwatch_test.go index 1d8a69d561..e28f5a2c2b 100644 --- a/flytestdlib/promutils/labeled/stopwatch_test.go +++ b/flytestdlib/promutils/labeled/stopwatch_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/lyft/flytestdlib/contextutils" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/random/mocks/comparable.go b/flytestdlib/random/mocks/comparable.go index a6163e9f98..4c6e4caa85 100644 --- a/flytestdlib/random/mocks/comparable.go +++ b/flytestdlib/random/mocks/comparable.go @@ -3,7 +3,7 @@ package mocks import ( - random "github.com/lyft/flytestdlib/random" + random "github.com/flyteorg/flytestdlib/random" mock "github.com/stretchr/testify/mock" ) diff --git a/flytestdlib/random/mocks/weighted_random_list.go b/flytestdlib/random/mocks/weighted_random_list.go index 490d5e3632..fb97dca8a2 100644 --- a/flytestdlib/random/mocks/weighted_random_list.go +++ b/flytestdlib/random/mocks/weighted_random_list.go @@ -7,7 +7,7 @@ import ( mock "github.com/stretchr/testify/mock" - random "github.com/lyft/flytestdlib/random" + random "github.com/flyteorg/flytestdlib/random" ) // WeightedRandomList is an autogenerated mock type for the WeightedRandomList type diff --git a/flytestdlib/random/weighted_random_list.go b/flytestdlib/random/weighted_random_list.go index 16b3562dc8..6a367eb692 100644 --- a/flytestdlib/random/weighted_random_list.go +++ b/flytestdlib/random/weighted_random_list.go @@ -7,7 +7,7 @@ import ( "sort" "time" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/logger" ) //go:generate mockery -all -case=underscore diff --git a/flytestdlib/storage/cached_rawstore.go b/flytestdlib/storage/cached_rawstore.go index e9d83df6cd..710937b610 100644 --- a/flytestdlib/storage/cached_rawstore.go +++ b/flytestdlib/storage/cached_rawstore.go @@ -7,15 +7,15 @@ import ( "runtime/debug" "time" - "github.com/lyft/flytestdlib/errors" + "github.com/flyteorg/flytestdlib/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/coocood/freecache" - "github.com/lyft/flytestdlib/ioutils" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/ioutils" + "github.com/flyteorg/flytestdlib/logger" ) const neverExpire = 0 diff --git a/flytestdlib/storage/cached_rawstore_test.go b/flytestdlib/storage/cached_rawstore_test.go index 8ff7dbe820..c61076f1d7 100644 --- a/flytestdlib/storage/cached_rawstore_test.go +++ b/flytestdlib/storage/cached_rawstore_test.go @@ -10,12 +10,12 @@ import ( "runtime/debug" "testing" - "github.com/lyft/flytestdlib/contextutils" - "github.com/lyft/flytestdlib/promutils/labeled" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils/labeled" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils" - "github.com/lyft/flytestdlib/ioutils" + "github.com/flyteorg/flytestdlib/ioutils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/storage/config.go b/flytestdlib/storage/config.go index cc830181d5..a44c150af5 100644 --- a/flytestdlib/storage/config.go +++ b/flytestdlib/storage/config.go @@ -3,8 +3,8 @@ package storage import ( "context" - "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/config" + "github.com/flyteorg/flytestdlib/logger" ) //go:generate pflags Config diff --git a/flytestdlib/storage/config_test.go b/flytestdlib/storage/config_test.go index 93a5fe887c..dbe44614e5 100644 --- a/flytestdlib/storage/config_test.go +++ b/flytestdlib/storage/config_test.go @@ -8,9 +8,9 @@ import ( "reflect" "testing" + "github.com/flyteorg/flytestdlib/config" + "github.com/flyteorg/flytestdlib/internal/utils" "github.com/ghodss/yaml" - "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytestdlib/internal/utils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/storage/copy_impl.go b/flytestdlib/storage/copy_impl.go index 56c7d54717..3b32905ebd 100644 --- a/flytestdlib/storage/copy_impl.go +++ b/flytestdlib/storage/copy_impl.go @@ -6,12 +6,12 @@ import ( "io" "time" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/logger" "github.com/prometheus/client_golang/prometheus" - "github.com/lyft/flytestdlib/ioutils" - "github.com/lyft/flytestdlib/promutils" - "github.com/lyft/flytestdlib/promutils/labeled" + "github.com/flyteorg/flytestdlib/ioutils" + "github.com/flyteorg/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils/labeled" errs "github.com/pkg/errors" ) diff --git a/flytestdlib/storage/copy_impl_test.go b/flytestdlib/storage/copy_impl_test.go index e81ef7b491..4504327677 100644 --- a/flytestdlib/storage/copy_impl_test.go +++ b/flytestdlib/storage/copy_impl_test.go @@ -7,10 +7,10 @@ import ( "math/rand" "testing" - "github.com/lyft/flytestdlib/errors" + "github.com/flyteorg/flytestdlib/errors" - "github.com/lyft/flytestdlib/ioutils" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/ioutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/storage/mem_store.go b/flytestdlib/storage/mem_store.go index cc0c5854c0..b6e8877ed4 100644 --- a/flytestdlib/storage/mem_store.go +++ b/flytestdlib/storage/mem_store.go @@ -7,7 +7,7 @@ import ( "io/ioutil" "os" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils" ) type rawFile = []byte diff --git a/flytestdlib/storage/mem_store_test.go b/flytestdlib/storage/mem_store_test.go index fdfe2b724a..ad3bb84b49 100644 --- a/flytestdlib/storage/mem_store_test.go +++ b/flytestdlib/storage/mem_store_test.go @@ -5,7 +5,7 @@ import ( "context" "testing" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/storage/protobuf_store.go b/flytestdlib/storage/protobuf_store.go index 9b2047bbbb..58b55063b2 100644 --- a/flytestdlib/storage/protobuf_store.go +++ b/flytestdlib/storage/protobuf_store.go @@ -6,10 +6,10 @@ import ( "fmt" "time" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/logger" - "github.com/lyft/flytestdlib/ioutils" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/ioutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/prometheus/client_golang/prometheus" "github.com/golang/protobuf/proto" diff --git a/flytestdlib/storage/protobuf_store_test.go b/flytestdlib/storage/protobuf_store_test.go index ca45d80dd1..0f2df567fb 100644 --- a/flytestdlib/storage/protobuf_store_test.go +++ b/flytestdlib/storage/protobuf_store_test.go @@ -7,7 +7,7 @@ import ( "math/rand" "testing" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/golang/protobuf/proto" errs "github.com/pkg/errors" diff --git a/flytestdlib/storage/rawstores.go b/flytestdlib/storage/rawstores.go index 9f223884ee..1651d8a47d 100644 --- a/flytestdlib/storage/rawstores.go +++ b/flytestdlib/storage/rawstores.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils" ) type dataStoreCreateFn func(cfg *Config, metricsScope promutils.Scope) (RawStore, error) diff --git a/flytestdlib/storage/rawstores_test.go b/flytestdlib/storage/rawstores_test.go index d5b32f4fb2..fb46293da2 100644 --- a/flytestdlib/storage/rawstores_test.go +++ b/flytestdlib/storage/rawstores_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/lyft/flytestdlib/config" + "github.com/flyteorg/flytestdlib/config" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/storage/storage_test.go b/flytestdlib/storage/storage_test.go index 1895b0ac5f..f6773bc0d4 100644 --- a/flytestdlib/storage/storage_test.go +++ b/flytestdlib/storage/storage_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index ce4e6b5c82..6f856ca542 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -16,13 +16,13 @@ import ( "github.com/graymeta/stow/s3" "github.com/graymeta/stow/swift" - "github.com/lyft/flytestdlib/contextutils" - "github.com/lyft/flytestdlib/logger" - "github.com/lyft/flytestdlib/promutils/labeled" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/promutils/labeled" - "github.com/lyft/flytestdlib/errors" + "github.com/flyteorg/flytestdlib/errors" - "github.com/lyft/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils" "github.com/graymeta/stow" errs "github.com/pkg/errors" diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index e3ebc0286b..2b18e966a2 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -19,11 +19,11 @@ import ( "github.com/graymeta/stow" "github.com/stretchr/testify/assert" - "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytestdlib/contextutils" - "github.com/lyft/flytestdlib/internal/utils" - "github.com/lyft/flytestdlib/promutils" - "github.com/lyft/flytestdlib/promutils/labeled" + "github.com/flyteorg/flytestdlib/config" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/internal/utils" + "github.com/flyteorg/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils/labeled" ) type mockStowLoc struct { diff --git a/flytestdlib/storage/url_path.go b/flytestdlib/storage/url_path.go index 824347f259..efd070da7e 100644 --- a/flytestdlib/storage/url_path.go +++ b/flytestdlib/storage/url_path.go @@ -9,7 +9,7 @@ import ( "net/url" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/logger" ) const separator = "/" diff --git a/flytestdlib/storage/utils.go b/flytestdlib/storage/utils.go index bf5b1567ec..880093f1fd 100644 --- a/flytestdlib/storage/utils.go +++ b/flytestdlib/storage/utils.go @@ -4,8 +4,8 @@ import ( "context" "os" - stdErrs "github.com/lyft/flytestdlib/errors" - "github.com/lyft/flytestdlib/promutils/labeled" + stdErrs "github.com/flyteorg/flytestdlib/errors" + "github.com/flyteorg/flytestdlib/promutils/labeled" "github.com/graymeta/stow" "github.com/pkg/errors" diff --git a/flytestdlib/storage/utils_test.go b/flytestdlib/storage/utils_test.go index 3263fa703d..42cbc6bb0f 100644 --- a/flytestdlib/storage/utils_test.go +++ b/flytestdlib/storage/utils_test.go @@ -5,8 +5,8 @@ import ( "syscall" "testing" + flyteerrors "github.com/flyteorg/flytestdlib/errors" "github.com/graymeta/stow" - flyteerrors "github.com/lyft/flytestdlib/errors" "github.com/pkg/errors" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/tests/config_test.go b/flytestdlib/tests/config_test.go index 15c890cf08..60986b5000 100644 --- a/flytestdlib/tests/config_test.go +++ b/flytestdlib/tests/config_test.go @@ -9,13 +9,13 @@ import ( "reflect" "testing" - "github.com/lyft/flytestdlib/config/viper" + "github.com/flyteorg/flytestdlib/config/viper" + "github.com/flyteorg/flytestdlib/config" + "github.com/flyteorg/flytestdlib/internal/utils" + "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/storage" "github.com/ghodss/yaml" - "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytestdlib/internal/utils" - "github.com/lyft/flytestdlib/logger" - "github.com/lyft/flytestdlib/storage" "github.com/stretchr/testify/assert" ) diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index e9c22e2ed5..b29f384b13 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -4,9 +4,9 @@ import ( "context" "time" + "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/promutils" lru "github.com/hashicorp/golang-lru" - "github.com/lyft/flytestdlib/logger" - "github.com/lyft/flytestdlib/promutils" "github.com/prometheus/client_golang/prometheus" "k8s.io/apimachinery/pkg/util/wait" ) diff --git a/flytestdlib/utils/marshal_utils_test.go b/flytestdlib/utils/marshal_utils_test.go index e9c507d711..712c867579 100644 --- a/flytestdlib/utils/marshal_utils_test.go +++ b/flytestdlib/utils/marshal_utils_test.go @@ -6,9 +6,9 @@ import ( "github.com/go-test/deep" "github.com/stretchr/testify/assert" + "github.com/flyteorg/flytestdlib/utils/prototest" "github.com/golang/protobuf/proto" structpb "github.com/golang/protobuf/ptypes/struct" - "github.com/lyft/flytestdlib/utils/prototest" ) type SimpleType struct { diff --git a/flytestdlib/utils/mocks/auto_refresh_cache.go b/flytestdlib/utils/mocks/auto_refresh_cache.go index a8e6901121..2844fad011 100644 --- a/flytestdlib/utils/mocks/auto_refresh_cache.go +++ b/flytestdlib/utils/mocks/auto_refresh_cache.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - utils "github.com/lyft/flytestdlib/utils" + utils "github.com/flyteorg/flytestdlib/utils" mock "github.com/stretchr/testify/mock" ) diff --git a/flytestdlib/utils/prototest/test_type.proto b/flytestdlib/utils/prototest/test_type.proto index e9cb0b84c7..77b82a1960 100644 --- a/flytestdlib/utils/prototest/test_type.proto +++ b/flytestdlib/utils/prototest/test_type.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package flyteidl.core; -option go_package = "github.com/lyft/flytestdlib/utils/prototest"; +option go_package = "github.com/flyteorg/flytestdlib/utils/prototest"; message TestProto { string string_value = 1; diff --git a/flytestdlib/utils/rate_limiter.go b/flytestdlib/utils/rate_limiter.go index 6a28b21da9..25e784a8e4 100644 --- a/flytestdlib/utils/rate_limiter.go +++ b/flytestdlib/utils/rate_limiter.go @@ -3,7 +3,7 @@ package utils import ( "context" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/logger" "golang.org/x/time/rate" ) From f5bb14d972926646f224c646b2af37d538c0511f Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Thu, 4 Mar 2021 16:26:25 -0800 Subject: [PATCH 115/191] Remove dependency on lyft/api (#71) --- flytestdlib/go.mod | 8 +-- flytestdlib/go.sum | 126 +++++---------------------------------------- 2 files changed, 15 insertions(+), 119 deletions(-) diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 2ae1d793ca..0e8689ac07 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -53,12 +53,6 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/apimachinery v0.20.2 - k8s.io/client-go v11.0.0+incompatible + k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 k8s.io/klog/v2 v2.5.0 // indirect ) - -// Pin the version of client-go to something that's compatible with katrogan's fork of api and apimachinery -// Type the following -// replace k8s.io/client-go => k8s.io/client-go kubernetes-1.16.2 -// and it will be replaced with the 'sha' variant of the version -replace k8s.io/client-go => k8s.io/client-go v0.0.0-20191016111102-bec269661e48 diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index 7658e41f19..14d9131b93 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -47,42 +47,32 @@ github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9mo github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -121,7 +111,6 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -146,14 +135,11 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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 h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= @@ -162,7 +148,6 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= @@ -174,7 +159,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= @@ -201,19 +185,14 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -224,9 +203,8 @@ github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFG github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -241,10 +219,8 @@ 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/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 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 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= @@ -262,25 +238,19 @@ 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/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -301,10 +271,7 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -313,7 +280,7 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graymeta/stow v0.2.7 h1:b31cB1Ylw/388sYSZxnmpjT2QxC21AaQ8fRnUtE13b4= github.com/graymeta/stow v0.2.7/go.mod h1:JAs139Zr29qfsecy7b+h9DRsWXbFbsd7LCrbCDYI84k= -github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= @@ -350,52 +317,42 @@ github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmK github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -416,13 +373,12 @@ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eI github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= @@ -437,7 +393,6 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/ncw/swift v1.0.49 h1:eQaKIjSt/PXLKfYgzg01nevmO+CMXfXGRhB1gOhDs7E= github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= @@ -448,11 +403,9 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= @@ -474,14 +427,12 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR 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= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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= @@ -489,9 +440,7 @@ github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BU github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0 h1:miYCvYqFXtl/J9FIy8eNpBfYthAEFg+Ys0XyUVEcDsc= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= @@ -499,7 +448,6 @@ github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66Id 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 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= @@ -508,7 +456,6 @@ github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7q github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= 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.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= @@ -517,7 +464,6 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= 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= @@ -535,25 +481,19 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.5.1 h1:VHu76Lk0LSP1x254maIu2bplkWpfBWI+B+6fdoZprcg= github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -575,16 +515,12 @@ github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3 github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -608,7 +544,6 @@ 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/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -625,7 +560,6 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -634,7 +568,6 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= @@ -660,7 +593,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -670,11 +602,9 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0 h1:8pl+sMODzuvGJkmj2W4kZihvVb5mKm8pB/X44PIQHv8= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -694,11 +624,9 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -722,10 +650,8 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y golang.org/x/net v0.0.0-20210119194325-5f4716e94777/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/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -742,7 +668,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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= @@ -751,7 +676,6 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -772,7 +696,6 @@ golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -800,11 +723,9 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbq golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -813,14 +734,13 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/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= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -864,6 +784,7 @@ golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -875,12 +796,12 @@ golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/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= @@ -891,7 +812,6 @@ google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEn google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0 h1:yzlyyDW/J0w8yNFJIhiAJy4kq74S+1DOLdawELNxFMA= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= @@ -913,10 +833,8 @@ google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 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 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -932,7 +850,6 @@ google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150 h1:VPpdpQkGvFicX9yo4G5oxZPi9ALBnEOZblPSa/Wa2m4= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -970,7 +887,6 @@ google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= 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= @@ -997,17 +913,13 @@ 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/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1018,15 +930,12 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -1038,31 +947,24 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20191016110408-35e52d86657a/go.mod h1:/L5qH+AD540e7Cetbui1tuJeXdmNhO8jM6VkXeDdDhQ= -k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= +k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= +k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/client-go v0.0.0-20191016111102-bec269661e48 h1:C2XVy2z0dV94q9hSSoCuTPp1KOG7IegvbdXuz9VGxoU= -k8s.io/client-go v0.0.0-20191016111102-bec269661e48/go.mod h1:hrwktSwYGI4JK+TJA3dMaFyyvHVi/aLarVHpbs8bgCU= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 h1:d+LBRNY3c/KGp7lDblRlUJkayx4Vla7WUTIazoGMdYo= +k8s.io/client-go v0.0.0-20210217172142-7279fc64d847/go.mod h1:q0EaghmVye2uui19vxSZ2NG6ssgUWgjudO6vrwXneSI= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.4.0 h1:lCJCxf/LIowc2IGS9TPjWDyXY4nOmdGdfcwwDQCOURQ= -k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From b3a384860e1de681289a10ebb29ed4d348da9302 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Wed, 10 Mar 2021 15:23:02 -0800 Subject: [PATCH 116/191] Always try to create a bucket when loading a container (#76) --- flytestdlib/storage/stow_store.go | 38 ++++------- flytestdlib/storage/stow_store_test.go | 91 +++++++++++++++++++++++++- 2 files changed, 102 insertions(+), 27 deletions(-) diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 6f856ca542..b484bc2588 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -53,19 +53,6 @@ var fQNFn = map[string]func(string) DataReference{ }, } -// Checks if the error is AWS S3 bucket not found error -func awsBucketIsNotFound(err error) bool { - if IsNotFound(err) { - return true - } - - if awsErr, errOk := errs.Cause(err).(awserr.Error); errOk { - return awsErr.Code() == s32.ErrCodeNoSuchBucket - } - - return false -} - // Checks if the error is AWS S3 bucket already exists error. func awsBucketAlreadyExists(err error) bool { if IsExists(err) { @@ -124,21 +111,20 @@ type StowStore struct { } func (s *StowStore) LoadContainer(ctx context.Context, container string, createIfNotFound bool) (stow.Container, error) { + // TODO: As of stow v0.2.6 elides the container lookup when a bucket region is set, + // so we always just attempt to create it when createIfNotFound is true. + + if createIfNotFound { + logger.Infof(ctx, "Attempting to create container [%s]", container) + _, err := s.loc.CreateContainer(container) + if err != nil && !awsBucketAlreadyExists(err) && !IsExists(err) { + return nil, fmt.Errorf("unable to initialize container [%v]. Error: %v", container, err) + } + } + c, err := s.loc.Container(container) if err != nil { - if createIfNotFound { - logger.Infof(ctx, "Container [%s] lookup failed, err [%s], will try to create a new one", container, err) - if IsNotFound(err) || awsBucketIsNotFound(err) { - c, err := s.loc.CreateContainer(container) - // If the container's already created, move on. Otherwise, fail with error. - if err != nil && !awsBucketAlreadyExists(err) && !IsExists(err) { - return nil, fmt.Errorf("unable to initialize container [%v]. Error: %v", container, err) - } - return c, nil - } - } else { - logger.Errorf(ctx, "Container [%s] lookup failed. Error %s", container, err) - } + logger.Errorf(ctx, "Container [%s] lookup failed. Error %s", container, err) return nil, err } return c, nil diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index 2b18e966a2..c3131eb759 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -28,13 +28,18 @@ import ( type mockStowLoc struct { stow.Location - ContainerCb func(id string) (stow.Container, error) + ContainerCb func(id string) (stow.Container, error) + CreateContainerCb func(name string) (stow.Container, error) } func (m mockStowLoc) Container(id string) (stow.Container, error) { return m.ContainerCb(id) } +func (m mockStowLoc) CreateContainer(name string) (stow.Container, error) { + return m.CreateContainerCb(name) +} + type mockStowContainer struct { id string items map[string]mockStowItem @@ -133,6 +138,12 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, }, false, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) @@ -158,6 +169,12 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, }, false, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 3*MiB, Options{}, bytes.NewReader([]byte{})) @@ -183,6 +200,12 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, }, true, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), "s3://bad-container/path", 0, Options{}, bytes.NewReader([]byte{})) @@ -209,6 +232,12 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, }, true, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), "s3://bad-container/path", 0, Options{}, bytes.NewReader([]byte{})) @@ -373,3 +402,63 @@ func Test_newStowRawStore(t *testing.T) { }) } } + +func TestLoadContainer(t *testing.T) { + container := "container" + t.Run("Create if not found", func(t *testing.T) { + stowStore := StowStore{ + loc: &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, + } + stowContainer, err := stowStore.LoadContainer(context.Background(), "container", true) + assert.NoError(t, err) + assert.Equal(t, container, stowContainer.ID()) + }) + t.Run("Create if not found with error", func(t *testing.T) { + stowStore := StowStore{ + loc: &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return nil, fmt.Errorf("foo") + } + return nil, fmt.Errorf("container is not supported") + }, + }, + } + _, err := stowStore.LoadContainer(context.Background(), "container", true) + assert.EqualError(t, err, "unable to initialize container [container]. Error: foo") + }) + t.Run("No create if not found", func(t *testing.T) { + stowStore := StowStore{ + loc: &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, + } + stowContainer, err := stowStore.LoadContainer(context.Background(), "container", false) + assert.NoError(t, err) + assert.Equal(t, container, stowContainer.ID()) + }) +} From ddc0117b24645e7a16c046c951a2e241acbe8698 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Tue, 16 Mar 2021 15:21:05 -0700 Subject: [PATCH 117/191] Update create container if not exists logic (#77) --- flytestdlib/storage/stow_store.go | 56 +++++++++++----- flytestdlib/storage/stow_store_test.go | 91 +++++++++++++++++++++++--- 2 files changed, 124 insertions(+), 23 deletions(-) diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index b484bc2588..0799d0eb77 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -53,6 +53,15 @@ var fQNFn = map[string]func(string) DataReference{ }, } +// Checks if the error is AWS S3 bucket not found error +func awsBucketIsNotFound(err error) bool { + if awsErr, errOk := errs.Cause(err).(awserr.Error); errOk { + return awsErr.Code() == s32.ErrCodeNoSuchBucket + } + + return false +} + // Checks if the error is AWS S3 bucket already exists error. func awsBucketAlreadyExists(err error) bool { if IsExists(err) { @@ -110,22 +119,30 @@ type StowStore struct { baseContainerFQN DataReference } -func (s *StowStore) LoadContainer(ctx context.Context, container string, createIfNotFound bool) (stow.Container, error) { - // TODO: As of stow v0.2.6 elides the container lookup when a bucket region is set, - // so we always just attempt to create it when createIfNotFound is true. - - if createIfNotFound { - logger.Infof(ctx, "Attempting to create container [%s]", container) - _, err := s.loc.CreateContainer(container) - if err != nil && !awsBucketAlreadyExists(err) && !IsExists(err) { - return nil, fmt.Errorf("unable to initialize container [%v]. Error: %v", container, err) - } +func (s *StowStore) CreateContainer(ctx context.Context, container string) (stow.Container, error) { + logger.Infof(ctx, "Attempting to create container [%s]", container) + c, err := s.loc.CreateContainer(container) + if err != nil && !awsBucketAlreadyExists(err) && !IsExists(err) { + return nil, fmt.Errorf("unable to initialize container [%v]. Error: %v", container, err) } + return c, nil +} +func (s *StowStore) LoadContainer(ctx context.Context, container string, createIfNotFound bool) (stow.Container, error) { c, err := s.loc.Container(container) if err != nil { - logger.Errorf(ctx, "Container [%s] lookup failed. Error %s", container, err) - return nil, err + // IsNotFound is not always guaranteed to be returned if the underlying container doesn't exist! + // As of stow v0.2.6, the call to get container elides the lookup when a bucket region is set for S3 containers. + if IsNotFound(err) && createIfNotFound { + c, err = s.CreateContainer(ctx, container) + if err != nil { + logger.Errorf(ctx, "Call to create container [%s] failed. Error %s", container, err) + return nil, err + } + } else { + logger.Errorf(ctx, "Container [%s] lookup failed. Error %s", container, err) + return nil, err + } } return c, nil } @@ -180,7 +197,7 @@ func (s *StowStore) Head(ctx context.Context, reference DataReference) (Metadata } } - if IsNotFound(err) { + if IsNotFound(err) || awsBucketIsNotFound(err) { return StowMetadata{exists: false}, nil } @@ -235,8 +252,17 @@ func (s *StowStore) WriteRaw(ctx context.Context, reference DataReference, size t := s.metrics.WriteLatency.Start(ctx) _, err = container.Put(k, raw, size, opts.Metadata) if err != nil { - incFailureCounterForError(ctx, s.metrics.WriteFailure, err) - return errs.Wrapf(err, "Failed to write data [%vb] to path [%v].", size, k) + // If this error is due to the bucket not existing, first attempt to create it and retry the getContainer call. + if IsNotFound(err) || awsBucketIsNotFound(err) { + container, err = s.CreateContainer(ctx, c) + if err == nil { + s.dynamicContainerMap.Store(container, c) + } + } + if err != nil { + incFailureCounterForError(ctx, s.metrics.WriteFailure, err) + return errs.Wrapf(err, "Failed to write data [%vb] to path [%v].", size, k) + } } t.Stop() diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index c3131eb759..d291b5cb1b 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -3,6 +3,7 @@ package storage import ( "bytes" "context" + errors2 "errors" "fmt" "io" "io/ioutil" @@ -12,6 +13,9 @@ import ( "testing" "time" + "github.com/aws/aws-sdk-go/aws/awserr" + s32 "github.com/aws/aws-sdk-go/service/s3" + "github.com/graymeta/stow/google" "github.com/graymeta/stow/local" "github.com/pkg/errors" @@ -43,6 +47,7 @@ func (m mockStowLoc) CreateContainer(name string) (stow.Container, error) { type mockStowContainer struct { id string items map[string]mockStowItem + putCB func(name string, r io.Reader, size int64, metadata map[string]interface{}) (stow.Item, error) } func (m mockStowContainer) ID() string { @@ -70,6 +75,9 @@ func (mockStowContainer) RemoveItem(id string) error { } func (m *mockStowContainer) Put(name string, r io.Reader, size int64, metadata map[string]interface{}) (stow.Item, error) { + if m.putCB != nil { + return m.putCB(name, r, size, metadata) + } item := mockStowItem{url: name, size: size} m.items[name] = item return item, nil @@ -124,6 +132,17 @@ func (mockStowItem) Metadata() (map[string]interface{}, error) { return map[string]interface{}{}, nil } +func TestAwsBucketIsNotFound(t *testing.T) { + t.Run("detect is not found", func(t *testing.T) { + err := awserr.New(s32.ErrCodeNoSuchBucket, "foo", errors2.New("foo")) + assert.True(t, awsBucketIsNotFound(err)) + }) + t.Run("do not detect random errors", func(t *testing.T) { + err := awserr.New(s32.ErrCodeInvalidObjectState, "foo", errors2.New("foo")) + assert.False(t, awsBucketIsNotFound(err)) + }) +} + func TestStowStore_ReadRaw(t *testing.T) { labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) @@ -410,7 +429,7 @@ func TestLoadContainer(t *testing.T) { loc: &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { if id == container { - return newMockStowContainer(container), nil + return newMockStowContainer(container), stow.ErrNotFound } return nil, fmt.Errorf("container is not supported") }, @@ -430,10 +449,7 @@ func TestLoadContainer(t *testing.T) { stowStore := StowStore{ loc: &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { - if id == container { - return newMockStowContainer(container), nil - } - return nil, fmt.Errorf("container is not supported") + return nil, stow.ErrNotFound }, CreateContainerCb: func(name string) (stow.Container, error) { if name == container { @@ -451,14 +467,73 @@ func TestLoadContainer(t *testing.T) { loc: &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { if id == container { - return newMockStowContainer(container), nil + return newMockStowContainer(container), stow.ErrNotFound } return nil, fmt.Errorf("container is not supported") }, }, } - stowContainer, err := stowStore.LoadContainer(context.Background(), "container", false) + _, err := stowStore.LoadContainer(context.Background(), "container", false) + assert.EqualError(t, err, stow.ErrNotFound.Error()) + }) +} + +func TestStowStore_WriteRaw(t *testing.T) { + labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) + const container = "container" + fn := fQNFn["s3"] + t.Run("create container when not found", func(t *testing.T) { + testScope := promutils.NewTestScope() + var createCalled bool + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + mockStowContainer := newMockStowContainer(container) + mockStowContainer.putCB = func(name string, r io.Reader, size int64, metadata map[string]interface{}) (stow.Item, error) { + return nil, awserr.New(s32.ErrCodeNoSuchBucket, "foo", errors2.New("foo")) + } + return mockStowContainer, nil + } + return nil, fmt.Errorf("container is not supported") + }, + CreateContainerCb: func(name string) (stow.Container, error) { + createCalled = true + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, true, testScope) assert.NoError(t, err) - assert.Equal(t, container, stowContainer.ID()) + err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) + assert.NoError(t, err) + assert.True(t, createCalled) + var containerStoredInDynamicContainerMap bool + s.dynamicContainerMap.Range(func(key, value interface{}) bool { + if value == container { + containerStoredInDynamicContainerMap = true + return true + } + return false + }) + assert.True(t, containerStoredInDynamicContainerMap) + }) + t.Run("bubble up generic put errors", func(t *testing.T) { + testScope := promutils.NewTestScope() + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + mockStowContainer := newMockStowContainer(container) + mockStowContainer.putCB = func(name string, r io.Reader, size int64, metadata map[string]interface{}) (stow.Item, error) { + return nil, errors2.New("foo") + } + return mockStowContainer, nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, true, testScope) + assert.NoError(t, err) + err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) + assert.EqualError(t, err, "Failed to write data [0b] to path [path].: foo") }) } From 7b3f9c38e5cd444ec1713f4350320a6cae154f32 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Fri, 2 Apr 2021 12:18:41 -0700 Subject: [PATCH 118/191] Update promutils workqueue Metrics for newest client-go (#78) * Update prometheus workqueue Metrics provider to work with latest Client Go Signed-off-by: Haytham Abuelfutuh * Add unit tests Signed-off-by: Haytham Abuelfutuh --- flytestdlib/go.mod | 2 +- flytestdlib/promutils/workqueue.go | 31 ++++++++++++++----------- flytestdlib/promutils/workqueue_test.go | 18 ++++++++++++++ 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 0e8689ac07..33c6dc2120 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -1,6 +1,6 @@ module github.com/flyteorg/flytestdlib -go 1.13 +go 1.16 require ( cloud.google.com/go v0.75.0 // indirect diff --git a/flytestdlib/promutils/workqueue.go b/flytestdlib/promutils/workqueue.go index f7bdd055f0..ba128b201a 100644 --- a/flytestdlib/promutils/workqueue.go +++ b/flytestdlib/promutils/workqueue.go @@ -17,8 +17,6 @@ limitations under the License. package promutils import ( - "fmt" - "k8s.io/client-go/util/workqueue" "github.com/prometheus/client_golang/prometheus" @@ -28,18 +26,23 @@ import ( // prometheus metrics. To use this package, you just have to import it. func init() { - var provider interface{} //nolint - provider = prometheusMetricsProvider{} - if p, casted := provider.(workqueue.MetricsProvider); casted { - workqueue.SetProvider(p) - } else { - // This case happens in future versions of client-go where the interface has added methods - fmt.Println("Warn: No metricsProvider set for the workqueue") - } + provider := prometheusMetricsProvider{} + workqueue.SetProvider(provider) } type prometheusMetricsProvider struct{} +func (prometheusMetricsProvider) NewLongestRunningProcessorSecondsMetric(name string) workqueue.SettableGaugeMetric { + unfinishedWork := prometheus.NewGauge(prometheus.GaugeOpts{ + Subsystem: name, + Name: "longest_running_processor_s", + Help: "How many microseconds longest running processor from workqueue" + name + " takes.", + }) + + prometheus.MustRegister(unfinishedWork) + return unfinishedWork +} + func (prometheusMetricsProvider) NewUnfinishedWorkSecondsMetric(name string) workqueue.SettableGaugeMetric { unfinishedWork := prometheus.NewGauge(prometheus.GaugeOpts{ Subsystem: name, @@ -80,8 +83,8 @@ func (prometheusMetricsProvider) NewAddsMetric(name string) workqueue.CounterMet return adds } -func (prometheusMetricsProvider) NewLatencyMetric(name string) workqueue.SummaryMetric { - latency := prometheus.NewSummary(prometheus.SummaryOpts{ +func (prometheusMetricsProvider) NewLatencyMetric(name string) workqueue.HistogramMetric { + latency := prometheus.NewHistogram(prometheus.HistogramOpts{ Subsystem: name, Name: "queue_latency_us", Help: "How long an item stays in workqueue" + name + " before being requested.", @@ -90,8 +93,8 @@ func (prometheusMetricsProvider) NewLatencyMetric(name string) workqueue.Summary return latency } -func (prometheusMetricsProvider) NewWorkDurationMetric(name string) workqueue.SummaryMetric { - workDuration := prometheus.NewSummary(prometheus.SummaryOpts{ +func (prometheusMetricsProvider) NewWorkDurationMetric(name string) workqueue.HistogramMetric { + workDuration := prometheus.NewHistogram(prometheus.HistogramOpts{ Subsystem: name, Name: "work_duration_us", Help: "How long processing an item from workqueue" + name + " takes.", diff --git a/flytestdlib/promutils/workqueue_test.go b/flytestdlib/promutils/workqueue_test.go index 4c5bbcae9e..bacf7a2fa8 100644 --- a/flytestdlib/promutils/workqueue_test.go +++ b/flytestdlib/promutils/workqueue_test.go @@ -39,4 +39,22 @@ func TestPrometheusMetricsProvider(t *testing.T) { _, ok := c.(prometheus.Summary) assert.True(t, ok) }) + + t.Run("NewLongestRunningProcessorSecondsMetric", func(t *testing.T) { + c := provider.NewLongestRunningProcessorSecondsMetric("x") + _, ok := c.(prometheus.Gauge) + assert.True(t, ok) + }) + + t.Run("NewUnfinishedWorkSecondsMetric", func(t *testing.T) { + c := provider.NewUnfinishedWorkSecondsMetric("x") + _, ok := c.(prometheus.Gauge) + assert.True(t, ok) + }) + + t.Run("NewLongestRunningProcessorMicrosecondsMetric", func(t *testing.T) { + c := provider.NewLongestRunningProcessorMicrosecondsMetric("x") + _, ok := c.(prometheus.Gauge) + assert.True(t, ok) + }) } From 971d050e3e55064cf799ec918ca807c6f26decb2 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Fri, 16 Apr 2021 09:25:53 -0700 Subject: [PATCH 119/191] Generate mocks for data storage for use in tests (#79) --- .../storage/mocks/composed_protobuf_store.go | 261 ++++++++++++++++++ flytestdlib/storage/mocks/raw_store.go | 195 +++++++++++++ .../storage/mocks/reference_constructor.go | 61 ++++ flytestdlib/storage/storage.go | 6 + 4 files changed, 523 insertions(+) create mode 100644 flytestdlib/storage/mocks/composed_protobuf_store.go create mode 100644 flytestdlib/storage/mocks/raw_store.go create mode 100644 flytestdlib/storage/mocks/reference_constructor.go diff --git a/flytestdlib/storage/mocks/composed_protobuf_store.go b/flytestdlib/storage/mocks/composed_protobuf_store.go new file mode 100644 index 0000000000..4bd5c31850 --- /dev/null +++ b/flytestdlib/storage/mocks/composed_protobuf_store.go @@ -0,0 +1,261 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + io "io" + + mock "github.com/stretchr/testify/mock" + + protoiface "google.golang.org/protobuf/runtime/protoiface" + + storage "github.com/flyteorg/flytestdlib/storage" +) + +// ComposedProtobufStore is an autogenerated mock type for the ComposedProtobufStore type +type ComposedProtobufStore struct { + mock.Mock +} + +type ComposedProtobufStore_CopyRaw struct { + *mock.Call +} + +func (_m ComposedProtobufStore_CopyRaw) Return(_a0 error) *ComposedProtobufStore_CopyRaw { + return &ComposedProtobufStore_CopyRaw{Call: _m.Call.Return(_a0)} +} + +func (_m *ComposedProtobufStore) OnCopyRaw(ctx context.Context, source storage.DataReference, destination storage.DataReference, opts storage.Options) *ComposedProtobufStore_CopyRaw { + c := _m.On("CopyRaw", ctx, source, destination, opts) + return &ComposedProtobufStore_CopyRaw{Call: c} +} + +func (_m *ComposedProtobufStore) OnCopyRawMatch(matchers ...interface{}) *ComposedProtobufStore_CopyRaw { + c := _m.On("CopyRaw", matchers...) + return &ComposedProtobufStore_CopyRaw{Call: c} +} + +// CopyRaw provides a mock function with given fields: ctx, source, destination, opts +func (_m *ComposedProtobufStore) CopyRaw(ctx context.Context, source storage.DataReference, destination storage.DataReference, opts storage.Options) error { + ret := _m.Called(ctx, source, destination, opts) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference, storage.DataReference, storage.Options) error); ok { + r0 = rf(ctx, source, destination, opts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type ComposedProtobufStore_GetBaseContainerFQN struct { + *mock.Call +} + +func (_m ComposedProtobufStore_GetBaseContainerFQN) Return(_a0 storage.DataReference) *ComposedProtobufStore_GetBaseContainerFQN { + return &ComposedProtobufStore_GetBaseContainerFQN{Call: _m.Call.Return(_a0)} +} + +func (_m *ComposedProtobufStore) OnGetBaseContainerFQN(ctx context.Context) *ComposedProtobufStore_GetBaseContainerFQN { + c := _m.On("GetBaseContainerFQN", ctx) + return &ComposedProtobufStore_GetBaseContainerFQN{Call: c} +} + +func (_m *ComposedProtobufStore) OnGetBaseContainerFQNMatch(matchers ...interface{}) *ComposedProtobufStore_GetBaseContainerFQN { + c := _m.On("GetBaseContainerFQN", matchers...) + return &ComposedProtobufStore_GetBaseContainerFQN{Call: c} +} + +// GetBaseContainerFQN provides a mock function with given fields: ctx +func (_m *ComposedProtobufStore) GetBaseContainerFQN(ctx context.Context) storage.DataReference { + ret := _m.Called(ctx) + + var r0 storage.DataReference + if rf, ok := ret.Get(0).(func(context.Context) storage.DataReference); ok { + r0 = rf(ctx) + } else { + r0 = ret.Get(0).(storage.DataReference) + } + + return r0 +} + +type ComposedProtobufStore_Head struct { + *mock.Call +} + +func (_m ComposedProtobufStore_Head) Return(_a0 storage.Metadata, _a1 error) *ComposedProtobufStore_Head { + return &ComposedProtobufStore_Head{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *ComposedProtobufStore) OnHead(ctx context.Context, reference storage.DataReference) *ComposedProtobufStore_Head { + c := _m.On("Head", ctx, reference) + return &ComposedProtobufStore_Head{Call: c} +} + +func (_m *ComposedProtobufStore) OnHeadMatch(matchers ...interface{}) *ComposedProtobufStore_Head { + c := _m.On("Head", matchers...) + return &ComposedProtobufStore_Head{Call: c} +} + +// Head provides a mock function with given fields: ctx, reference +func (_m *ComposedProtobufStore) Head(ctx context.Context, reference storage.DataReference) (storage.Metadata, error) { + ret := _m.Called(ctx, reference) + + var r0 storage.Metadata + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference) storage.Metadata); ok { + r0 = rf(ctx, reference) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storage.Metadata) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, storage.DataReference) error); ok { + r1 = rf(ctx, reference) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type ComposedProtobufStore_ReadProtobuf struct { + *mock.Call +} + +func (_m ComposedProtobufStore_ReadProtobuf) Return(_a0 error) *ComposedProtobufStore_ReadProtobuf { + return &ComposedProtobufStore_ReadProtobuf{Call: _m.Call.Return(_a0)} +} + +func (_m *ComposedProtobufStore) OnReadProtobuf(ctx context.Context, reference storage.DataReference, msg protoiface.MessageV1) *ComposedProtobufStore_ReadProtobuf { + c := _m.On("ReadProtobuf", ctx, reference, msg) + return &ComposedProtobufStore_ReadProtobuf{Call: c} +} + +func (_m *ComposedProtobufStore) OnReadProtobufMatch(matchers ...interface{}) *ComposedProtobufStore_ReadProtobuf { + c := _m.On("ReadProtobuf", matchers...) + return &ComposedProtobufStore_ReadProtobuf{Call: c} +} + +// ReadProtobuf provides a mock function with given fields: ctx, reference, msg +func (_m *ComposedProtobufStore) ReadProtobuf(ctx context.Context, reference storage.DataReference, msg protoiface.MessageV1) error { + ret := _m.Called(ctx, reference, msg) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference, protoiface.MessageV1) error); ok { + r0 = rf(ctx, reference, msg) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type ComposedProtobufStore_ReadRaw struct { + *mock.Call +} + +func (_m ComposedProtobufStore_ReadRaw) Return(_a0 io.ReadCloser, _a1 error) *ComposedProtobufStore_ReadRaw { + return &ComposedProtobufStore_ReadRaw{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *ComposedProtobufStore) OnReadRaw(ctx context.Context, reference storage.DataReference) *ComposedProtobufStore_ReadRaw { + c := _m.On("ReadRaw", ctx, reference) + return &ComposedProtobufStore_ReadRaw{Call: c} +} + +func (_m *ComposedProtobufStore) OnReadRawMatch(matchers ...interface{}) *ComposedProtobufStore_ReadRaw { + c := _m.On("ReadRaw", matchers...) + return &ComposedProtobufStore_ReadRaw{Call: c} +} + +// ReadRaw provides a mock function with given fields: ctx, reference +func (_m *ComposedProtobufStore) ReadRaw(ctx context.Context, reference storage.DataReference) (io.ReadCloser, error) { + ret := _m.Called(ctx, reference) + + var r0 io.ReadCloser + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference) io.ReadCloser); ok { + r0 = rf(ctx, reference) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(io.ReadCloser) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, storage.DataReference) error); ok { + r1 = rf(ctx, reference) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type ComposedProtobufStore_WriteProtobuf struct { + *mock.Call +} + +func (_m ComposedProtobufStore_WriteProtobuf) Return(_a0 error) *ComposedProtobufStore_WriteProtobuf { + return &ComposedProtobufStore_WriteProtobuf{Call: _m.Call.Return(_a0)} +} + +func (_m *ComposedProtobufStore) OnWriteProtobuf(ctx context.Context, reference storage.DataReference, opts storage.Options, msg protoiface.MessageV1) *ComposedProtobufStore_WriteProtobuf { + c := _m.On("WriteProtobuf", ctx, reference, opts, msg) + return &ComposedProtobufStore_WriteProtobuf{Call: c} +} + +func (_m *ComposedProtobufStore) OnWriteProtobufMatch(matchers ...interface{}) *ComposedProtobufStore_WriteProtobuf { + c := _m.On("WriteProtobuf", matchers...) + return &ComposedProtobufStore_WriteProtobuf{Call: c} +} + +// WriteProtobuf provides a mock function with given fields: ctx, reference, opts, msg +func (_m *ComposedProtobufStore) WriteProtobuf(ctx context.Context, reference storage.DataReference, opts storage.Options, msg protoiface.MessageV1) error { + ret := _m.Called(ctx, reference, opts, msg) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference, storage.Options, protoiface.MessageV1) error); ok { + r0 = rf(ctx, reference, opts, msg) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type ComposedProtobufStore_WriteRaw struct { + *mock.Call +} + +func (_m ComposedProtobufStore_WriteRaw) Return(_a0 error) *ComposedProtobufStore_WriteRaw { + return &ComposedProtobufStore_WriteRaw{Call: _m.Call.Return(_a0)} +} + +func (_m *ComposedProtobufStore) OnWriteRaw(ctx context.Context, reference storage.DataReference, size int64, opts storage.Options, raw io.Reader) *ComposedProtobufStore_WriteRaw { + c := _m.On("WriteRaw", ctx, reference, size, opts, raw) + return &ComposedProtobufStore_WriteRaw{Call: c} +} + +func (_m *ComposedProtobufStore) OnWriteRawMatch(matchers ...interface{}) *ComposedProtobufStore_WriteRaw { + c := _m.On("WriteRaw", matchers...) + return &ComposedProtobufStore_WriteRaw{Call: c} +} + +// WriteRaw provides a mock function with given fields: ctx, reference, size, opts, raw +func (_m *ComposedProtobufStore) WriteRaw(ctx context.Context, reference storage.DataReference, size int64, opts storage.Options, raw io.Reader) error { + ret := _m.Called(ctx, reference, size, opts, raw) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference, int64, storage.Options, io.Reader) error); ok { + r0 = rf(ctx, reference, size, opts, raw) + } else { + r0 = ret.Error(0) + } + + return r0 +} diff --git a/flytestdlib/storage/mocks/raw_store.go b/flytestdlib/storage/mocks/raw_store.go new file mode 100644 index 0000000000..1ec9815b0c --- /dev/null +++ b/flytestdlib/storage/mocks/raw_store.go @@ -0,0 +1,195 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + io "io" + + mock "github.com/stretchr/testify/mock" + + storage "github.com/flyteorg/flytestdlib/storage" +) + +// RawStore is an autogenerated mock type for the RawStore type +type RawStore struct { + mock.Mock +} + +type RawStore_CopyRaw struct { + *mock.Call +} + +func (_m RawStore_CopyRaw) Return(_a0 error) *RawStore_CopyRaw { + return &RawStore_CopyRaw{Call: _m.Call.Return(_a0)} +} + +func (_m *RawStore) OnCopyRaw(ctx context.Context, source storage.DataReference, destination storage.DataReference, opts storage.Options) *RawStore_CopyRaw { + c := _m.On("CopyRaw", ctx, source, destination, opts) + return &RawStore_CopyRaw{Call: c} +} + +func (_m *RawStore) OnCopyRawMatch(matchers ...interface{}) *RawStore_CopyRaw { + c := _m.On("CopyRaw", matchers...) + return &RawStore_CopyRaw{Call: c} +} + +// CopyRaw provides a mock function with given fields: ctx, source, destination, opts +func (_m *RawStore) CopyRaw(ctx context.Context, source storage.DataReference, destination storage.DataReference, opts storage.Options) error { + ret := _m.Called(ctx, source, destination, opts) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference, storage.DataReference, storage.Options) error); ok { + r0 = rf(ctx, source, destination, opts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type RawStore_GetBaseContainerFQN struct { + *mock.Call +} + +func (_m RawStore_GetBaseContainerFQN) Return(_a0 storage.DataReference) *RawStore_GetBaseContainerFQN { + return &RawStore_GetBaseContainerFQN{Call: _m.Call.Return(_a0)} +} + +func (_m *RawStore) OnGetBaseContainerFQN(ctx context.Context) *RawStore_GetBaseContainerFQN { + c := _m.On("GetBaseContainerFQN", ctx) + return &RawStore_GetBaseContainerFQN{Call: c} +} + +func (_m *RawStore) OnGetBaseContainerFQNMatch(matchers ...interface{}) *RawStore_GetBaseContainerFQN { + c := _m.On("GetBaseContainerFQN", matchers...) + return &RawStore_GetBaseContainerFQN{Call: c} +} + +// GetBaseContainerFQN provides a mock function with given fields: ctx +func (_m *RawStore) GetBaseContainerFQN(ctx context.Context) storage.DataReference { + ret := _m.Called(ctx) + + var r0 storage.DataReference + if rf, ok := ret.Get(0).(func(context.Context) storage.DataReference); ok { + r0 = rf(ctx) + } else { + r0 = ret.Get(0).(storage.DataReference) + } + + return r0 +} + +type RawStore_Head struct { + *mock.Call +} + +func (_m RawStore_Head) Return(_a0 storage.Metadata, _a1 error) *RawStore_Head { + return &RawStore_Head{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *RawStore) OnHead(ctx context.Context, reference storage.DataReference) *RawStore_Head { + c := _m.On("Head", ctx, reference) + return &RawStore_Head{Call: c} +} + +func (_m *RawStore) OnHeadMatch(matchers ...interface{}) *RawStore_Head { + c := _m.On("Head", matchers...) + return &RawStore_Head{Call: c} +} + +// Head provides a mock function with given fields: ctx, reference +func (_m *RawStore) Head(ctx context.Context, reference storage.DataReference) (storage.Metadata, error) { + ret := _m.Called(ctx, reference) + + var r0 storage.Metadata + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference) storage.Metadata); ok { + r0 = rf(ctx, reference) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storage.Metadata) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, storage.DataReference) error); ok { + r1 = rf(ctx, reference) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type RawStore_ReadRaw struct { + *mock.Call +} + +func (_m RawStore_ReadRaw) Return(_a0 io.ReadCloser, _a1 error) *RawStore_ReadRaw { + return &RawStore_ReadRaw{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *RawStore) OnReadRaw(ctx context.Context, reference storage.DataReference) *RawStore_ReadRaw { + c := _m.On("ReadRaw", ctx, reference) + return &RawStore_ReadRaw{Call: c} +} + +func (_m *RawStore) OnReadRawMatch(matchers ...interface{}) *RawStore_ReadRaw { + c := _m.On("ReadRaw", matchers...) + return &RawStore_ReadRaw{Call: c} +} + +// ReadRaw provides a mock function with given fields: ctx, reference +func (_m *RawStore) ReadRaw(ctx context.Context, reference storage.DataReference) (io.ReadCloser, error) { + ret := _m.Called(ctx, reference) + + var r0 io.ReadCloser + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference) io.ReadCloser); ok { + r0 = rf(ctx, reference) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(io.ReadCloser) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, storage.DataReference) error); ok { + r1 = rf(ctx, reference) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type RawStore_WriteRaw struct { + *mock.Call +} + +func (_m RawStore_WriteRaw) Return(_a0 error) *RawStore_WriteRaw { + return &RawStore_WriteRaw{Call: _m.Call.Return(_a0)} +} + +func (_m *RawStore) OnWriteRaw(ctx context.Context, reference storage.DataReference, size int64, opts storage.Options, raw io.Reader) *RawStore_WriteRaw { + c := _m.On("WriteRaw", ctx, reference, size, opts, raw) + return &RawStore_WriteRaw{Call: c} +} + +func (_m *RawStore) OnWriteRawMatch(matchers ...interface{}) *RawStore_WriteRaw { + c := _m.On("WriteRaw", matchers...) + return &RawStore_WriteRaw{Call: c} +} + +// WriteRaw provides a mock function with given fields: ctx, reference, size, opts, raw +func (_m *RawStore) WriteRaw(ctx context.Context, reference storage.DataReference, size int64, opts storage.Options, raw io.Reader) error { + ret := _m.Called(ctx, reference, size, opts, raw) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference, int64, storage.Options, io.Reader) error); ok { + r0 = rf(ctx, reference, size, opts, raw) + } else { + r0 = ret.Error(0) + } + + return r0 +} diff --git a/flytestdlib/storage/mocks/reference_constructor.go b/flytestdlib/storage/mocks/reference_constructor.go new file mode 100644 index 0000000000..08bc957daa --- /dev/null +++ b/flytestdlib/storage/mocks/reference_constructor.go @@ -0,0 +1,61 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + storage "github.com/flyteorg/flytestdlib/storage" + mock "github.com/stretchr/testify/mock" +) + +// ReferenceConstructor is an autogenerated mock type for the ReferenceConstructor type +type ReferenceConstructor struct { + mock.Mock +} + +type ReferenceConstructor_ConstructReference struct { + *mock.Call +} + +func (_m ReferenceConstructor_ConstructReference) Return(_a0 storage.DataReference, _a1 error) *ReferenceConstructor_ConstructReference { + return &ReferenceConstructor_ConstructReference{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *ReferenceConstructor) OnConstructReference(ctx context.Context, reference storage.DataReference, nestedKeys ...string) *ReferenceConstructor_ConstructReference { + c := _m.On("ConstructReference", ctx, reference, nestedKeys) + return &ReferenceConstructor_ConstructReference{Call: c} +} + +func (_m *ReferenceConstructor) OnConstructReferenceMatch(matchers ...interface{}) *ReferenceConstructor_ConstructReference { + c := _m.On("ConstructReference", matchers...) + return &ReferenceConstructor_ConstructReference{Call: c} +} + +// ConstructReference provides a mock function with given fields: ctx, reference, nestedKeys +func (_m *ReferenceConstructor) ConstructReference(ctx context.Context, reference storage.DataReference, nestedKeys ...string) (storage.DataReference, error) { + _va := make([]interface{}, len(nestedKeys)) + for _i := range nestedKeys { + _va[_i] = nestedKeys[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, reference) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 storage.DataReference + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference, ...string) storage.DataReference); ok { + r0 = rf(ctx, reference, nestedKeys...) + } else { + r0 = ret.Get(0).(storage.DataReference) + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, storage.DataReference, ...string) error); ok { + r1 = rf(ctx, reference, nestedKeys...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flytestdlib/storage/storage.go b/flytestdlib/storage/storage.go index ffbc2c62b0..c6dbdde9fd 100644 --- a/flytestdlib/storage/storage.go +++ b/flytestdlib/storage/storage.go @@ -40,6 +40,8 @@ type DataStore struct { ReferenceConstructor } +//go:generate mockery -name RawStore -case=underscore + // Defines a low level interface for accessing and storing bytes. type RawStore interface { // returns a FQN DataReference with the configured base init container @@ -58,6 +60,8 @@ type RawStore interface { CopyRaw(ctx context.Context, source, destination DataReference, opts Options) error } +//go:generate mockery -name ReferenceConstructor -case=underscore + // Defines an interface for building data reference paths. type ReferenceConstructor interface { // Creates a new dataReference that matches the storage structure. @@ -73,6 +77,8 @@ type ProtobufStore interface { WriteProtobuf(ctx context.Context, reference DataReference, opts Options, msg proto.Message) error } +//go:generate mockery -name ComposedProtobufStore -case=underscore + // A ProtobufStore needs a RawStore to get the RawData. This interface provides all the necessary components to make // Protobuf fetching work type ComposedProtobufStore interface { From 378f424bea8d8988d3dab3be0ca326d50cc9b0ab Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Tue, 27 Apr 2021 12:12:56 -0700 Subject: [PATCH 120/191] zero fields overriden in config files to avoid undesired merging logic (#81) Signed-off-by: Haytham Abuelfutuh --- flytestdlib/config/tests/accessor_test.go | 32 +++++++++++++++++++ .../config/tests/testdata/array_config_2.yaml | 4 +++ flytestdlib/config/tests/types_test.go | 10 ++++++ flytestdlib/config/viper/viper.go | 2 ++ 4 files changed, 48 insertions(+) create mode 100644 flytestdlib/config/tests/testdata/array_config_2.yaml diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index e53e4f619e..64d9f55073 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -299,6 +299,38 @@ func TestAccessor_UpdateConfig(t *testing.T) { assert.Equal(t, 4, (*topLevel)[1].IntValue) }) + t.Run(fmt.Sprintf("[%v] Override default array config", provider(config.Options{}).ID()), func(t *testing.T) { + root := config.NewRootSection() + _, err := root.RegisterSection(MyComponentSectionKey, &ItemArray{ + Items: []Item{ + { + ID: "default_1", + Name: "default_Name", + }, + { + ID: "default_2", + Name: "default_2_Name", + }, + }, + OtherItem: Item{ + ID: "default_3", + Name: "default_3_name", + }, + }) + assert.NoError(t, err) + + v := provider(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "array_config_2.yaml")}, + RootSection: root, + }) + + assert.NoError(t, v.UpdateConfig(context.TODO())) + r := root.GetSection(MyComponentSectionKey).GetConfig().(*ItemArray) + assert.Len(t, r.Items, 1) + assert.Equal(t, "abc", r.Items[0].ID) + assert.Equal(t, "default_3", r.OtherItem.ID) + }) + t.Run(fmt.Sprintf("[%v] Override in Env Var", provider(config.Options{}).ID()), func(t *testing.T) { reg := config.NewRootSection() _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) diff --git a/flytestdlib/config/tests/testdata/array_config_2.yaml b/flytestdlib/config/tests/testdata/array_config_2.yaml new file mode 100644 index 0000000000..05aa2bb533 --- /dev/null +++ b/flytestdlib/config/tests/testdata/array_config_2.yaml @@ -0,0 +1,4 @@ +my-component: + items: + - id: abc + name: "A b c" \ No newline at end of file diff --git a/flytestdlib/config/tests/types_test.go b/flytestdlib/config/tests/types_test.go index 0be368f62c..03c442b0b7 100644 --- a/flytestdlib/config/tests/types_test.go +++ b/flytestdlib/config/tests/types_test.go @@ -27,6 +27,16 @@ type OtherComponentConfig struct { StringArrayWithDefaults []string `json:"strings-def"` } +type Item struct { + ID string `json:"id"` + Name string `json:"name"` +} + +type ItemArray struct { + Items []Item `json:"items"` + OtherItem Item `json:"otherItem"` +} + func (MyComponentConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("MyComponentConfig", pflag.ExitOnError) cmdFlags.String(fmt.Sprintf("%v%v", prefix, "str"), "hello world", "life is short") diff --git a/flytestdlib/config/viper/viper.go b/flytestdlib/config/viper/viper.go index 6f472fef4a..d91bc63df1 100644 --- a/flytestdlib/config/viper/viper.go +++ b/flytestdlib/config/viper/viper.go @@ -270,6 +270,8 @@ func defaultDecoderConfig(output interface{}, opts ...viperLib.DecoderConfigOpti mapstructure.StringToTimeDurationHookFunc(), mapstructure.StringToSliceHookFunc(","), ), + // Empty/zero fields before applying provided values. This avoids potentially undesired/unexpected merging logic. + ZeroFields: true, } for _, opt := range opts { From 7c6d1d7355b65a43468c651676f44836194de6d0 Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Fri, 30 Apr 2021 22:14:02 +0530 Subject: [PATCH 121/191] update boilerplate code (#82) Signed-off-by: Samhita Alla --- flytestdlib/.github/config.yml | 15 ++++++++++ flytestdlib/boilerplate/flyte/Readme.rst | 8 +++++ flytestdlib/boilerplate/flyte/config.yml | 15 ++++++++++ flytestdlib/boilerplate/flyte/update.sh | 14 +++++++++ flytestdlib/boilerplate/update.cfg | 1 + flytestdlib/boilerplate/update.sh | 37 +++++++++++++++++++----- 6 files changed, 82 insertions(+), 8 deletions(-) create mode 100644 flytestdlib/.github/config.yml create mode 100644 flytestdlib/boilerplate/flyte/Readme.rst create mode 100644 flytestdlib/boilerplate/flyte/config.yml create mode 100755 flytestdlib/boilerplate/flyte/update.sh diff --git a/flytestdlib/.github/config.yml b/flytestdlib/.github/config.yml new file mode 100644 index 0000000000..f99bcd78f1 --- /dev/null +++ b/flytestdlib/.github/config.yml @@ -0,0 +1,15 @@ +# Comment to be posted on PRs from first-time contributors in your repository +newPRWelcomeComment: > + Thank you for opening this pull request! 🙌 + + These tips will help get your PR across the finish line: + - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. + - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). + +# Comment to be posted to on pull requests merged by a first time user +firstPRMergeComment: > + Congrats on merging your first pull request! 🎉 + +# Comment to be posted on first-time issues +newIssueWelcomeComment: > + Thank you for opening your first issue here! 🛠 diff --git a/flytestdlib/boilerplate/flyte/Readme.rst b/flytestdlib/boilerplate/flyte/Readme.rst new file mode 100644 index 0000000000..ea18781185 --- /dev/null +++ b/flytestdlib/boilerplate/flyte/Readme.rst @@ -0,0 +1,8 @@ +Config File -- Welcome Bot +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Provides a ``config.yml`` file. + +**To Enable:** + +Add ``flyte/config.yml`` to your ``boilerplate/update.cfg`` file. \ No newline at end of file diff --git a/flytestdlib/boilerplate/flyte/config.yml b/flytestdlib/boilerplate/flyte/config.yml new file mode 100644 index 0000000000..f99bcd78f1 --- /dev/null +++ b/flytestdlib/boilerplate/flyte/config.yml @@ -0,0 +1,15 @@ +# Comment to be posted on PRs from first-time contributors in your repository +newPRWelcomeComment: > + Thank you for opening this pull request! 🙌 + + These tips will help get your PR across the finish line: + - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. + - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). + +# Comment to be posted to on pull requests merged by a first time user +firstPRMergeComment: > + Congrats on merging your first pull request! 🎉 + +# Comment to be posted on first-time issues +newIssueWelcomeComment: > + Thank you for opening your first issue here! 🛠 diff --git a/flytestdlib/boilerplate/flyte/update.sh b/flytestdlib/boilerplate/flyte/update.sh new file mode 100755 index 0000000000..506c3221b7 --- /dev/null +++ b/flytestdlib/boilerplate/flyte/update.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +# Clone the config.yml file +echo " - copying ${DIR}/config.yml to the root directory." +cp ${DIR}/config.yml ${DIR}/../../.github/config.yml diff --git a/flytestdlib/boilerplate/update.cfg b/flytestdlib/boilerplate/update.cfg index a1b1bff989..a8754f3683 100644 --- a/flytestdlib/boilerplate/update.cfg +++ b/flytestdlib/boilerplate/update.cfg @@ -2,3 +2,4 @@ lyft/golang_test_targets lyft/golangci_file lyft/golang_support_tools lyft/pull_request_template +flyte/ diff --git a/flytestdlib/boilerplate/update.sh b/flytestdlib/boilerplate/update.sh index a8c05705e3..374e4b930e 100755 --- a/flytestdlib/boilerplate/update.sh +++ b/flytestdlib/boilerplate/update.sh @@ -10,7 +10,9 @@ set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" OUT="$(mktemp -d)" -git clone git@github.com:lyft/boilerplate.git "${OUT}" +trap "rm -fr $OUT" EXIT + +git clone git@github.com:flyteorg/boilerplate.git "${OUT}" echo "Updating the update.sh script." cp "${OUT}/boilerplate/update.sh" "${DIR}/update.sh" @@ -18,7 +20,7 @@ echo "" CONFIG_FILE="${DIR}/update.cfg" -README="https://github.com/lyft/boilerplate/blob/master/Readme.rst" +README="https://github.com/flyteorg/boilerplate/blob/master/Readme.rst" if [ ! -f "$CONFIG_FILE" ]; then echo "$CONFIG_FILE not found." @@ -33,13 +35,34 @@ if [ -z "$REPOSITORY" ]; then exit 1 fi -while read directory; do - # TODO: Skip empty lines, whitespace only lines, and comment lines +while read directory junk; do + # Skip comment lines (which can have leading whitespace) + if [[ "$directory" == '#'* ]]; then + continue + fi + # Skip blank or whitespace-only lines + if [[ "$directory" == "" ]]; then + continue + fi + # Lines like + # valid/path other_junk + # are not acceptable, unless `other_junk` is a comment + if [[ "$junk" != "" ]] && [[ "$junk" != '#'* ]]; then + echo "Invalid config! Only one directory is allowed per line. Found '$junk'" + exit 1 + fi + + dir_path="${OUT}/boilerplate/${directory}" + # Make sure the directory exists + if ! [[ -d "$dir_path" ]]; then + echo "Invalid boilerplate directory: '$directory'" + exit 1 + fi + echo "***********************************************************************************" echo "$directory is configured in update.cfg." echo "-----------------------------------------------------------------------------------" echo "syncing files from source." - dir_path="${OUT}/boilerplate/${directory}" rm -rf "${DIR}/${directory}" mkdir -p $(dirname "${DIR}/${directory}") cp -r "$dir_path" "${DIR}/${directory}" @@ -49,6 +72,4 @@ while read directory; do fi echo "***********************************************************************************" echo "" -done < "$CONFIG_FILE" - -rm -rf "${OUT}" +done < "$CONFIG_FILE" \ No newline at end of file From 07aa25d01c1d97b839b4132143337f68cd164f19 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Tue, 4 May 2021 10:24:44 -0700 Subject: [PATCH 122/191] Fix zeroFields setting when merging slices into maps (#83) * Fix zeroFields setting when merging slices into maps Signed-off-by: Haytham Abuelfutuh * PR Feedback Signed-off-by: Haytham Abuelfutuh --- flytestdlib/config/tests/accessor_test.go | 51 +++++++++++++++++++ .../config/tests/testdata/map_config.yaml | 8 +++ .../tests/testdata/map_config_nested.yaml | 17 +++++++ flytestdlib/config/tests/types_test.go | 10 +++- flytestdlib/config/viper/viper.go | 29 +++++++++++ 5 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 flytestdlib/config/tests/testdata/map_config.yaml create mode 100644 flytestdlib/config/tests/testdata/map_config_nested.yaml diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index 64d9f55073..df7507e740 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -331,6 +331,57 @@ func TestAccessor_UpdateConfig(t *testing.T) { assert.Equal(t, "default_3", r.OtherItem.ID) }) + t.Run(fmt.Sprintf("[%v] Override default map config", provider(config.Options{}).ID()), func(t *testing.T) { + t.Run("Simple", func(t *testing.T) { + root := config.NewRootSection() + _, err := root.RegisterSection(MyComponentSectionKey, &ItemMap{ + Items: map[string]Item{ + "1": { + ID: "default_1", + Name: "default_Name", + }, + "2": { + ID: "default_2", + Name: "default_2_Name", + }, + }, + }) + assert.NoError(t, err) + + v := provider(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "map_config.yaml")}, + RootSection: root, + }) + + assert.NoError(t, v.UpdateConfig(context.TODO())) + r := root.GetSection(MyComponentSectionKey).GetConfig().(*ItemMap) + assert.Len(t, r.Items, 2) + assert.Equal(t, "abc", r.Items["1"].ID) + }) + + t.Run("NestedMaps", func(t *testing.T) { + root := config.NewRootSection() + _, err := root.RegisterSection(MyComponentSectionKey, &ItemMap{ + ItemsMap: map[string]map[string]Item{}, + }) + assert.NoError(t, err) + + v := provider(config.Options{ + SearchPaths: []string{filepath.Join("testdata", "map_config_nested.yaml")}, + RootSection: root, + }) + + assert.NoError(t, v.UpdateConfig(context.TODO())) + r := root.GetSection(MyComponentSectionKey).GetConfig().(*ItemMap) + assert.Len(t, r.ItemsMap, 2) + assert.Equal(t, "abc1", r.ItemsMap["itemA"]["itemAa"].ID) + assert.Equal(t, "hello world", r.ItemsMap["itemA"]["itemAa"].RandomValue) + assert.Equal(t, "abc2", r.ItemsMap["itemB"]["itemBa"].ID) + assert.Equal(t, "xyz1", r.ItemsMap["itemA"]["itemAb"].ID) + assert.Equal(t, "xyz2", r.ItemsMap["itemB"]["itemBb"].ID) + }) + }) + t.Run(fmt.Sprintf("[%v] Override in Env Var", provider(config.Options{}).ID()), func(t *testing.T) { reg := config.NewRootSection() _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) diff --git a/flytestdlib/config/tests/testdata/map_config.yaml b/flytestdlib/config/tests/testdata/map_config.yaml new file mode 100644 index 0000000000..d388851d39 --- /dev/null +++ b/flytestdlib/config/tests/testdata/map_config.yaml @@ -0,0 +1,8 @@ +my-component: + items: + 1: + id: abc + name: "A b c" + 2: + id: xyz + name: "x y z" \ No newline at end of file diff --git a/flytestdlib/config/tests/testdata/map_config_nested.yaml b/flytestdlib/config/tests/testdata/map_config_nested.yaml new file mode 100644 index 0000000000..92de73e5d8 --- /dev/null +++ b/flytestdlib/config/tests/testdata/map_config_nested.yaml @@ -0,0 +1,17 @@ +my-component: + itemsMap: + - itemA: + - itemAa: + id: abc1 + name: "A b c" + randomValue: "hello world" + - itemAb: + id: xyz1 + name: "x y z" + - itemB: + - itemBa: + id: abc2 + name: "A b c" + - itemBb: + id: xyz2 + name: "x y z" \ No newline at end of file diff --git a/flytestdlib/config/tests/types_test.go b/flytestdlib/config/tests/types_test.go index 03c442b0b7..4d2303dcec 100644 --- a/flytestdlib/config/tests/types_test.go +++ b/flytestdlib/config/tests/types_test.go @@ -28,8 +28,9 @@ type OtherComponentConfig struct { } type Item struct { - ID string `json:"id"` - Name string `json:"name"` + ID string `json:"id"` + Name string `json:"name"` + RandomValue string `json:"randomValue"` } type ItemArray struct { @@ -37,6 +38,11 @@ type ItemArray struct { OtherItem Item `json:"otherItem"` } +type ItemMap struct { + Items map[string]Item `json:"items"` + ItemsMap map[string]map[string]Item `json:"itemsMap"` +} + func (MyComponentConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("MyComponentConfig", pflag.ExitOnError) cmdFlags.String(fmt.Sprintf("%v%v", prefix, "str"), "hello world", "life is short") diff --git a/flytestdlib/config/viper/viper.go b/flytestdlib/config/viper/viper.go index d91bc63df1..78fcc8be5f 100644 --- a/flytestdlib/config/viper/viper.go +++ b/flytestdlib/config/viper/viper.go @@ -165,6 +165,34 @@ func canGetElement(t reflect.Kind) bool { return exists } +// sliceToMapHook allows the conversion from slices to maps. This is used as a hack due to the lack of support of case +// sensitive keys in viper (see: https://github.com/spf13/viper#does-viper-support-case-sensitive-keys). The way we work +// around that is by filling in fields that should be maps as slices in yaml config files. This hook then takes care of +// reverting that process. +func sliceToMapHook(f reflect.Kind, t reflect.Kind, data interface{}) (interface{}, error) { + // Only handle slice -> map conversion + if f == reflect.Slice && t == reflect.Map { + // this will be the target result + res := map[interface{}]interface{}{} + // It's safe to convert data into a slice since we did the type assertion above. + asSlice := data.([]interface{}) + for _, item := range asSlice { + asMap, casted := item.(map[interface{}]interface{}) + if !casted { + return data, nil + } + + for key, value := range asMap { + res[key] = value + } + } + + return res, nil + } + + return data, nil +} + // This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the // object. Otherwise, it'll just pass on the original data. func jsonUnmarshallerHook(_, to reflect.Type, data interface{}) (interface{}, error) { @@ -269,6 +297,7 @@ func defaultDecoderConfig(output interface{}, opts ...viperLib.DecoderConfigOpti jsonUnmarshallerHook, mapstructure.StringToTimeDurationHookFunc(), mapstructure.StringToSliceHookFunc(","), + sliceToMapHook, ), // Empty/zero fields before applying provided values. This avoids potentially undesired/unexpected merging logic. ZeroFields: true, From a8597b2f354310b1011b097af99f1ac5be1764b0 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Tue, 18 May 2021 10:03:58 -0700 Subject: [PATCH 123/191] Support binding pflags to default variable fields (#69) * Update CI post migration (#68) * Update CI post migration * Migrate to github workflows * length check * debug * Avoid installing pflags from repo * Update deps * update go action * try import path * update protos * set checkout depth * cleanup * typo in master wf Signed-off-by: Haytham Abuelfutuh Signed-off-by: Prafulla Mahindrakar * Disable scoope publishing Signed-off-by: Haytham Abuelfutuh Signed-off-by: Prafulla Mahindrakar * Rename (#73) * first pass at updating references * update module name * update boilerplate mod * remove version * mor * mockery * maybe * mor * replace replace * trying something * other Signed-off-by: Haytham Abuelfutuh Signed-off-by: Prafulla Mahindrakar * Remove dependency on lyft/api (#71) Signed-off-by: Haytham Abuelfutuh Signed-off-by: Prafulla Mahindrakar * Always try to create a bucket when loading a container (#76) Signed-off-by: Haytham Abuelfutuh Signed-off-by: Prafulla Mahindrakar * Update create container if not exists logic (#77) Signed-off-by: Haytham Abuelfutuh Signed-off-by: Prafulla Mahindrakar * Support binding pflags to default variable fields Support Map Types now that viper does Signed-off-by: Haytham Abuelfutuh Signed-off-by: Prafulla Mahindrakar * Added some coverage Signed-off-by: Prafulla Mahindrakar * Reverting to go 1.16 Signed-off-by: Prafulla Mahindrakar * Fixed unit test Signed-off-by: Prafulla Mahindrakar * Added more coverage Signed-off-by: Prafulla Mahindrakar Co-authored-by: brucearctor <5032356+brucearctor@users.noreply.github.com> Co-authored-by: Ketan Umare <16888709+kumare3@users.noreply.github.com> Co-authored-by: Katrina Rogan Co-authored-by: Prafulla Mahindrakar --- flytestdlib/cli/pflags/api/generator.go | 166 ++++++++++----- flytestdlib/cli/pflags/api/generator_test.go | 91 ++++++++- flytestdlib/cli/pflags/api/sample.go | 1 + flytestdlib/cli/pflags/api/templates.go | 23 ++- .../cli/pflags/api/testdata/testtype.go | 12 +- .../cli/pflags/api/testdata/testtype_test.go | 190 ++---------------- flytestdlib/cli/pflags/api/types.go | 20 +- flytestdlib/cli/pflags/api/utils.go | 4 + flytestdlib/cli/pflags/cmd/root.go | 8 +- flytestdlib/go.mod | 1 - flytestdlib/go.sum | 23 ++- 11 files changed, 297 insertions(+), 242 deletions(-) diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index 0fca81ce23..2917e5842e 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -20,9 +20,10 @@ const ( // PFlagProviderGenerator parses and generates GetPFlagSet implementation to add PFlags for a given struct's fields. type PFlagProviderGenerator struct { - pkg *types.Package - st *types.Named - defaultVar *types.Var + pkg *types.Package + st *types.Named + defaultVar *types.Var + shouldBindDefaultVar bool } // This list is restricted because that's the only kinds viper parses out, otherwise it assumes strings. @@ -35,6 +36,7 @@ var allowedKinds = []types.Type{ types.Typ[types.Int64], types.Typ[types.Bool], types.Typ[types.String], + types.NewMap(types.Typ[types.String], types.Typ[types.String]), } type SliceOrArray interface { @@ -49,8 +51,8 @@ func capitalize(s string) string { return s } -func buildFieldForSlice(ctx context.Context, t SliceOrArray, name, goName, usage, defaultValue string) (FieldInfo, error) { - strategy := SliceRaw +func buildFieldForSlice(ctx context.Context, t SliceOrArray, name, goName, usage, defaultValue string, bindDefaultVar bool) (FieldInfo, error) { + strategy := Raw FlagMethodName := "StringSlice" typ := types.NewSlice(types.Typ[types.String]) emptyDefaultValue := `[]string{}` @@ -76,14 +78,59 @@ func buildFieldForSlice(ctx context.Context, t SliceOrArray, name, goName, usage } return FieldInfo{ - Name: name, - GoName: goName, - Typ: typ, - FlagMethodName: FlagMethodName, - DefaultValue: defaultValue, - UsageString: usage, - TestValue: testValue, - TestStrategy: strategy, + Name: name, + GoName: goName, + Typ: typ, + FlagMethodName: FlagMethodName, + DefaultValue: defaultValue, + UsageString: usage, + TestValue: testValue, + TestStrategy: strategy, + ShouldBindDefault: bindDefaultVar, + }, nil +} + +func buildFieldForMap(ctx context.Context, t *types.Map, name, goName, usage, defaultValue string, bindDefaultVar bool) (FieldInfo, error) { + strategy := Raw + FlagMethodName := "StringToString" + typ := types.NewMap(types.Typ[types.String], types.Typ[types.String]) + emptyDefaultValue := `nil` + if k, ok := t.Key().(*types.Basic); !ok || k.Kind() != types.String { + logger.Infof(ctx, "Key of type [%v] is not a basic type. It must be json unmarshalable or generation will fail.", t.Elem()) + } else if v, valueOk := t.Elem().(*types.Basic); !valueOk && !isJSONUnmarshaler(t.Elem()) { + return FieldInfo{}, + fmt.Errorf("map of type [%v] is not supported. Only basic slices or slices of json-unmarshalable types are supported", + t.Elem().String()) + } else { + logger.Infof(ctx, "Map[%v]%v is supported. using pflag maps.", k, t.Elem()) + strategy = Raw + if valueOk { + FlagMethodName = fmt.Sprintf("StringTo%v", capitalize(v.Name())) + typ = types.NewMap(k, v) + emptyDefaultValue = fmt.Sprintf(`map[%v]%v{}`, k.Name(), v.Name()) + } else { + // Value is not a basic type. Rely on json marshaling to unmarshal it + FlagMethodName = fmt.Sprintf("StringToString") + } + } + + if len(defaultValue) == 0 { + defaultValue = emptyDefaultValue + } + + testValue := `"a=1,b=2"` + + return FieldInfo{ + Name: name, + GoName: goName, + Typ: typ, + FlagMethodName: FlagMethodName, + DefaultValue: defaultValue, + UsageString: usage, + TestValue: testValue, + TestStrategy: strategy, + ShouldBindDefault: bindDefaultVar, + ShouldTestDefault: false, }, nil } @@ -121,7 +168,7 @@ func appendAccessors(accessors ...string) string { // met; encountered a basic type (e.g. string, int... etc.) or the field type implements UnmarshalJSON. // If passed a non-empty defaultValueAccessor, it'll be used to fill in default values instead of any default value // specified in pflag tag. -func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValueAccessor, fieldPath string) ([]FieldInfo, error) { +func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValueAccessor, fieldPath string, bindDefaultVar bool) ([]FieldInfo, error) { logger.Printf(ctx, "Finding all fields in [%v.%v.%v]", typ.Obj().Pkg().Path(), typ.Obj().Pkg().Name(), typ.Obj().Name()) @@ -187,14 +234,15 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue } fields = append(fields, FieldInfo{ - Name: tag.Name, - GoName: v.Name(), - Typ: t, - FlagMethodName: camelCase(t.String()), - DefaultValue: defaultValue, - UsageString: tag.Usage, - TestValue: `"1"`, - TestStrategy: JSON, + Name: tag.Name, + GoName: v.Name(), + Typ: t, + FlagMethodName: camelCase(t.String()), + DefaultValue: defaultValue, + UsageString: tag.Usage, + TestValue: `"1"`, + TestStrategy: JSON, + ShouldBindDefault: bindDefaultVar, }) case *types.Named: if _, isStruct := t.Underlying().(*types.Struct); !isStruct { @@ -211,10 +259,14 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue defaultValue = appendAccessors(defaultValueAccessor, fieldPath, v.Name()) if isStringer(t) { defaultValue = defaultValue + ".String()" - } else { + } else if isJSONMarshaler(t) { logger.Infof(ctx, "Field [%v] of type [%v] does not implement Stringer interface."+ " Will use %s.mustMarshalJSON() to get its default value.", defaultValueAccessor, v.Name(), t.String()) defaultValue = fmt.Sprintf("%s.mustMarshalJSON(%s)", defaultValueAccessor, defaultValue) + } else { + logger.Infof(ctx, "Field [%v] of type [%v] does not implement Stringer interface."+ + " Will use %s.mustMarshalJSON() to get its default value.", defaultValueAccessor, v.Name(), t.String()) + defaultValue = fmt.Sprintf("%s.mustJsonMarshal(%s)", defaultValueAccessor, defaultValue) } } @@ -229,49 +281,66 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue logger.Infof(logger.WithIndent(ctx, indent), "Type is json unmarhslalable.") fields = append(fields, FieldInfo{ - Name: tag.Name, - GoName: v.Name(), - Typ: types.Typ[types.String], - FlagMethodName: "String", - DefaultValue: defaultValue, - UsageString: tag.Usage, - TestValue: testValue, - TestStrategy: JSON, + Name: tag.Name, + GoName: v.Name(), + Typ: types.Typ[types.String], + FlagMethodName: "String", + DefaultValue: defaultValue, + UsageString: tag.Usage, + TestValue: testValue, + TestStrategy: JSON, + ShouldBindDefault: bindDefaultVar, }) } else { logger.Infof(ctx, "Traversing fields in type.") - nested, err := discoverFieldsRecursive(logger.WithIndent(ctx, indent), t, defaultValueAccessor, appendAccessors(fieldPath, v.Name())) + nested, err := discoverFieldsRecursive(logger.WithIndent(ctx, indent), t, defaultValueAccessor, appendAccessors(fieldPath, v.Name()), bindDefaultVar) if err != nil { return nil, err } for _, subField := range nested { fields = append(fields, FieldInfo{ - Name: fmt.Sprintf("%v.%v", tag.Name, subField.Name), - GoName: fmt.Sprintf("%v.%v", v.Name(), subField.GoName), - Typ: subField.Typ, - FlagMethodName: subField.FlagMethodName, - DefaultValue: subField.DefaultValue, - UsageString: subField.UsageString, - TestValue: subField.TestValue, - TestStrategy: subField.TestStrategy, + Name: fmt.Sprintf("%v.%v", tag.Name, subField.Name), + GoName: fmt.Sprintf("%v.%v", v.Name(), subField.GoName), + Typ: subField.Typ, + FlagMethodName: subField.FlagMethodName, + DefaultValue: subField.DefaultValue, + UsageString: subField.UsageString, + TestValue: subField.TestValue, + TestStrategy: subField.TestStrategy, + ShouldBindDefault: bindDefaultVar, }) } } case *types.Slice: logger.Infof(ctx, "[%v] is of a slice type with default value [%v].", tag.Name, tag.DefaultValue) + defaultValue := tag.DefaultValue - f, err := buildFieldForSlice(logger.WithIndent(ctx, indent), t, tag.Name, v.Name(), tag.Usage, tag.DefaultValue) + f, err := buildFieldForSlice(logger.WithIndent(ctx, indent), t, tag.Name, v.Name(), tag.Usage, defaultValue, bindDefaultVar) if err != nil { return nil, err } fields = append(fields, f) case *types.Array: - logger.Infof(ctx, "[%v] is of an array with default value [%v].", tag.Name, tag.DefaultValue) + logger.Infof(ctx, "[%v] is of an array type with default value [%v].", tag.Name, tag.DefaultValue) + defaultValue := tag.DefaultValue + + f, err := buildFieldForSlice(logger.WithIndent(ctx, indent), t, tag.Name, v.Name(), tag.Usage, defaultValue, bindDefaultVar) + if err != nil { + return nil, err + } + + fields = append(fields, f) + case *types.Map: + logger.Infof(ctx, "[%v] is of a map type with default value [%v].", tag.Name, tag.DefaultValue) + defaultValue := tag.DefaultValue + if len(defaultValueAccessor) > 0 { + defaultValue = appendAccessors(defaultValueAccessor, fieldPath, v.Name()) + } - f, err := buildFieldForSlice(logger.WithIndent(ctx, indent), t, tag.Name, v.Name(), tag.Usage, tag.DefaultValue) + f, err := buildFieldForMap(logger.WithIndent(ctx, indent), t, tag.Name, v.Name(), tag.Usage, defaultValue, bindDefaultVar) if err != nil { return nil, err } @@ -288,7 +357,7 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue // NewGenerator initializes a PFlagProviderGenerator for pflags files for targetTypeName struct under pkg. If pkg is not filled in, // it's assumed to be current package (which is expected to be the common use case when invoking pflags from // go:generate comments) -func NewGenerator(pkg, targetTypeName, defaultVariableName string) (*PFlagProviderGenerator, error) { +func NewGenerator(pkg, targetTypeName, defaultVariableName string, shouldBindDefaultVar bool) (*PFlagProviderGenerator, error) { ctx := context.Background() var err error @@ -334,9 +403,10 @@ func NewGenerator(pkg, targetTypeName, defaultVariableName string) (*PFlagProvid } return &PFlagProviderGenerator{ - st: st, - pkg: targetPackage, - defaultVar: defaultVar, + st: st, + pkg: targetPackage, + defaultVar: defaultVar, + shouldBindDefaultVar: shouldBindDefaultVar, }, nil } @@ -369,7 +439,7 @@ func (g PFlagProviderGenerator) Generate(ctx context.Context) (PFlagProvider, er defaultValueAccessor = g.defaultVar.Name() } - fields, err := discoverFieldsRecursive(ctx, g.st, defaultValueAccessor, "") + fields, err := discoverFieldsRecursive(ctx, g.st, defaultValueAccessor, "", g.shouldBindDefaultVar) if err != nil { return PFlagProvider{}, err } diff --git a/flytestdlib/cli/pflags/api/generator_test.go b/flytestdlib/cli/pflags/api/generator_test.go index cbff9382b8..e8240c8296 100644 --- a/flytestdlib/cli/pflags/api/generator_test.go +++ b/flytestdlib/cli/pflags/api/generator_test.go @@ -3,6 +3,9 @@ package api import ( "context" "flag" + "fmt" + "go/token" + "go/types" "io/ioutil" "os" "path/filepath" @@ -45,11 +48,10 @@ func TestElemValueOrNil(t *testing.T) { } func TestNewGenerator(t *testing.T) { - g, err := NewGenerator("github.com/flyteorg/flytestdlib/cli/pflags/api", "TestType", "DefaultTestType") + g, err := NewGenerator("github.com/flyteorg/flytestdlib/cli/pflags/api", "TestType", "DefaultTestType", false) if !assert.NoError(t, err) { t.FailNow() } - ctx := context.Background() p, err := g.Generate(ctx) if !assert.NoError(t, err) { @@ -93,4 +95,89 @@ func TestNewGenerator(t *testing.T) { goldenTestOutput, err := ioutil.ReadFile(filepath.Clean(goldenTestFilePath)) assert.NoError(t, err) assert.Equal(t, string(goldenTestOutput), string(testBytes)) + t.Run("empty package", func(t *testing.T) { + gen, err := NewGenerator("", "TestType", "DefaultTestType", false) + assert.Nil(t, err) + assert.NotNil(t, gen.GetTargetPackage()) + }) +} + +func TestBuildFieldForMap(t *testing.T) { + t.Run("supported : StringToString", func(t *testing.T) { + ctx := context.Background() + key := types.Typ[types.String] + elem := types.Typ[types.String] + typesMap := types.NewMap(key, elem) + name := "m" + goName := "StringMap" + usage := "I'm a map of strings" + defaultValue := "DefaultValue" + fieldInfo, err := buildFieldForMap(ctx, typesMap, name, goName, usage, defaultValue, false) + assert.Nil(t, err) + assert.NotNil(t, fieldInfo) + assert.Equal(t, "StringToString", fieldInfo.FlagMethodName) + assert.Equal(t, defaultValue, fieldInfo.DefaultValue) + }) + t.Run("unsupported : not a string type map", func(t *testing.T) { + ctx := context.Background() + key := types.Typ[types.Bool] + elem := types.Typ[types.Bool] + typesMap := types.NewMap(key, elem) + name := "m" + goName := "BoolMap" + usage := "I'm a map of bools" + defaultValue := "" + fieldInfo, err := buildFieldForMap(ctx, typesMap, name, goName, usage, defaultValue, false) + assert.Nil(t, err) + assert.NotNil(t, fieldInfo) + assert.Equal(t, "StringToString", fieldInfo.FlagMethodName) + assert.Equal(t, "nil", fieldInfo.DefaultValue) + }) + t.Run("unsupported : elem not a basic type", func(t *testing.T) { + ctx := context.Background() + key := types.Typ[types.String] + elem := &types.Interface{} + typesMap := types.NewMap(key, elem) + name := "m" + goName := "InterfaceMap" + usage := "I'm a map of interface values" + defaultValue := "" + fieldInfo, err := buildFieldForMap(ctx, typesMap, name, goName, usage, defaultValue, false) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("map of type [interface{/* incomplete */}] is not supported."+ + " Only basic slices or slices of json-unmarshalable types are supported"), err) + assert.NotNil(t, fieldInfo) + assert.Equal(t, "", fieldInfo.FlagMethodName) + assert.Equal(t, "", fieldInfo.DefaultValue) + }) + t.Run("supported : StringToFloat64", func(t *testing.T) { + ctx := context.Background() + key := types.Typ[types.String] + elem := types.Typ[types.Float64] + typesMap := types.NewMap(key, elem) + name := "m" + goName := "Float64Map" + usage := "I'm a map of float64" + defaultValue := "DefaultValue" + fieldInfo, err := buildFieldForMap(ctx, typesMap, name, goName, usage, defaultValue, false) + assert.Nil(t, err) + assert.NotNil(t, fieldInfo) + assert.Equal(t, "StringToFloat64", fieldInfo.FlagMethodName) + assert.Equal(t, defaultValue, fieldInfo.DefaultValue) + }) +} + +func TestDiscoverFieldsRecursive(t *testing.T) { + t.Run("empty struct", func(t *testing.T) { + ctx := context.Background() + defaultValueAccessor := "defaultAccessor" + fieldPath := "field.Path" + pkg := types.NewPackage("p", "p") + n1 := types.NewTypeName(token.NoPos, pkg, "T1", nil) + namedTypes := types.NewNamed(n1, new(types.Struct), nil) + //namedTypes := types.NewNamed(n1, nil, nil) + fields, err := discoverFieldsRecursive(ctx, namedTypes, defaultValueAccessor, fieldPath, false) + assert.Nil(t, err) + assert.Equal(t, len(fields), 0) + }) } diff --git a/flytestdlib/cli/pflags/api/sample.go b/flytestdlib/cli/pflags/api/sample.go index 6d8e2ab38d..51d681febe 100644 --- a/flytestdlib/cli/pflags/api/sample.go +++ b/flytestdlib/cli/pflags/api/sample.go @@ -22,6 +22,7 @@ type TestType struct { IgnoredMap map[string]string `json:"ignored-map" pflag:"-,"` StorageConfig storage.Config `json:"storage"` IntValue *int `json:"i"` + StringMap map[string]string `json:"m" pflag:",I'm a map of strings"` } type NestedType struct { diff --git a/flytestdlib/cli/pflags/api/templates.go b/flytestdlib/cli/pflags/api/templates.go index 15057374f2..31799eb16e 100644 --- a/flytestdlib/cli/pflags/api/templates.go +++ b/flytestdlib/cli/pflags/api/templates.go @@ -44,6 +44,15 @@ func ({{ .Name }}) elemValueOrNil(v interface{}) interface{} { return v } +func ({{ .Name }}) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func ({{ .Name }}) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -58,8 +67,12 @@ func ({{ .Name }}) mustMarshalJSON(v json.Marshaler) string { func (cfg {{ .Name }}) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("{{ .Name }}", pflag.ExitOnError) {{- range .Fields }} + {{- if .ShouldBindDefault }} + cmdFlags.{{ .FlagMethodName }}Var(&{{ .DefaultValue }}, fmt.Sprintf("%v%v", prefix, "{{ .Name }}"), {{ .DefaultValue }}, {{ .UsageString }}) + {{- else }} cmdFlags.{{ .FlagMethodName }}(fmt.Sprintf("%v%v", prefix, "{{ .Name }}"), {{ .DefaultValue }}, {{ .UsageString }}) {{- end }} + {{- end }} return cmdFlags } `)) @@ -154,7 +167,7 @@ func testDecodeJson_{{ .Name }}(t *testing.T, val, result interface{}) { assert.NoError(t, decode_{{ .Name }}(val, result)) } -func testDecodeSlice_{{ .Name }}(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_{{ .Name }}(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_{{ .Name }}(vStringSlice, result)) } @@ -172,6 +185,7 @@ func Test{{ .Name }}_SetFlags(t *testing.T) { {{ $ParentName := .Name }} {{- range .Fields }} t.Run("Test_{{ .Name }}", func(t *testing.T) { {{ $varName := print "v" .FlagMethodName }} + {{- if .ShouldTestDefault }} t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if {{ $varName }}, err := cmdFlags.Get{{ .FlagMethodName }}("{{ .Name }}"); err == nil { @@ -180,17 +194,18 @@ func Test{{ .Name }}_SetFlags(t *testing.T) { assert.FailNow(t, err.Error()) } }) + {{- end }} t.Run("Override", func(t *testing.T) { {{ if eq .TestStrategy "Json" }}testValue := {{ .TestValue }} - {{ else if eq .TestStrategy "SliceRaw" }}testValue := {{ .TestValue }} + {{ else if eq .TestStrategy "Raw" }}testValue := {{ .TestValue }} {{ else }}testValue := join_{{ $ParentName }}({{ .TestValue }}, ",") {{ end }} cmdFlags.Set("{{ .Name }}", testValue) if {{ $varName }}, err := cmdFlags.Get{{ .FlagMethodName }}("{{ .Name }}"); err == nil { {{ if eq .TestStrategy "Json" }}testDecodeJson_{{ $ParentName }}(t, fmt.Sprintf("%v", {{ print "v" .FlagMethodName }}), &actual.{{ .GoName }}) - {{ else if eq .TestStrategy "SliceRaw" }}testDecodeSlice_{{ $ParentName }}(t, {{ print "v" .FlagMethodName }}, &actual.{{ .GoName }}) - {{ else }}testDecodeSlice_{{ $ParentName }}(t, join_{{ $ParentName }}({{ print "v" .FlagMethodName }}, ","), &actual.{{ .GoName }}) + {{ else if eq .TestStrategy "Raw" }}testDecodeRaw_{{ $ParentName }}(t, {{ print "v" .FlagMethodName }}, &actual.{{ .GoName }}) + {{ else }}testDecodeRaw_{{ $ParentName }}(t, join_{{ $ParentName }}({{ print "v" .FlagMethodName }}, ","), &actual.{{ .GoName }}) {{ end }} } else { assert.FailNow(t, err.Error()) diff --git a/flytestdlib/cli/pflags/api/testdata/testtype.go b/flytestdlib/cli/pflags/api/testdata/testtype.go index 05feb6b62f..045a9c2c9a 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype.go @@ -28,6 +28,15 @@ func (TestType) elemValueOrNil(v interface{}) interface{} { return v } +func (TestType) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (TestType) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -47,7 +56,7 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.IntSlice(fmt.Sprintf("%v%v", prefix, "ints"), []int{12, 1}, "") cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "strs"), []string{"12", "1"}, "") cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "complexArr"), []string{}, "") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "c"), DefaultTestType.mustMarshalJSON(DefaultTestType.StringToJSON), "I'm a complex type but can be converted from string.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "c"), DefaultTestType.mustJsonMarshal(DefaultTestType.StringToJSON), "I'm a complex type but can be converted from string.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.type"), DefaultTestType.StorageConfig.Type, "Sets the type of storage to configure [s3/minio/local/mem/stow].") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.endpoint"), DefaultTestType.StorageConfig.Connection.Endpoint.String(), "URL for storage client to connect to.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.auth-type"), DefaultTestType.StorageConfig.Connection.AuthType, "Auth Type to use [iam, accesskey].") @@ -62,5 +71,6 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.Int64(fmt.Sprintf("%v%v", prefix, "storage.limits.maxDownloadMBs"), DefaultTestType.StorageConfig.Limits.GetLimitMegabytes, "Maximum allowed download size (in MBs) per call.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.defaultHttpClient.timeout"), DefaultTestType.StorageConfig.DefaultHTTPClient.Timeout.String(), "Sets time out on the http client.") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "i"), DefaultTestType.elemValueOrNil(DefaultTestType.IntValue).(int), "") + cmdFlags.StringToString(fmt.Sprintf("%v%v", prefix, "m"), DefaultTestType.StringMap, "I'm a map of strings") return cmdFlags } diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_test.go b/flytestdlib/cli/pflags/api/testdata/testtype_test.go index 3854a316a6..cb35842ef1 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype_test.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype_test.go @@ -84,7 +84,7 @@ func testDecodeJson_TestType(t *testing.T, val, result interface{}) { assert.NoError(t, decode_TestType(val, result)) } -func testDecodeSlice_TestType(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_TestType(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_TestType(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestTestType_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_str", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("str"); err == nil { - assert.Equal(t, string(DefaultTestType.StringValue), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -122,14 +114,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_bl", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("bl"); err == nil { - assert.Equal(t, bool(DefaultTestType.BoolValue), vBool) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -144,14 +128,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_nested.i", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vInt, err := cmdFlags.GetInt("nested.i"); err == nil { - assert.Equal(t, int(DefaultTestType.NestedType.IntValue), vInt) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -166,21 +142,13 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_ints", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vIntSlice, err := cmdFlags.GetIntSlice("ints"); err == nil { - assert.Equal(t, []int([]int{12, 1}), vIntSlice) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := join_TestType([]int{12, 1}, ",") cmdFlags.Set("ints", testValue) if vIntSlice, err := cmdFlags.GetIntSlice("ints"); err == nil { - testDecodeSlice_TestType(t, join_TestType(vIntSlice, ","), &actual.IntArray) + testDecodeRaw_TestType(t, join_TestType(vIntSlice, ","), &actual.IntArray) } else { assert.FailNow(t, err.Error()) @@ -188,21 +156,13 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_strs", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vStringSlice, err := cmdFlags.GetStringSlice("strs"); err == nil { - assert.Equal(t, []string([]string{"12", "1"}), vStringSlice) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := join_TestType([]string{"12", "1"}, ",") cmdFlags.Set("strs", testValue) if vStringSlice, err := cmdFlags.GetStringSlice("strs"); err == nil { - testDecodeSlice_TestType(t, join_TestType(vStringSlice, ","), &actual.StringArray) + testDecodeRaw_TestType(t, join_TestType(vStringSlice, ","), &actual.StringArray) } else { assert.FailNow(t, err.Error()) @@ -210,21 +170,13 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_complexArr", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vStringSlice, err := cmdFlags.GetStringSlice("complexArr"); err == nil { - assert.Equal(t, []string([]string{}), vStringSlice) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1,1" cmdFlags.Set("complexArr", testValue) if vStringSlice, err := cmdFlags.GetStringSlice("complexArr"); err == nil { - testDecodeSlice_TestType(t, vStringSlice, &actual.ComplexJSONArray) + testDecodeRaw_TestType(t, vStringSlice, &actual.ComplexJSONArray) } else { assert.FailNow(t, err.Error()) @@ -232,17 +184,9 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_c", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("c"); err == nil { - assert.Equal(t, string(DefaultTestType.mustMarshalJSON(DefaultTestType.StringToJSON)), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { - testValue := DefaultTestType.mustMarshalJSON(DefaultTestType.StringToJSON) + testValue := DefaultTestType.mustJsonMarshal(DefaultTestType.StringToJSON) cmdFlags.Set("c", testValue) if vString, err := cmdFlags.GetString("c"); err == nil { @@ -254,14 +198,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.type", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("storage.type"); err == nil { - assert.Equal(t, string(DefaultTestType.StorageConfig.Type), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -276,14 +212,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.connection.endpoint", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("storage.connection.endpoint"); err == nil { - assert.Equal(t, string(DefaultTestType.StorageConfig.Connection.Endpoint.String()), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := DefaultTestType.StorageConfig.Connection.Endpoint.String() @@ -298,14 +226,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.connection.auth-type", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("storage.connection.auth-type"); err == nil { - assert.Equal(t, string(DefaultTestType.StorageConfig.Connection.AuthType), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -320,14 +240,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.connection.access-key", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("storage.connection.access-key"); err == nil { - assert.Equal(t, string(DefaultTestType.StorageConfig.Connection.AccessKey), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -342,14 +254,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.connection.secret-key", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("storage.connection.secret-key"); err == nil { - assert.Equal(t, string(DefaultTestType.StorageConfig.Connection.SecretKey), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -364,14 +268,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.connection.region", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("storage.connection.region"); err == nil { - assert.Equal(t, string(DefaultTestType.StorageConfig.Connection.Region), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -386,14 +282,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.connection.disable-ssl", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("storage.connection.disable-ssl"); err == nil { - assert.Equal(t, bool(DefaultTestType.StorageConfig.Connection.DisableSSL), vBool) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -408,14 +296,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.container", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("storage.container"); err == nil { - assert.Equal(t, string(DefaultTestType.StorageConfig.InitContainer), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -430,14 +310,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.enable-multicontainer", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("storage.enable-multicontainer"); err == nil { - assert.Equal(t, bool(DefaultTestType.StorageConfig.MultiContainerEnabled), vBool) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -452,14 +324,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.cache.max_size_mbs", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vInt, err := cmdFlags.GetInt("storage.cache.max_size_mbs"); err == nil { - assert.Equal(t, int(DefaultTestType.StorageConfig.Cache.MaxSizeMegabytes), vInt) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -474,14 +338,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.cache.target_gc_percent", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vInt, err := cmdFlags.GetInt("storage.cache.target_gc_percent"); err == nil { - assert.Equal(t, int(DefaultTestType.StorageConfig.Cache.TargetGCPercent), vInt) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -496,14 +352,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.limits.maxDownloadMBs", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vInt64, err := cmdFlags.GetInt64("storage.limits.maxDownloadMBs"); err == nil { - assert.Equal(t, int64(DefaultTestType.StorageConfig.Limits.GetLimitMegabytes), vInt64) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -518,14 +366,6 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_storage.defaultHttpClient.timeout", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("storage.defaultHttpClient.timeout"); err == nil { - assert.Equal(t, string(DefaultTestType.StorageConfig.DefaultHTTPClient.Timeout.String()), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := DefaultTestType.StorageConfig.DefaultHTTPClient.Timeout.String() @@ -540,21 +380,27 @@ func TestTestType_SetFlags(t *testing.T) { }) }) t.Run("Test_i", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("i", testValue) if vInt, err := cmdFlags.GetInt("i"); err == nil { - assert.Equal(t, int(DefaultTestType.elemValueOrNil(DefaultTestType.IntValue).(int)), vInt) + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt), &actual.IntValue) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_m", func(t *testing.T) { t.Run("Override", func(t *testing.T) { - testValue := "1" + testValue := "a=1,b=2" - cmdFlags.Set("i", testValue) - if vInt, err := cmdFlags.GetInt("i"); err == nil { - testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt), &actual.IntValue) + cmdFlags.Set("m", testValue) + if vStringToString, err := cmdFlags.GetStringToString("m"); err == nil { + testDecodeRaw_TestType(t, vStringToString, &actual.StringMap) } else { assert.FailNow(t, err.Error()) diff --git a/flytestdlib/cli/pflags/api/types.go b/flytestdlib/cli/pflags/api/types.go index 1e6c1297ff..c4932bd0e9 100644 --- a/flytestdlib/cli/pflags/api/types.go +++ b/flytestdlib/cli/pflags/api/types.go @@ -11,18 +11,20 @@ type TestStrategy string const ( JSON TestStrategy = "Json" SliceJoined TestStrategy = "SliceJoined" - SliceRaw TestStrategy = "SliceRaw" + Raw TestStrategy = "Raw" ) type FieldInfo struct { - Name string - GoName string - Typ types.Type - DefaultValue string - UsageString string - FlagMethodName string - TestValue string - TestStrategy TestStrategy + Name string + GoName string + Typ types.Type + DefaultValue string + UsageString string + FlagMethodName string + TestValue string + TestStrategy TestStrategy + ShouldBindDefault bool + ShouldTestDefault bool } // Holds the finalized information passed to the template for evaluation. diff --git a/flytestdlib/cli/pflags/api/utils.go b/flytestdlib/cli/pflags/api/utils.go index b6a5b75baa..504aa0de97 100644 --- a/flytestdlib/cli/pflags/api/utils.go +++ b/flytestdlib/cli/pflags/api/utils.go @@ -24,6 +24,10 @@ func isJSONUnmarshaler(t types.Type) bool { return implementsAnyOfMethods(t, "UnmarshalJSON") } +func isJSONMarshaler(t types.Type) bool { + return implementsAnyOfMethods(t, "MarshalJSON") +} + func isStringer(t types.Type) bool { return implementsAnyOfMethods(t, "String") } diff --git a/flytestdlib/cli/pflags/cmd/root.go b/flytestdlib/cli/pflags/cmd/root.go index d03c207b5d..8ff376691c 100644 --- a/flytestdlib/cli/pflags/cmd/root.go +++ b/flytestdlib/cli/pflags/cmd/root.go @@ -12,8 +12,9 @@ import ( ) var ( - pkg string - defaultValuesVariable string + pkg string + defaultValuesVariable string + shouldBindDefaultVariable bool ) var root = cobra.Command{ @@ -33,6 +34,7 @@ type MyStruct struct { func init() { root.Flags().StringVarP(&pkg, "package", "p", ".", "Determines the source/destination package.") root.Flags().StringVar(&defaultValuesVariable, "default-var", "defaultConfig", "Points to a variable to use to load default configs. If specified & found, it'll be used instead of the values specified in the tag.") + root.Flags().BoolVar(&shouldBindDefaultVariable, "bind-default-var", false, "The generated PFlags Set will bind fields to the default variable.") } func Execute() error { @@ -46,7 +48,7 @@ func generatePflagsProvider(cmd *cobra.Command, args []string) error { } ctx := context.Background() - gen, err := api.NewGenerator(pkg, structName, defaultValuesVariable) + gen, err := api.NewGenerator(pkg, structName, defaultValuesVariable, shouldBindDefaultVariable) if err != nil { return err } diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 33c6dc2120..a1f0ab9b65 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -54,5 +54,4 @@ require ( gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/apimachinery v0.20.2 k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 - k8s.io/klog/v2 v2.5.0 // indirect ) diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index 14d9131b93..15e8a5a3ed 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -6,7 +6,6 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0 h1:GGslhk/BU052LPlnI1vpp3fcbUs+hQ3E+Doti/3/vF8= 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= @@ -36,7 +35,6 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0 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.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lUX4= cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= @@ -59,7 +57,9 @@ github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8K github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= @@ -71,6 +71,7 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= @@ -111,6 +112,7 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -140,6 +142,7 @@ 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/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= @@ -246,11 +249,14 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -272,6 +278,7 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -317,11 +324,13 @@ github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmK github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -330,7 +339,9 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -343,9 +354,11 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= @@ -485,10 +498,13 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -593,6 +609,7 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -835,6 +852,7 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -914,6 +932,7 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-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= From 1766c998b28770914b1b1d8bba263688c5884706 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Wed, 19 May 2021 17:00:38 -0700 Subject: [PATCH 124/191] config: Support converting string configs to []byte (#85) * config: Support converting string configs to []byte Signed-off-by: Haytham Abuelfutuh * Use base64 encoding to match yaml.unmarshal behavior Signed-off-by: Haytham Abuelfutuh * support string array since it seems mapstructure does that Signed-off-by: Haytham Abuelfutuh * Fix unit test value Signed-off-by: Haytham Abuelfutuh * Increase patch coverage Signed-off-by: Haytham Abuelfutuh --- flytestdlib/config/tests/testdata/config.yaml | 1 + flytestdlib/config/tests/types_test.go | 1 + flytestdlib/config/viper/viper.go | 31 +++++++++++ flytestdlib/config/viper/viper_test.go | 54 +++++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 flytestdlib/config/viper/viper_test.go diff --git a/flytestdlib/config/tests/testdata/config.yaml b/flytestdlib/config/tests/testdata/config.yaml index ca78698fae..9840a8696f 100755 --- a/flytestdlib/config/tests/testdata/config.yaml +++ b/flytestdlib/config/tests/testdata/config.yaml @@ -9,3 +9,4 @@ other-component: - world - '!' url-value: http://something.com + myByteArray: JDJhJDA2JHB4czFBa0c4MUt2cmhwbWwxUWlMU09RYVRrOWVlUHJVLzdZYWI5eTA3aDN4MFRnbGJhb1Q2 diff --git a/flytestdlib/config/tests/types_test.go b/flytestdlib/config/tests/types_test.go index 4d2303dcec..179ca61c83 100644 --- a/flytestdlib/config/tests/types_test.go +++ b/flytestdlib/config/tests/types_test.go @@ -25,6 +25,7 @@ type OtherComponentConfig struct { IntValue int `json:"int-val"` StringArray []string `json:"strings"` StringArrayWithDefaults []string `json:"strings-def"` + MyByteArray []byte `json:"myByteArray"` } type Item struct { diff --git a/flytestdlib/config/viper/viper.go b/flytestdlib/config/viper/viper.go index 78fcc8be5f..526516d57d 100644 --- a/flytestdlib/config/viper/viper.go +++ b/flytestdlib/config/viper/viper.go @@ -2,6 +2,7 @@ package viper import ( "context" + "encoding/base64" "encoding/json" "flag" "fmt" @@ -193,6 +194,35 @@ func sliceToMapHook(f reflect.Kind, t reflect.Kind, data interface{}) (interface return data, nil } +// stringToByteArray allows the conversion from strings to []byte. mapstructure's default behavior involve converting +// each element as a uint8 before assembling the final []byte. +func stringToByteArray(f, t reflect.Type, data interface{}) (interface{}, error) { + // Only handle string -> []byte conversion + if t.Kind() != reflect.Slice || t.Elem().Kind() != reflect.Uint8 { + return data, nil + } + + asStr := "" + if f.Kind() == reflect.String { + asStr = data.(string) + } else if f.Kind() == reflect.Slice && f.Elem().Kind() == reflect.String { + asSlice := data.([]string) + if len(asSlice) == 0 { + return data, nil + } + + asStr = asSlice[0] + } + + b := make([]byte, base64.StdEncoding.DecodedLen(len(asStr))) + n, err := base64.StdEncoding.Decode(b, []byte(asStr)) + if err != nil { + return nil, err + } + + return b[:n], nil +} + // This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the // object. Otherwise, it'll just pass on the original data. func jsonUnmarshallerHook(_, to reflect.Type, data interface{}) (interface{}, error) { @@ -298,6 +328,7 @@ func defaultDecoderConfig(output interface{}, opts ...viperLib.DecoderConfigOpti mapstructure.StringToTimeDurationHookFunc(), mapstructure.StringToSliceHookFunc(","), sliceToMapHook, + stringToByteArray, ), // Empty/zero fields before applying provided values. This avoids potentially undesired/unexpected merging logic. ZeroFields: true, diff --git a/flytestdlib/config/viper/viper_test.go b/flytestdlib/config/viper/viper_test.go new file mode 100644 index 0000000000..881d4436f2 --- /dev/null +++ b/flytestdlib/config/viper/viper_test.go @@ -0,0 +1,54 @@ +package viper + +import ( + "encoding/base64" + "reflect" + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_stringToByteArray(t *testing.T) { + t.Run("Expected types", func(t *testing.T) { + input := "hello world" + base64Encoded := base64.StdEncoding.EncodeToString([]byte(input)) + res, err := stringToByteArray(reflect.TypeOf(base64Encoded), reflect.TypeOf([]byte{}), base64Encoded) + assert.NoError(t, err) + assert.Equal(t, []byte(input), res) + }) + + t.Run("Expected types - array string", func(t *testing.T) { + input := []string{"hello world"} + base64Encoded := base64.StdEncoding.EncodeToString([]byte(input[0])) + res, err := stringToByteArray(reflect.TypeOf(input), reflect.TypeOf([]byte{}), []string{base64Encoded}) + assert.NoError(t, err) + assert.Equal(t, []byte(input[0]), res) + }) + + t.Run("Expected types - invalid encoding", func(t *testing.T) { + input := []string{"hello world"} + _, err := stringToByteArray(reflect.TypeOf(input), reflect.TypeOf([]byte{}), []string{"invalid base64"}) + assert.Error(t, err) + }) + + t.Run("Expected types - empty array string", func(t *testing.T) { + input := []string{"hello world"} + res, err := stringToByteArray(reflect.TypeOf(input), reflect.TypeOf([]byte{}), []string{}) + assert.NoError(t, err) + assert.Equal(t, []string{}, res) + }) + + t.Run("Unexpected types", func(t *testing.T) { + input := 5 + res, err := stringToByteArray(reflect.TypeOf(input), reflect.TypeOf([]byte{}), input) + assert.NoError(t, err) + assert.NotEqual(t, []byte("hello"), res) + }) + + t.Run("Unexpected types", func(t *testing.T) { + input := 5 + res, err := stringToByteArray(reflect.TypeOf(input), reflect.TypeOf(""), input) + assert.NoError(t, err) + assert.NotEqual(t, []byte("hello"), res) + }) +} From dd49e0b967ab4d347cbae8a0fee0fccf3166cad7 Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Fri, 28 May 2021 00:36:41 +0530 Subject: [PATCH 125/191] Added boilerplate automation (#84) --- .../workflows/boilerplate-automation.yml | 37 + flytestdlib/.golangci.yml | 4 +- flytestdlib/Makefile | 3 +- .../golang_support_tools/go.mod | 8 +- .../flyte/golang_support_tools/go.sum | 1267 +++++++++++++++++ .../golang_support_tools/tools.go | 0 .../golang_test_targets/Makefile | 8 +- .../golang_test_targets/Readme.rst | 6 +- .../golang_test_targets/download_tooling.sh | 8 +- .../golang_test_targets/goimports | 4 +- .../golangci_file/.golangci.yml | 4 +- .../{lyft => flyte}/golangci_file/Readme.rst | 2 +- .../{lyft => flyte}/golangci_file/update.sh | 4 +- .../pull_request_template/Readme.rst | 2 +- .../pull_request_template.md | 10 +- .../pull_request_template/update.sh | 4 +- .../lyft/golang_support_tools/go.sum | 558 -------- flytestdlib/boilerplate/update.cfg | 8 +- flytestdlib/boilerplate/update.sh | 20 +- flytestdlib/cli/pflags/api/generator.go | 3 +- flytestdlib/pull_request_template.md | 10 +- flytestdlib/random/weighted_random_list.go | 2 + 22 files changed, 1365 insertions(+), 607 deletions(-) create mode 100644 flytestdlib/.github/workflows/boilerplate-automation.yml rename flytestdlib/boilerplate/{lyft => flyte}/golang_support_tools/go.mod (61%) create mode 100644 flytestdlib/boilerplate/flyte/golang_support_tools/go.sum rename flytestdlib/boilerplate/{lyft => flyte}/golang_support_tools/tools.go (100%) rename flytestdlib/boilerplate/{lyft => flyte}/golang_test_targets/Makefile (82%) rename flytestdlib/boilerplate/{lyft => flyte}/golang_test_targets/Readme.rst (75%) rename flytestdlib/boilerplate/{lyft => flyte}/golang_test_targets/download_tooling.sh (86%) rename flytestdlib/boilerplate/{lyft => flyte}/golang_test_targets/goimports (56%) rename flytestdlib/boilerplate/{lyft => flyte}/golangci_file/.golangci.yml (72%) rename flytestdlib/boilerplate/{lyft => flyte}/golangci_file/Readme.rst (60%) rename flytestdlib/boilerplate/{lyft => flyte}/golangci_file/update.sh (67%) rename flytestdlib/boilerplate/{lyft => flyte}/pull_request_template/Readme.rst (55%) rename flytestdlib/boilerplate/{lyft => flyte}/pull_request_template/pull_request_template.md (54%) rename flytestdlib/boilerplate/{lyft => flyte}/pull_request_template/update.sh (61%) delete mode 100644 flytestdlib/boilerplate/lyft/golang_support_tools/go.sum diff --git a/flytestdlib/.github/workflows/boilerplate-automation.yml b/flytestdlib/.github/workflows/boilerplate-automation.yml new file mode 100644 index 0000000000..d4a76239be --- /dev/null +++ b/flytestdlib/.github/workflows/boilerplate-automation.yml @@ -0,0 +1,37 @@ +name: Update Boilerplate Automation +on: + workflow_dispatch: + +jobs: + update-boilerplate: + name: Update Boilerplate + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Update Boilerplate + run: | + make update_boilerplate + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.FLYTE_BOT_PAT }} + commit-message: Update Boilerplate + committer: Flyte-Bot + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: true + branch: flyte-bot-update-boilerplate + delete-branch: true + title: 'Update Boilerplate' + body: | + Update Boilerplate + - Auto-generated by [flyte-bot] + labels: | + boilerplate + team-reviewers: | + owners + maintainers + draft: false + diff --git a/flytestdlib/.golangci.yml b/flytestdlib/.golangci.yml index a414f33f79..5d53f35295 100644 --- a/flytestdlib/.golangci.yml +++ b/flytestdlib/.golangci.yml @@ -1,7 +1,7 @@ # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst run: skip-dirs: diff --git a/flytestdlib/Makefile b/flytestdlib/Makefile index 003dc5c1fb..db89bec84c 100644 --- a/flytestdlib/Makefile +++ b/flytestdlib/Makefile @@ -1,8 +1,9 @@ export REPOSITORY=flytestdlib -include boilerplate/lyft/golang_test_targets/Makefile +include boilerplate/flyte/golang_test_targets/Makefile .PHONY: update_boilerplate update_boilerplate: + @curl https://raw.githubusercontent.com/flyteorg/boilerplate/master/boilerplate/update.sh -o boilerplate/update.sh @boilerplate/update.sh # Generate golden files. Add test packages that generate golden files here. diff --git a/flytestdlib/boilerplate/lyft/golang_support_tools/go.mod b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod similarity index 61% rename from flytestdlib/boilerplate/lyft/golang_support_tools/go.mod rename to flytestdlib/boilerplate/flyte/golang_support_tools/go.mod index 6816461a59..7afee48e45 100644 --- a/flytestdlib/boilerplate/lyft/golang_support_tools/go.mod +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod @@ -1,11 +1,11 @@ -module github.com/lyft/boilerplate +module github.com/flyteorg/boilerplate -go 1.13 +go 1.16 require ( github.com/alvaroloes/enumer v1.1.2 - github.com/golangci/golangci-lint v1.22.2 - github.com/lyft/flytestdlib v0.2.31 + github.com/flyteorg/flytestdlib v0.3.22 + github.com/golangci/golangci-lint v1.38.0 github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 ) diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum b/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum new file mode 100644 index 0000000000..49939b689d --- /dev/null +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum @@ -0,0 +1,1267 @@ +4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a h1:wFEQiK85fRsEVF0CRrPAos5LoAryUsIX1kPW/WrIqFw= +4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0Ko= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0 h1:XgtDnVJRCPEUG21gjFiRPz4zI1Mjg16R+NYQjfmU4XY= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/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.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lUX4= +cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v51.0.0+incompatible h1:p7blnyJSjJqf5jflHbSGhIhEpXIgIFmYZNg5uwqweso= +github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= +github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= +github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= +github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us= +github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= +github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= +github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= +github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= +github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/ashanbrown/forbidigo v1.1.0 h1:SJOPJyqsrVL3CvR0veFZFmIM0fXS/Kvyikqvfphd0Z4= +github.com/ashanbrown/forbidigo v1.1.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= +github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a h1:/U9tbJzDRof4fOR51vwzWdIBsIH6R2yU0KG1MBRM2Js= +github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= +github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bkielbasa/cyclop v1.2.0 h1:7Jmnh0yL2DjKfw28p86YTd/B4lRGcNuu12sKE35sM7A= +github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= +github.com/bombsimon/wsl/v3 v3.2.0 h1:x3QUbwW7tPGcCNridvqmhSRthZMTALnkg5/1J+vaUas= +github.com/bombsimon/wsl/v3 v3.2.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= +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= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.6 h1:Tsy7EppNow2pDC0jN7Hsmcb6mHd71ZbI1vFissRBtc0= +github.com/charithe/durationcheck v0.0.6/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= +github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/daixiang0/gci v0.2.8 h1:1mrIGMBQsBu0P7j7m1M8Lb+ZeZxsZL+jyGX4YoMJJpg= +github.com/daixiang0/gci v0.2.8/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= +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/denis-tingajkin/go-header v0.4.2 h1:jEeSF4sdv8/3cT/WY8AgDHUoItNSoEZ7qg9dX7pc218= +github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 h1:qxIJwfSemSCqhG3/lEw1Rm+wYbegjuKsqy0ZqnIpL14= +github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0/go.mod h1:KfdIkmkpVY3n2sc1ykFj01uMviOiXH2HMhUCvA5FYGg= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= +github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= +github.com/esimonov/ifshort v1.0.1 h1:p7hlWD15c9XwvwxYg3W7f7UZHmwg7l9hC0hBiF95gd0= +github.com/esimonov/ifshort v1.0.1/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/flyteorg/flytestdlib v0.3.22 h1:nJEPaCdxzXBaeg2p4fdo3I3Ua09NedFRaUwuLafLEdw= +github.com/flyteorg/flytestdlib v0.3.22/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +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= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fzipp/gocyclo v0.3.1 h1:A9UeX3HJSXTBzvHzhqoYVuE0eAhe+aM8XBCCwsPMZOc= +github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-critic/go-critic v0.5.4 h1:fPNMqImVjELN6Du7NVVuvKA4cgASNmc7e4zSYQCOnv8= +github.com/go-critic/go-critic v0.5.4/go.mod h1:cjB4YGw+n/+X8gREApej7150Uyy1Tg8If6F2XOAUXNE= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= +github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0 h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= +github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg= +github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= +github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-toolsmith/typep v1.0.2 h1:8xdsa1+FSIH/RhEkgnD1j2CJOy5mNllW1Q9tRiYwvlk= +github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b h1:khEcpUM4yFcxg4/FHQWkvVRmgijNXRfzkIDHh23ggEo= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= +github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= +github.com/golangci/golangci-lint v1.38.0 h1:hgZsLRzZrjhpp44Ak+fhXNzgrbDF39ETf22a+Jd3fJQ= +github.com/golangci/golangci-lint v1.38.0/go.mod h1:Knp/sd5ATrVp7EOzWzwIIFH+c8hUfpW+oOQb8NvdZDo= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/misspell v0.3.5 h1:pLzmVdl3VxTOncgzHcvLOKirdvcx/TydsClUQXTehjo= +github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5 h1:c9Mqqrm/Clj5biNaG7rABrmwUq88nHh0uABo2b/WYmc= +github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +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/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= +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.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gookit/color v1.3.6/go.mod h1:R3ogXq2B9rTbXoSHJ1HyUVAZ3poOJHpd9nQmyGZsfvQ= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254 h1:Nb2aRlC404yz7gQIfRZxX9/MLvQiqXyiBTJtgAy6yrI= +github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= +github.com/gostaticanalysis/analysisutil v0.4.1 h1:/7clKqrVfiVwiBQLM0Uke4KvXnO6JcCTS7HwF2D6wG8= +github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= +github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= +github.com/gostaticanalysis/comment v1.4.1 h1:xHopR5L2lRz6OsjH4R2HG5wRhW9ySl3FsHIvi5pcXwc= +github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= +github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5 h1:rx8127mFPqXXsfPSo8BwnIU97MKFZc89WHAHt8PwDVY= +github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= +github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= +github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= +github.com/graymeta/stow v0.2.7 h1:b31cB1Ylw/388sYSZxnmpjT2QxC21AaQ8fRnUtE13b4= +github.com/graymeta/stow v0.2.7/go.mod h1:JAs139Zr29qfsecy7b+h9DRsWXbFbsd7LCrbCDYI84k= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +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/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +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= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jgautheron/goconst v1.4.0 h1:hp9XKUpe/MPyDamUbfsrGpe+3dnY2whNK4EtB86dvLM= +github.com/jgautheron/goconst v1.4.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d h1:BYDZtm80MLJpTWalkwHxNnIbO/2akQHERcfLq4TbIWE= +github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d/go.mod h1:/EZlaYCnEX24i7qdVhT9du5JrtFWYRQr67bVgR7JJC8= +github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= +github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0 h1:exZBMUS/kB/AhxSj/9lIIxhqkCpXXdKScjFWQUTbi3M= +github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.6.0 h1:YTDO4pNy7AUN/021p+JGHycQyYNIyMoenM1YDVK6RlY= +github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.4.0 h1:2Nx7XbdbE/BYZeoip2mURKUdtHQRuy6Ug+wR7K9ywNM= +github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= +github.com/kunwardeep/paralleltest v1.0.2 h1:/jJRv0TiqPoEy/Y8dQxCFJhD56uS/pnvtatgTZBHokU= +github.com/kunwardeep/paralleltest v1.0.2/go.mod h1:ZPqNm1fVHPllh5LPVujzbVz1JN2GhLxSfY+oqUsvG30= +github.com/kyoh86/exportloopref v0.1.8 h1:5Ry/at+eFdkX9Vsdw3qU4YkvGtzuVfzT4X7S77LoN/M= +github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= +github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= +github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/maratori/testpackage v1.0.1 h1:QtJ5ZjqapShm0w5DosRjg0PRlSdAdlx+W6cCKoALdbQ= +github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= +github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 h1:pWxk9e//NbPwfxat7RXkts09K+dEBJWakUWwICVqYbA= +github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= +github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +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/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= +github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= +github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81 h1:QASJXOGm2RZ5Ardbc86qNFvby9AqkLDibfChMtAg5QM= +github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/mgechev/revive v1.0.3 h1:z3FL6IFFN3JKzHYHD8O1ExH9g/4lAGJ5x1+9rPZgsFg= +github.com/mgechev/revive v1.0.3/go.mod h1:POGGZagSo/0frdr7VeAifzS5Uka0d0GPiM35MsTO8nE= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/moricho/tparallel v0.2.1 h1:95FytivzT6rYzdJLdtfn6m1bfFJylOJK41+lgv/EHf4= +github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= +github.com/mozilla/tls-observatory v0.0.0-20201209171846-0547674fceff/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nakabonne/nestif v0.3.0 h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw= +github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88 h1:o+O3Cd1HO9CTgxE3/C8p5I5Y4C0yYWbF8d4IkfOLtcQ= +github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= +github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= +github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nishanths/exhaustive v0.1.0 h1:kVlMw8h2LHPMGUVqUj6230oQjjTMFjwcZrnkhXzFfl8= +github.com/nishanths/exhaustive v0.1.0/go.mod h1:S1j9110vxV1ECdCudXRkeMnFQ/DQk9ajLT0Uf2MYZQQ= +github.com/nishanths/predeclared v0.2.1 h1:1TXtjmy4f3YCFjTxRd8zcFHOmoUir+gp0ESzjFzG2sw= +github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +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/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= +github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= +github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.4 h1:NiTx7EEvBzu9sFOD1zORteLSt3o8gnlvZZwSE9TnY9U= +github.com/onsi/gomega v1.10.4/go.mod h1:g/HbgYopi++010VEqkFgJHKC09uJiW9UkXvMUuKHUCQ= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +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= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 h1:/I3lTljEEDNYLho3/FUB7iD/oc2cEFgVmbHzV+O0PtU= +github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1/go.mod h1:eD5JxqMiuNYyFNmyY9rkJ/slN8y59oEu4Ei7F8OoKWQ= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= +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= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +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/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f h1:xAw10KgJqG5NJDfmRqJ05Z0IFblKumjtMeyiOLxj3+4= +github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= +github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +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/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +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.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +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.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +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/prometheus/procfs v0.3.0 h1:Uehi/mxLK0eiUc0H0++5tpMGTexB8wZ598MIgU8VpDM= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= +github.com/quasilyte/go-ruleguard v0.3.0 h1:A3OfpsK2ynOTbz/KMi62qWzignjGCOZVChATSf4P+A0= +github.com/quasilyte/go-ruleguard v0.3.0/go.mod h1:p2miAhLp6fERzFNbcuQ4bevXs8rgK//uCHsUDkumITg= +github.com/quasilyte/go-ruleguard/dsl v0.0.0-20210106184943-e47d54850b18/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.0.0-20210115110123-c73ee1cbff1f/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= +github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 h1:L8QM9bvf68pVdQ3bCFZMDmnt9yqcMBro1pC7F+IPYMY= +github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.2.0 h1:YWfhGOrXwLGiqcC/u5EqG6YeS8nh+1fw0HEc85CVZro= +github.com/ryancurrah/gomodguard v1.2.0/go.mod h1:rNqbC4TOIdUDcVMSIpNNAzTbzXAZa6W5lnUepvuMMgQ= +github.com/ryanrolds/sqlclosecheck v0.3.0 h1:AZx+Bixh8zdUBxUA1NxbxVAS78vTPq4rCb8OUZI9xFw= +github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sanposhiho/wastedassign v0.1.3 h1:qIMpTh4NGZYRbFJ+DSpLoVn8F4SLciX2afRvXPefC7w= +github.com/sanposhiho/wastedassign v0.1.3/go.mod h1:LGpq5Hsv74QaqM47WtIsRSF/ik9kqk07kchgv66tLVE= +github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/securego/gosec/v2 v2.6.1 h1:+KCw+uz16FYfFyJ/A5aU6uP7mnrL+j1TbDnk1yN+8R0= +github.com/securego/gosec/v2 v2.6.1/go.mod h1:I76p3NTHBXsGhybUW+cEQ692q2Vp+A0Z6ZLzDIZy+Ao= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= +github.com/shirou/gopsutil/v3 v3.21.1/go.mod h1:igHnfak0qnw1biGeI2qKQvu0ZkwvEkUcCLlYhZzdr/4= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= +github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sonatard/noctx v0.0.1 h1:VC1Qhl6Oxx9vvWo3UDgrGXYCeKCe3Wbw7qAWL6FrmTY= +github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/go-diff v0.6.1 h1:hmA1LzxW0n1c3Q4YbrFgg4P99GSnebYa3x8gr0HZqLQ= +github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.5.1 h1:VHu76Lk0LSP1x254maIu2bplkWpfBWI+B+6fdoZprcg= +github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/ssgreg/nlreturn/v2 v2.1.0 h1:6/s4Rc49L6Uo6RLjhWZGBpWWjfzk2yrf1nIW8m4wgVA= +github.com/ssgreg/nlreturn/v2 v2.1.0/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= +github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b h1:HxLVTlqcHhFAz3nWUcuvpH7WuOMv8LQoCWmruLfFH2U= +github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= +github.com/tetafro/godot v1.4.4 h1:VAtLEoAMmopIzHVWVBrztjVWDeYm1OD/DKqhqXR4828= +github.com/tetafro/godot v1.4.4/go.mod h1:FVDd4JuKliW3UgjswZfJfHq4vAx0bD/Jd5brJjGeaz4= +github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94 h1:ig99OeTyDwQWhPe2iw9lwfQVF1KB3Q4fpP3X7/2VBG8= +github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomarrell/wrapcheck v0.0.0-20201130113247-1683564d9756 h1:zV5mu0ESwb+WnzqVaW2z1DdbAP0S46UtjY8DHQupQP4= +github.com/tomarrell/wrapcheck v0.0.0-20201130113247-1683564d9756/go.mod h1:yiFB6fFoV7saXirUGfuK+cPtUh4NX/Hf5y2WC2lehu0= +github.com/tommy-muehle/go-mnd/v2 v2.3.1 h1:a1S4+4HSXDJMgeODJH/t0EEKxcVla6Tasw+Zx9JJMog= +github.com/tommy-muehle/go-mnd/v2 v2.3.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iLA= +github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg= +github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= +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/uudashr/gocognit v1.0.1 h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjPs= +github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= +github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +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/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok= +go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/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= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/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-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/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/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 h1:55H5j7lotzuFCEOKDsMch+fRNUQ9DgtyHOUP31FNqKc= +golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013/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/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/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= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/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-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201024232916-9f70ab9862d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/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-20201214210602-f9fddec55a1e/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/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +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/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +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-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/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-20180525024113-a5b4c53f6e8b/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= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524210228-3d17549cdc6b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200828161849-5deb26317202/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20200915173823-2db8f0ff891c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20200918232735-d647fc253266/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201011145850-ed2f50202694/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210102185154-773b96fafca2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/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/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= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.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.31.0/go.mod h1:CL+9IBCa2WWU6gRuBWaKqGWLFFwbEUXkfeMkHLQWYWo= +google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +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/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/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200831141814-d751682dd103/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200914193844-75d14daec038/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200921151605-7abf4a1a14d5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 h1:uLBY0yHDCj2PMQ98KWDSIDFwn9zK2zh+tgWtbvPPBjI= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/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= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= +google.golang.org/grpc v1.35.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= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +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/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/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/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/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/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/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= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.1.2 h1:SMdYLJl312RXuxXziCCHhRsp/tvct9cGKey0yv95tZM= +honnef.co/go/tools v0.1.2/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= +k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= +k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= +k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 h1:d+LBRNY3c/KGp7lDblRlUJkayx4Vla7WUTIazoGMdYo= +k8s.io/client-go v0.0.0-20210217172142-7279fc64d847/go.mod h1:q0EaghmVye2uui19vxSZ2NG6ssgUWgjudO6vrwXneSI= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= +k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +mvdan.cc/gofumpt v0.1.0 h1:hsVv+Y9UsZ/mFZTxJZuHVI6shSQCtzZ11h1JEFPAZLw= +mvdan.cc/gofumpt v0.1.0/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= +mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 h1:HT3e4Krq+IE44tiN36RvVEb6tvqeIdtsVSsxmNPqlFU= +mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/flytestdlib/boilerplate/lyft/golang_support_tools/tools.go b/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go similarity index 100% rename from flytestdlib/boilerplate/lyft/golang_support_tools/tools.go rename to flytestdlib/boilerplate/flyte/golang_support_tools/tools.go diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile b/flytestdlib/boilerplate/flyte/golang_test_targets/Makefile similarity index 82% rename from flytestdlib/boilerplate/lyft/golang_test_targets/Makefile rename to flytestdlib/boilerplate/flyte/golang_test_targets/Makefile index 5abd2ed607..21d8b5b776 100644 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/Makefile +++ b/flytestdlib/boilerplate/flyte/golang_test_targets/Makefile @@ -1,12 +1,12 @@ # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst .PHONY: download_tooling download_tooling: #download dependencies (including test deps) for the package - @boilerplate/lyft/golang_test_targets/download_tooling.sh + @boilerplate/flyte/golang_test_targets/download_tooling.sh .PHONY: lint lint: download_tooling #lints the package for common code smells @@ -16,7 +16,7 @@ lint: download_tooling #lints the package for common code smells # skips 'vendor' .PHONY: goimports goimports: - @boilerplate/lyft/golang_test_targets/goimports + @boilerplate/flyte/golang_test_targets/goimports .PHONY: mod_download mod_download: #download dependencies (including test deps) for the package diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/Readme.rst b/flytestdlib/boilerplate/flyte/golang_test_targets/Readme.rst similarity index 75% rename from flytestdlib/boilerplate/lyft/golang_test_targets/Readme.rst rename to flytestdlib/boilerplate/flyte/golang_test_targets/Readme.rst index 3466e30c55..f9d890fdd7 100644 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/Readme.rst +++ b/flytestdlib/boilerplate/flyte/golang_test_targets/Readme.rst @@ -15,17 +15,17 @@ Provides a ``test_benchmark`` target for benchmark tests. **To Enable:** -Add ``lyft/golang_test_targets`` to your ``boilerplate/update.cfg`` file. +Add ``flyteorg/golang_test_targets`` to your ``boilerplate/update.cfg`` file. Make sure you're using ``go mod`` for dependency management. Provide a ``.golangci`` configuration (the lint target requires it). -Add ``include boilerplate/lyft/golang_test_targets/Makefile`` in your main ``Makefile`` _after_ your REPOSITORY environment variable +Add ``include boilerplate/flyte/golang_test_targets/Makefile`` in your main ``Makefile`` _after_ your REPOSITORY environment variable :: REPOSITORY= - include boilerplate/lyft/golang_test_targets/Makefile + include boilerplate/flyte/golang_test_targets/Makefile (this ensures the extra make targets get included in your main Makefile) diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/download_tooling.sh b/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh similarity index 86% rename from flytestdlib/boilerplate/lyft/golang_test_targets/download_tooling.sh rename to flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh index 98f9751fd4..25d4ac3dc1 100755 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/download_tooling.sh +++ b/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -7,7 +7,7 @@ # pins. To facilitate this, we're maintaining two sets of go.mod/sum files - the second one only for tooling. This is # the same approach that go 1.14 will take as well. # See: -# https://github.com/lyft/flyte/issues/129 +# https://github.com/flyteorg/flyte/issues/129 # https://github.com/golang/go/issues/30515 for some background context # https://github.com/go-modules-by-example/index/blob/5ec250b4b78114a55001bd7c9cb88f6e07270ea5/010_tools/README.md @@ -16,15 +16,15 @@ set -e # List of tools to go get # In the format of ":" or ":" if no cli tools=( - "github.com/vektra/mockery" - "github.com/lyft/flytestdlib/cli/pflags" + "github.com/vektra/mockery/cmd/mockery" + "github.com/flyteorg/flytestdlib/cli/pflags" "github.com/golangci/golangci-lint/cmd/golangci-lint" "github.com/alvaroloes/enumer" ) tmp_dir=$(mktemp -d -t gotooling-XXX) echo "Using temp directory ${tmp_dir}" -cp -R boilerplate/lyft/golang_support_tools/* $tmp_dir +cp -R boilerplate/flyte/golang_support_tools/* $tmp_dir pushd "$tmp_dir" for tool in "${tools[@]}" diff --git a/flytestdlib/boilerplate/lyft/golang_test_targets/goimports b/flytestdlib/boilerplate/flyte/golang_test_targets/goimports similarity index 56% rename from flytestdlib/boilerplate/lyft/golang_test_targets/goimports rename to flytestdlib/boilerplate/flyte/golang_test_targets/goimports index 160525a8cc..ba0d6d8718 100755 --- a/flytestdlib/boilerplate/lyft/golang_test_targets/goimports +++ b/flytestdlib/boilerplate/flyte/golang_test_targets/goimports @@ -1,8 +1,8 @@ #!/usr/bin/env bash # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*") diff --git a/flytestdlib/boilerplate/lyft/golangci_file/.golangci.yml b/flytestdlib/boilerplate/flyte/golangci_file/.golangci.yml similarity index 72% rename from flytestdlib/boilerplate/lyft/golangci_file/.golangci.yml rename to flytestdlib/boilerplate/flyte/golangci_file/.golangci.yml index a414f33f79..5d53f35295 100644 --- a/flytestdlib/boilerplate/lyft/golangci_file/.golangci.yml +++ b/flytestdlib/boilerplate/flyte/golangci_file/.golangci.yml @@ -1,7 +1,7 @@ # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst run: skip-dirs: diff --git a/flytestdlib/boilerplate/lyft/golangci_file/Readme.rst b/flytestdlib/boilerplate/flyte/golangci_file/Readme.rst similarity index 60% rename from flytestdlib/boilerplate/lyft/golangci_file/Readme.rst rename to flytestdlib/boilerplate/flyte/golangci_file/Readme.rst index ba5d2b61ce..e4cbd18b96 100644 --- a/flytestdlib/boilerplate/lyft/golangci_file/Readme.rst +++ b/flytestdlib/boilerplate/flyte/golangci_file/Readme.rst @@ -5,4 +5,4 @@ Provides a ``.golangci`` file with the linters we've agreed upon. **To Enable:** -Add ``lyft/golangci_file`` to your ``boilerplate/update.cfg`` file. +Add ``flyteorg/golangci_file`` to your ``boilerplate/update.cfg`` file. diff --git a/flytestdlib/boilerplate/lyft/golangci_file/update.sh b/flytestdlib/boilerplate/flyte/golangci_file/update.sh similarity index 67% rename from flytestdlib/boilerplate/lyft/golangci_file/update.sh rename to flytestdlib/boilerplate/flyte/golangci_file/update.sh index 9e9e6c1f46..ab2f85c680 100755 --- a/flytestdlib/boilerplate/lyft/golangci_file/update.sh +++ b/flytestdlib/boilerplate/flyte/golangci_file/update.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst set -e diff --git a/flytestdlib/boilerplate/lyft/pull_request_template/Readme.rst b/flytestdlib/boilerplate/flyte/pull_request_template/Readme.rst similarity index 55% rename from flytestdlib/boilerplate/lyft/pull_request_template/Readme.rst rename to flytestdlib/boilerplate/flyte/pull_request_template/Readme.rst index b85a4ea121..ee54437252 100644 --- a/flytestdlib/boilerplate/lyft/pull_request_template/Readme.rst +++ b/flytestdlib/boilerplate/flyte/pull_request_template/Readme.rst @@ -5,4 +5,4 @@ Provides a Pull Request template. **To Enable:** -Add ``lyft/golang_test_targets`` to your ``boilerplate/update.cfg`` file. +Add ``flyteorg/golang_test_targets`` to your ``boilerplate/update.cfg`` file. diff --git a/flytestdlib/boilerplate/lyft/pull_request_template/pull_request_template.md b/flytestdlib/boilerplate/flyte/pull_request_template/pull_request_template.md similarity index 54% rename from flytestdlib/boilerplate/lyft/pull_request_template/pull_request_template.md rename to flytestdlib/boilerplate/flyte/pull_request_template/pull_request_template.md index d2becf38b7..d7699558be 100644 --- a/flytestdlib/boilerplate/lyft/pull_request_template/pull_request_template.md +++ b/flytestdlib/boilerplate/flyte/pull_request_template/pull_request_template.md @@ -1,3 +1,9 @@ +## Read then delete + +- Make sure to use a concise title for the pull-request. +- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version +will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump) + # TL;DR _Please replace this text with a description of what this PR accomplishes._ @@ -18,9 +24,9 @@ _Please replace this text with a description of what this PR accomplishes._ _How did you fix the bug, make the feature etc. Link to any design docs etc_ ## Tracking Issue -https://github.com/lyft/flyte/issues/ +https://github.com/flyteorg/flyte/issues/ ## Follow-up issue _NA_ OR -_https://github.com/lyft/flyte/issues/_ +_https://github.com/flyteorg/flyte/issues/_ diff --git a/flytestdlib/boilerplate/lyft/pull_request_template/update.sh b/flytestdlib/boilerplate/flyte/pull_request_template/update.sh similarity index 61% rename from flytestdlib/boilerplate/lyft/pull_request_template/update.sh rename to flytestdlib/boilerplate/flyte/pull_request_template/update.sh index 13f0c3b57d..051e9dbce0 100755 --- a/flytestdlib/boilerplate/lyft/pull_request_template/update.sh +++ b/flytestdlib/boilerplate/flyte/pull_request_template/update.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst set -e diff --git a/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum b/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum deleted file mode 100644 index 81e0469630..0000000000 --- a/flytestdlib/boilerplate/lyft/golang_support_tools/go.sum +++ /dev/null @@ -1,558 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.47.0 h1:1JUtpcY9E7+eTospEwWS2QXP3DEn7poB3E2j0jN74mM= -cloud.google.com/go v0.47.0/go.mod h1:5p3Ky/7f3N10VBkhuR5LFtddroTiMyjZV/Kj5qOQFxU= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible h1:/x4W7ZQV4PHJYnLUgKubojM8T+zlFEDdaBazAnA/QCY= -github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-autorest/autorest v0.9.2 h1:6AWuh3uWrsZJcNoCHrCF/+g4aKPCU39kaMO6/qrnK/4= -github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us= -github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= -github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aws/aws-sdk-go v1.25.16 h1:k7Fy6T/uNuLX6zuayU/TJoP7yMgGcJSkZpF7QVjwYpA= -github.com/aws/aws-sdk-go v1.25.16/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bombsimon/wsl/v2 v2.0.0 h1:+Vjcn+/T5lSrO8Bjzhk4v14Un/2UyCA1E3V5j9nwTkQ= -github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coocood/freecache v1.1.0 h1:ENiHOsWdj1BrrlPwblhbn4GdAsMymK3pZORJ+bJGAjA= -github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -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 h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 h1:qxIJwfSemSCqhG3/lEw1Rm+wYbegjuKsqy0ZqnIpL14= -github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0/go.mod h1:KfdIkmkpVY3n2sc1ykFj01uMviOiXH2HMhUCvA5FYGg= -github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= -github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= -github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structtag v1.1.0 h1:6j4mUV/ES2duvnAzKMFkN6/A5mCaNYPD3xfbAkLLOF8= -github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 h1:SmsgwFZy9pdTk/k8BZz40D3P5umP5+Ejt3hAi0paBNQ= -github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-critic/go-critic v0.4.0 h1:sXD3pix0wDemuPuSlrXpJNNYXlUiKiysLrtPVQmxkzI= -github.com/go-critic/go-critic v0.4.0/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-lintpack/lintpack v0.5.2 h1:DI5mA3+eKdWeJ40nU4d6Wc26qmdG8RCi/btYq0TuRN0= -github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0 h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= -github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= -github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= -github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0 h1:zKymWyA1TRYvqYrYDrfEMZULyrhcnGY3x7LDKU2XQaA= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b h1:ekuhfTjngPhisSjOJ0QWKpPQE8/rbknHaes6WVJj5Hw= -github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc h1:55rEp52jU6bkyslZ1+C/7NGfpQsEc6pxGLAGDOctqbw= -github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/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 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6 h1:YYWNAGTKWhKpcLLt7aSj/odlKrSrelQwlovBpDuf19w= -github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3 h1:pe9JHs3cHHDQgOFXJJdYkK6fLz2PWyYtP4hthoCMvs8= -github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= -github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee h1:J2XAy40+7yz70uaOiMbNnluTg7gyQhtGqLQncQh+4J8= -github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.22.2 h1:iaihss3Tf6NvZVjun3lHimKSgofPV1+FqE/cbehoiRQ= -github.com/golangci/golangci-lint v1.22.2/go.mod h1:2Bj42k6hPQFTRxkDb7S3TQ+EsnumZXOmIYNqlQrp0FI= -github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc h1:gLLhTLMk2/SutryVJ6D4VZCU3CUqr8YloG7FPIBWFpI= -github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770 h1:EL/O5HGrF7Jaq0yNhBLucz9hTuRzj2LdwGBOaENgxIk= -github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 h1:leSNB7iYzLYSSx3J/s5sVf4Drkc68W2wm4Ixh/mr0us= -github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= -github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0 h1:HVfrLniijszjS1aiNg8JbBMO2+E1WIQ+j/gL4SQqGPg= -github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= -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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3 h1:JVnpOZS+qxli+rgVl98ILOXVNbW+kb5wcxeGx8ShUIw= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7 h1:oIYi27Ruo2k5dxukdOisCSZrowkg70jxxuaPZck9+ic= -github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7/go.mod h1:B24dekNjtWVeREK+dyMHtI22d85VzCT+sX5bVWDtjoA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/lyft/flytestdlib v0.2.31 h1:JAOSGwy/wLprhq1KR9zxekBqnKdSlAQQG1x4KQe+hlI= -github.com/lyft/flytestdlib v0.2.31/go.mod h1:/fqNXKCGChEvMzcRapVq6vDM69Vlusl+bCj7foToaUQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb h1:RHba4YImhrUVQDHUCe2BNSOz4tVy2yGyXhvYDvxGgeE= -github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -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/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E= -github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= -github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7 h1:2FttUGr9cza0JNOUDHeVWo4wVGk92m8bralgdbAeYJY= -github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 h1:/I3lTljEEDNYLho3/FUB7iD/oc2cEFgVmbHzV+O0PtU= -github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1/go.mod h1:eD5JxqMiuNYyFNmyY9rkJ/slN8y59oEu4Ei7F8OoKWQ= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.5.0 h1:5BakdOZdtKJ1FFk6QdL8iSGrMWsXgchNJcrnarjbmJQ= -github.com/pelletier/go-toml v1.5.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/satori/uuid v1.2.0 h1:6TFY4nxn5XwBx0gDfzbEMCNT6k4N/4FNIuN8RACZ0KI= -github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU= -github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d h1:BzRvVq1EHuIjxpijCEKpAxzKUUMurOQ4sknehIATRh8= -github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d/go.mod h1:w5+eXa0mYznDkHaMCXA4XYffjlH+cy1oyKbfzJXa2Do= -github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= -github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sourcegraph/go-diff v0.5.1 h1:gO6i5zugwzo1RVTvgvfwCOSVegNuvnNi6bAD1QCmkHs= -github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= -github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q= -github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tommy-muehle/go-mnd v1.1.1 h1:4D0wuPKjOTiK2garzuPGGvm4zZ/wLYDOH8TJSABC7KU= -github.com/tommy-muehle/go-mnd v1.1.1/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ultraware/funlen v0.0.2 h1:Av96YVBwwNSe4MLR7iI/BIa3VyI7/djnto/pK3Uxbdo= -github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg= -github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= -github.com/uudashr/gocognit v1.0.1 h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjPs= -github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= -github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.1 h1:8dP3SGL7MPB94crU3bEPplMPe83FI4EouesJUeFHv50= -go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191021144547-ec77196f6094 h1:5O4U9trLjNpuhpynaDsqwCk+Tw6seqJz1EbqbnzHrc8= -golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -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/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2 h1:nq114VpM8lsSlP+lyUbANecYHYiFcSNFtqcBlxRV+gA= -golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -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/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-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w= -golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/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-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524210228-3d17549cdc6b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190930201159-7c411dea38b0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191010171213-8abd42400456/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191204011308-9611592c72f6 h1:BP62y4oUl8+/CvHuvVqHIPmVRixgDl6y6a+tR7pXXIA= -golang.org/x/tools v0.0.0-20191204011308-9611592c72f6/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9 h1:DcDldKT1PaijNBNDNPaGtfl+LvUHR1xsw5DpipSI1CE= -google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -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/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93 h1:tT6oQBi0qwLbbZSfDkdIsb23EwaLY85hoAV4SpXfdao= -k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= -k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31 h1:OH3z6khCtxnJBAc0C5CMYWLl1CoK5R5fngX7wrwdN5c= -k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f h1:Cq7MalBHYACRd6EesksG1Q8EoIAKOsiZviGKbOLIej4= -mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 h1:JPJh2pk3+X4lXAkZIk2RuE/7/FoK9maXw+TNPJhVS/c= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/flytestdlib/boilerplate/update.cfg b/flytestdlib/boilerplate/update.cfg index a8754f3683..45331b566c 100644 --- a/flytestdlib/boilerplate/update.cfg +++ b/flytestdlib/boilerplate/update.cfg @@ -1,5 +1,3 @@ -lyft/golang_test_targets -lyft/golangci_file -lyft/golang_support_tools -lyft/pull_request_template -flyte/ +flyte/golang_test_targets +flyte/golang_support_tools +flyte/pull_request_template diff --git a/flytestdlib/boilerplate/update.sh b/flytestdlib/boilerplate/update.sh index 374e4b930e..73de4dc91c 100755 --- a/flytestdlib/boilerplate/update.sh +++ b/flytestdlib/boilerplate/update.sh @@ -1,23 +1,21 @@ #!/usr/bin/env bash # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" OUT="$(mktemp -d)" -trap "rm -fr $OUT" EXIT +trap 'rm -fr $OUT' EXIT -git clone git@github.com:flyteorg/boilerplate.git "${OUT}" +git clone https://github.com/flyteorg/boilerplate.git "${OUT}" echo "Updating the update.sh script." cp "${OUT}/boilerplate/update.sh" "${DIR}/update.sh" -echo "" - CONFIG_FILE="${DIR}/update.cfg" README="https://github.com/flyteorg/boilerplate/blob/master/Readme.rst" @@ -30,12 +28,12 @@ if [ ! -f "$CONFIG_FILE" ]; then fi if [ -z "$REPOSITORY" ]; then - echo '$REPOSITORY is required to run this script' + echo "$REPOSITORY is required to run this script" echo "See $README for more details." exit 1 fi -while read directory junk; do +while read -r directory junk; do # Skip comment lines (which can have leading whitespace) if [[ "$directory" == '#'* ]]; then continue @@ -63,8 +61,8 @@ while read directory junk; do echo "$directory is configured in update.cfg." echo "-----------------------------------------------------------------------------------" echo "syncing files from source." - rm -rf "${DIR}/${directory}" - mkdir -p $(dirname "${DIR}/${directory}") + rm -rf "${DIR:?}/${directory}" + mkdir -p "$(dirname "${DIR}"/"${directory}")" cp -r "$dir_path" "${DIR}/${directory}" if [ -f "${DIR}/${directory}/update.sh" ]; then echo "executing ${DIR}/${directory}/update.sh" @@ -72,4 +70,4 @@ while read directory junk; do fi echo "***********************************************************************************" echo "" -done < "$CONFIG_FILE" \ No newline at end of file +done < "$CONFIG_FILE" diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index 2917e5842e..70dc49a0b5 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -110,7 +110,8 @@ func buildFieldForMap(ctx context.Context, t *types.Map, name, goName, usage, de emptyDefaultValue = fmt.Sprintf(`map[%v]%v{}`, k.Name(), v.Name()) } else { // Value is not a basic type. Rely on json marshaling to unmarshal it - FlagMethodName = fmt.Sprintf("StringToString") + /* #nosec */ + FlagMethodName = "StringToString" } } diff --git a/flytestdlib/pull_request_template.md b/flytestdlib/pull_request_template.md index d2becf38b7..d7699558be 100644 --- a/flytestdlib/pull_request_template.md +++ b/flytestdlib/pull_request_template.md @@ -1,3 +1,9 @@ +## Read then delete + +- Make sure to use a concise title for the pull-request. +- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version +will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump) + # TL;DR _Please replace this text with a description of what this PR accomplishes._ @@ -18,9 +24,9 @@ _Please replace this text with a description of what this PR accomplishes._ _How did you fix the bug, make the feature etc. Link to any design docs etc_ ## Tracking Issue -https://github.com/lyft/flyte/issues/ +https://github.com/flyteorg/flyte/issues/ ## Follow-up issue _NA_ OR -_https://github.com/lyft/flyte/issues/_ +_https://github.com/flyteorg/flyte/issues/_ diff --git a/flytestdlib/random/weighted_random_list.go b/flytestdlib/random/weighted_random_list.go index 6a367eb692..06d54a58fd 100644 --- a/flytestdlib/random/weighted_random_list.go +++ b/flytestdlib/random/weighted_random_list.go @@ -113,12 +113,14 @@ func (w *weightedRandomListImpl) get(generator *rand.Rand) Comparable { // Returns a random entry based on the weights func (w *weightedRandomListImpl) Get() Comparable { + /* #nosec */ randGenerator := rand.New(rand.NewSource(time.Now().UTC().UnixNano())) return w.get(randGenerator) } // For a given seed, the same entry will be returned all the time. func (w *weightedRandomListImpl) GetWithSeed(seed rand.Source) (Comparable, error) { + /* #nosec */ randGenerator := rand.New(seed) return w.get(randGenerator), nil } From 2ae4e3f081a93deb7b5c04a4e84c8bd9c0a47516 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Sun, 13 Jun 2021 11:02:32 +0530 Subject: [PATCH 126/191] Fixed logger levels in viper (#87) Signed-off-by: Yuvraj --- flytestdlib/config/viper/viper.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/flytestdlib/config/viper/viper.go b/flytestdlib/config/viper/viper.go index 526516d57d..96749b37f8 100644 --- a/flytestdlib/config/viper/viper.go +++ b/flytestdlib/config/viper/viper.go @@ -123,12 +123,12 @@ func (v viperAccessor) updateConfig(ctx context.Context, r config.Section) error shouldWatchChanges := true // If a config file is found, read it in. if err = v.viper.ReadInConfig(); err == nil { - logger.Printf(ctx, "Using config file: %+v", v.viper.ConfigFilesUsed()) + logger.Debugf(ctx, "Using config file: %+v", v.viper.ConfigFilesUsed()) } else if asErrorCollection, ok := err.(stdLibErrs.ErrorCollection); ok { shouldWatchChanges = false for i, e := range asErrorCollection { if _, isNotFound := errors.Cause(e).(viperLib.ConfigFileNotFoundError); isNotFound { - logger.Printf(ctx, "[%v] Couldn't find a config file [%v]. Relying on env vars and pflags.", + logger.Infof(ctx, "[%v] Couldn't find a config file [%v]. Relying on env vars and pflags.", i, v.viper.underlying[i].ConfigFileUsed()) } else { return err @@ -136,7 +136,7 @@ func (v viperAccessor) updateConfig(ctx context.Context, r config.Section) error } } else if reflect.TypeOf(err) == reflect.TypeOf(viperLib.ConfigFileNotFoundError{}) { shouldWatchChanges = false - logger.Printf(ctx, "Couldn't find a config file. Relying on env vars and pflags.") + logger.Info(ctx, "Couldn't find a config file. Relying on env vars and pflags.") } else { return err } @@ -146,7 +146,7 @@ func (v viperAccessor) updateConfig(ctx context.Context, r config.Section) error // Watch config files to pick up on file changes without requiring a full application restart. // This call must occur after *all* config paths have been added. v.viper.OnConfigChange(func(e fsnotify.Event) { - fmt.Printf("Got a notification change for file [%v]\n", e.Name) + logger.Debugf(ctx, "Got a notification change for file [%v] \n", e.Name) v.configChangeHandler() }) v.viper.WatchConfig() @@ -233,14 +233,14 @@ func jsonUnmarshallerHook(_, to reflect.Type, data interface{}) (interface{}, er ctx := context.Background() raw, err := json.Marshal(data) if err != nil { - logger.Printf(ctx, "Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + logger.Errorf(ctx, "Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) return data, nil } res := reflect.New(to).Interface() err = json.Unmarshal(raw, &res) if err != nil { - logger.Printf(ctx, "Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + logger.Errorf(ctx, "Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) return data, nil } @@ -355,9 +355,9 @@ func (v viperAccessor) configChangeHandler() { err := v.RefreshFromConfig(ctx, v.rootConfig, false) if err != nil { // TODO: Retry? panic? - logger.Printf(ctx, "Failed to update config. Error: %v", err) + logger.Errorf(ctx, "Failed to update config. Error: %v", err) } else { - logger.Printf(ctx, "Refreshed config in response to file(s) change.") + logger.Infof(ctx, "Refreshed config in response to file(s) change.") } } @@ -375,11 +375,11 @@ func (v viperAccessor) RefreshFromConfig(ctx context.Context, r config.Section, func (v viperAccessor) sendUpdatedEvents(ctx context.Context, root config.Section, forceSend bool, sectionKey config.SectionKey) { for key, section := range root.GetSections() { if !section.GetConfigChangedAndClear() && !forceSend { - logger.Infof(ctx, "Config section [%v] hasn't changed.", sectionKey+key) + logger.Debugf(ctx, "Config section [%v] hasn't changed.", sectionKey+key) } else if section.GetConfigUpdatedHandler() == nil { - logger.Infof(ctx, "Config section [%v] updated. No update handler registered.", sectionKey+key) + logger.Debugf(ctx, "Config section [%v] updated. No update handler registered.", sectionKey+key) } else { - logger.Infof(ctx, "Config section [%v] updated. Firing updated event.", sectionKey+key) + logger.Debugf(ctx, "Config section [%v] updated. Firing updated event.", sectionKey+key) section.GetConfigUpdatedHandler()(ctx, section.GetConfig()) } From f9f70fd1c5f655c59c30c5e74b98ea6b75ad2bcb Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Tue, 15 Jun 2021 09:57:57 -0700 Subject: [PATCH 127/191] Update Boilerplate (#86) Signed-off-by: Flyte-Bot Co-authored-by: flyte-bot --- .../flyte/golang_support_tools/go.mod | 3 +++ .../flyte/golang_support_tools/go.sum | 26 +++++++++++++++++++ .../flyte/golang_support_tools/tools.go | 1 + .../golang_test_targets/download_tooling.sh | 1 + flytestdlib/boilerplate/update.sh | 2 +- 5 files changed, 32 insertions(+), 1 deletion(-) diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod index 7afee48e45..53f645159a 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod @@ -6,7 +6,10 @@ require ( github.com/alvaroloes/enumer v1.1.2 github.com/flyteorg/flytestdlib v0.3.22 github.com/golangci/golangci-lint v1.38.0 + github.com/pseudomuto/protoc-gen-doc v1.4.1 // indirect github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 ) replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 + +replace github.com/pseudomuto/protoc-gen-doc => github.com/flyteorg/protoc-gen-doc v1.4.2 diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum b/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum index 49939b689d..261048f745 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum @@ -75,8 +75,11 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.15.0+incompatible h1:0gSxPGWS9PAr7U2NsQ2YQg6juRDINkUyuvbb4b2Xm8w= +github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -99,6 +102,8 @@ github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cv github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/aokoli/goutils v1.0.1 h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg= +github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -164,6 +169,7 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/daixiang0/gci v0.2.8 h1:1mrIGMBQsBu0P7j7m1M8Lb+ZeZxsZL+jyGX4YoMJJpg= github.com/daixiang0/gci v0.2.8/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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= @@ -191,6 +197,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.3.0-java h1:bV5JGEB1ouEzZa0hgVDFFiClrUEuGWRaAc/3mxR2QK0= +github.com/envoyproxy/protoc-gen-validate v0.3.0-java/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= github.com/esimonov/ifshort v1.0.1 h1:p7hlWD15c9XwvwxYg3W7f7UZHmwg7l9hC0hBiF95gd0= @@ -204,6 +212,8 @@ github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4 github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flytestdlib v0.3.22 h1:nJEPaCdxzXBaeg2p4fdo3I3Ua09NedFRaUwuLafLEdw= github.com/flyteorg/flytestdlib v0.3.22/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= +github.com/flyteorg/protoc-gen-doc v1.4.2 h1:Otw0F+RHaPQ8XlpzhLLgjsCMcrAIcMO01Zh+ALe3rrE= +github.com/flyteorg/protoc-gen-doc v1.4.2/go.mod h1:exDTOVwqpp30eV/EDPFLZy3Pwr2sn6hBC1WIYH/UbIg= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -271,6 +281,7 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -355,8 +366,10 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= @@ -418,9 +431,13 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.0.0 h1:pO2K/gKgKaat5LdpAhxhluX2GPQMaI3W5FUz/I/UnWk= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -543,6 +560,8 @@ github.com/mozilla/tls-observatory v0.0.0-20201209171846-0547674fceff/go.mod h1: github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 h1:28i1IjGcx8AofiB4N3q5Yls55VEaitzuEPkFJEVgGkA= +github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nakabonne/nestif v0.3.0 h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw= github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= @@ -616,6 +635,7 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f h1:xAw10KgJqG5NJDfmRqJ05Z0IFblKumjtMeyiOLxj3+4= @@ -655,6 +675,8 @@ github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.3.0 h1:Uehi/mxLK0eiUc0H0++5tpMGTexB8wZ598MIgU8VpDM= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/pseudomuto/protokit v0.2.0 h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ8RpM= +github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quasilyte/go-ruleguard v0.3.0 h1:A3OfpsK2ynOTbz/KMi62qWzignjGCOZVChATSf4P+A0= github.com/quasilyte/go-ruleguard v0.3.0/go.mod h1:p2miAhLp6fERzFNbcuQ4bevXs8rgK//uCHsUDkumITg= @@ -737,6 +759,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -797,6 +820,7 @@ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -905,6 +929,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ 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-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1121,6 +1146,7 @@ google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go b/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go index 71163a57d9..eee691d8c3 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go @@ -7,4 +7,5 @@ import ( _ "github.com/flyteorg/flytestdlib/cli/pflags" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/vektra/mockery/cmd/mockery" + - "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) diff --git a/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh b/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh index 25d4ac3dc1..c0ab06b063 100755 --- a/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh +++ b/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -20,6 +20,7 @@ tools=( "github.com/flyteorg/flytestdlib/cli/pflags" "github.com/golangci/golangci-lint/cmd/golangci-lint" "github.com/alvaroloes/enumer" + "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) tmp_dir=$(mktemp -d -t gotooling-XXX) diff --git a/flytestdlib/boilerplate/update.sh b/flytestdlib/boilerplate/update.sh index 73de4dc91c..9173b662de 100755 --- a/flytestdlib/boilerplate/update.sh +++ b/flytestdlib/boilerplate/update.sh @@ -70,4 +70,4 @@ while read -r directory junk; do fi echo "***********************************************************************************" echo "" -done < "$CONFIG_FILE" +done < "$CONFIG_FILE" \ No newline at end of file From ac0b67155a429db6e26893fc8b8ed9ae2cb5202c Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Mon, 28 Jun 2021 08:35:17 -0700 Subject: [PATCH 128/191] Update Boilerplate (#88) Signed-off-by: Flyte-Bot Co-authored-by: flyte-bot --- .../pull_request_template/pull_request_template.md | 13 ++++++++----- flytestdlib/boilerplate/update.sh | 2 +- flytestdlib/pull_request_template.md | 13 ++++++++----- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/flytestdlib/boilerplate/flyte/pull_request_template/pull_request_template.md b/flytestdlib/boilerplate/flyte/pull_request_template/pull_request_template.md index d7699558be..9cdab99b46 100644 --- a/flytestdlib/boilerplate/flyte/pull_request_template/pull_request_template.md +++ b/flytestdlib/boilerplate/flyte/pull_request_template/pull_request_template.md @@ -1,8 +1,9 @@ -## Read then delete +## _Read then delete this section_ -- Make sure to use a concise title for the pull-request. -- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version -will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump) +_- Make sure to use a concise title for the pull-request._ + +_- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version +will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump)_ # TL;DR _Please replace this text with a description of what this PR accomplishes._ @@ -24,7 +25,9 @@ _Please replace this text with a description of what this PR accomplishes._ _How did you fix the bug, make the feature etc. Link to any design docs etc_ ## Tracking Issue -https://github.com/flyteorg/flyte/issues/ +_Remove the '*fixes*' keyword if there will be multiple PRs to fix the linked issue_ + +fixes https://github.com/flyteorg/flyte/issues/ ## Follow-up issue _NA_ diff --git a/flytestdlib/boilerplate/update.sh b/flytestdlib/boilerplate/update.sh index 9173b662de..73de4dc91c 100755 --- a/flytestdlib/boilerplate/update.sh +++ b/flytestdlib/boilerplate/update.sh @@ -70,4 +70,4 @@ while read -r directory junk; do fi echo "***********************************************************************************" echo "" -done < "$CONFIG_FILE" \ No newline at end of file +done < "$CONFIG_FILE" diff --git a/flytestdlib/pull_request_template.md b/flytestdlib/pull_request_template.md index d7699558be..9cdab99b46 100644 --- a/flytestdlib/pull_request_template.md +++ b/flytestdlib/pull_request_template.md @@ -1,8 +1,9 @@ -## Read then delete +## _Read then delete this section_ -- Make sure to use a concise title for the pull-request. -- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version -will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump) +_- Make sure to use a concise title for the pull-request._ + +_- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version +will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump)_ # TL;DR _Please replace this text with a description of what this PR accomplishes._ @@ -24,7 +25,9 @@ _Please replace this text with a description of what this PR accomplishes._ _How did you fix the bug, make the feature etc. Link to any design docs etc_ ## Tracking Issue -https://github.com/flyteorg/flyte/issues/ +_Remove the '*fixes*' keyword if there will be multiple PRs to fix the linked issue_ + +fixes https://github.com/flyteorg/flyte/issues/ ## Follow-up issue _NA_ From 960cbcc71aacb1ce990011e69556913b24ec3231 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Wed, 7 Jul 2021 16:02:11 -0700 Subject: [PATCH 129/191] Add UnmarshalStructToObj to marshal utils (#90) Signed-off-by: Katrina Rogan --- flytestdlib/go.mod | 1 + flytestdlib/go.sum | 10 ++++++ flytestdlib/utils/marshal_utils.go | 18 ++++++++++ flytestdlib/utils/marshal_utils_test.go | 46 +++++++++++++++++++++++++ 4 files changed, 75 insertions(+) diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index a1f0ab9b65..f14b4f21f7 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -52,6 +52,7 @@ require ( gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/api v0.20.2 k8s.io/apimachinery v0.20.2 k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 ) diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index 15e8a5a3ed..5ded4a82fe 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -207,6 +207,7 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -252,6 +253,7 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.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= @@ -337,6 +339,7 @@ github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= @@ -391,8 +394,10 @@ github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxd github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -938,6 +943,7 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= @@ -967,6 +973,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= +k8s.io/api v0.20.2 h1:y/HR22XDZY3pniu9hIFDLpUCPq2w5eQ6aV/VFQ7uJMw= +k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= @@ -983,7 +991,9 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.3 h1:4oyYo8NREp49LBBhKxEqCulFjg26rawYKrnCmg+Sr6c= sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/flytestdlib/utils/marshal_utils.go b/flytestdlib/utils/marshal_utils.go index 129de4f87d..380e292208 100644 --- a/flytestdlib/utils/marshal_utils.go +++ b/flytestdlib/utils/marshal_utils.go @@ -79,3 +79,21 @@ func MarshalObjToStruct(input interface{}) (*structpb.Struct, error) { return structObj, nil } + +// Unmarshals a struct to the passed obj. Don't use this if the unmarshalled obj is a proto message. +func UnmarshalStructToObj(structObj *structpb.Struct, obj interface{}) error { + if structObj == nil { + return fmt.Errorf("nil Struct Object passed") + } + + jsonObj, err := json.Marshal(structObj) + if err != nil { + return err + } + + if err = json.Unmarshal(jsonObj, obj); err != nil { + return err + } + + return nil +} diff --git a/flytestdlib/utils/marshal_utils_test.go b/flytestdlib/utils/marshal_utils_test.go index 712c867579..ecb335c8b2 100644 --- a/flytestdlib/utils/marshal_utils_test.go +++ b/flytestdlib/utils/marshal_utils_test.go @@ -3,12 +3,15 @@ package utils import ( "testing" + "k8s.io/apimachinery/pkg/util/json" + "github.com/go-test/deep" "github.com/stretchr/testify/assert" "github.com/flyteorg/flytestdlib/utils/prototest" "github.com/golang/protobuf/proto" structpb "github.com/golang/protobuf/ptypes/struct" + v1 "k8s.io/api/core/v1" ) type SimpleType struct { @@ -138,3 +141,46 @@ func TestMarshalPbToStruct(t *testing.T) { }) } } + +func TestUnmarshalStructToObj(t *testing.T) { + t.Run("no nil structs allowed", func(t *testing.T) { + var podSpec v1.PodSpec + err := UnmarshalStructToObj(nil, &podSpec) + assert.EqualError(t, err, "nil Struct Object passed") + }) + podSpec := v1.PodSpec{ + Containers: []v1.Container{ + { + Name: "a container", + }, + { + Name: "another container", + }, + }, + } + + b, err := json.Marshal(podSpec) + if err != nil { + t.Fatal(err) + } + + structObj := &structpb.Struct{} + if err := json.Unmarshal(b, structObj); err != nil { + t.Fatal(err) + } + + t.Run("no nil pointers as obj allowed", func(t *testing.T) { + var nilPodspec *v1.PodSpec + err := UnmarshalStructToObj(structObj, nilPodspec) + assert.EqualError(t, err, "json: Unmarshal(nil *v1.PodSpec)") + }) + + t.Run("happy case", func(t *testing.T) { + var podSpecObj v1.PodSpec + err := UnmarshalStructToObj(structObj, &podSpecObj) + assert.NoError(t, err) + if diff := deep.Equal(podSpecObj, podSpec); diff != nil { + t.Errorf("UnmarshalStructToObj() got = %v, want %v, diff: %v", podSpecObj, podSpec, diff) + } + }) +} From ad390b8b2b9d33e879dac6e74f558e263eaad8b3 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Thu, 8 Jul 2021 17:27:59 -0700 Subject: [PATCH 130/191] stdlibConfig strictMode should not fail if there are existing flags (#89) * Do not error on existing flags Signed-off-by: Haytham Abuelfutuh * Add unit test Signed-off-by: Haytham Abuelfutuh * Update unit test Signed-off-by: Haytham Abuelfutuh --- flytestdlib/config/tests/accessor_test.go | 19 +++++++++++ .../config/tests/testdata/bad_config.yaml | 8 ++--- flytestdlib/config/viper/viper.go | 32 +++++++++++++++---- 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index df7507e740..80e74e02d4 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -207,6 +207,25 @@ func TestStrictAccessor(t *testing.T) { assert.Error(t, v.UpdateConfig(context.TODO())) }) + t.Run(fmt.Sprintf("[%v] flags defined outside", provider(config.Options{}).ID()), func(t *testing.T) { + reg := config.NewRootSection() + _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) + assert.NoError(t, err) + + _, err = reg.RegisterSection(OtherComponentSectionKey, &OtherComponentConfig{}) + assert.NoError(t, err) + v := provider(config.Options{ + StrictMode: true, + SearchPaths: []string{filepath.Join("testdata", "bad_config.yaml")}, + RootSection: reg, + }) + + set := pflag.NewFlagSet("test", pflag.ExitOnError) + set.StringP("unknown-key", "u", "", "") + v.InitializePflags(set) + assert.NoError(t, v.UpdateConfig(context.TODO())) + }) + t.Run(fmt.Sprintf("[%v] Set through env", provider(config.Options{}).ID()), func(t *testing.T) { reg := config.NewRootSection() _, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) diff --git a/flytestdlib/config/tests/testdata/bad_config.yaml b/flytestdlib/config/tests/testdata/bad_config.yaml index c0707abdeb..3e87c2a4e4 100644 --- a/flytestdlib/config/tests/testdata/bad_config.yaml +++ b/flytestdlib/config/tests/testdata/bad_config.yaml @@ -5,9 +5,9 @@ other-component: int-val: 4 string-value: Hey there! strings: - - hello - - world - - '!' + - hello + - world + - '!' url-value: http://something.com - unknown-key: "something" +unknown-key: "something" diff --git a/flytestdlib/config/viper/viper.go b/flytestdlib/config/viper/viper.go index 96749b37f8..a8cc9b4d1f 100644 --- a/flytestdlib/config/viper/viper.go +++ b/flytestdlib/config/viper/viper.go @@ -10,6 +10,8 @@ import ( "strings" "sync" + "k8s.io/apimachinery/pkg/util/sets" + "github.com/pkg/errors" stdLibErrs "github.com/flyteorg/flytestdlib/errors" @@ -44,6 +46,7 @@ type viperAccessor struct { rootConfig config.Section // Ensures we initialize the file Watcher once. watcherInitializer *sync.Once + existingFlagKeys sets.String } func (viperAccessor) ID() string { @@ -54,7 +57,17 @@ func (viperAccessor) InitializeFlags(cmdFlags *flag.FlagSet) { // TODO: Implement? } -func (v viperAccessor) InitializePflags(cmdFlags *pflag.FlagSet) { +func (v *viperAccessor) InitializePflags(cmdFlags *pflag.FlagSet) { + existingFlagKeys := sets.NewString() + cmdFlags.VisitAll(func(f *pflag.Flag) { + existingFlagKeys.Insert(f.Name) + if len(f.Shorthand) > 0 { + existingFlagKeys.Insert(f.Shorthand) + } + }) + + v.existingFlagKeys = existingFlagKeys + err := v.addSectionsPFlags(cmdFlags) if err != nil { panic(errors.Wrap(err, "error adding config PFlags to flag set")) @@ -260,12 +273,14 @@ func (v viperAccessor) parseViperConfigRecursive(root config.Section, settings i errs := stdLibErrs.ErrorCollection{} var mine interface{} myKeysCount := 0 + discoveredKeys := sets.NewString() if asMap, casted := settings.(map[string]interface{}); casted { myMap := map[string]interface{}{} for childKey, childValue := range asMap { if childSection, found := root.GetSections()[childKey]; found { errs.Append(v.parseViperConfigRecursive(childSection, childValue)) } else { + discoveredKeys.Insert(childKey) myMap[childKey] = childValue } } @@ -276,6 +291,7 @@ func (v viperAccessor) parseViperConfigRecursive(root config.Section, settings i mine = settings myKeysCount = len(asSlice) } else { + discoveredKeys.Insert(fmt.Sprintf("%v", mine)) mine = settings if settings != nil { myKeysCount = 1 @@ -296,10 +312,12 @@ func (v viperAccessor) parseViperConfigRecursive(root config.Section, settings i } else if myKeysCount > 0 { // There are keys set that are meant to be decoded but no config to receive them. Fail if strict mode is on. if v.strictMode { - errs.Append(errors.Wrap( - config.ErrStrictModeValidation, - fmt.Sprintf("strict mode is on but received keys [%+v] to decode with no config assigned to"+ - " receive them", mine))) + if newKeys := discoveredKeys.Difference(v.existingFlagKeys); newKeys.Len() > 0 { + errs.Append(errors.Wrap( + config.ErrStrictModeValidation, + fmt.Sprintf("strict mode is on but received keys [%+v] to decode with no config assigned to"+ + " receive them", newKeys))) + } } } @@ -396,7 +414,7 @@ func NewAccessor(opts config.Options) config.Accessor { return newAccessor(opts) } -func newAccessor(opts config.Options) viperAccessor { +func newAccessor(opts config.Options) *viperAccessor { vipers := make([]Viper, 0, 1) configFiles := files.FindConfigFiles(opts.SearchPaths) for _, configFile := range configFiles { @@ -417,7 +435,7 @@ func newAccessor(opts config.Options) viperAccessor { r = config.GetRootSection() } - return viperAccessor{ + return &viperAccessor{ strictMode: opts.StrictMode, rootConfig: r, viper: &CollectionProxy{underlying: vipers}, From dddaca60e9bceb54c0b403b0f7f45dc5f15c6559 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Sat, 17 Jul 2021 08:33:12 -0700 Subject: [PATCH 131/191] Update Boilerplate (#91) Signed-off-by: Flyte-Bot Co-authored-by: flyte-bot --- flytestdlib/boilerplate/flyte/golang_test_targets/goimports | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytestdlib/boilerplate/flyte/golang_test_targets/goimports b/flytestdlib/boilerplate/flyte/golang_test_targets/goimports index ba0d6d8718..af1829036c 100755 --- a/flytestdlib/boilerplate/flyte/golang_test_targets/goimports +++ b/flytestdlib/boilerplate/flyte/golang_test_targets/goimports @@ -5,4 +5,4 @@ # # TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst -goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*") +goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*" -not -path "./boilerplate/*") From 9706d90647a38abc45906b956baac6dc79b51cfd Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Thu, 22 Jul 2021 03:25:59 +0530 Subject: [PATCH 132/191] Update code of conduct (#94) Signed-off-by: Ketan Umare --- flytestdlib/CODE_OF_CONDUCT.md | 2 +- .../flyte/code_of_conduct/CODE_OF_CONDUCT.md | 2 ++ .../boilerplate/flyte/code_of_conduct/README.rst | 2 ++ .../boilerplate/flyte/code_of_conduct/update.sh | 12 ++++++++++++ .../boilerplate/flyte/welcome_bot/Readme.rst | 8 ++++++++ .../boilerplate/flyte/welcome_bot/config.yml | 15 +++++++++++++++ .../boilerplate/flyte/welcome_bot/update.sh | 15 +++++++++++++++ flytestdlib/boilerplate/update.cfg | 2 ++ 8 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 flytestdlib/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md create mode 100644 flytestdlib/boilerplate/flyte/code_of_conduct/README.rst create mode 100755 flytestdlib/boilerplate/flyte/code_of_conduct/update.sh create mode 100644 flytestdlib/boilerplate/flyte/welcome_bot/Readme.rst create mode 100644 flytestdlib/boilerplate/flyte/welcome_bot/config.yml create mode 100755 flytestdlib/boilerplate/flyte/welcome_bot/update.sh diff --git a/flytestdlib/CODE_OF_CONDUCT.md b/flytestdlib/CODE_OF_CONDUCT.md index 4c3a38cc48..e12139d691 100644 --- a/flytestdlib/CODE_OF_CONDUCT.md +++ b/flytestdlib/CODE_OF_CONDUCT.md @@ -1,2 +1,2 @@ -This project is governed by [Lyft's code of conduct](https://github.com/lyft/code-of-conduct). +This project is governed by LF AI Foundation's [code of conduct](https://lfprojects.org/policies/code-of-conduct/). All contributors and participants agree to abide by its terms. diff --git a/flytestdlib/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md b/flytestdlib/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..e12139d691 --- /dev/null +++ b/flytestdlib/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md @@ -0,0 +1,2 @@ +This project is governed by LF AI Foundation's [code of conduct](https://lfprojects.org/policies/code-of-conduct/). +All contributors and participants agree to abide by its terms. diff --git a/flytestdlib/boilerplate/flyte/code_of_conduct/README.rst b/flytestdlib/boilerplate/flyte/code_of_conduct/README.rst new file mode 100644 index 0000000000..0c9f2f1ec5 --- /dev/null +++ b/flytestdlib/boilerplate/flyte/code_of_conduct/README.rst @@ -0,0 +1,2 @@ +CODE OF CONDUCT +~~~~~~~~~~~~~~~ diff --git a/flytestdlib/boilerplate/flyte/code_of_conduct/update.sh b/flytestdlib/boilerplate/flyte/code_of_conduct/update.sh new file mode 100755 index 0000000000..42f6158460 --- /dev/null +++ b/flytestdlib/boilerplate/flyte/code_of_conduct/update.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +cp ${DIR}/CODE_OF_CONDUCT.md ${DIR}/../../../CODE_OF_CONDUCT.md diff --git a/flytestdlib/boilerplate/flyte/welcome_bot/Readme.rst b/flytestdlib/boilerplate/flyte/welcome_bot/Readme.rst new file mode 100644 index 0000000000..ea18781185 --- /dev/null +++ b/flytestdlib/boilerplate/flyte/welcome_bot/Readme.rst @@ -0,0 +1,8 @@ +Config File -- Welcome Bot +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Provides a ``config.yml`` file. + +**To Enable:** + +Add ``flyte/config.yml`` to your ``boilerplate/update.cfg`` file. \ No newline at end of file diff --git a/flytestdlib/boilerplate/flyte/welcome_bot/config.yml b/flytestdlib/boilerplate/flyte/welcome_bot/config.yml new file mode 100644 index 0000000000..f99bcd78f1 --- /dev/null +++ b/flytestdlib/boilerplate/flyte/welcome_bot/config.yml @@ -0,0 +1,15 @@ +# Comment to be posted on PRs from first-time contributors in your repository +newPRWelcomeComment: > + Thank you for opening this pull request! 🙌 + + These tips will help get your PR across the finish line: + - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. + - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). + +# Comment to be posted to on pull requests merged by a first time user +firstPRMergeComment: > + Congrats on merging your first pull request! 🎉 + +# Comment to be posted on first-time issues +newIssueWelcomeComment: > + Thank you for opening your first issue here! 🛠 diff --git a/flytestdlib/boilerplate/flyte/welcome_bot/update.sh b/flytestdlib/boilerplate/flyte/welcome_bot/update.sh new file mode 100755 index 0000000000..2db64ac3f1 --- /dev/null +++ b/flytestdlib/boilerplate/flyte/welcome_bot/update.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +# Clone the config.yml file +echo " - copying ${DIR}/config.yml to the root directory." +cp "${DIR}"/config.yml "${DIR}"/../../../.github/config.yml + diff --git a/flytestdlib/boilerplate/update.cfg b/flytestdlib/boilerplate/update.cfg index 45331b566c..caa58e0db1 100644 --- a/flytestdlib/boilerplate/update.cfg +++ b/flytestdlib/boilerplate/update.cfg @@ -1,3 +1,5 @@ flyte/golang_test_targets flyte/golang_support_tools flyte/pull_request_template +flyte/welcome_bot +flyte/code_of_conduct From bcda192760ef0b16bb90019f69ca0d2aec8d63aa Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 26 Jul 2021 11:50:45 +0530 Subject: [PATCH 133/191] Added default no limit on storage (#93) * Added default no limit on storage Signed-off-by: Yuvraj --- flytestdlib/storage/stow_store.go | 10 +++++---- flytestdlib/storage/stow_store_test.go | 30 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 0799d0eb77..18f7fb7c7d 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -7,6 +7,8 @@ import ( "sync" "time" + "github.com/flyteorg/flytestdlib/errors" + "github.com/aws/aws-sdk-go/aws/awserr" s32 "github.com/aws/aws-sdk-go/service/s3" "github.com/graymeta/stow/azure" @@ -20,8 +22,6 @@ import ( "github.com/flyteorg/flytestdlib/logger" "github.com/flyteorg/flytestdlib/promutils/labeled" - "github.com/flyteorg/flytestdlib/errors" - "github.com/flyteorg/flytestdlib/promutils" "github.com/graymeta/stow" @@ -230,8 +230,10 @@ func (s *StowStore) ReadRaw(ctx context.Context, reference DataReference) (io.Re return nil, err } - if sizeMbs := sizeBytes / MiB; sizeMbs > GetConfig().Limits.GetLimitMegabytes { - return nil, errors.Errorf(ErrExceedsLimit, "limit exceeded. %vmb > %vmb.", sizeMbs, GetConfig().Limits.GetLimitMegabytes) + if GetConfig().Limits.GetLimitMegabytes != 0 { + if sizeMbs := sizeBytes / MiB; sizeMbs > GetConfig().Limits.GetLimitMegabytes { + return nil, errors.Errorf(ErrExceedsLimit, "limit exceeded. %vmb > %vmb.", sizeMbs, GetConfig().Limits.GetLimitMegabytes) + } } return item.Open() diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index d291b5cb1b..87025ed7db 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -181,6 +181,7 @@ func TestStowStore_ReadRaw(t *testing.T) { t.Run("Exceeds limit", func(t *testing.T) { testScope := promutils.NewTestScope() fn := fQNFn["s3"] + s, err := NewStowRawStore(fn(container), &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { if id == container { @@ -207,6 +208,35 @@ func TestStowStore_ReadRaw(t *testing.T) { assert.NotNil(t, errors.Cause(err)) }) + t.Run("No Limit", func(t *testing.T) { + testScope := promutils.NewTestScope() + fn := fQNFn["s3"] + GetConfig().Limits.GetLimitMegabytes = 0 + + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, false, testScope) + assert.NoError(t, err) + err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 3*MiB, Options{}, bytes.NewReader([]byte{})) + assert.NoError(t, err) + metadata, err := s.Head(context.TODO(), DataReference("s3://container/path")) + assert.NoError(t, err) + assert.True(t, metadata.Exists()) + _, err = s.ReadRaw(context.TODO(), DataReference("s3://container/path")) + assert.Nil(t, err) + }) + t.Run("Happy Path multi-container enabled", func(t *testing.T) { testScope := promutils.NewTestScope() fn := fQNFn["s3"] From b72dbf337f8b0d0346c282b227378823038d9a6d Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Fri, 13 Aug 2021 02:13:44 -0700 Subject: [PATCH 134/191] Update Boilerplate (#96) Signed-off-by: Flyte-Bot Co-authored-by: flyte-bot --- flytestdlib/.github/config.yml | 1 + flytestdlib/boilerplate/flyte/welcome_bot/config.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/flytestdlib/.github/config.yml b/flytestdlib/.github/config.yml index f99bcd78f1..7afe6111f5 100644 --- a/flytestdlib/.github/config.yml +++ b/flytestdlib/.github/config.yml @@ -3,6 +3,7 @@ newPRWelcomeComment: > Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line: + - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). diff --git a/flytestdlib/boilerplate/flyte/welcome_bot/config.yml b/flytestdlib/boilerplate/flyte/welcome_bot/config.yml index f99bcd78f1..7afe6111f5 100644 --- a/flytestdlib/boilerplate/flyte/welcome_bot/config.yml +++ b/flytestdlib/boilerplate/flyte/welcome_bot/config.yml @@ -3,6 +3,7 @@ newPRWelcomeComment: > Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line: + - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). From 97e307ba1b9177e5c6292057a22ae60752b8b859 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Sat, 14 Aug 2021 03:02:26 +0530 Subject: [PATCH 135/191] Added pflag for stow config in storage (#95) * Generated pflag for stow config Signed-off-by: Yuvraj * more changes Signed-off-by: Yuvraj * more changes Signed-off-by: Yuvraj --- .../cli/pflags/api/testdata/testtype.go | 2 + .../cli/pflags/api/testdata/testtype_test.go | 28 ++++ flytestdlib/storage/config.go | 6 +- flytestdlib/storage/config_flags.go | 13 +- flytestdlib/storage/config_flags_test.go | 124 ++++-------------- flytestdlib/storage/stow_store.go | 3 +- flytestdlib/storage/stow_store_test.go | 10 +- 7 files changed, 76 insertions(+), 110 deletions(-) diff --git a/flytestdlib/cli/pflags/api/testdata/testtype.go b/flytestdlib/cli/pflags/api/testdata/testtype.go index 045a9c2c9a..ca352843bf 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype.go @@ -64,6 +64,8 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.secret-key"), DefaultTestType.StorageConfig.Connection.SecretKey, "Secret to use when accesskey is set.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.region"), DefaultTestType.StorageConfig.Connection.Region, "Region to connect to.") cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "storage.connection.disable-ssl"), DefaultTestType.StorageConfig.Connection.DisableSSL, "Disables SSL connection. Should only be used for development.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.stow.kind"), DefaultTestType.StorageConfig.Stow.Kind, "Kind of Stow backend to use. Refer to github/graymeta/stow") + cmdFlags.StringToString(fmt.Sprintf("%v%v", prefix, "storage.stow.config"), DefaultTestType.StorageConfig.Stow.Config, "Configuration for stow backend. Refer to github/graymeta/stow") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.container"), DefaultTestType.StorageConfig.InitContainer, "Initial container (in s3 a bucket) to create -if it doesn't exist-.'") cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "storage.enable-multicontainer"), DefaultTestType.StorageConfig.MultiContainerEnabled, "If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.max_size_mbs"), DefaultTestType.StorageConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_test.go b/flytestdlib/cli/pflags/api/testdata/testtype_test.go index cb35842ef1..37a97618cd 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype_test.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype_test.go @@ -295,6 +295,34 @@ func TestTestType_SetFlags(t *testing.T) { } }) }) + t.Run("Test_storage.stow.kind", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.stow.kind", testValue) + if vString, err := cmdFlags.GetString("storage.stow.kind"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Stow.Kind) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.stow.config", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "a=1,b=2" + + cmdFlags.Set("storage.stow.config", testValue) + if vStringToString, err := cmdFlags.GetStringToString("storage.stow.config"); err == nil { + testDecodeRaw_TestType(t, vStringToString, &actual.StorageConfig.Stow.Config) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_storage.container", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytestdlib/storage/config.go b/flytestdlib/storage/config.go index a44c150af5..bbafd36d74 100644 --- a/flytestdlib/storage/config.go +++ b/flytestdlib/storage/config.go @@ -47,7 +47,7 @@ var ( type Config struct { Type Type `json:"type" pflag:",Sets the type of storage to configure [s3/minio/local/mem/stow]."` Connection ConnectionConfig `json:"connection"` - Stow *StowConfig `json:"stow,omitempty"` + Stow StowConfig `json:"stow,omitempty" pflag:",Storage config for stow backend."` // Container here is misleading, it refers to a Bucket (AWS S3) like blobstore entity. In some terms it could be a table InitContainer string `json:"container" pflag:",Initial container (in s3 a bucket) to create -if it doesn't exist-.'"` // By default if this is not enabled, multiple containers are not supported by the storage layer. Only the configured `container` InitContainer will be allowed to requests data from. But, if enabled then data will be loaded to written to any @@ -79,8 +79,8 @@ type ConnectionConfig struct { } type StowConfig struct { - Kind string `json:"kind,omitempty" pflag:"-,Kind of Stow backend to use. Refer to github/graymeta/stow"` - Config map[string]string `json:"config,omitempty" pflag:"-,Configuration for stow backend. Refer to github/graymeta/stow"` + Kind string `json:"kind,omitempty" pflag:",Kind of Stow backend to use. Refer to github/graymeta/stow"` + Config map[string]string `json:"config,omitempty" pflag:",Configuration for stow backend. Refer to github/graymeta/stow"` } type CachingConfig struct { diff --git a/flytestdlib/storage/config_flags.go b/flytestdlib/storage/config_flags.go index 42cdb7bcb0..c9c2eb9a10 100755 --- a/flytestdlib/storage/config_flags.go +++ b/flytestdlib/storage/config_flags.go @@ -28,6 +28,15 @@ func (Config) elemValueOrNil(v interface{}) interface{} { return v } +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (Config) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -48,7 +57,9 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.secret-key"), defaultConfig.Connection.SecretKey, "Secret to use when accesskey is set.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.region"), defaultConfig.Connection.Region, "Region to connect to.") cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "connection.disable-ssl"), defaultConfig.Connection.DisableSSL, "Disables SSL connection. Should only be used for development.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "container"), defaultConfig.InitContainer, "Initial container to create -if it doesn't exist-.'") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "stow.kind"), defaultConfig.Stow.Kind, "Kind of Stow backend to use. Refer to github/graymeta/stow") + cmdFlags.StringToString(fmt.Sprintf("%v%v", prefix, "stow.config"), defaultConfig.Stow.Config, "Configuration for stow backend. Refer to github/graymeta/stow") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "container"), defaultConfig.InitContainer, "Initial container (in s3 a bucket) to create -if it doesn't exist-.'") cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "enable-multicontainer"), defaultConfig.MultiContainerEnabled, "If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.max_size_mbs"), defaultConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.target_gc_percent"), defaultConfig.Cache.TargetGCPercent, "Sets the garbage collection target percentage.") diff --git a/flytestdlib/storage/config_flags_test.go b/flytestdlib/storage/config_flags_test.go index 61a7bbdb2b..c71a3e8f6d 100755 --- a/flytestdlib/storage/config_flags_test.go +++ b/flytestdlib/storage/config_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_Config(t *testing.T, val, result interface{}) { assert.NoError(t, decode_Config(val, result)) } -func testDecodeSlice_Config(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_Config(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_type", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("type"); err == nil { - assert.Equal(t, string(defaultConfig.Type), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -122,14 +114,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_connection.endpoint", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("connection.endpoint"); err == nil { - assert.Equal(t, string(defaultConfig.Connection.Endpoint.String()), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := defaultConfig.Connection.Endpoint.String() @@ -144,14 +128,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_connection.auth-type", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("connection.auth-type"); err == nil { - assert.Equal(t, string(defaultConfig.Connection.AuthType), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -166,14 +142,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_connection.access-key", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("connection.access-key"); err == nil { - assert.Equal(t, string(defaultConfig.Connection.AccessKey), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -188,14 +156,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_connection.secret-key", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("connection.secret-key"); err == nil { - assert.Equal(t, string(defaultConfig.Connection.SecretKey), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -210,14 +170,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_connection.region", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("connection.region"); err == nil { - assert.Equal(t, string(defaultConfig.Connection.Region), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -232,36 +184,48 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_connection.disable-ssl", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("connection.disable-ssl", testValue) if vBool, err := cmdFlags.GetBool("connection.disable-ssl"); err == nil { - assert.Equal(t, bool(defaultConfig.Connection.DisableSSL), vBool) + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Connection.DisableSSL) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_stow.kind", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("connection.disable-ssl", testValue) - if vBool, err := cmdFlags.GetBool("connection.disable-ssl"); err == nil { - testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Connection.DisableSSL) + cmdFlags.Set("stow.kind", testValue) + if vString, err := cmdFlags.GetString("stow.kind"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Stow.Kind) } else { assert.FailNow(t, err.Error()) } }) }) - t.Run("Test_container", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("container"); err == nil { - assert.Equal(t, string(defaultConfig.InitContainer), vString) + t.Run("Test_stow.config", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "a=1,b=2" + + cmdFlags.Set("stow.config", testValue) + if vStringToString, err := cmdFlags.GetStringToString("stow.config"); err == nil { + testDecodeRaw_Config(t, vStringToString, &actual.Stow.Config) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_container", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" @@ -276,14 +240,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_enable-multicontainer", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("enable-multicontainer"); err == nil { - assert.Equal(t, bool(defaultConfig.MultiContainerEnabled), vBool) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -298,14 +254,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_cache.max_size_mbs", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vInt, err := cmdFlags.GetInt("cache.max_size_mbs"); err == nil { - assert.Equal(t, int(defaultConfig.Cache.MaxSizeMegabytes), vInt) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -320,14 +268,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_cache.target_gc_percent", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vInt, err := cmdFlags.GetInt("cache.target_gc_percent"); err == nil { - assert.Equal(t, int(defaultConfig.Cache.TargetGCPercent), vInt) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -342,14 +282,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_limits.maxDownloadMBs", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vInt64, err := cmdFlags.GetInt64("limits.maxDownloadMBs"); err == nil { - assert.Equal(t, int64(defaultConfig.Limits.GetLimitMegabytes), vInt64) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -364,14 +296,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_defaultHttpClient.timeout", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("defaultHttpClient.timeout"); err == nil { - assert.Equal(t, string(defaultConfig.DefaultHTTPClient.Timeout.String()), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := defaultConfig.DefaultHTTPClient.Timeout.String() diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 18f7fb7c7d..4e3ad2d1f8 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "io" + "reflect" "sync" "time" @@ -319,7 +320,7 @@ func newStowRawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error var cfgMap stow.ConfigMap var kind string - if cfg.Stow != nil { + if !reflect.DeepEqual(cfg.Stow, StowConfig{}) { kind = cfg.Stow.Kind cfgMap = cfg.Stow.Config } else { diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index 87025ed7db..16fff35c76 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -303,7 +303,7 @@ func TestNewLocalStore(t *testing.T) { t.Run("Valid config", func(t *testing.T) { testScope := promutils.NewTestScope() store, err := newStowRawStore(&Config{ - Stow: &StowConfig{ + Stow: StowConfig{ Kind: local.Kind, Config: map[string]string{ local.ConfigKeyPath: "./", @@ -339,7 +339,7 @@ func TestNewLocalStore(t *testing.T) { assert.NotNil(t, stats) store, err := newStowRawStore(&Config{ - Stow: &StowConfig{ + Stow: StowConfig{ Kind: local.Kind, Config: map[string]string{ local.ConfigKeyPath: tmpDir, @@ -368,7 +368,7 @@ func TestNewLocalStore(t *testing.T) { assert.NotNil(t, stats) store, err := newStowRawStore(&Config{ - Stow: &StowConfig{ + Stow: StowConfig{ Kind: local.Kind, Config: map[string]string{ local.ConfigKeyPath: tmpDir, @@ -390,7 +390,7 @@ func TestNewLocalStore(t *testing.T) { assert.NotNil(t, stats) store, err := newStowRawStore(&Config{ - Stow: &StowConfig{ + Stow: StowConfig{ Kind: local.Kind, Config: map[string]string{ local.ConfigKeyPath: tmpDir, @@ -424,7 +424,7 @@ func Test_newStowRawStore(t *testing.T) { {"fail", args{&Config{}, promutils.NewTestScope()}, true}, {"google", args{&Config{ InitContainer: "flyte", - Stow: &StowConfig{ + Stow: StowConfig{ Kind: google.Kind, Config: map[string]string{ google.ConfigProjectId: "x", From fdc9c42a85e09d2618978454c302c05506825cd8 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Sat, 21 Aug 2021 22:15:37 +0530 Subject: [PATCH 136/191] hotfix for stow config (#97) Signed-off-by: Yuvraj --- flytestdlib/storage/stow_store.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 4e3ad2d1f8..8bc76e8528 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "io" - "reflect" "sync" "time" @@ -320,7 +319,7 @@ func newStowRawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error var cfgMap stow.ConfigMap var kind string - if !reflect.DeepEqual(cfg.Stow, StowConfig{}) { + if len(cfg.Stow.Kind) > 0 && len(cfg.Stow.Config) > 0 { kind = cfg.Stow.Kind cfgMap = cfg.Stow.Config } else { From 138aada7644a5bda15f12950a5fda789b743ba74 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Tue, 21 Sep 2021 16:48:44 -0700 Subject: [PATCH 137/191] Support DeleteDelayed operation in AutoRefresh cache (#98) Signed-off-by: Haytham Abuelfutuh --- flytestdlib/cache/auto_refresh.go | 21 ++++++++++++- flytestdlib/cache/sync_set.go | 40 ++++++++++++++++++++++++ flytestdlib/cache/sync_set_test.go | 49 ++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 flytestdlib/cache/sync_set.go create mode 100644 flytestdlib/cache/sync_set_test.go diff --git a/flytestdlib/cache/auto_refresh.go b/flytestdlib/cache/auto_refresh.go index 6360127d34..09a85ae39e 100644 --- a/flytestdlib/cache/auto_refresh.go +++ b/flytestdlib/cache/auto_refresh.go @@ -40,6 +40,10 @@ type AutoRefresh interface { // Get object if exists else create it. GetOrCreate(id ItemID, item Item) (Item, error) + + // DeleteDelayed queues an item for deletion. It Will get deleted as part of the next Sync cycle. Until the next sync + // cycle runs, Get and GetOrCreate will continue to return the Item in its previous state. + DeleteDelayed(id ItemID) error } type metrics struct { @@ -113,6 +117,7 @@ type autoRefresh struct { syncCb SyncFunc createBatchesCb CreateBatchesFunc lruMap *lru.Cache + toDelete *syncSet syncPeriod time.Duration workqueue workqueue.RateLimitingInterface parallelizm int @@ -190,6 +195,13 @@ func (w *autoRefresh) GetOrCreate(id ItemID, item Item) (Item, error) { return item, nil } +// DeleteDelayed queues an item for deletion. It Will get deleted as part of the next Sync cycle. Until the next sync +// cycle runs, Get and GetOrCreate will continue to return the Item in its previous state. +func (w *autoRefresh) DeleteDelayed(id ItemID) error { + w.toDelete.Insert(id) + return nil +} + // This function is called internally by its own timer. Roughly, it will, // - List keys // - Create batches of keys based on createBatchesCb @@ -202,7 +214,7 @@ func (w *autoRefresh) enqueueBatches(ctx context.Context) error { for _, k := range keys { // If not ok, it means evicted between the item was evicted between getting the keys and this update loop // which is fine, we can just ignore. - if value, ok := w.lruMap.Peek(k); ok { + if value, ok := w.lruMap.Peek(k); ok && !w.toDelete.Contains(k) { snapshot = append(snapshot, itemWrapper{ id: k.(ItemID), item: value.(Item), @@ -282,6 +294,12 @@ func (w *autoRefresh) sync(ctx context.Context) (err error) { } } + w.toDelete.Range(func(key interface{}) bool { + w.lruMap.Remove(key) + w.toDelete.Remove(key) + return true + }) + t.Stop() } } @@ -304,6 +322,7 @@ func NewAutoRefreshBatchedCache(name string, createBatches CreateBatchesFunc, sy createBatchesCb: createBatches, syncCb: syncCb, lruMap: lruCache, + toDelete: newSyncSet(), syncPeriod: resyncPeriod, workqueue: workqueue.NewNamedRateLimitingQueue(syncRateLimiter, scope.CurrentScope()), } diff --git a/flytestdlib/cache/sync_set.go b/flytestdlib/cache/sync_set.go new file mode 100644 index 0000000000..211b4f10ef --- /dev/null +++ b/flytestdlib/cache/sync_set.go @@ -0,0 +1,40 @@ +package cache + +import "sync" + +var emptyVal = struct{}{} + +// syncSet is a thread-safe Set. +type syncSet struct { + underlying sync.Map +} + +// Contains checks if the key is present in the set. +func (s *syncSet) Contains(key interface{}) bool { + _, found := s.underlying.Load(key) + return found +} + +// Insert adds a new key to the set if it doesn't already exist. +func (s *syncSet) Insert(key interface{}) { + s.underlying.Store(key, emptyVal) +} + +// Remove deletes a key from the set. +func (s *syncSet) Remove(key interface{}) { + s.underlying.Delete(key) +} + +// Range allows iterating over the set. Deleting the key while iterating is a supported operation. +func (s *syncSet) Range(callback func(key interface{}) bool) { + s.underlying.Range(func(key, value interface{}) bool { + return callback(key) + }) +} + +// newSyncSet initializes a new thread-safe set. +func newSyncSet() *syncSet { + return &syncSet{ + underlying: sync.Map{}, + } +} diff --git a/flytestdlib/cache/sync_set_test.go b/flytestdlib/cache/sync_set_test.go new file mode 100644 index 0000000000..5a80138d2c --- /dev/null +++ b/flytestdlib/cache/sync_set_test.go @@ -0,0 +1,49 @@ +package cache + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func rangeAndRemove(tb testing.TB, s *syncSet, count int) { + for i := 0; i < count; i++ { + s.Insert(i) + } + + s.Range(func(key interface{}) bool { + s.Remove(key) + return true + }) + + for i := 0; i < count; i++ { + assert.False(tb, s.Contains(i)) + } +} + +func TestSyncSet_Range(t *testing.T) { + s := newSyncSet() + rangeAndRemove(t, s, 1000) +} + +func BenchmarkSyncSet_Range(b *testing.B) { + s := newSyncSet() + rangeAndRemove(b, s, b.N) +} + +func TestSyncSet_Contains(t *testing.T) { + s := newSyncSet() + count := 1000 + for i := 0; i < count; i++ { + s.Insert(i) + } + + for i := 0; i < count; i++ { + assert.True(t, s.Contains(i)) + s.Remove(i) + } + + for i := 0; i < count; i++ { + assert.False(t, s.Contains(i)) + } +} From 65fa16c362beb486178881ed3676cd7d0c2f9ecc Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Thu, 23 Sep 2021 10:44:55 -0700 Subject: [PATCH 138/191] Go Generate and Add a Workflow to perform a sanity check (#99) * Add a check for generated code Signed-off-by: Haytham Abuelfutuh * mod_download Signed-off-by: Haytham Abuelfutuh * gen-config Signed-off-by: Haytham Abuelfutuh --- .../.github/workflows/pull_request.yml | 14 ++++++++ flytestdlib/cache/mocks/AutoRefresh.go | 32 +++++++++++++++++ flytestdlib/logger/config_flags.go | 9 +++++ flytestdlib/logger/config_flags_test.go | 34 +------------------ 4 files changed, 56 insertions(+), 33 deletions(-) diff --git a/flytestdlib/.github/workflows/pull_request.yml b/flytestdlib/.github/workflows/pull_request.yml index b0e05d6fe4..ffea087eb5 100644 --- a/flytestdlib/.github/workflows/pull_request.yml +++ b/flytestdlib/.github/workflows/pull_request.yml @@ -35,3 +35,17 @@ jobs: GO111MODULE: "on" with: args: make install && make test_benchmark + test-generate-integrity: + name: Ensure go generate has run + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: GoGenerate and Diff + uses: cedrickring/golang-action@1.6.0 + env: + GO111MODULE: "on" + with: + args: make gen-config && git diff --quiet || { echo "run go gonerate ./..."; exit 1; } diff --git a/flytestdlib/cache/mocks/AutoRefresh.go b/flytestdlib/cache/mocks/AutoRefresh.go index 4d07f5486b..a0d37ac9b7 100644 --- a/flytestdlib/cache/mocks/AutoRefresh.go +++ b/flytestdlib/cache/mocks/AutoRefresh.go @@ -15,6 +15,38 @@ type AutoRefresh struct { mock.Mock } +type AutoRefresh_DeleteDelayed struct { + *mock.Call +} + +func (_m AutoRefresh_DeleteDelayed) Return(_a0 error) *AutoRefresh_DeleteDelayed { + return &AutoRefresh_DeleteDelayed{Call: _m.Call.Return(_a0)} +} + +func (_m *AutoRefresh) OnDeleteDelayed(id string) *AutoRefresh_DeleteDelayed { + c := _m.On("DeleteDelayed", id) + return &AutoRefresh_DeleteDelayed{Call: c} +} + +func (_m *AutoRefresh) OnDeleteDelayedMatch(matchers ...interface{}) *AutoRefresh_DeleteDelayed { + c := _m.On("DeleteDelayed", matchers...) + return &AutoRefresh_DeleteDelayed{Call: c} +} + +// DeleteDelayed provides a mock function with given fields: id +func (_m *AutoRefresh) DeleteDelayed(id string) error { + ret := _m.Called(id) + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(id) + } else { + r0 = ret.Error(0) + } + + return r0 +} + type AutoRefresh_Get struct { *mock.Call } diff --git a/flytestdlib/logger/config_flags.go b/flytestdlib/logger/config_flags.go index 4e2c7795e4..8d41c35129 100755 --- a/flytestdlib/logger/config_flags.go +++ b/flytestdlib/logger/config_flags.go @@ -28,6 +28,15 @@ func (Config) elemValueOrNil(v interface{}) interface{} { return v } +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (Config) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { diff --git a/flytestdlib/logger/config_flags_test.go b/flytestdlib/logger/config_flags_test.go index fd2ce27db2..8c6eb2c276 100755 --- a/flytestdlib/logger/config_flags_test.go +++ b/flytestdlib/logger/config_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_Config(t *testing.T, val, result interface{}) { assert.NoError(t, decode_Config(val, result)) } -func testDecodeSlice_Config(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_Config(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_show-source", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("show-source"); err == nil { - assert.Equal(t, bool(defaultConfig.IncludeSourceCode), vBool) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -122,14 +114,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_mute", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("mute"); err == nil { - assert.Equal(t, bool(defaultConfig.Mute), vBool) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -144,14 +128,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_level", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vInt, err := cmdFlags.GetInt("level"); err == nil { - assert.Equal(t, int(defaultConfig.Level), vInt) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -166,14 +142,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_formatter.type", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("formatter.type"); err == nil { - assert.Equal(t, string(defaultConfig.Formatter.Type), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" From b7cb0a1458884a8a2798ae17e72700e3a28f7959 Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Wed, 13 Oct 2021 19:42:51 +0530 Subject: [PATCH 139/191] Add Slack button to README (#101) --- flytestdlib/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/flytestdlib/README.md b/flytestdlib/README.md index 085e2c914b..d209e025c7 100644 --- a/flytestdlib/README.md +++ b/flytestdlib/README.md @@ -8,6 +8,7 @@ Common Go Tools [![Go Report Card](https://goreportcard.com/badge/github.com/lyft/flytestdlib)](https://goreportcard.com/report/github.com/lyft/flytestdlib) ![Commit activity](https://img.shields.io/github/commit-activity/w/lyft/flytestdlib.svg?style=plastic) ![Commit since last releast](https://img.shields.io/github/commits-since/lyft/flytestdlib/latest.svg?style=plastic) +[![Slack](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://slack.flyte.org) Shared components we found ourselves building time and time again, so we collected them in one place! From a21be1e53e3867102c370c9c2e50ad04f8333c1e Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Thu, 14 Oct 2021 12:05:32 -0700 Subject: [PATCH 140/191] Added FastCheck Filters #minor (#100) * Added FastCheck Filters - Fast check filters allow to look for existence of an item and prioritize false negatives instead of false positives like Bloom filters do. False negative here refers to the filter returning a negative, even if it is possible that the object was previously seen, instead of false for an object that was never seen, as in the case of bloom filters. The code had to be adapter from https://github.com/jmhodges/opposite_of_a_bloom_filter/blob/master/go/oppobloom/oppobloom.go because, the existing implementation had only one method that would check and add. We prefer the case in which can check and then add as 2 separate invocations Signed-off-by: Ketan Umare * Linter and better organization / comments Signed-off-by: Ketan Umare * Updated benchmark and tests Signed-off-by: Ketan Umare * improved Signed-off-by: Ketan Umare * updated filter benchmarking to split Contains / Add functions and work on single operation granularity Signed-off-by: Daniel Rammer Co-authored-by: Daniel Rammer --- flytestdlib/fastcheck/doc.go | 11 ++ flytestdlib/fastcheck/fastcheck_test.go | 173 ++++++++++++++++++++++++ flytestdlib/fastcheck/iface.go | 37 +++++ flytestdlib/fastcheck/lru.go | 45 ++++++ flytestdlib/fastcheck/oppobloom.go | 121 +++++++++++++++++ 5 files changed, 387 insertions(+) create mode 100644 flytestdlib/fastcheck/doc.go create mode 100644 flytestdlib/fastcheck/fastcheck_test.go create mode 100644 flytestdlib/fastcheck/iface.go create mode 100644 flytestdlib/fastcheck/lru.go create mode 100644 flytestdlib/fastcheck/oppobloom.go diff --git a/flytestdlib/fastcheck/doc.go b/flytestdlib/fastcheck/doc.go new file mode 100644 index 0000000000..1cdf28c587 --- /dev/null +++ b/flytestdlib/fastcheck/doc.go @@ -0,0 +1,11 @@ +// This package contains implementation for checking if an item has been seen previously. This is different from a bloom-filter +// as it prioritizes false-negatives (return absence even if the object was seen previously), instead of false-positives. +// A Bloom filter prioritizes false-positives (return presence even if the object was not seen previously) +// and thus is able to provide a high compression. +// This is similar to a cache, with the difference being that it does not store a value and can use other optimized +// representations to compress the keys and optimize for storage. +// The simplest implementation for the fastcheck.Filter is an LRU cache +// the package provides alternative implementations and is inspired by the code in +// https://github.com/jmhodges/opposite_of_a_bloom_filter/ and +// the related blog https://www.somethingsimilar.com/2012/05/21/the-opposite-of-a-bloom-filter/ +package fastcheck diff --git a/flytestdlib/fastcheck/fastcheck_test.go b/flytestdlib/fastcheck/fastcheck_test.go new file mode 100644 index 0000000000..07ad57d354 --- /dev/null +++ b/flytestdlib/fastcheck/fastcheck_test.go @@ -0,0 +1,173 @@ +package fastcheck + +import ( + "context" + "math/rand" + "testing" + + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils/labeled" + "github.com/stretchr/testify/assert" +) + +func TestFilter(t *testing.T) { + ctx := context.TODO() + + lru, err := NewLRUCacheFilter(2, promutils.NewTestScope()) + assert.NoError(t, err) + assert.NotNil(t, lru) + oppo, err := NewOppoBloomFilter(2, promutils.NewTestScope()) + assert.NoError(t, err) + assert.NotNil(t, oppo) + + twentyNineID := []byte{27, 28, 29} + thirtyID := []byte{27, 28, 30} + thirtyThreeID := []byte{27, 28, 33} + // the last 2 byte arrays have the same hash value + + assert.False(t, lru.Contains(ctx, twentyNineID)) + assert.False(t, oppo.Contains(ctx, twentyNineID)) + lru.Add(ctx, twentyNineID) + oppo.Add(ctx, twentyNineID) + assert.True(t, lru.Contains(ctx, twentyNineID)) + assert.True(t, oppo.Contains(ctx, twentyNineID)) + + assert.False(t, lru.Contains(ctx, thirtyID)) + assert.False(t, oppo.Contains(ctx, thirtyID)) + + assert.False(t, lru.Contains(ctx, thirtyThreeID)) + assert.False(t, oppo.Contains(ctx, thirtyThreeID)) + + // Now that they have the same hash value + lru.Add(ctx, thirtyID) + oppo.Add(ctx, thirtyID) + assert.True(t, lru.Contains(ctx, thirtyID)) + assert.True(t, oppo.Contains(ctx, thirtyID)) + // LRU should not contain it and oppo should also return false + assert.False(t, lru.Contains(ctx, thirtyThreeID)) + assert.False(t, oppo.Contains(ctx, thirtyThreeID)) + + lru.Add(ctx, thirtyThreeID) + oppo.Add(ctx, thirtyThreeID) + + // LRU will evict first entered, while oppo will evict matching hash + assert.True(t, lru.Contains(ctx, thirtyID)) + assert.False(t, oppo.Contains(ctx, thirtyID)) + +} + +func TestSizeRounding(t *testing.T) { + f, _ := NewOppoBloomFilter(3, promutils.NewTestScope()) + if len(f.array) != 4 { + t.Errorf("3 should round to 4") + } + f, _ = NewOppoBloomFilter(4, promutils.NewTestScope()) + if len(f.array) != 4 { + t.Errorf("4 should round to 4") + } + f, _ = NewOppoBloomFilter(129, promutils.NewTestScope()) + if len(f.array) != 256 { + t.Errorf("129 should round to 256") + } +} + +func TestTooLargeSize(t *testing.T) { + size := (1 << 30) + 1 + f, err := NewOppoBloomFilter(size, promutils.NewTestScope()) + if err != ErrSizeTooLarge { + t.Errorf("did not error out on a too-large filter size") + } + if f != nil { + t.Errorf("did not return nil on a too-large filter size") + } +} + +func TestTooSmallSize(t *testing.T) { + f, err := NewOppoBloomFilter(0, promutils.NewTestScope()) + if err != ErrSizeTooSmall { + t.Errorf("did not error out on a too small filter size") + } + if f != nil { + t.Errorf("did not return nil on a too small filter size") + } +} + +const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" +const ( + letterIdxBits = 6 // 6 bits to represent a letter index + letterIdxMask = 1<= 0; { //nolint:gosec + if remain == 0 { + cache, remain = rand.Int63(), letterIdxMax //nolint:gosec + } + if idx := int(cache & letterIdxMask); idx < len(letterBytes) { + b[i] = letterBytes[idx] + i-- + } + cache >>= letterIdxBits + remain-- + } + + return b +} + +// RandBytesSliceGenerator generates a slice of size m with random bytes of size n +func RandBytesSliceGenerator(n int, m int) [][]byte { + byteSlice := make([][]byte, 0, m) + for i := 0; i < m; i++ { + byteSlice = append(byteSlice, RandBytesGenerator(n)) + } + return byteSlice +} + +func benchmarkFilter(b *testing.B, ids [][]byte, f func(context.Context, []byte) bool, parallelism int) { + ctx := context.TODO() + b.SetParallelism(parallelism) + b.ResetTimer() + + b.RunParallel(func(pb *testing.PB) { + index := 0 + for pb.Next() { + index = (index + 1) % len(ids) + f(ctx, ids[index]) + } + }) +} + +func BenchmarkFilter(b *testing.B) { + parallelism := 10 + cacheSize := 5000 + + bf, err := NewOppoBloomFilter(cacheSize, promutils.NewTestScope()) + assert.NoError(b, err) + lf, err := NewLRUCacheFilter(cacheSize, promutils.NewTestScope()) + assert.NoError(b, err) + ids := RandBytesSliceGenerator(100, 100000) + + b.Run("oppoFilterContainsBenchmark", func(b *testing.B) { + benchmarkFilter(b, ids, bf.Contains, parallelism) + }) + + b.Run("oppoFilterAddBenchmark", func(b *testing.B) { + benchmarkFilter(b, ids, bf.Add, parallelism) + }) + + b.Run("lruCacheContainsBenchmark", func(b *testing.B) { + benchmarkFilter(b, ids, lf.Contains, parallelism) + }) + + b.Run("lruCacheAddBenchmark", func(b *testing.B) { + benchmarkFilter(b, ids, lf.Add, parallelism) + }) +} + +func init() { + labeled.SetMetricKeys(contextutils.MetricKeysFromStrings([]string{"test"})...) +} diff --git a/flytestdlib/fastcheck/iface.go b/flytestdlib/fastcheck/iface.go new file mode 100644 index 0000000000..e9d0637ad7 --- /dev/null +++ b/flytestdlib/fastcheck/iface.go @@ -0,0 +1,37 @@ +package fastcheck + +import ( + "context" + + "github.com/flyteorg/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils/labeled" +) + +// Filter provides an interface to check if a Key of type []byte was ever seen. +// The size of the cache is dependent on the id size and the initialization. It may also vary based on the implementation +// For example an LRU cache, may have an overhead because of the use of a HashMap with loading factor and collision +// resolution +// The Data-structure is thread-safe and can be accessed by multiple threads concurrently. +type Filter interface { + // Contains returns a True if the id was previously seen or false otherwise + // It may return a false, even if a item may have previously occurred. + Contains(ctx context.Context, id []byte) bool + + // Adds the element id to the Filter and returns if a previous object was evicted in the process + Add(ctx context.Context, id []byte) (evicted bool) +} + +// Every implementation of the Filter Interface provides these metrics +type Metrics struct { + // Indicates if the item was found in the cache + Hit labeled.Counter + // Indicates if the item was not found in the cache + Miss labeled.Counter +} + +func newMetrics(scope promutils.Scope) Metrics { + return Metrics{ + Hit: labeled.NewCounter("cache_hit", "Indicates that the item was found in the cache", scope), + Miss: labeled.NewCounter("cache_miss", "Indicates that the item was found in the cache", scope), + } +} diff --git a/flytestdlib/fastcheck/lru.go b/flytestdlib/fastcheck/lru.go new file mode 100644 index 0000000000..05360567fc --- /dev/null +++ b/flytestdlib/fastcheck/lru.go @@ -0,0 +1,45 @@ +package fastcheck + +import ( + "context" + + "github.com/flyteorg/flytestdlib/promutils" + cache "github.com/hashicorp/golang-lru" +) + +// validate that it conforms to the interface +var _ Filter = LRUCacheFilter{} + +// Implements the fastcheck.Filter interface using an underlying LRUCache from cache.Cache +// the underlying lru cache implementation is thread-safe +type LRUCacheFilter struct { + lru *cache.Cache + metrics Metrics +} + +// Simply uses Contains from the LRUCacheFilter +func (l LRUCacheFilter) Contains(ctx context.Context, id []byte) bool { + v := l.lru.Contains(string(id)) + if v { + l.metrics.Hit.Inc(ctx) + return true + } + l.metrics.Miss.Inc(ctx) + return false +} + +func (l LRUCacheFilter) Add(_ context.Context, id []byte) bool { + return l.lru.Add(string(id), nil) +} + +// Create a new fastcheck.Filter using an LRU cache of type cache.Cache with a fixed size +func NewLRUCacheFilter(size int, scope promutils.Scope) (*LRUCacheFilter, error) { + c, err := cache.New(size) + if err != nil { + return nil, err + } + return &LRUCacheFilter{ + lru: c, + metrics: newMetrics(scope), + }, nil +} diff --git a/flytestdlib/fastcheck/oppobloom.go b/flytestdlib/fastcheck/oppobloom.go new file mode 100644 index 0000000000..c1ce967707 --- /dev/null +++ b/flytestdlib/fastcheck/oppobloom.go @@ -0,0 +1,121 @@ +// Copyright 2012 Jeff Hodges. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +// Copyright FlyteAuthors. +// This code is liberally copied from the original implementation at https://github.com/jmhodges/opposite_of_a_bloom_filter/blob/master/go/oppobloom/oppobloom.go +// Package oppobloom implements a filter data structure that may report false negatives but no false positives. + +// the fastcheck.OppoBloomFilter provides two methods instead of one, a contains and an add. This makes it possible to +// check and then optionally add the value. It is possible that two threads may race and add it multiple times +package fastcheck + +import ( + "bytes" + "context" + "crypto/md5" //nolint:gosec + "errors" + "hash" + "math" + "sync/atomic" + "unsafe" + + "github.com/flyteorg/flytestdlib/promutils" +) + +var ErrSizeTooLarge = errors.New("oppobloom: size given too large to round to a power of 2") +var ErrSizeTooSmall = errors.New("oppobloom: filter cannot have a zero or negative size") +var MaxFilterSize = 1 << 30 + +// validate that it conforms to the interface +var _ Filter = &OppoBloomFilter{} + +type md5UintHash struct { + hash.Hash // a hack with knowledge of how md5 works +} + +func (m md5UintHash) Sum32() uint32 { + sum := m.Sum(nil) + x := uint32(sum[0]) + for _, val := range sum[1:3] { + x = x << 3 + x += uint32(val) + } + return x +} + +// Implementation of the oppoFilter proposed in https://github.com/jmhodges/opposite_of_a_bloom_filter/ and +// the related blog https://www.somethingsimilar.com/2012/05/21/the-opposite-of-a-bloom-filter/ +type OppoBloomFilter struct { + array []*[]byte + sizeMask uint32 + metrics Metrics +} + +// getIndex calculates the hashindex of the given id +func (f *OppoBloomFilter) getIndex(id []byte) int32 { + //nolint:gosec + h := md5UintHash{md5.New()} + h.Write(id) + uindex := h.Sum32() & f.sizeMask + return int32(uindex) +} + +func (f *OppoBloomFilter) Add(_ context.Context, id []byte) bool { + oldID := getAndSet(f.array, f.getIndex(id), id) + return !bytes.Equal(oldID, id) +} + +func (f *OppoBloomFilter) Contains(ctx context.Context, id []byte) bool { + curr := get(f.array, f.getIndex(id)) + if curr != nil { + if bytes.Equal(id, *curr) { + f.metrics.Hit.Inc(ctx) + return true + } + } + f.metrics.Miss.Inc(ctx) + return false +} + +// Helper methods + +// get returns the actual value stored at the given index. If not found the value can be nil +func get(arr []*[]byte, index int32) *[]byte { + indexPtr := (*unsafe.Pointer)(unsafe.Pointer(&arr[index])) + return (*[]byte)(atomic.LoadPointer(indexPtr)) +} + +// getAndSet Returns the id that was in the slice at the given index after putting the +// new id in the slice at that index, atomically. +func getAndSet(arr []*[]byte, index int32, id []byte) []byte { + indexPtr := (*unsafe.Pointer)(unsafe.Pointer(&arr[index])) + idUnsafe := unsafe.Pointer(&id) + var oldID []byte + for { + oldIDUnsafe := atomic.LoadPointer(indexPtr) + if atomic.CompareAndSwapPointer(indexPtr, oldIDUnsafe, idUnsafe) { + oldIDPtr := (*[]byte)(oldIDUnsafe) + if oldIDPtr != nil { + oldID = *oldIDPtr + } + break + } + } + return oldID +} + +// NewOppoBloomFilter creates a new Opposite of Bloom filter proposed in https://github.com/jmhodges/opposite_of_a_bloom_filter/ and +// the related blog https://www.somethingsimilar.com/2012/05/21/the-opposite-of-a-bloom-filter/ +func NewOppoBloomFilter(size int, scope promutils.Scope) (*OppoBloomFilter, error) { + if size > MaxFilterSize { + return nil, ErrSizeTooLarge + } + if size <= 0 { + return nil, ErrSizeTooSmall + } + // round to the next largest power of two + size = int(math.Pow(2, math.Ceil(math.Log2(float64(size))))) + slice := make([]*[]byte, size) + sizeMask := uint32(size - 1) + return &OppoBloomFilter{slice, sizeMask, newMetrics(scope)}, nil +} From a625e0c0e5df8afeae1629d7eb93a5aaa0d0f1af Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Wed, 20 Oct 2021 12:58:58 -0500 Subject: [PATCH 141/191] add mocks to the fastcheck package (#102) * added mocks to the fastcheck package Signed-off-by: Daniel Rammer * added generic set test to fix codecov failing Signed-off-by: Daniel Rammer --- flytestdlib/fastcheck/iface.go | 3 ++ flytestdlib/fastcheck/mocks/filter.go | 78 +++++++++++++++++++++++++++ flytestdlib/sets/generic_set_test.go | 8 +++ 3 files changed, 89 insertions(+) create mode 100644 flytestdlib/fastcheck/mocks/filter.go diff --git a/flytestdlib/fastcheck/iface.go b/flytestdlib/fastcheck/iface.go index e9d0637ad7..2c285b9b88 100644 --- a/flytestdlib/fastcheck/iface.go +++ b/flytestdlib/fastcheck/iface.go @@ -12,6 +12,9 @@ import ( // For example an LRU cache, may have an overhead because of the use of a HashMap with loading factor and collision // resolution // The Data-structure is thread-safe and can be accessed by multiple threads concurrently. + +//go:generate mockery -name Filter -case=underscore + type Filter interface { // Contains returns a True if the id was previously seen or false otherwise // It may return a false, even if a item may have previously occurred. diff --git a/flytestdlib/fastcheck/mocks/filter.go b/flytestdlib/fastcheck/mocks/filter.go new file mode 100644 index 0000000000..04b31555a8 --- /dev/null +++ b/flytestdlib/fastcheck/mocks/filter.go @@ -0,0 +1,78 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// Filter is an autogenerated mock type for the Filter type +type Filter struct { + mock.Mock +} + +type Filter_Add struct { + *mock.Call +} + +func (_m Filter_Add) Return(evicted bool) *Filter_Add { + return &Filter_Add{Call: _m.Call.Return(evicted)} +} + +func (_m *Filter) OnAdd(ctx context.Context, id []byte) *Filter_Add { + c := _m.On("Add", ctx, id) + return &Filter_Add{Call: c} +} + +func (_m *Filter) OnAddMatch(matchers ...interface{}) *Filter_Add { + c := _m.On("Add", matchers...) + return &Filter_Add{Call: c} +} + +// Add provides a mock function with given fields: ctx, id +func (_m *Filter) Add(ctx context.Context, id []byte) bool { + ret := _m.Called(ctx, id) + + var r0 bool + if rf, ok := ret.Get(0).(func(context.Context, []byte) bool); ok { + r0 = rf(ctx, id) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +type Filter_Contains struct { + *mock.Call +} + +func (_m Filter_Contains) Return(_a0 bool) *Filter_Contains { + return &Filter_Contains{Call: _m.Call.Return(_a0)} +} + +func (_m *Filter) OnContains(ctx context.Context, id []byte) *Filter_Contains { + c := _m.On("Contains", ctx, id) + return &Filter_Contains{Call: c} +} + +func (_m *Filter) OnContainsMatch(matchers ...interface{}) *Filter_Contains { + c := _m.On("Contains", matchers...) + return &Filter_Contains{Call: c} +} + +// Contains provides a mock function with given fields: ctx, id +func (_m *Filter) Contains(ctx context.Context, id []byte) bool { + ret := _m.Called(ctx, id) + + var r0 bool + if rf, ok := ret.Get(0).(func(context.Context, []byte) bool); ok { + r0 = rf(ctx, id) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} diff --git a/flytestdlib/sets/generic_set_test.go b/flytestdlib/sets/generic_set_test.go index 9d9f165ed5..ac95a64726 100644 --- a/flytestdlib/sets/generic_set_test.go +++ b/flytestdlib/sets/generic_set_test.go @@ -64,7 +64,15 @@ func TestGenericSet(t *testing.T) { assert.True(t, g2.IsSuperset(g1)) assert.False(t, g1.IsSuperset(g2)) } + { + g1 := NewGeneric(GenericVal("a"), GenericVal("b")) + g2 := g1.UnsortedListKeys() + assert.Equal(t, g1.Len(), len(g2)) + for _, key := range g2 { + assert.True(t, g1.Has(GenericVal(key))) + } + } { g1 := NewGeneric(GenericVal("a"), GenericVal("b")) assert.True(t, g1.Has(GenericVal("a"))) From ca6c9794d14ef04f58ccdcc708ab2dcd0a71a63f Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Mon, 25 Oct 2021 16:38:32 -0500 Subject: [PATCH 142/191] Unlabel prometheus filter metrics (#104) * updated prometheus metric from a labeled counter to unlabeled Signed-off-by: Daniel Rammer * labeled the unused context parameter on lur and oppobloom Contains functions Signed-off-by: Daniel Rammer --- flytestdlib/fastcheck/iface.go | 11 ++++++----- flytestdlib/fastcheck/lru.go | 6 +++--- flytestdlib/fastcheck/oppobloom.go | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/flytestdlib/fastcheck/iface.go b/flytestdlib/fastcheck/iface.go index 2c285b9b88..0eec7bc7c6 100644 --- a/flytestdlib/fastcheck/iface.go +++ b/flytestdlib/fastcheck/iface.go @@ -3,8 +3,9 @@ package fastcheck import ( "context" + "github.com/prometheus/client_golang/prometheus" + "github.com/flyteorg/flytestdlib/promutils" - "github.com/flyteorg/flytestdlib/promutils/labeled" ) // Filter provides an interface to check if a Key of type []byte was ever seen. @@ -27,14 +28,14 @@ type Filter interface { // Every implementation of the Filter Interface provides these metrics type Metrics struct { // Indicates if the item was found in the cache - Hit labeled.Counter + Hit prometheus.Counter // Indicates if the item was not found in the cache - Miss labeled.Counter + Miss prometheus.Counter } func newMetrics(scope promutils.Scope) Metrics { return Metrics{ - Hit: labeled.NewCounter("cache_hit", "Indicates that the item was found in the cache", scope), - Miss: labeled.NewCounter("cache_miss", "Indicates that the item was found in the cache", scope), + Hit: scope.MustNewCounter("cache_hit", "Indicates that the item was found in the cache"), + Miss: scope.MustNewCounter("cache_miss", "Indicates that the item was found in the cache"), } } diff --git a/flytestdlib/fastcheck/lru.go b/flytestdlib/fastcheck/lru.go index 05360567fc..86c557a46f 100644 --- a/flytestdlib/fastcheck/lru.go +++ b/flytestdlib/fastcheck/lru.go @@ -18,13 +18,13 @@ type LRUCacheFilter struct { } // Simply uses Contains from the LRUCacheFilter -func (l LRUCacheFilter) Contains(ctx context.Context, id []byte) bool { +func (l LRUCacheFilter) Contains(_ context.Context, id []byte) bool { v := l.lru.Contains(string(id)) if v { - l.metrics.Hit.Inc(ctx) + l.metrics.Hit.Inc() return true } - l.metrics.Miss.Inc(ctx) + l.metrics.Miss.Inc() return false } diff --git a/flytestdlib/fastcheck/oppobloom.go b/flytestdlib/fastcheck/oppobloom.go index c1ce967707..b3582fffc7 100644 --- a/flytestdlib/fastcheck/oppobloom.go +++ b/flytestdlib/fastcheck/oppobloom.go @@ -65,15 +65,15 @@ func (f *OppoBloomFilter) Add(_ context.Context, id []byte) bool { return !bytes.Equal(oldID, id) } -func (f *OppoBloomFilter) Contains(ctx context.Context, id []byte) bool { +func (f *OppoBloomFilter) Contains(_ context.Context, id []byte) bool { curr := get(f.array, f.getIndex(id)) if curr != nil { if bytes.Equal(id, *curr) { - f.metrics.Hit.Inc(ctx) + f.metrics.Hit.Inc() return true } } - f.metrics.Miss.Inc(ctx) + f.metrics.Miss.Inc() return false } From 112bdf89b50b1a9d6f5b6471f6ac01695eb732c6 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Tue, 2 Nov 2021 00:27:17 -0700 Subject: [PATCH 143/191] Update Boilerplate (#105) Signed-off-by: Flyte-Bot Co-authored-by: flyte-bot --- flytestdlib/.github/config.yml | 2 +- flytestdlib/boilerplate/flyte/welcome_bot/config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flytestdlib/.github/config.yml b/flytestdlib/.github/config.yml index 7afe6111f5..73da252e52 100644 --- a/flytestdlib/.github/config.yml +++ b/flytestdlib/.github/config.yml @@ -1,5 +1,5 @@ # Comment to be posted on PRs from first-time contributors in your repository -newPRWelcomeComment: > +newPRWelcomeComment: | Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line: diff --git a/flytestdlib/boilerplate/flyte/welcome_bot/config.yml b/flytestdlib/boilerplate/flyte/welcome_bot/config.yml index 7afe6111f5..73da252e52 100644 --- a/flytestdlib/boilerplate/flyte/welcome_bot/config.yml +++ b/flytestdlib/boilerplate/flyte/welcome_bot/config.yml @@ -1,5 +1,5 @@ # Comment to be posted on PRs from first-time contributors in your repository -newPRWelcomeComment: > +newPRWelcomeComment: | Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line: From e58917c3206e395ec2154cbde34c342ecb2793c1 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Sat, 6 Nov 2021 08:44:48 +0800 Subject: [PATCH 144/191] Add config docs generate command (#103) * Added show command Signed-off-by: Kevin Su * Added tests Signed-off-by: Kevin Su * Added tests Signed-off-by: Kevin Su * Added link Signed-off-by: Kevin Su * Config docs Signed-off-by: Kevin Su * Address comments Signed-off-by: Kevin Su * Added tests Signed-off-by: Kevin Su * Fixed lint Signed-off-by: Kevin Su * Address comments Signed-off-by: Kevin Su * Fixed lint Signed-off-by: Kevin Su * Updated tests Signed-off-by: Kevin Su * Updated tests Signed-off-by: Kevin Su * Fixed lint Signed-off-by: Kevin Su * Updated tests Signed-off-by: Kevin Su * Updated tests Signed-off-by: Kevin Su --- flytestdlib/config/config_cmd.go | 212 +++++++++++++++++++++++++- flytestdlib/config/config_cmd_test.go | 59 +++++++ 2 files changed, 270 insertions(+), 1 deletion(-) diff --git a/flytestdlib/config/config_cmd.go b/flytestdlib/config/config_cmd.go index a5023ceb61..cadb5efa99 100644 --- a/flytestdlib/config/config_cmd.go +++ b/flytestdlib/config/config_cmd.go @@ -2,8 +2,14 @@ package config import ( "context" + "fmt" "os" + "reflect" "strings" + "unsafe" + + "github.com/ghodss/yaml" + "k8s.io/apimachinery/pkg/util/sets" "github.com/fatih/color" "github.com/spf13/cobra" @@ -14,6 +20,7 @@ const ( StrictModeFlag = "strict" CommandValidate = "validate" CommandDiscover = "discover" + CommandDocs = "docs" ) type AccessorProvider func(options Options) Accessor @@ -28,7 +35,7 @@ func NewConfigCommand(accessorProvider AccessorProvider) *cobra.Command { rootCmd := &cobra.Command{ Use: "config", Short: "Runs various config commands, look at the help of this command to get a list of available commands..", - ValidArgs: []string{CommandValidate, CommandDiscover}, + ValidArgs: []string{CommandValidate, CommandDiscover, CommandDocs}, } validateCmd := &cobra.Command{ @@ -47,12 +54,34 @@ func NewConfigCommand(accessorProvider AccessorProvider) *cobra.Command { }, } + docsCmd := &cobra.Command{ + Use: "docs", + Short: "Generate configuration documetation in rst format", + RunE: func(cmd *cobra.Command, args []string) error { + sections := GetRootSection().GetSections() + orderedSectionKeys := sets.NewString() + for s := range sections { + orderedSectionKeys.Insert(s) + } + printToc(orderedSectionKeys) + visitedSection := map[string]bool{} + visitedType := map[reflect.Type]bool{} + for _, sectionKey := range orderedSectionKeys.List() { + if canPrint(sections[sectionKey].GetConfig()) { + printDocs(sectionKey, false, sections[sectionKey], visitedSection, visitedType) + } + } + return nil + }, + } + // Configure Root Command rootCmd.PersistentFlags().StringArrayVar(&opts.SearchPaths, PathFlag, []string{}, `Passes the config file to load. If empty, it'll first search for the config file path then, if found, will load config from there.`) rootCmd.AddCommand(validateCmd) rootCmd.AddCommand(discoverCmd) + rootCmd.AddCommand(docsCmd) // Configure Validate Command validateCmd.Flags().BoolVar(&opts.StrictMode, StrictModeFlag, false, `Validates that all keys in loaded config @@ -75,6 +104,187 @@ func redirectStdOut() (old, new *os.File) { return } +func printDocs(title string, isSubsection bool, section Section, visitedSection map[string]bool, visitedType map[reflect.Type]bool) { + printTitle(title, isSubsection) + val := reflect.Indirect(reflect.ValueOf(section.GetConfig())) + if val.Kind() == reflect.Slice { + val = reflect.Indirect(reflect.ValueOf(val.Index(0).Interface())) + } + + subsections := make(map[string]interface{}) + for i := 0; i < val.Type().NumField(); i++ { + field := val.Type().Field(i) + tagType := field.Type + if tagType.Kind() == reflect.Ptr { + tagType = field.Type.Elem() + } + + fieldName := getFieldNameFromJSONTag(field) + fieldTypeString := getFieldTypeString(tagType) + fieldDefaultValue := getDefaultValue(fmt.Sprintf("%v", reflect.Indirect(val.Field(i)))) + fieldDescription := getFieldDescriptionFromPflag(field) + + subVal := val.Field(i) + if tagType.Kind() == reflect.Struct { + // In order to get value from unexported field in struct + if subVal.Kind() == reflect.Ptr { + subVal = reflect.NewAt(subVal.Type(), unsafe.Pointer(subVal.UnsafeAddr())).Elem() + } else { + subVal = reflect.NewAt(subVal.Type(), unsafe.Pointer(subVal.UnsafeAddr())) + } + } + + if tagType.Kind() == reflect.Map || tagType.Kind() == reflect.Slice || tagType.Kind() == reflect.Struct { + fieldDefaultValue = getDefaultValue(subVal.Interface()) + } + + if tagType.Kind() == reflect.Struct { + if canPrint(subVal.Interface()) { + addSubsection(subVal.Interface(), subsections, fieldName, &fieldTypeString, tagType, visitedSection, visitedType) + } + } + printSection(fieldName, fieldTypeString, fieldDefaultValue, fieldDescription) + } + + if section != nil { + sections := section.GetSections() + orderedSectionKeys := sets.NewString() + for s := range sections { + orderedSectionKeys.Insert(s) + } + for _, sectionKey := range orderedSectionKeys.List() { + fieldName := sectionKey + fieldType := reflect.TypeOf(sections[sectionKey].GetConfig()) + fieldTypeString := getFieldTypeString(fieldType) + fieldDefaultValue := getDefaultValue(sections[sectionKey].GetConfig()) + + addSubsection(sections[sectionKey].GetConfig(), subsections, fieldName, &fieldTypeString, fieldType, visitedSection, visitedType) + printSection(fieldName, fieldTypeString, fieldDefaultValue, "") + } + } + orderedSectionKeys := sets.NewString() + for s := range subsections { + orderedSectionKeys.Insert(s) + } + + for _, sectionKey := range orderedSectionKeys.List() { + printDocs(sectionKey, true, NewSection(subsections[sectionKey], nil), visitedSection, visitedType) + } +} + +// Print Table of contents +func printToc(orderedSectionKeys sets.String) { + for _, sectionKey := range orderedSectionKeys.List() { + fmt.Printf("- `%s <#section-%s>`_\n\n", sectionKey, sectionKey) + } +} + +func printTitle(title string, isSubsection bool) { + if isSubsection { + fmt.Println(title) + fmt.Println(strings.Repeat("-", 80)) + } else { + fmt.Println("Section:", title) + fmt.Println(strings.Repeat("=", 80)) + } + fmt.Println() +} + +func printSection(name string, dataType string, defaultValue string, description string) { + c := "-" + + fmt.Printf("%s ", name) + fmt.Printf("(%s)\n", dataType) + fmt.Println(strings.Repeat(c, 80)) + fmt.Println() + if description != "" { + fmt.Printf("%s\n\n", description) + } + if defaultValue != "" { + val := strings.Replace(defaultValue, "\n", "\n ", -1) + val = ".. code-block:: yaml\n\n " + val + fmt.Printf("**Default Value**: \n\n%s\n", val) + } + fmt.Println() +} + +func addSubsection(val interface{}, subsections map[string]interface{}, fieldName string, + fieldTypeString *string, fieldType reflect.Type, visitedSection map[string]bool, visitedType map[reflect.Type]bool) { + + if visitedSection[*fieldTypeString] { + if !visitedType[fieldType] { + // Some types have the same name, but they are different type. + // Add field name at the end to tell the difference between them. + *fieldTypeString = fmt.Sprintf("%s (%s)", *fieldTypeString, fieldName) + subsections[*fieldTypeString] = val + + } + } else { + visitedSection[*fieldTypeString] = true + subsections[*fieldTypeString] = val + } + *fieldTypeString = fmt.Sprintf("`%s`_", *fieldTypeString) + visitedType[fieldType] = true +} + +func getDefaultValue(val interface{}) string { + defaultValue, err := yaml.Marshal(val) + if err != nil { + return "" + } + DefaultValue := string(defaultValue) + return DefaultValue +} + +func getFieldTypeString(tagType reflect.Type) string { + kind := tagType.Kind() + if kind == reflect.Ptr { + tagType = tagType.Elem() + kind = tagType.Kind() + } + + FieldTypeString := kind.String() + if kind == reflect.Map || kind == reflect.Slice || kind == reflect.Struct { + FieldTypeString = tagType.String() + } + return FieldTypeString +} + +func getFieldDescriptionFromPflag(field reflect.StructField) string { + if pFlag := field.Tag.Get("pflag"); len(pFlag) > 0 && !strings.HasPrefix(pFlag, "-") { + var commaIdx int + if commaIdx = strings.Index(pFlag, ","); commaIdx < 0 { + commaIdx = -1 + } + if strippedDescription := pFlag[commaIdx+1:]; len(strippedDescription) > 0 { + return strings.TrimPrefix(strippedDescription, " ") + } + } + return "" +} + +func getFieldNameFromJSONTag(field reflect.StructField) string { + if jsonTag := field.Tag.Get("json"); len(jsonTag) > 0 && !strings.HasPrefix(jsonTag, "-") { + var commaIdx int + if commaIdx = strings.Index(jsonTag, ","); commaIdx < 0 { + commaIdx = len(jsonTag) + } + if strippedName := jsonTag[:commaIdx]; len(strippedName) > 0 { + return strippedName + } + } + return field.Name +} + +// Print out config docs if and only if the section type is struct or slice +func canPrint(b interface{}) bool { + val := reflect.Indirect(reflect.ValueOf(b)) + if val.Kind() == reflect.Struct || val.Kind() == reflect.Slice { + return true + } + return false +} + func validate(accessor Accessor, p printer) error { // Redirect stdout old, n := redirectStdOut() diff --git a/flytestdlib/config/config_cmd_test.go b/flytestdlib/config/config_cmd_test.go index 03546ea9b7..0974ca3666 100644 --- a/flytestdlib/config/config_cmd_test.go +++ b/flytestdlib/config/config_cmd_test.go @@ -4,6 +4,7 @@ import ( "bytes" "context" "flag" + "reflect" "testing" "github.com/spf13/cobra" @@ -11,6 +12,10 @@ import ( "github.com/stretchr/testify/assert" ) +var redisConfig = "mockRedis" +var resourceManagerConfig = ResourceManagerConfig{"mockType", 100, &redisConfig, + []int{1, 2, 3}, InnerConfig{"hello"}, &InnerConfig{"world"}} + type MockAccessor struct { } @@ -61,4 +66,58 @@ func TestNewConfigCommand(t *testing.T) { output, err = executeCommandC(cmd, CommandValidate) assert.NoError(t, err) assert.Contains(t, output, "test") + + section, err := GetRootSection().RegisterSection("root", &resourceManagerConfig) + assert.NoError(t, err) + section.MustRegisterSection("subsection", &resourceManagerConfig) + _, err = executeCommandC(cmd, CommandDocs) + assert.NoError(t, err) +} + +type InnerConfig struct { + InnerType string `json:"type" pflag:"noop,Which resource manager to use"` +} + +type ResourceManagerConfig struct { + Type string `json:"type" pflag:"noop,Which resource manager to use"` + ResourceMaxQuota int `json:"resourceMaxQuota" pflag:",Global limit for concurrent Qubole queries"` + RedisConfig *string `json:"" pflag:",Config for Redis resource manager."` + ListConfig []int `json:"" pflag:","` + InnerConfig InnerConfig + InnerConfig1 *InnerConfig +} + +func TestGetDefaultValue(t *testing.T) { + val := getDefaultValue(resourceManagerConfig) + res := "InnerConfig:\n type: hello\nInnerConfig1:\n type: world\nListConfig:\n- 1\n- 2\n- 3\nRedisConfig: mockRedis\nresourceMaxQuota: 100\ntype: mockType\n" + assert.Equal(t, res, val) +} + +func TestGetFieldTypeString(t *testing.T) { + val := reflect.ValueOf(resourceManagerConfig) + assert.Equal(t, "config.ResourceManagerConfig", getFieldTypeString(val.Type())) + assert.Equal(t, "string", getFieldTypeString(val.Field(0).Type())) + assert.Equal(t, "int", getFieldTypeString(val.Field(1).Type())) + assert.Equal(t, "string", getFieldTypeString(val.Field(2).Type())) +} + +func TestGetFieldDescriptionFromPflag(t *testing.T) { + val := reflect.ValueOf(resourceManagerConfig) + assert.Equal(t, "Which resource manager to use", getFieldDescriptionFromPflag(val.Type().Field(0))) + assert.Equal(t, "Global limit for concurrent Qubole queries", getFieldDescriptionFromPflag(val.Type().Field(1))) + assert.Equal(t, "Config for Redis resource manager.", getFieldDescriptionFromPflag(val.Type().Field(2))) +} + +func TestGetFieldNameFromJSONTag(t *testing.T) { + val := reflect.ValueOf(resourceManagerConfig) + assert.Equal(t, "type", getFieldNameFromJSONTag(val.Type().Field(0))) + assert.Equal(t, "resourceMaxQuota", getFieldNameFromJSONTag(val.Type().Field(1))) + assert.Equal(t, "RedisConfig", getFieldNameFromJSONTag(val.Type().Field(2))) +} + +func TestCanPrint(t *testing.T) { + assert.True(t, canPrint(resourceManagerConfig)) + assert.True(t, canPrint(&resourceManagerConfig)) + assert.True(t, canPrint([]ResourceManagerConfig{resourceManagerConfig})) + assert.False(t, canPrint(map[string]ResourceManagerConfig{"config": resourceManagerConfig})) } From e2a0e0a81b6d92819332193fd10bcff04d1b177e Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Sat, 13 Nov 2021 03:29:31 +0800 Subject: [PATCH 145/191] Print subsection in different heading level (#106) Signed-off-by: Kevin Su --- flytestdlib/config/config_cmd.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/flytestdlib/config/config_cmd.go b/flytestdlib/config/config_cmd.go index cadb5efa99..086009e263 100644 --- a/flytestdlib/config/config_cmd.go +++ b/flytestdlib/config/config_cmd.go @@ -143,7 +143,7 @@ func printDocs(title string, isSubsection bool, section Section, visitedSection addSubsection(subVal.Interface(), subsections, fieldName, &fieldTypeString, tagType, visitedSection, visitedType) } } - printSection(fieldName, fieldTypeString, fieldDefaultValue, fieldDescription) + printSection(fieldName, fieldTypeString, fieldDefaultValue, fieldDescription, isSubsection) } if section != nil { @@ -159,7 +159,7 @@ func printDocs(title string, isSubsection bool, section Section, visitedSection fieldDefaultValue := getDefaultValue(sections[sectionKey].GetConfig()) addSubsection(sections[sectionKey].GetConfig(), subsections, fieldName, &fieldTypeString, fieldType, visitedSection, visitedType) - printSection(fieldName, fieldTypeString, fieldDefaultValue, "") + printSection(fieldName, fieldTypeString, fieldDefaultValue, "", isSubsection) } } orderedSectionKeys := sets.NewString() @@ -182,7 +182,7 @@ func printToc(orderedSectionKeys sets.String) { func printTitle(title string, isSubsection bool) { if isSubsection { fmt.Println(title) - fmt.Println(strings.Repeat("-", 80)) + fmt.Println(strings.Repeat("^", 80)) } else { fmt.Println("Section:", title) fmt.Println(strings.Repeat("=", 80)) @@ -190,8 +190,11 @@ func printTitle(title string, isSubsection bool) { fmt.Println() } -func printSection(name string, dataType string, defaultValue string, description string) { +func printSection(name string, dataType string, defaultValue string, description string, isSubsection bool) { c := "-" + if isSubsection { + c = "\"" + } fmt.Printf("%s ", name) fmt.Printf("(%s)\n", dataType) @@ -217,7 +220,6 @@ func addSubsection(val interface{}, subsections map[string]interface{}, fieldNam // Add field name at the end to tell the difference between them. *fieldTypeString = fmt.Sprintf("%s (%s)", *fieldTypeString, fieldName) subsections[*fieldTypeString] = val - } } else { visitedSection[*fieldTypeString] = true From 21d07def475e92e72de4f4a6f12d7865cc84c8c8 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Tue, 23 Nov 2021 19:13:52 -0800 Subject: [PATCH 146/191] Support Named types in pflags (#107) * Support Named/Alias types Signed-off-by: Haytham Abuelfutuh * Add test for enumer generated enums Signed-off-by: Haytham Abuelfutuh * Add type casting for named basic types Signed-off-by: Haytham Abuelfutuh * Update generator to leverage Stringer and JsonUnmarshaler interfaces Signed-off-by: Haytham Abuelfutuh * Support bind to default var for NamedTypes Signed-off-by: Haytham Abuelfutuh * wip Signed-off-by: Haytham Abuelfutuh * Revert generation of PFlag Value interface Signed-off-by: Haytham Abuelfutuh * Remove bad unit test Signed-off-by: Haytham Abuelfutuh * lint Signed-off-by: Haytham Abuelfutuh * lint Signed-off-by: Haytham Abuelfutuh * fix dash in golang support tools Signed-off-by: Haytham Abuelfutuh --- .../flyte/golang_support_tools/go.mod | 2 +- .../flyte/golang_support_tools/tools.go | 3 +- flytestdlib/cli/pflags/api/generator.go | 342 +++++++++---- flytestdlib/cli/pflags/api/generator_test.go | 118 +++-- .../cli/pflags/api/namedtype_enumer.go | 68 +++ flytestdlib/cli/pflags/api/pflag_provider.go | 35 +- flytestdlib/cli/pflags/api/sample.go | 35 +- flytestdlib/cli/pflags/api/templates.go | 19 +- .../cli/pflags/api/testdata/testtype.go | 2 + .../cli/pflags/api/testdata/testtype_bind.go | 80 +++ .../pflags/api/testdata/testtype_bind_test.go | 462 ++++++++++++++++++ .../cli/pflags/api/testdata/testtype_test.go | 28 ++ flytestdlib/cli/pflags/api/types.go | 44 +- flytestdlib/cli/pflags/api/utils.go | 29 ++ flytestdlib/config/duration.go | 14 +- flytestdlib/config/port.go | 16 + flytestdlib/config/tests/accessor_test.go | 1 + flytestdlib/config/tests/testdata/config.yaml | 1 + flytestdlib/config/tests/types_test.go | 76 +++ flytestdlib/config/url.go | 16 + flytestdlib/go.mod | 76 ++- flytestdlib/storage/config.go | 10 +- flytestdlib/utils/marshal_utils.go | 10 +- flytestdlib/utils/marshal_utils_test.go | 1 + 24 files changed, 1265 insertions(+), 223 deletions(-) create mode 100644 flytestdlib/cli/pflags/api/namedtype_enumer.go create mode 100755 flytestdlib/cli/pflags/api/testdata/testtype_bind.go create mode 100755 flytestdlib/cli/pflags/api/testdata/testtype_bind_test.go diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod index 53f645159a..692db82fb7 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod @@ -1,6 +1,6 @@ module github.com/flyteorg/boilerplate -go 1.16 +go 1.17 require ( github.com/alvaroloes/enumer v1.1.2 diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go b/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go index eee691d8c3..da7b933302 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go @@ -1,3 +1,4 @@ +//go:build tools // +build tools package tools @@ -6,6 +7,6 @@ import ( _ "github.com/alvaroloes/enumer" _ "github.com/flyteorg/flytestdlib/cli/pflags" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" + _ "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" _ "github.com/vektra/mockery/cmd/mockery" - - "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index 70dc49a0b5..80b92dcfbd 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -78,15 +78,16 @@ func buildFieldForSlice(ctx context.Context, t SliceOrArray, name, goName, usage } return FieldInfo{ - Name: name, - GoName: goName, - Typ: typ, - FlagMethodName: FlagMethodName, - DefaultValue: defaultValue, - UsageString: usage, - TestValue: testValue, - TestStrategy: strategy, - ShouldBindDefault: bindDefaultVar, + Name: name, + GoName: goName, + Typ: typ, + FlagMethodName: FlagMethodName, + TestFlagMethodName: FlagMethodName, + DefaultValue: defaultValue, + UsageString: usage, + TestValue: testValue, + TestStrategy: strategy, + ShouldBindDefault: bindDefaultVar, }, nil } @@ -122,16 +123,17 @@ func buildFieldForMap(ctx context.Context, t *types.Map, name, goName, usage, de testValue := `"a=1,b=2"` return FieldInfo{ - Name: name, - GoName: goName, - Typ: typ, - FlagMethodName: FlagMethodName, - DefaultValue: defaultValue, - UsageString: usage, - TestValue: testValue, - TestStrategy: strategy, - ShouldBindDefault: bindDefaultVar, - ShouldTestDefault: false, + Name: name, + GoName: goName, + Typ: typ, + FlagMethodName: FlagMethodName, + TestFlagMethodName: FlagMethodName, + DefaultValue: defaultValue, + UsageString: usage, + TestValue: testValue, + TestStrategy: strategy, + ShouldBindDefault: bindDefaultVar, + ShouldTestDefault: false, }, nil } @@ -165,11 +167,20 @@ func appendAccessors(accessors ...string) string { return sb.String() } +func pflagValueTypesToList(m map[string]PFlagValueType) []PFlagValueType { + l := make([]PFlagValueType, 0, len(m)) + for _, v := range m { + l = append(l, v) + } + + return l +} + // Traverses fields in type and follows recursion tree to discover all fields. It stops when one of two conditions is // met; encountered a basic type (e.g. string, int... etc.) or the field type implements UnmarshalJSON. // If passed a non-empty defaultValueAccessor, it'll be used to fill in default values instead of any default value // specified in pflag tag. -func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValueAccessor, fieldPath string, bindDefaultVar bool) ([]FieldInfo, error) { +func discoverFieldsRecursive(ctx context.Context, workingDirPkg string, typ *types.Named, defaultValueAccessor, fieldPath string, bindDefaultVar bool) ([]FieldInfo, []PFlagValueType, error) { logger.Printf(ctx, "Finding all fields in [%v.%v.%v]", typ.Obj().Pkg().Path(), typ.Obj().Pkg().Name(), typ.Obj().Name()) @@ -177,20 +188,33 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue st := typ.Underlying().(*types.Struct) fields := make([]FieldInfo, 0, st.NumFields()) + pflagValueTypes := make(map[string]PFlagValueType, st.NumFields()) + addField := func(typ types.Type, f FieldInfo) { + if _, isNamed := typ.(*types.Named); isNamed && bindDefaultVar { + hasPFlagValueImpl := isPFlagValue(typ) + if hasPFlagValueImpl { + f.FlagMethodName = "" + } else { + f.ShouldBindDefault = false + } + } + + fields = append(fields, f) + } for i := 0; i < st.NumFields(); i++ { - v := st.Field(i) - if !v.IsField() { + variable := st.Field(i) + if !variable.IsField() { continue } // Parses out the tag if one exists. tag, err := ParseTag(st.Tag(i)) if err != nil { - return nil, err + return nil, nil, err } if len(tag.Name) == 0 { - tag.Name = v.Name() + tag.Name = variable.Name() } if tag.DefaultValue == "-" { @@ -198,7 +222,7 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue continue } - typ := v.Type() + typ := variable.Type() ptr, isPtr := typ.(*types.Pointer) if isPtr { typ = ptr.Elem() @@ -206,49 +230,29 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue switch t := typ.(type) { case *types.Basic: - if len(tag.DefaultValue) == 0 { - tag.DefaultValue = fmt.Sprintf("*new(%v)", typ.String()) + f, err := buildBasicField(ctx, tag, t, defaultValueAccessor, fieldPath, variable, false, false, isPtr, bindDefaultVar, nil) + if err != nil { + return fields, pflagValueTypesToList(pflagValueTypes), err } - logger.Infof(ctx, "[%v] is of a basic type with default value [%v].", tag.Name, tag.DefaultValue) - - isAllowed := false - for _, k := range allowedKinds { - if t.String() == k.String() { - isAllowed = true - break + addField(typ, f) + case *types.Named: + // For type aliases/named types (e.g. `type Foo int`), they will show up as Named but their underlying type + // will be basic. + if _, isBasic := t.Underlying().(*types.Basic); isBasic { + logger.Debugf(ctx, "type [%v] is a named basic type. Using buildNamedBasicField to generate it.", t.Obj().Name()) + f, err := buildNamedBasicField(ctx, workingDirPkg, tag, t, defaultValueAccessor, fieldPath, variable, isPtr, bindDefaultVar) + if err != nil { + return fields, []PFlagValueType{}, err } - } - - if !isAllowed { - return nil, fmt.Errorf("only these basic kinds are allowed. given [%v] (Kind: [%v]. expected: [%+v]", - t.String(), t.Kind(), allowedKinds) - } - defaultValue := tag.DefaultValue - if len(defaultValueAccessor) > 0 { - defaultValue = appendAccessors(defaultValueAccessor, fieldPath, v.Name()) - - if isPtr { - defaultValue = fmt.Sprintf("%s.elemValueOrNil(%s).(%s)", defaultValueAccessor, defaultValue, t.Name()) - } + addField(typ, f) + break } - fields = append(fields, FieldInfo{ - Name: tag.Name, - GoName: v.Name(), - Typ: t, - FlagMethodName: camelCase(t.String()), - DefaultValue: defaultValue, - UsageString: tag.Usage, - TestValue: `"1"`, - TestStrategy: JSON, - ShouldBindDefault: bindDefaultVar, - }) - case *types.Named: if _, isStruct := t.Underlying().(*types.Struct); !isStruct { // TODO: Add a more descriptive error message. - return nil, fmt.Errorf("invalid type. it must be struct, received [%v] for field [%v]", t.Underlying().String(), tag.Name) + return nil, []PFlagValueType{}, fmt.Errorf("invalid type. it must be struct, received [%v] for field [%v]", t.Underlying().String(), tag.Name) } // If the type has json unmarshaler, then stop the recursion and assume the type is string. config package @@ -256,22 +260,35 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue jsonUnmarshaler := isJSONUnmarshaler(t) defaultValue := tag.DefaultValue + bindDefaultVarForField := bindDefaultVar + testValue := defaultValue if len(defaultValueAccessor) > 0 { - defaultValue = appendAccessors(defaultValueAccessor, fieldPath, v.Name()) + defaultValue = appendAccessors(defaultValueAccessor, fieldPath, variable.Name()) + if isStringer(t) { - defaultValue = defaultValue + ".String()" + if !bindDefaultVar { + defaultValue = defaultValue + ".String()" + testValue = defaultValue + } else { + testValue = defaultValue + ".String()" + } + + // Don't do anything, we will generate PFlagValue implementation to use this. } else if isJSONMarshaler(t) { logger.Infof(ctx, "Field [%v] of type [%v] does not implement Stringer interface."+ - " Will use %s.mustMarshalJSON() to get its default value.", defaultValueAccessor, v.Name(), t.String()) + " Will use %s.mustMarshalJSON() to get its default value.", defaultValueAccessor, variable.Name(), t.String()) defaultValue = fmt.Sprintf("%s.mustMarshalJSON(%s)", defaultValueAccessor, defaultValue) + bindDefaultVarForField = false + testValue = defaultValue } else { logger.Infof(ctx, "Field [%v] of type [%v] does not implement Stringer interface."+ - " Will use %s.mustMarshalJSON() to get its default value.", defaultValueAccessor, v.Name(), t.String()) + " Will use %s.mustMarshalJSON() to get its default value.", defaultValueAccessor, variable.Name(), t.String()) defaultValue = fmt.Sprintf("%s.mustJsonMarshal(%s)", defaultValueAccessor, defaultValue) + bindDefaultVarForField = false + testValue = defaultValue } } - testValue := defaultValue if len(testValue) == 0 { testValue = `"1"` } @@ -281,78 +298,201 @@ func discoverFieldsRecursive(ctx context.Context, typ *types.Named, defaultValue if jsonUnmarshaler { logger.Infof(logger.WithIndent(ctx, indent), "Type is json unmarhslalable.") - fields = append(fields, FieldInfo{ - Name: tag.Name, - GoName: v.Name(), - Typ: types.Typ[types.String], - FlagMethodName: "String", - DefaultValue: defaultValue, - UsageString: tag.Usage, - TestValue: testValue, - TestStrategy: JSON, - ShouldBindDefault: bindDefaultVar, + addField(typ, FieldInfo{ + Name: tag.Name, + GoName: variable.Name(), + Typ: types.Typ[types.String], + FlagMethodName: "String", + TestFlagMethodName: "String", + DefaultValue: defaultValue, + UsageString: tag.Usage, + TestValue: testValue, + TestStrategy: JSON, + ShouldBindDefault: bindDefaultVarForField, + LocalTypeName: t.Obj().Name(), }) } else { logger.Infof(ctx, "Traversing fields in type.") - nested, err := discoverFieldsRecursive(logger.WithIndent(ctx, indent), t, defaultValueAccessor, appendAccessors(fieldPath, v.Name()), bindDefaultVar) + nested, otherPflagValueTypes, err := discoverFieldsRecursive(logger.WithIndent(ctx, indent), workingDirPkg, t, defaultValueAccessor, appendAccessors(fieldPath, variable.Name()), bindDefaultVar) if err != nil { - return nil, err + return nil, []PFlagValueType{}, err } for _, subField := range nested { - fields = append(fields, FieldInfo{ - Name: fmt.Sprintf("%v.%v", tag.Name, subField.Name), - GoName: fmt.Sprintf("%v.%v", v.Name(), subField.GoName), - Typ: subField.Typ, - FlagMethodName: subField.FlagMethodName, - DefaultValue: subField.DefaultValue, - UsageString: subField.UsageString, - TestValue: subField.TestValue, - TestStrategy: subField.TestStrategy, - ShouldBindDefault: bindDefaultVar, + addField(subField.Typ, FieldInfo{ + Name: fmt.Sprintf("%v.%v", tag.Name, subField.Name), + GoName: fmt.Sprintf("%v.%v", variable.Name(), subField.GoName), + Typ: subField.Typ, + FlagMethodName: subField.FlagMethodName, + TestFlagMethodName: subField.TestFlagMethodName, + DefaultValue: subField.DefaultValue, + UsageString: subField.UsageString, + TestValue: subField.TestValue, + TestStrategy: subField.TestStrategy, + ShouldBindDefault: bindDefaultVar, + LocalTypeName: subField.LocalTypeName, }) } + + for _, vType := range otherPflagValueTypes { + pflagValueTypes[vType.Name] = vType + } } case *types.Slice: logger.Infof(ctx, "[%v] is of a slice type with default value [%v].", tag.Name, tag.DefaultValue) defaultValue := tag.DefaultValue - f, err := buildFieldForSlice(logger.WithIndent(ctx, indent), t, tag.Name, v.Name(), tag.Usage, defaultValue, bindDefaultVar) + f, err := buildFieldForSlice(logger.WithIndent(ctx, indent), t, tag.Name, variable.Name(), tag.Usage, defaultValue, bindDefaultVar) if err != nil { - return nil, err + return nil, []PFlagValueType{}, err } - fields = append(fields, f) + addField(typ, f) case *types.Array: logger.Infof(ctx, "[%v] is of an array type with default value [%v].", tag.Name, tag.DefaultValue) defaultValue := tag.DefaultValue - f, err := buildFieldForSlice(logger.WithIndent(ctx, indent), t, tag.Name, v.Name(), tag.Usage, defaultValue, bindDefaultVar) + f, err := buildFieldForSlice(logger.WithIndent(ctx, indent), t, tag.Name, variable.Name(), tag.Usage, defaultValue, bindDefaultVar) if err != nil { - return nil, err + return nil, []PFlagValueType{}, err } - fields = append(fields, f) + addField(typ, f) case *types.Map: logger.Infof(ctx, "[%v] is of a map type with default value [%v].", tag.Name, tag.DefaultValue) defaultValue := tag.DefaultValue if len(defaultValueAccessor) > 0 { - defaultValue = appendAccessors(defaultValueAccessor, fieldPath, v.Name()) + defaultValue = appendAccessors(defaultValueAccessor, fieldPath, variable.Name()) } - f, err := buildFieldForMap(logger.WithIndent(ctx, indent), t, tag.Name, v.Name(), tag.Usage, defaultValue, bindDefaultVar) + f, err := buildFieldForMap(logger.WithIndent(ctx, indent), t, tag.Name, variable.Name(), tag.Usage, defaultValue, bindDefaultVar) if err != nil { - return nil, err + return nil, []PFlagValueType{}, err } - fields = append(fields, f) + addField(typ, f) default: - return nil, fmt.Errorf("unexpected type %v", t.String()) + return nil, []PFlagValueType{}, fmt.Errorf("unexpected type %v", t.String()) + } + } + + return fields, pflagValueTypesToList(pflagValueTypes), nil +} + +// buildNamedBasicField builds FieldInfo for a NamedType that has an underlying basic type (e.g. `type Foo int`) +func buildNamedBasicField(ctx context.Context, workingDirPkg string, tag Tag, t *types.Named, defaultValueAccessor, fieldPath string, + v *types.Var, isPtr, bindDefaultVar bool) (FieldInfo, error) { + _, casted := t.Underlying().(*types.Basic) + if !casted { + return FieldInfo{}, fmt.Errorf("expected named type with an underlying basic type. Received [%v]", t.String()) + } + + if !isStringer(t) { + return FieldInfo{}, fmt.Errorf("type [%v] doesn't implement Stringer interface. If you are trying to declare an enum, make sure to run `enumer` on it", t.String()) + } + + if !isJSONUnmarshaler(t) { + return FieldInfo{}, fmt.Errorf("type [%v] doesn't implement JSONUnmarshaler interface. If you are trying to create an enum, make sure to run `enumer -json` on it", t.String()) + } + + hasPFlagValueImpl := isPFlagValue(t) + if !hasPFlagValueImpl && bindDefaultVar && t.Obj().Pkg().Path() != workingDirPkg { + return FieldInfo{}, fmt.Errorf("field [%v] of type [%v] from package [%v] does not implement PFlag's"+ + " Value interface and is not local to the package to generate an implementation for automatically. Either"+ + " disable bind-default-var for the type, disable pflag generation for this field or created a local"+ + " wrapper type", t.Obj().Name(), appendAccessors(fieldPath, v.Name()), t.Obj().Pkg().Path()) + } + + // We rely on `enumer` generation to convert string to value. If it's not implemented, fail + if !hasStringConstructor(t) { + typeName := t.Obj().Name() + return FieldInfo{}, fmt.Errorf("field [%v] of type [%v] from package [%v] doesn't have `enumer` run. "+ + "Add: //go:generate enumer --type=%s --trimPrefix=%s", typeName, appendAccessors(fieldPath, + v.Name()), t.Obj().Pkg().Path(), typeName, typeName) + } + + accessorWrapper := func(str string) string { + return fmt.Sprintf("%s.String()", str) + } + + if bindDefaultVar && hasPFlagValueImpl { + accessorWrapper = nil + } + + f, err := buildBasicField(ctx, tag, types.Typ[types.String], defaultValueAccessor, fieldPath, v, + hasPFlagValueImpl, true, isPtr, bindDefaultVar, accessorWrapper) + if err != nil { + return FieldInfo{}, err + } + + // Override the local type name to be the named type name. + f.LocalTypeName = t.Obj().Name() + return f, nil +} + +func buildBasicField(ctx context.Context, tag Tag, t *types.Basic, defaultValueAccessor, fieldPath string, + v *types.Var, isPFlagValue, isNamed, isPtr, bindDefaultVar bool, accessorWrapper func(string) string) (FieldInfo, error) { + + if len(tag.DefaultValue) == 0 { + tag.DefaultValue = fmt.Sprintf("*new(%v)", t.String()) + } + + logger.Infof(ctx, "[%v] is of a basic type with default value [%v].", tag.Name, tag.DefaultValue) + + isAllowed := false + for _, k := range allowedKinds { + if t.String() == k.String() { + isAllowed = true + break } } - return fields, nil + // If the type is a NamedType, we can generate interface implementation to make it work, so don't error here. + if !isAllowed && !isNamed { + return FieldInfo{}, fmt.Errorf("only these basic kinds are allowed. given [%v] (Kind: [%v]. expected: [%+v]", + t.String(), t.Kind(), allowedKinds) + } + + defaultValue := tag.DefaultValue + if len(defaultValueAccessor) > 0 { + defaultValue = appendAccessors(defaultValueAccessor, fieldPath, v.Name()) + if accessorWrapper != nil { + defaultValue = accessorWrapper(defaultValue) + } + + if isPtr { + defaultValue = fmt.Sprintf("%s.elemValueOrNil(%s).(%s)", defaultValueAccessor, defaultValue, t.Name()) + if bindDefaultVar { + logger.Warnf(ctx, "field [%v] is nullable. Will not bind default variable", defaultValue) + bindDefaultVar = false + } + } + } + + flagMethodName := camelCase(t.String()) + testFlagMethodName := flagMethodName + if isNamed && bindDefaultVar && isPFlagValue { + // The template automatically appends the word "Var" to the method name. + // The one we now want to use is just named "Var" so make this string empty to end up with the + // right method name. + flagMethodName = "" + } else if isNamed && bindDefaultVar { + bindDefaultVar = false + } + + return FieldInfo{ + Name: tag.Name, + GoName: v.Name(), + Typ: t, + FlagMethodName: flagMethodName, + TestFlagMethodName: testFlagMethodName, + DefaultValue: defaultValue, + UsageString: tag.Usage, + TestValue: `"1"`, + TestStrategy: JSON, + ShouldBindDefault: bindDefaultVar, + }, nil } // NewGenerator initializes a PFlagProviderGenerator for pflags files for targetTypeName struct under pkg. If pkg is not filled in, @@ -440,10 +580,10 @@ func (g PFlagProviderGenerator) Generate(ctx context.Context) (PFlagProvider, er defaultValueAccessor = g.defaultVar.Name() } - fields, err := discoverFieldsRecursive(ctx, g.st, defaultValueAccessor, "", g.shouldBindDefaultVar) + fields, pflagValueTypes, err := discoverFieldsRecursive(ctx, g.pkg.Path(), g.st, defaultValueAccessor, "", g.shouldBindDefaultVar) if err != nil { return PFlagProvider{}, err } - return newPflagProvider(g.pkg, g.st.Obj().Name(), fields), nil + return newPflagProvider(g.pkg, g.st.Obj().Name(), fields, pflagValueTypes), nil } diff --git a/flytestdlib/cli/pflags/api/generator_test.go b/flytestdlib/cli/pflags/api/generator_test.go index e8240c8296..21eee3b026 100644 --- a/flytestdlib/cli/pflags/api/generator_test.go +++ b/flytestdlib/cli/pflags/api/generator_test.go @@ -10,6 +10,7 @@ import ( "os" "path/filepath" "reflect" + "strings" "testing" "github.com/stretchr/testify/assert" @@ -48,53 +49,82 @@ func TestElemValueOrNil(t *testing.T) { } func TestNewGenerator(t *testing.T) { - g, err := NewGenerator("github.com/flyteorg/flytestdlib/cli/pflags/api", "TestType", "DefaultTestType", false) - if !assert.NoError(t, err) { - t.FailNow() - } - ctx := context.Background() - p, err := g.Generate(ctx) - if !assert.NoError(t, err) { - t.FailNow() - } - - codeOutput, err := ioutil.TempFile("", "output-*.go") - if !assert.NoError(t, err) { - t.FailNow() + testCases := []struct { + TypeName string + DefaultVariableName string + shouldBindDefaultVariable bool + }{ + { + TypeName: "TestType", + DefaultVariableName: "DefaultTestType", + shouldBindDefaultVariable: false, + }, + { + TypeName: "TestType", + DefaultVariableName: "DefaultTestType", + shouldBindDefaultVariable: true, + }, } - defer func() { assert.NoError(t, os.Remove(codeOutput.Name())) }() - - testOutput, err := ioutil.TempFile("", "output-*_test.go") - if !assert.NoError(t, err) { - t.FailNow() + for _, typ := range testCases { + t.Run("Test "+typ.TypeName, func(t *testing.T) { + g, err := NewGenerator("github.com/flyteorg/flytestdlib/cli/pflags/api", typ.TypeName, typ.DefaultVariableName, typ.shouldBindDefaultVariable) + if !assert.NoError(t, err) { + t.FailNow() + } + ctx := context.Background() + p, err := g.Generate(ctx) + if !assert.NoError(t, err) { + t.FailNow() + } + + codeOutput, err := ioutil.TempFile("", "output-*.go") + if !assert.NoError(t, err) { + t.FailNow() + } + + defer func() { assert.NoError(t, os.Remove(codeOutput.Name())) }() + + testOutput, err := ioutil.TempFile("", "output-*_test.go") + if !assert.NoError(t, err) { + t.FailNow() + } + + defer func() { assert.NoError(t, os.Remove(testOutput.Name())) }() + + assert.NoError(t, p.WriteCodeFile(codeOutput.Name())) + assert.NoError(t, p.WriteTestFile(testOutput.Name())) + + codeBytes, err := ioutil.ReadFile(codeOutput.Name()) + assert.NoError(t, err) + + testBytes, err := ioutil.ReadFile(testOutput.Name()) + assert.NoError(t, err) + + var goldenFilePath string + var goldenTestFilePath string + goldenFilePath = filepath.Join("testdata", strings.ToLower(typ.TypeName)+".go") + goldenTestFilePath = filepath.Join("testdata", strings.ToLower(typ.TypeName)+"_test.go") + if typ.shouldBindDefaultVariable { + goldenFilePath = filepath.Join("testdata", strings.ToLower(typ.TypeName)+"_bind.go") + goldenTestFilePath = filepath.Join("testdata", strings.ToLower(typ.TypeName)+"_bind_test.go") + } + + if *update { + assert.NoError(t, ioutil.WriteFile(goldenFilePath, codeBytes, os.ModePerm)) + assert.NoError(t, ioutil.WriteFile(goldenTestFilePath, testBytes, os.ModePerm)) + } + + goldenOutput, err := ioutil.ReadFile(filepath.Clean(goldenFilePath)) + assert.NoError(t, err) + assert.Equal(t, string(goldenOutput), string(codeBytes)) + + goldenTestOutput, err := ioutil.ReadFile(filepath.Clean(goldenTestFilePath)) + assert.NoError(t, err) + assert.Equal(t, string(goldenTestOutput), string(testBytes)) + }) } - defer func() { assert.NoError(t, os.Remove(testOutput.Name())) }() - - assert.NoError(t, p.WriteCodeFile(codeOutput.Name())) - assert.NoError(t, p.WriteTestFile(testOutput.Name())) - - codeBytes, err := ioutil.ReadFile(codeOutput.Name()) - assert.NoError(t, err) - - testBytes, err := ioutil.ReadFile(testOutput.Name()) - assert.NoError(t, err) - - goldenFilePath := filepath.Join("testdata", "testtype.go") - goldenTestFilePath := filepath.Join("testdata", "testtype_test.go") - if *update { - assert.NoError(t, ioutil.WriteFile(goldenFilePath, codeBytes, os.ModePerm)) - assert.NoError(t, ioutil.WriteFile(goldenTestFilePath, testBytes, os.ModePerm)) - } - - goldenOutput, err := ioutil.ReadFile(filepath.Clean(goldenFilePath)) - assert.NoError(t, err) - assert.Equal(t, string(goldenOutput), string(codeBytes)) - - goldenTestOutput, err := ioutil.ReadFile(filepath.Clean(goldenTestFilePath)) - assert.NoError(t, err) - assert.Equal(t, string(goldenTestOutput), string(testBytes)) t.Run("empty package", func(t *testing.T) { gen, err := NewGenerator("", "TestType", "DefaultTestType", false) assert.Nil(t, err) @@ -176,7 +206,7 @@ func TestDiscoverFieldsRecursive(t *testing.T) { n1 := types.NewTypeName(token.NoPos, pkg, "T1", nil) namedTypes := types.NewNamed(n1, new(types.Struct), nil) //namedTypes := types.NewNamed(n1, nil, nil) - fields, err := discoverFieldsRecursive(ctx, namedTypes, defaultValueAccessor, fieldPath, false) + fields, _, err := discoverFieldsRecursive(ctx, "p", namedTypes, defaultValueAccessor, fieldPath, false) assert.Nil(t, err) assert.Equal(t, len(fields), 0) }) diff --git a/flytestdlib/cli/pflags/api/namedtype_enumer.go b/flytestdlib/cli/pflags/api/namedtype_enumer.go new file mode 100644 index 0000000000..4ea1621a7c --- /dev/null +++ b/flytestdlib/cli/pflags/api/namedtype_enumer.go @@ -0,0 +1,68 @@ +// Code generated by "enumer --type=NamedType --trimprefix=NamedType -json"; DO NOT EDIT. + +// +package api + +import ( + "encoding/json" + "fmt" +) + +const _NamedTypeName = "AB" + +var _NamedTypeIndex = [...]uint8{0, 1, 2} + +func (i NamedType) String() string { + if i < 0 || i >= NamedType(len(_NamedTypeIndex)-1) { + return fmt.Sprintf("NamedType(%d)", i) + } + return _NamedTypeName[_NamedTypeIndex[i]:_NamedTypeIndex[i+1]] +} + +var _NamedTypeValues = []NamedType{0, 1} + +var _NamedTypeNameToValueMap = map[string]NamedType{ + _NamedTypeName[0:1]: 0, + _NamedTypeName[1:2]: 1, +} + +// NamedTypeString retrieves an enum value from the enum constants string name. +// Throws an error if the param is not part of the enum. +func NamedTypeString(s string) (NamedType, error) { + if val, ok := _NamedTypeNameToValueMap[s]; ok { + return val, nil + } + return 0, fmt.Errorf("%s does not belong to NamedType values", s) +} + +// NamedTypeValues returns all values of the enum +func NamedTypeValues() []NamedType { + return _NamedTypeValues +} + +// IsANamedType returns "true" if the value is listed in the enum definition. "false" otherwise +func (i NamedType) IsANamedType() bool { + for _, v := range _NamedTypeValues { + if i == v { + return true + } + } + return false +} + +// MarshalJSON implements the json.Marshaler interface for NamedType +func (i NamedType) MarshalJSON() ([]byte, error) { + return json.Marshal(i.String()) +} + +// UnmarshalJSON implements the json.Unmarshaler interface for NamedType +func (i *NamedType) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return fmt.Errorf("NamedType should be a string, got %s", data) + } + + var err error + *i, err = NamedTypeString(s) + return err +} diff --git a/flytestdlib/cli/pflags/api/pflag_provider.go b/flytestdlib/cli/pflags/api/pflag_provider.go index e414398063..f1626ae8cc 100644 --- a/flytestdlib/cli/pflags/api/pflag_provider.go +++ b/flytestdlib/cli/pflags/api/pflag_provider.go @@ -13,12 +13,13 @@ import ( ) type PFlagProvider struct { - typeName string - pkg *types.Package - fields []FieldInfo + typeName string + pkg *types.Package + fields []FieldInfo + pflagValueTypes []PFlagValueType } -// Adds any needed imports for types not directly declared in this package. +// Imports adds any needed imports for types not directly declared in this package. func (p PFlagProvider) Imports() map[string]string { imp := imports.New(p.pkg.Name()) for _, m := range p.fields { @@ -28,7 +29,7 @@ func (p PFlagProvider) Imports() map[string]string { return imp.Imports() } -// Evaluates the main code file template and writes the output to outputFilePath +// WriteCodeFile evaluates the main code file template and writes the output to outputFilePath func (p PFlagProvider) WriteCodeFile(outputFilePath string) error { buf := bytes.Buffer{} err := p.generate(GenerateCodeFile, &buf, outputFilePath) @@ -39,7 +40,7 @@ func (p PFlagProvider) WriteCodeFile(outputFilePath string) error { return p.writeToFile(&buf, outputFilePath) } -// Evaluates the test code file template and writes the output to outputFilePath +// WriteTestFile evaluates the test code file template and writes the output to outputFilePath func (p PFlagProvider) WriteTestFile(outputFilePath string) error { buf := bytes.Buffer{} err := p.generate(GenerateTestFile, &buf, outputFilePath) @@ -54,15 +55,16 @@ func (p PFlagProvider) writeToFile(buffer *bytes.Buffer, fileName string) error return ioutil.WriteFile(fileName, buffer.Bytes(), os.ModePerm) } -// Evaluates the generator and writes the output to buffer. targetFileName is used only to influence how imports are +// generate evaluates the generator and writes the output to buffer. targetFileName is used only to influence how imports are // generated/optimized. func (p PFlagProvider) generate(generator func(buffer *bytes.Buffer, info TypeInfo) error, buffer *bytes.Buffer, targetFileName string) error { info := TypeInfo{ - Name: p.typeName, - Fields: p.fields, - Package: p.pkg.Name(), - Timestamp: time.Now(), - Imports: p.Imports(), + Name: p.typeName, + Fields: p.fields, + Package: p.pkg.Name(), + Timestamp: time.Now(), + Imports: p.Imports(), + PFlagValueTypes: p.pflagValueTypes, } if err := generator(buffer, info); err != nil { @@ -81,10 +83,11 @@ func (p PFlagProvider) generate(generator func(buffer *bytes.Buffer, info TypeIn return err } -func newPflagProvider(pkg *types.Package, typeName string, fields []FieldInfo) PFlagProvider { +func newPflagProvider(pkg *types.Package, typeName string, fields []FieldInfo, pflagValueTypes []PFlagValueType) PFlagProvider { return PFlagProvider{ - typeName: typeName, - pkg: pkg, - fields: fields, + typeName: typeName, + pkg: pkg, + fields: fields, + pflagValueTypes: pflagValueTypes, } } diff --git a/flytestdlib/cli/pflags/api/sample.go b/flytestdlib/cli/pflags/api/sample.go index 51d681febe..f84e9ad353 100644 --- a/flytestdlib/cli/pflags/api/sample.go +++ b/flytestdlib/cli/pflags/api/sample.go @@ -12,19 +12,32 @@ var DefaultTestType = &TestType{ } type TestType struct { - StringValue string `json:"str" pflag:"\"hello world\",\"life is short\""` - BoolValue bool `json:"bl" pflag:"true"` - NestedType NestedType `json:"nested"` - IntArray []int `json:"ints" pflag:"[]int{12%2C1}"` - StringArray []string `json:"strs" pflag:"[]string{\"12\"%2C\"1\"}"` - ComplexJSONArray []ComplexJSONType `json:"complexArr"` - StringToJSON ComplexJSONType `json:"c" pflag:",I'm a complex type but can be converted from string."` - IgnoredMap map[string]string `json:"ignored-map" pflag:"-,"` - StorageConfig storage.Config `json:"storage"` - IntValue *int `json:"i"` - StringMap map[string]string `json:"m" pflag:",I'm a map of strings"` + StringValue string `json:"str" pflag:"\"hello world\",\"life is short\""` + BoolValue bool `json:"bl" pflag:"true"` + NestedType NestedType `json:"nested"` + IntArray []int `json:"ints" pflag:"[]int{12%2C1}"` + StringArray []string `json:"strs" pflag:"[]string{\"12\"%2C\"1\"}"` + ComplexJSONArray []ComplexJSONType `json:"complexArr"` + StringToJSON ComplexJSONType `json:"c" pflag:",I'm a complex type but can be converted from string."` + IgnoredMap map[string]string `json:"ignored-map" pflag:"-,"` + StorageConfig storage.Config `json:"storage"` + IntValue *int `json:"i"` + StringMap map[string]string `json:"m" pflag:",I'm a map of strings"` + ConstType NamedType `json:"constType"` + AliasType TestConstTypeAlias `json:"aliasType"` } +//go:generate enumer --type=NamedType --trimprefix=NamedType -json + +type NamedType int + +const ( + NamedTypeA NamedType = iota + NamedTypeB +) + +type TestConstTypeAlias = int + type NestedType struct { IntValue int `json:"i" pflag:",this is an important flag"` } diff --git a/flytestdlib/cli/pflags/api/templates.go b/flytestdlib/cli/pflags/api/templates.go index 31799eb16e..f486ee4541 100644 --- a/flytestdlib/cli/pflags/api/templates.go +++ b/flytestdlib/cli/pflags/api/templates.go @@ -67,12 +67,20 @@ func ({{ .Name }}) mustMarshalJSON(v json.Marshaler) string { func (cfg {{ .Name }}) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("{{ .Name }}", pflag.ExitOnError) {{- range .Fields }} + {{- if eq .FlagMethodName "" }} + {{- if .ShouldBindDefault }} + cmdFlags.{{ .FlagMethodName }}Var(&{{ .DefaultValue }}, fmt.Sprintf("%v%v", prefix, "{{ .Name }}"), {{ .UsageString }}) + {{- else }} + cmdFlags.{{ .FlagMethodName }}(fmt.Sprintf("%v%v", prefix, "{{ .Name }}"), {{ .UsageString }}) + {{- end }} + {{- else }} {{- if .ShouldBindDefault }} cmdFlags.{{ .FlagMethodName }}Var(&{{ .DefaultValue }}, fmt.Sprintf("%v%v", prefix, "{{ .Name }}"), {{ .DefaultValue }}, {{ .UsageString }}) {{- else }} cmdFlags.{{ .FlagMethodName }}(fmt.Sprintf("%v%v", prefix, "{{ .Name }}"), {{ .DefaultValue }}, {{ .UsageString }}) {{- end }} {{- end }} + {{- end }} return cmdFlags } `)) @@ -202,7 +210,15 @@ func Test{{ .Name }}_SetFlags(t *testing.T) { {{ else }}testValue := join_{{ $ParentName }}({{ .TestValue }}, ",") {{ end }} cmdFlags.Set("{{ .Name }}", testValue) - if {{ $varName }}, err := cmdFlags.Get{{ .FlagMethodName }}("{{ .Name }}"); err == nil { + {{- if eq .FlagMethodName "" }} + if {{ $varName }} := cmdFlags.Lookup("{{ .Name }}"); {{ $varName }} != nil { + {{ if eq .TestStrategy "Json" }}testDecodeJson_{{ $ParentName }}(t, fmt.Sprintf("%v", v.Value.String()), &actual.{{ .GoName }}) + {{ else if eq .TestStrategy "Raw" }}testDecodeRaw_{{ $ParentName }}(t, v.Value.String(), &actual.{{ .GoName }}) + {{ else }}testDecodeRaw_{{ $ParentName }}(t, join_{{ $ParentName }}({{ print "v" .FlagMethodName }}, ",").Value.String(), &actual.{{ .GoName }}) + {{ end }} + } + {{- else }} + if {{ $varName }}, err := cmdFlags.Get{{ .TestFlagMethodName }}("{{ .Name }}"); err == nil { {{ if eq .TestStrategy "Json" }}testDecodeJson_{{ $ParentName }}(t, fmt.Sprintf("%v", {{ print "v" .FlagMethodName }}), &actual.{{ .GoName }}) {{ else if eq .TestStrategy "Raw" }}testDecodeRaw_{{ $ParentName }}(t, {{ print "v" .FlagMethodName }}, &actual.{{ .GoName }}) {{ else }}testDecodeRaw_{{ $ParentName }}(t, join_{{ $ParentName }}({{ print "v" .FlagMethodName }}, ","), &actual.{{ .GoName }}) @@ -210,6 +226,7 @@ func Test{{ .Name }}_SetFlags(t *testing.T) { } else { assert.FailNow(t, err.Error()) } + {{- end }} }) }) {{- end }} diff --git a/flytestdlib/cli/pflags/api/testdata/testtype.go b/flytestdlib/cli/pflags/api/testdata/testtype.go index ca352843bf..2d72c5ce5a 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype.go @@ -74,5 +74,7 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.defaultHttpClient.timeout"), DefaultTestType.StorageConfig.DefaultHTTPClient.Timeout.String(), "Sets time out on the http client.") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "i"), DefaultTestType.elemValueOrNil(DefaultTestType.IntValue).(int), "") cmdFlags.StringToString(fmt.Sprintf("%v%v", prefix, "m"), DefaultTestType.StringMap, "I'm a map of strings") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "constType"), DefaultTestType.ConstType.String(), "") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "aliasType"), DefaultTestType.AliasType, "") return cmdFlags } diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_bind.go b/flytestdlib/cli/pflags/api/testdata/testtype_bind.go new file mode 100755 index 0000000000..12be5bd52d --- /dev/null +++ b/flytestdlib/cli/pflags/api/testdata/testtype_bind.go @@ -0,0 +1,80 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package api + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (TestType) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (TestType) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (TestType) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in TestType and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("TestType", pflag.ExitOnError) + cmdFlags.StringVar(&DefaultTestType.StringValue, fmt.Sprintf("%v%v", prefix, "str"), DefaultTestType.StringValue, "life is short") + cmdFlags.BoolVar(&DefaultTestType.BoolValue, fmt.Sprintf("%v%v", prefix, "bl"), DefaultTestType.BoolValue, "") + cmdFlags.IntVar(&DefaultTestType.NestedType.IntValue, fmt.Sprintf("%v%v", prefix, "nested.i"), DefaultTestType.NestedType.IntValue, "this is an important flag") + cmdFlags.IntSliceVar(&[]int{12, 1}, fmt.Sprintf("%v%v", prefix, "ints"), []int{12, 1}, "") + cmdFlags.StringSliceVar(&[]string{"12", "1"}, fmt.Sprintf("%v%v", prefix, "strs"), []string{"12", "1"}, "") + cmdFlags.StringSliceVar(&[]string{}, fmt.Sprintf("%v%v", prefix, "complexArr"), []string{}, "") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "c"), DefaultTestType.mustJsonMarshal(DefaultTestType.StringToJSON), "I'm a complex type but can be converted from string.") + cmdFlags.StringVar(&DefaultTestType.StorageConfig.Type, fmt.Sprintf("%v%v", prefix, "storage.type"), DefaultTestType.StorageConfig.Type, "Sets the type of storage to configure [s3/minio/local/mem/stow].") + cmdFlags.Var(&DefaultTestType.StorageConfig.Connection.Endpoint, fmt.Sprintf("%v%v", prefix, "storage.connection.endpoint"), "URL for storage client to connect to.") + cmdFlags.StringVar(&DefaultTestType.StorageConfig.Connection.AuthType, fmt.Sprintf("%v%v", prefix, "storage.connection.auth-type"), DefaultTestType.StorageConfig.Connection.AuthType, "Auth Type to use [iam, accesskey].") + cmdFlags.StringVar(&DefaultTestType.StorageConfig.Connection.AccessKey, fmt.Sprintf("%v%v", prefix, "storage.connection.access-key"), DefaultTestType.StorageConfig.Connection.AccessKey, "Access key to use. Only required when authtype is set to accesskey.") + cmdFlags.StringVar(&DefaultTestType.StorageConfig.Connection.SecretKey, fmt.Sprintf("%v%v", prefix, "storage.connection.secret-key"), DefaultTestType.StorageConfig.Connection.SecretKey, "Secret to use when accesskey is set.") + cmdFlags.StringVar(&DefaultTestType.StorageConfig.Connection.Region, fmt.Sprintf("%v%v", prefix, "storage.connection.region"), DefaultTestType.StorageConfig.Connection.Region, "Region to connect to.") + cmdFlags.BoolVar(&DefaultTestType.StorageConfig.Connection.DisableSSL, fmt.Sprintf("%v%v", prefix, "storage.connection.disable-ssl"), DefaultTestType.StorageConfig.Connection.DisableSSL, "Disables SSL connection. Should only be used for development.") + cmdFlags.StringVar(&DefaultTestType.StorageConfig.Stow.Kind, fmt.Sprintf("%v%v", prefix, "storage.stow.kind"), DefaultTestType.StorageConfig.Stow.Kind, "Kind of Stow backend to use. Refer to github/graymeta/stow") + cmdFlags.StringToStringVar(&DefaultTestType.StorageConfig.Stow.Config, fmt.Sprintf("%v%v", prefix, "storage.stow.config"), DefaultTestType.StorageConfig.Stow.Config, "Configuration for stow backend. Refer to github/graymeta/stow") + cmdFlags.StringVar(&DefaultTestType.StorageConfig.InitContainer, fmt.Sprintf("%v%v", prefix, "storage.container"), DefaultTestType.StorageConfig.InitContainer, "Initial container (in s3 a bucket) to create -if it doesn't exist-.'") + cmdFlags.BoolVar(&DefaultTestType.StorageConfig.MultiContainerEnabled, fmt.Sprintf("%v%v", prefix, "storage.enable-multicontainer"), DefaultTestType.StorageConfig.MultiContainerEnabled, "If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered") + cmdFlags.IntVar(&DefaultTestType.StorageConfig.Cache.MaxSizeMegabytes, fmt.Sprintf("%v%v", prefix, "storage.cache.max_size_mbs"), DefaultTestType.StorageConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") + cmdFlags.IntVar(&DefaultTestType.StorageConfig.Cache.TargetGCPercent, fmt.Sprintf("%v%v", prefix, "storage.cache.target_gc_percent"), DefaultTestType.StorageConfig.Cache.TargetGCPercent, "Sets the garbage collection target percentage.") + cmdFlags.Int64Var(&DefaultTestType.StorageConfig.Limits.GetLimitMegabytes, fmt.Sprintf("%v%v", prefix, "storage.limits.maxDownloadMBs"), DefaultTestType.StorageConfig.Limits.GetLimitMegabytes, "Maximum allowed download size (in MBs) per call.") + cmdFlags.Var(&DefaultTestType.StorageConfig.DefaultHTTPClient.Timeout, fmt.Sprintf("%v%v", prefix, "storage.defaultHttpClient.timeout"), "Sets time out on the http client.") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "i"), DefaultTestType.elemValueOrNil(DefaultTestType.IntValue).(int), "") + cmdFlags.StringToStringVar(&DefaultTestType.StringMap, fmt.Sprintf("%v%v", prefix, "m"), DefaultTestType.StringMap, "I'm a map of strings") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "constType"), DefaultTestType.ConstType.String(), "") + cmdFlags.IntVar(&DefaultTestType.AliasType, fmt.Sprintf("%v%v", prefix, "aliasType"), DefaultTestType.AliasType, "") + return cmdFlags +} diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_bind_test.go b/flytestdlib/cli/pflags/api/testdata/testtype_bind_test.go new file mode 100755 index 0000000000..ea5b38e2ca --- /dev/null +++ b/flytestdlib/cli/pflags/api/testdata/testtype_bind_test.go @@ -0,0 +1,462 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package api + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsTestType = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementTestType(t reflect.Kind) bool { + _, exists := dereferencableKindsTestType[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookTestType(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementTestType(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_TestType(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookTestType, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_TestType(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_TestType(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_TestType(val, result)) +} + +func testDecodeRaw_TestType(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_TestType(vStringSlice, result)) +} + +func TestTestType_GetPFlagSet(t *testing.T) { + val := TestType{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestTestType_SetFlags(t *testing.T) { + actual := TestType{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_str", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("str", testValue) + if vString, err := cmdFlags.GetString("str"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StringValue) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_bl", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("bl", testValue) + if vBool, err := cmdFlags.GetBool("bl"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vBool), &actual.BoolValue) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_nested.i", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("nested.i", testValue) + if vInt, err := cmdFlags.GetInt("nested.i"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt), &actual.NestedType.IntValue) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_ints", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := join_TestType([]int{12, 1}, ",") + + cmdFlags.Set("ints", testValue) + if vIntSlice, err := cmdFlags.GetIntSlice("ints"); err == nil { + testDecodeRaw_TestType(t, join_TestType(vIntSlice, ","), &actual.IntArray) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_strs", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := join_TestType([]string{"12", "1"}, ",") + + cmdFlags.Set("strs", testValue) + if vStringSlice, err := cmdFlags.GetStringSlice("strs"); err == nil { + testDecodeRaw_TestType(t, join_TestType(vStringSlice, ","), &actual.StringArray) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_complexArr", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1,1" + + cmdFlags.Set("complexArr", testValue) + if vStringSlice, err := cmdFlags.GetStringSlice("complexArr"); err == nil { + testDecodeRaw_TestType(t, vStringSlice, &actual.ComplexJSONArray) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_c", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := DefaultTestType.mustJsonMarshal(DefaultTestType.StringToJSON) + + cmdFlags.Set("c", testValue) + if vString, err := cmdFlags.GetString("c"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StringToJSON) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.type", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.type", testValue) + if vString, err := cmdFlags.GetString("storage.type"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Type) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.connection.endpoint", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := DefaultTestType.StorageConfig.Connection.Endpoint.String() + + cmdFlags.Set("storage.connection.endpoint", testValue) + if v := cmdFlags.Lookup("storage.connection.endpoint"); v != nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", v.Value.String()), &actual.StorageConfig.Connection.Endpoint) + + } + }) + }) + t.Run("Test_storage.connection.auth-type", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.connection.auth-type", testValue) + if vString, err := cmdFlags.GetString("storage.connection.auth-type"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Connection.AuthType) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.connection.access-key", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.connection.access-key", testValue) + if vString, err := cmdFlags.GetString("storage.connection.access-key"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Connection.AccessKey) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.connection.secret-key", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.connection.secret-key", testValue) + if vString, err := cmdFlags.GetString("storage.connection.secret-key"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Connection.SecretKey) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.connection.region", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.connection.region", testValue) + if vString, err := cmdFlags.GetString("storage.connection.region"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Connection.Region) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.connection.disable-ssl", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.connection.disable-ssl", testValue) + if vBool, err := cmdFlags.GetBool("storage.connection.disable-ssl"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vBool), &actual.StorageConfig.Connection.DisableSSL) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.stow.kind", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.stow.kind", testValue) + if vString, err := cmdFlags.GetString("storage.stow.kind"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.Stow.Kind) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.stow.config", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "a=1,b=2" + + cmdFlags.Set("storage.stow.config", testValue) + if vStringToString, err := cmdFlags.GetStringToString("storage.stow.config"); err == nil { + testDecodeRaw_TestType(t, vStringToString, &actual.StorageConfig.Stow.Config) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.container", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.container", testValue) + if vString, err := cmdFlags.GetString("storage.container"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.StorageConfig.InitContainer) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.enable-multicontainer", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.enable-multicontainer", testValue) + if vBool, err := cmdFlags.GetBool("storage.enable-multicontainer"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vBool), &actual.StorageConfig.MultiContainerEnabled) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.cache.max_size_mbs", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.cache.max_size_mbs", testValue) + if vInt, err := cmdFlags.GetInt("storage.cache.max_size_mbs"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt), &actual.StorageConfig.Cache.MaxSizeMegabytes) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.cache.target_gc_percent", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.cache.target_gc_percent", testValue) + if vInt, err := cmdFlags.GetInt("storage.cache.target_gc_percent"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt), &actual.StorageConfig.Cache.TargetGCPercent) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.limits.maxDownloadMBs", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage.limits.maxDownloadMBs", testValue) + if vInt64, err := cmdFlags.GetInt64("storage.limits.maxDownloadMBs"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt64), &actual.StorageConfig.Limits.GetLimitMegabytes) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage.defaultHttpClient.timeout", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := DefaultTestType.StorageConfig.DefaultHTTPClient.Timeout.String() + + cmdFlags.Set("storage.defaultHttpClient.timeout", testValue) + if v := cmdFlags.Lookup("storage.defaultHttpClient.timeout"); v != nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", v.Value.String()), &actual.StorageConfig.DefaultHTTPClient.Timeout) + + } + }) + }) + t.Run("Test_i", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("i", testValue) + if vInt, err := cmdFlags.GetInt("i"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt), &actual.IntValue) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_m", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "a=1,b=2" + + cmdFlags.Set("m", testValue) + if vStringToString, err := cmdFlags.GetStringToString("m"); err == nil { + testDecodeRaw_TestType(t, vStringToString, &actual.StringMap) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_constType", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("constType", testValue) + if vString, err := cmdFlags.GetString("constType"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.ConstType) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_aliasType", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("aliasType", testValue) + if vInt, err := cmdFlags.GetInt("aliasType"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt), &actual.AliasType) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_test.go b/flytestdlib/cli/pflags/api/testdata/testtype_test.go index 37a97618cd..4d8611d1ec 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype_test.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype_test.go @@ -435,4 +435,32 @@ func TestTestType_SetFlags(t *testing.T) { } }) }) + t.Run("Test_constType", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("constType", testValue) + if vString, err := cmdFlags.GetString("constType"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vString), &actual.ConstType) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_aliasType", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("aliasType", testValue) + if vInt, err := cmdFlags.GetInt("aliasType"); err == nil { + testDecodeJson_TestType(t, fmt.Sprintf("%v", vInt), &actual.AliasType) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytestdlib/cli/pflags/api/types.go b/flytestdlib/cli/pflags/api/types.go index c4932bd0e9..051433b0cf 100644 --- a/flytestdlib/cli/pflags/api/types.go +++ b/flytestdlib/cli/pflags/api/types.go @@ -5,7 +5,7 @@ import ( "time" ) -// Determines how tests should be generated. +// TestStrategy determines how tests should be generated. type TestStrategy string const ( @@ -15,24 +15,32 @@ const ( ) type FieldInfo struct { - Name string - GoName string - Typ types.Type - DefaultValue string - UsageString string - FlagMethodName string - TestValue string - TestStrategy TestStrategy - ShouldBindDefault bool - ShouldTestDefault bool + Name string + GoName string + Typ types.Type + LocalTypeName string + DefaultValue string + UsageString string + FlagMethodName string + TestFlagMethodName string + TestValue string + TestStrategy TestStrategy + ShouldBindDefault bool + ShouldTestDefault bool } -// Holds the finalized information passed to the template for evaluation. +// TypeInfo holds the finalized information passed to the template for evaluation. type TypeInfo struct { - Timestamp time.Time - Fields []FieldInfo - Package string - Name string - TypeRef string - Imports map[string]string + Timestamp time.Time + Fields []FieldInfo + PFlagValueTypes []PFlagValueType + Package string + Name string + TypeRef string + Imports map[string]string +} + +type PFlagValueType struct { + Name string + ShouldGenerateSetAndType bool } diff --git a/flytestdlib/cli/pflags/api/utils.go b/flytestdlib/cli/pflags/api/utils.go index 504aa0de97..47e3df9b1d 100644 --- a/flytestdlib/cli/pflags/api/utils.go +++ b/flytestdlib/cli/pflags/api/utils.go @@ -5,6 +5,8 @@ import ( "fmt" "go/types" "unicode" + + "k8s.io/apimachinery/pkg/util/sets" ) func camelCase(str string) string { @@ -32,6 +34,14 @@ func isStringer(t types.Type) bool { return implementsAnyOfMethods(t, "String") } +func isPFlagValue(t types.Type) bool { + return implementsAllOfMethods(t, "String", "Set", "Type") +} + +func hasStringConstructor(t *types.Named) bool { + return t.Obj().Parent().Lookup(fmt.Sprintf("%sString", t.Obj().Name())) != nil +} + func implementsAnyOfMethods(t types.Type, methodNames ...string) (found bool) { mset := types.NewMethodSet(t) for _, name := range methodNames { @@ -49,3 +59,22 @@ func implementsAnyOfMethods(t types.Type, methodNames ...string) (found bool) { return false } + +func implementsAllOfMethods(t types.Type, methodNames ...string) (found bool) { + mset := types.NewMethodSet(t) + foundMethods := sets.NewString() + for _, name := range methodNames { + if foundMethod := mset.Lookup(nil, name); foundMethod != nil { + foundMethods.Insert(name) + } + } + + mset = types.NewMethodSet(types.NewPointer(t)) + for _, name := range methodNames { + if mset.Lookup(nil, name) != nil { + foundMethods.Insert(name) + } + } + + return foundMethods.Len() == len(methodNames) +} diff --git a/flytestdlib/config/duration.go b/flytestdlib/config/duration.go index e1a978d5c8..a86d61bbae 100644 --- a/flytestdlib/config/duration.go +++ b/flytestdlib/config/duration.go @@ -6,7 +6,7 @@ import ( "time" ) -// A wrapper around time.Duration that enables Json Marshalling capabilities +// Duration is a wrapper around time.Duration that enables Json Marshalling capabilities type Duration struct { time.Duration } @@ -45,3 +45,15 @@ func (d *Duration) UnmarshalJSON(b []byte) error { return nil } + +// Set implements PFlag's Value interface's set method to set the value of duration from string. +func (d *Duration) Set(val string) error { + var err error + d.Duration, err = time.ParseDuration(val) + return err +} + +// Type implements PFlag's Value interface's Type method to return the name of the type. +func (Duration) Type() string { + return "Duration" +} diff --git a/flytestdlib/config/port.go b/flytestdlib/config/port.go index fef6e4d11b..381a5e9a5e 100644 --- a/flytestdlib/config/port.go +++ b/flytestdlib/config/port.go @@ -58,3 +58,19 @@ func parsePortString(port string) (int, error) { func validPortRange(port float64) bool { return 0 <= port && port <= 65535 } + +// Set implements PFlag's Value interface's set method to set the value of duration from string. +func (p *Port) Set(val string) error { + u, err := parsePortString(val) + if err != nil { + return err + } + + p.Port = u + return nil +} + +// Type implements PFlag's Value interface's Type method to return the name of the type. +func (Port) Type() string { + return "URL" +} diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index 80e74e02d4..28fa27ed8e 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -158,6 +158,7 @@ func TestAccessor_InitializePflags(t *testing.T) { otherC := reg.GetSection(OtherComponentSectionKey).GetConfig().(*OtherComponentConfig) assert.Equal(t, 4, otherC.IntValue) assert.Equal(t, []string{"default value"}, otherC.StringArrayWithDefaults) + assert.Equal(t, NamedTypeB, otherC.NamedType) }) t.Run(fmt.Sprintf("[%v] Sub-sections", provider(config.Options{}).ID()), func(t *testing.T) { diff --git a/flytestdlib/config/tests/testdata/config.yaml b/flytestdlib/config/tests/testdata/config.yaml index 9840a8696f..501b11eb95 100755 --- a/flytestdlib/config/tests/testdata/config.yaml +++ b/flytestdlib/config/tests/testdata/config.yaml @@ -10,3 +10,4 @@ other-component: - '!' url-value: http://something.com myByteArray: JDJhJDA2JHB4czFBa0c4MUt2cmhwbWwxUWlMU09RYVRrOWVlUHJVLzdZYWI5eTA3aDN4MFRnbGJhb1Q2 + namedType: B diff --git a/flytestdlib/config/tests/types_test.go b/flytestdlib/config/tests/types_test.go index 179ca61c83..1c7b9ab9bd 100644 --- a/flytestdlib/config/tests/types_test.go +++ b/flytestdlib/config/tests/types_test.go @@ -3,6 +3,8 @@ package tests import ( "fmt" + "encoding/json" + "github.com/flyteorg/flytestdlib/config" "github.com/flyteorg/flytestdlib/config/viper" "github.com/spf13/pflag" @@ -18,6 +20,13 @@ type MyComponentConfig struct { StringValue3 string `json:"str3"` } +type NamedType int + +const ( + NamedTypeA NamedType = iota + NamedTypeB +) + type OtherComponentConfig struct { DurationValue config.Duration `json:"duration-value"` URLValue config.URL `json:"url-value"` @@ -26,6 +35,7 @@ type OtherComponentConfig struct { StringArray []string `json:"strings"` StringArrayWithDefaults []string `json:"strings-def"` MyByteArray []byte `json:"myByteArray"` + NamedType NamedType `json:"namedType"` } type Item struct { @@ -52,6 +62,12 @@ func (MyComponentConfig) GetPFlagSet(prefix string) *pflag.FlagSet { return cmdFlags } +var ( + DefaultOtherComponentConfig = &OtherComponentConfig{ + NamedType: NamedTypeA, + } +) + func (OtherComponentConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("MyComponentConfig", pflag.ExitOnError) cmdFlags.String(fmt.Sprintf("%v%v", prefix, "string-value"), "hello world", "life is short") @@ -59,6 +75,7 @@ func (OtherComponentConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "int-val"), 4, "this is an important flag") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "url-value"), "http://blah.com", "Sets the type of storage to configure [s3/minio/local/mem].") cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "strings-def"), []string{"default value"}, "Sets the type of storage to configure [s3/minio/local/mem].") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "namedType"), int(DefaultOtherComponentConfig.NamedType), "") return cmdFlags } @@ -81,3 +98,62 @@ func init() { panic(err) } } + +const _NamedTypeName = "AB" + +var _NamedTypeIndex = [...]uint8{0, 1, 2} + +func (i NamedType) String() string { + if i < 0 || i >= NamedType(len(_NamedTypeIndex)-1) { + return fmt.Sprintf("NamedType(%d)", i) + } + return _NamedTypeName[_NamedTypeIndex[i]:_NamedTypeIndex[i+1]] +} + +var _NamedTypeValues = []NamedType{0, 1} + +var _NamedTypeNameToValueMap = map[string]NamedType{ + _NamedTypeName[0:1]: 0, + _NamedTypeName[1:2]: 1, +} + +// NamedTypeString retrieves an enum value from the enum constants string name. +// Throws an error if the param is not part of the enum. +func NamedTypeString(s string) (NamedType, error) { + if val, ok := _NamedTypeNameToValueMap[s]; ok { + return val, nil + } + return 0, fmt.Errorf("%s does not belong to NamedType values", s) +} + +// NamedTypeValues returns all values of the enum +func NamedTypeValues() []NamedType { + return _NamedTypeValues +} + +// IsANamedType returns "true" if the value is listed in the enum definition. "false" otherwise +func (i NamedType) IsANamedType() bool { + for _, v := range _NamedTypeValues { + if i == v { + return true + } + } + return false +} + +// MarshalJSON implements the json.Marshaler interface for NamedType +func (i NamedType) MarshalJSON() ([]byte, error) { + return json.Marshal(i.String()) +} + +// UnmarshalJSON implements the json.Unmarshaler interface for NamedType +func (i *NamedType) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return fmt.Errorf("NamedType should be a string, got %s", data) + } + + var err error + *i, err = NamedTypeString(s) + return err +} diff --git a/flytestdlib/config/url.go b/flytestdlib/config/url.go index 4045caf962..087ca8a510 100644 --- a/flytestdlib/config/url.go +++ b/flytestdlib/config/url.go @@ -34,3 +34,19 @@ func (d *URL) UnmarshalJSON(b []byte) error { return errors.New("invalid url") } } + +// Set implements PFlag's Value interface's set method to set the value of duration from string. +func (d *URL) Set(val string) error { + u, err := url.Parse(val) + if err != nil { + return err + } + + d.URL = *u + return nil +} + +// Type implements PFlag's Value interface's Type method to return the name of the type. +func (URL) Type() string { + return "URL" +} diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index f14b4f21f7..1b0954e894 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -1,13 +1,8 @@ module github.com/flyteorg/flytestdlib -go 1.16 +go 1.17 require ( - cloud.google.com/go v0.75.0 // indirect - cloud.google.com/go/storage v1.12.0 // indirect - github.com/Azure/azure-sdk-for-go v51.0.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.17 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect github.com/aws/aws-sdk-go v1.37.1 github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 github.com/coocood/freecache v1.1.1 @@ -22,37 +17,80 @@ require ( github.com/hashicorp/golang-lru v0.5.4 github.com/magiconair/properties v1.8.4 github.com/mitchellh/mapstructure v1.4.1 - github.com/ncw/swift v1.0.53 // indirect - github.com/pelletier/go-toml v1.8.1 // indirect github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.9.0 - github.com/prometheus/procfs v0.3.0 // indirect github.com/sirupsen/logrus v1.7.0 - github.com/spf13/afero v1.5.1 // indirect - github.com/spf13/cast v1.3.1 // indirect github.com/spf13/cobra v1.1.1 - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.1 - github.com/stretchr/objx v0.3.0 // indirect github.com/stretchr/testify v1.7.0 + golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 + golang.org/x/tools v0.1.0 + google.golang.org/protobuf v1.25.0 + k8s.io/api v0.20.2 + k8s.io/apimachinery v0.20.2 + k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 +) + +require ( + cloud.google.com/go v0.75.0 // indirect + cloud.google.com/go/storage v1.12.0 // indirect + github.com/Azure/azure-sdk-for-go v51.0.0+incompatible // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.17 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/logger v0.2.0 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect + github.com/go-logr/logr v0.4.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/json-iterator/go v1.1.10 // indirect + github.com/jstemmer/go-junit-report v0.9.1 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/ncw/swift v1.0.53 // indirect + github.com/pelletier/go-toml v1.8.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.15.0 // indirect + github.com/prometheus/procfs v0.3.0 // indirect + github.com/satori/go.uuid v1.2.0 // indirect + github.com/spf13/afero v1.5.1 // indirect + github.com/spf13/cast v1.3.1 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/stretchr/objx v0.3.0 // indirect + github.com/subosito/gotenv v1.2.0 // indirect go.opencensus.io v0.22.6 // indirect golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect + golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect golang.org/x/mod v0.4.1 // indirect golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 // indirect golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect golang.org/x/text v0.3.5 // indirect - golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 - golang.org/x/tools v0.1.0 + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/api v0.38.0 // indirect + google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 // indirect google.golang.org/grpc v1.35.0 // indirect - google.golang.org/protobuf v1.25.0 + gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - k8s.io/api v0.20.2 - k8s.io/apimachinery v0.20.2 - k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 + k8s.io/klog/v2 v2.5.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.0.3 // indirect ) diff --git a/flytestdlib/storage/config.go b/flytestdlib/storage/config.go index bbafd36d74..92aa814ddc 100644 --- a/flytestdlib/storage/config.go +++ b/flytestdlib/storage/config.go @@ -7,9 +7,9 @@ import ( "github.com/flyteorg/flytestdlib/logger" ) -//go:generate pflags Config +//go:generate pflags Config --default-var=defaultConfig -// Defines the storage config type. +// Type defines the storage config type. type Type = string // The reserved config section key for storage. @@ -43,7 +43,7 @@ var ( } ) -// A common storage config. +// Config is a common storage config. type Config struct { Type Type `json:"type" pflag:",Sets the type of storage to configure [s3/minio/local/mem/stow]."` Connection ConnectionConfig `json:"connection"` @@ -65,10 +65,10 @@ type Config struct { // HTTPClientConfig encapsulates common settings that can be applied to an HTTP Client. type HTTPClientConfig struct { Headers map[string][]string `json:"headers" pflag:"-,Sets http headers to set on the http client."` - Timeout config.Duration `json:"timeout" pflag:"timeout,Sets time out on the http client."` + Timeout config.Duration `json:"timeout" pflag:",Sets time out on the http client."` } -// Defines connection configurations. +// ConnectionConfig defines connection configurations. type ConnectionConfig struct { Endpoint config.URL `json:"endpoint" pflag:",URL for storage client to connect to."` AuthType string `json:"auth-type" pflag:",Auth Type to use [iam,accesskey]."` diff --git a/flytestdlib/utils/marshal_utils.go b/flytestdlib/utils/marshal_utils.go index 380e292208..3f68a1667d 100644 --- a/flytestdlib/utils/marshal_utils.go +++ b/flytestdlib/utils/marshal_utils.go @@ -13,7 +13,7 @@ import ( var jsonPbMarshaler = jsonpb.Marshaler{} -// Unmarshals a proto struct into a proto message using jsonPb marshaler. +// UnmarshalStructToPb unmarshals a proto struct into a proto message using jsonPb marshaler. func UnmarshalStructToPb(structObj *structpb.Struct, msg proto.Message) error { if structObj == nil { return fmt.Errorf("nil Struct object passed") @@ -35,7 +35,7 @@ func UnmarshalStructToPb(structObj *structpb.Struct, msg proto.Message) error { return nil } -// Marshals a proto message into proto Struct using jsonPb marshaler. +// MarshalPbToStruct marshals a proto message into proto Struct using jsonPb marshaler. func MarshalPbToStruct(in proto.Message) (out *structpb.Struct, err error) { if in == nil { return nil, fmt.Errorf("nil proto message passed") @@ -54,12 +54,12 @@ func MarshalPbToStruct(in proto.Message) (out *structpb.Struct, err error) { return out, nil } -// Marshals a proto message using jsonPb marshaler to string. +// MarshalPbToString marshals a proto message using jsonPb marshaler to string. func MarshalPbToString(msg proto.Message) (string, error) { return jsonPbMarshaler.MarshalToString(msg) } -// Marshals obj into a struct. Will use jsonPb if input is a proto message, otherwise, it'll use json +// MarshalObjToStruct marshals obj into a struct. Will use jsonPb if input is a proto message, otherwise, it'll use json // marshaler. func MarshalObjToStruct(input interface{}) (*structpb.Struct, error) { if p, casted := input.(proto.Message); casted { @@ -80,7 +80,7 @@ func MarshalObjToStruct(input interface{}) (*structpb.Struct, error) { return structObj, nil } -// Unmarshals a struct to the passed obj. Don't use this if the unmarshalled obj is a proto message. +// UnmarshalStructToObj unmarshals a struct to the passed obj. Don't use this if the unmarshalled obj is a proto message. func UnmarshalStructToObj(structObj *structpb.Struct, obj interface{}) error { if structObj == nil { return fmt.Errorf("nil Struct Object passed") diff --git a/flytestdlib/utils/marshal_utils_test.go b/flytestdlib/utils/marshal_utils_test.go index ecb335c8b2..6e7d94d973 100644 --- a/flytestdlib/utils/marshal_utils_test.go +++ b/flytestdlib/utils/marshal_utils_test.go @@ -71,6 +71,7 @@ func TestMarshalObjToStruct(t *testing.T) { t.Errorf("MarshalObjToStruct() error = %v, wantErr %v", err, tt.wantErr) return } + if diff := deep.Equal(got, tt.want); diff != nil { t.Errorf("MarshalObjToStruct() = %v, want %v, diff: %v", got, tt.want, diff) } From b4c933ad557825467fe8321363a57e9edf278d59 Mon Sep 17 00:00:00 2001 From: Babis Kiosidis Date: Thu, 25 Nov 2021 18:45:04 +0200 Subject: [PATCH 147/191] #patch create gcp log formatter (#108) --- flytestdlib/logger/config.go | 1 + flytestdlib/logger/gcp_formatter.go | 66 ++++++++++++++++++++++++ flytestdlib/logger/gcp_formatter_test.go | 62 ++++++++++++++++++++++ flytestdlib/logger/logger.go | 11 ++-- flytestdlib/logger/logger_test.go | 4 +- 5 files changed, 139 insertions(+), 5 deletions(-) create mode 100644 flytestdlib/logger/gcp_formatter.go create mode 100644 flytestdlib/logger/gcp_formatter_test.go diff --git a/flytestdlib/logger/config.go b/flytestdlib/logger/config.go index b07d79a7f3..b600bcb2b9 100644 --- a/flytestdlib/logger/config.go +++ b/flytestdlib/logger/config.go @@ -15,6 +15,7 @@ type FormatterType = string const ( FormatterJSON FormatterType = "json" FormatterText FormatterType = "text" + FormatterGCP FormatterType = "gcp" ) const ( diff --git a/flytestdlib/logger/gcp_formatter.go b/flytestdlib/logger/gcp_formatter.go new file mode 100644 index 0000000000..d6d94e0dea --- /dev/null +++ b/flytestdlib/logger/gcp_formatter.go @@ -0,0 +1,66 @@ +package logger + +import ( + "encoding/json" + "fmt" + "time" + + "github.com/sirupsen/logrus" +) + +// GcpFormatter Log formatter compatible with GCP stackdriver logging. +type GcpFormatter struct { +} + +type GcpEntry struct { + Data map[string]interface{} `json:"data,omitempty"` + Message string `json:"message,omitempty"` + Severity GcpSeverity `json:"severity,omitempty"` + Timestamp string `json:"timestamp,omitempty"` +} + +type GcpSeverity = string + +// https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogSeverity +const ( + GcpSeverityDebug GcpSeverity = "DEBUG" + GcpSeverityInfo GcpSeverity = "INFO" + GcpSeverityWarning GcpSeverity = "WARNING" + GcpSeverityError GcpSeverity = "ERROR" + GcpSeverityCritical GcpSeverity = "CRITICAL" + GcpSeverityAlert GcpSeverity = "ALERT" +) + +var ( + logrusToGcp = map[logrus.Level]GcpSeverity{ + logrus.DebugLevel: GcpSeverityDebug, + logrus.InfoLevel: GcpSeverityInfo, + logrus.WarnLevel: GcpSeverityWarning, + logrus.ErrorLevel: GcpSeverityError, + logrus.FatalLevel: GcpSeverityCritical, + logrus.PanicLevel: GcpSeverityAlert, + } +) + +func toGcpSeverityOrDefault(level logrus.Level) GcpSeverity { + if severity, found := logrusToGcp[level]; found { + return severity + } + // default value + return GcpSeverityDebug +} + +func (f *GcpFormatter) Format(entry *logrus.Entry) ([]byte, error) { + var log = &GcpEntry{ + Timestamp: entry.Time.Format(time.RFC3339), + Message: entry.Message, + Severity: toGcpSeverityOrDefault(entry.Level), + Data: entry.Data, + } + + serialized, err := json.Marshal(log) + if err != nil { + return nil, fmt.Errorf("Failed to marshal fields to JSON, %w", err) + } + return append(serialized, '\n'), nil +} diff --git a/flytestdlib/logger/gcp_formatter_test.go b/flytestdlib/logger/gcp_formatter_test.go new file mode 100644 index 0000000000..d97da22b29 --- /dev/null +++ b/flytestdlib/logger/gcp_formatter_test.go @@ -0,0 +1,62 @@ +package logger + +import ( + "testing" + "time" + + "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" +) + +func Test_gcpFormatter(t *testing.T) { + tests := []struct { + name string + entry *logrus.Entry + expected string + }{ + {"test", &logrus.Entry{ + Logger: nil, + Data: map[string]interface{}{"src": "some-src"}, + Time: time.Date(2000, 01, 01, 01, 01, 000, 000, time.UTC), + Level: 1, + Caller: nil, + Message: "some-message", + Buffer: nil, + Context: nil, + }, "{\"data\":{\"src\":\"some-src\"},\"message\":\"some-message\",\"severity\":\"CRITICAL\",\"timestamp\":\"2000-01-01T01:01:00Z\"}\n"}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + formatter := GcpFormatter{} + bytelog, err := formatter.Format(tt.entry) + assert.Nil(t, err) + assert.Equal(t, tt.expected, string(bytelog)) + }) + } +} + +func Test_gcpFormatterFails(t *testing.T) { + tests := []struct { + name string + entry *logrus.Entry + errMsg string + }{ + {"test", &logrus.Entry{ + Logger: nil, + Data: map[string]interface{}{"src": make(chan int)}, + Time: time.Date(2000, 01, 01, 01, 01, 000, 000, time.UTC), + Level: 1, + Caller: nil, + Message: "some-message", + Buffer: nil, + Context: nil, + }, "Failed to marshal fields to JSON, json: unsupported type: chan int"}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + formatter := GcpFormatter{} + _, err := formatter.Format(tt.entry) + assert.Equal(t, tt.errMsg, err.Error()) + }) + } +} diff --git a/flytestdlib/logger/logger.go b/flytestdlib/logger/logger.go index 9d3fab34b5..924c8526cd 100644 --- a/flytestdlib/logger/logger.go +++ b/flytestdlib/logger/logger.go @@ -5,14 +5,13 @@ package logger import ( "context" - "io" - - "github.com/flyteorg/flytestdlib/contextutils" - "fmt" + "io" "runtime" "strings" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/sirupsen/logrus" ) @@ -35,6 +34,10 @@ func onConfigUpdated(cfg Config) { }, }) } + case FormatterGCP: + if _, isGCP := logrus.StandardLogger().Formatter.(*GcpFormatter); !isGCP { + logrus.SetFormatter(&GcpFormatter{}) + } default: if _, isJSON := logrus.StandardLogger().Formatter.(*logrus.JSONFormatter); !isJSON { logrus.SetFormatter(&logrus.JSONFormatter{ diff --git a/flytestdlib/logger/logger_test.go b/flytestdlib/logger/logger_test.go index ce81002046..d24329ae63 100644 --- a/flytestdlib/logger/logger_test.go +++ b/flytestdlib/logger/logger_test.go @@ -576,7 +576,9 @@ func Test_onConfigUpdated(t *testing.T) { name string args args }{ - // TODO: Add test cases. + {"testtext", args{Config{Formatter: FormatterConfig{FormatterText}}}}, + {"testjson", args{Config{Formatter: FormatterConfig{FormatterJSON}}}}, + {"testgcp", args{Config{Formatter: FormatterConfig{FormatterGCP}}}}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { From bdb87697fec8bdb09952149add0ef24ae307f2f2 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Tue, 28 Dec 2021 01:12:48 -0800 Subject: [PATCH 148/191] Update Boilerplate (#110) Signed-off-by: Flyte-Bot Co-authored-by: flyte-bot --- .../flyte/golang_support_tools/go.mod | 182 +++++++++++++++++- .../flyte/golang_support_tools/go.sum | 5 +- .../flyte/golang_support_tools/tools.go | 3 +- .../flyte/golang_test_targets/Makefile | 4 + .../flyte/golang_test_targets/go-gen.sh | 22 +++ 5 files changed, 210 insertions(+), 6 deletions(-) create mode 100755 flytestdlib/boilerplate/flyte/golang_test_targets/go-gen.sh diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod index 692db82fb7..307398c89e 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod @@ -4,12 +4,190 @@ go 1.17 require ( github.com/alvaroloes/enumer v1.1.2 - github.com/flyteorg/flytestdlib v0.3.22 + github.com/flyteorg/flytestdlib v0.4.7 github.com/golangci/golangci-lint v1.38.0 - github.com/pseudomuto/protoc-gen-doc v1.4.1 // indirect + github.com/pseudomuto/protoc-gen-doc v1.4.1 github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 ) +require ( + 4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a // indirect + cloud.google.com/go v0.75.0 // indirect + cloud.google.com/go/storage v1.12.0 // indirect + github.com/Azure/azure-sdk-for-go v51.0.0+incompatible // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.17 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/logger v0.2.0 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/BurntSushi/toml v0.3.1 // indirect + github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect + github.com/Masterminds/semver v1.5.0 // indirect + github.com/Masterminds/sprig v2.15.0+incompatible // indirect + github.com/OpenPeeDeeP/depguard v1.0.1 // indirect + github.com/alexkohler/prealloc v1.0.0 // indirect + github.com/aokoli/goutils v1.0.1 // indirect + github.com/ashanbrown/forbidigo v1.1.0 // indirect + github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a // indirect + github.com/aws/aws-sdk-go v1.37.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bkielbasa/cyclop v1.2.0 // indirect + github.com/bombsimon/wsl/v3 v3.2.0 // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/charithe/durationcheck v0.0.6 // indirect + github.com/coocood/freecache v1.1.1 // indirect + github.com/daixiang0/gci v0.2.8 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/denis-tingajkin/go-header v0.4.2 // indirect + github.com/envoyproxy/protoc-gen-validate v0.3.0-java // indirect + github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 // indirect + github.com/esimonov/ifshort v1.0.1 // indirect + github.com/fatih/color v1.10.0 // indirect + github.com/fatih/structtag v1.2.0 // indirect + github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/fzipp/gocyclo v0.3.1 // indirect + github.com/ghodss/yaml v1.0.0 // indirect + github.com/go-critic/go-critic v0.5.4 // indirect + github.com/go-logr/logr v0.4.0 // indirect + github.com/go-toolsmith/astcast v1.0.0 // indirect + github.com/go-toolsmith/astcopy v1.0.0 // indirect + github.com/go-toolsmith/astequal v1.0.0 // indirect + github.com/go-toolsmith/astfmt v1.0.0 // indirect + github.com/go-toolsmith/astp v1.0.0 // indirect + github.com/go-toolsmith/strparse v1.0.0 // indirect + github.com/go-toolsmith/typep v1.0.2 // indirect + github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/gofrs/flock v0.8.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.4.3 // indirect + github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect + github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect + github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 // indirect + github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect + github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect + github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect + github.com/golangci/misspell v0.3.5 // indirect + github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5 // indirect + github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect + github.com/google/go-cmp v0.5.4 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254 // indirect + github.com/gostaticanalysis/analysisutil v0.4.1 // indirect + github.com/gostaticanalysis/comment v1.4.1 // indirect + github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5 // indirect + github.com/gostaticanalysis/nilerr v0.1.1 // indirect + github.com/graymeta/stow v0.2.7 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/huandu/xstrings v1.0.0 // indirect + github.com/imdario/mergo v0.3.5 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jgautheron/goconst v1.4.0 // indirect + github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d // indirect + github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/jstemmer/go-junit-report v0.9.1 // indirect + github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0 // indirect + github.com/kisielk/errcheck v1.6.0 // indirect + github.com/kisielk/gotool v1.0.0 // indirect + github.com/kulti/thelper v0.4.0 // indirect + github.com/kunwardeep/paralleltest v1.0.2 // indirect + github.com/kyoh86/exportloopref v0.1.8 // indirect + github.com/magefile/mage v1.10.0 // indirect + github.com/magiconair/properties v1.8.4 // indirect + github.com/maratori/testpackage v1.0.1 // indirect + github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mattn/go-runewidth v0.0.7 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mbilski/exhaustivestruct v1.2.0 // indirect + github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81 // indirect + github.com/mgechev/revive v1.0.3 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.4.1 // indirect + github.com/moricho/tparallel v0.2.1 // indirect + github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 // indirect + github.com/nakabonne/nestif v0.3.0 // indirect + github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88 // indirect + github.com/ncw/swift v1.0.53 // indirect + github.com/nishanths/exhaustive v0.1.0 // indirect + github.com/nishanths/predeclared v0.2.1 // indirect + github.com/olekukonko/tablewriter v0.0.4 // indirect + github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 // indirect + github.com/pelletier/go-toml v1.8.1 // indirect + github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f // indirect + github.com/prometheus/client_golang v1.9.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.15.0 // indirect + github.com/prometheus/procfs v0.3.0 // indirect + github.com/pseudomuto/protokit v0.2.0 // indirect + github.com/quasilyte/go-ruleguard v0.3.0 // indirect + github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect + github.com/ryancurrah/gomodguard v1.2.0 // indirect + github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect + github.com/sanposhiho/wastedassign v0.1.3 // indirect + github.com/satori/go.uuid v1.2.0 // indirect + github.com/securego/gosec/v2 v2.6.1 // indirect + github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect + github.com/sirupsen/logrus v1.8.0 // indirect + github.com/sonatard/noctx v0.0.1 // indirect + github.com/sourcegraph/go-diff v0.6.1 // indirect + github.com/spf13/afero v1.5.1 // indirect + github.com/spf13/cast v1.3.1 // indirect + github.com/spf13/cobra v1.1.3 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.7.1 // indirect + github.com/ssgreg/nlreturn/v2 v2.1.0 // indirect + github.com/stretchr/objx v0.3.0 // indirect + github.com/stretchr/testify v1.7.0 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b // indirect + github.com/tetafro/godot v1.4.4 // indirect + github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94 // indirect + github.com/tomarrell/wrapcheck v0.0.0-20201130113247-1683564d9756 // indirect + github.com/tommy-muehle/go-mnd/v2 v2.3.1 // indirect + github.com/ultraware/funlen v0.0.3 // indirect + github.com/ultraware/whitespace v0.0.4 // indirect + github.com/uudashr/gocognit v1.0.1 // indirect + go.opencensus.io v0.22.6 // indirect + golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect + golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect + golang.org/x/mod v0.4.1 // indirect + golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect + golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 // indirect + golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect + golang.org/x/text v0.3.5 // indirect + golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect + golang.org/x/tools v0.1.0 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/api v0.38.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 // indirect + google.golang.org/grpc v1.35.0 // indirect + google.golang.org/protobuf v1.25.0 // indirect + gopkg.in/ini.v1 v1.62.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + honnef.co/go/tools v0.1.2 // indirect + k8s.io/apimachinery v0.20.2 // indirect + k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 // indirect + k8s.io/klog/v2 v2.5.0 // indirect + mvdan.cc/gofumpt v0.1.0 // indirect + mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect + mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect + mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 // indirect +) + replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 replace github.com/pseudomuto/protoc-gen-doc => github.com/flyteorg/protoc-gen-doc v1.4.2 diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum b/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum index 261048f745..a62010d29f 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum @@ -210,8 +210,8 @@ github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flytestdlib v0.3.22 h1:nJEPaCdxzXBaeg2p4fdo3I3Ua09NedFRaUwuLafLEdw= -github.com/flyteorg/flytestdlib v0.3.22/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= +github.com/flyteorg/flytestdlib v0.4.7 h1:SMPPXI3j/MjP7D2fqaR+lPQkTrqYS7xZbwsgJI2F8SU= +github.com/flyteorg/flytestdlib v0.4.7/go.mod h1:fv1ar34LJLMTaf0tbfetisLykUlARi7rP+NQTUn6QQs= github.com/flyteorg/protoc-gen-doc v1.4.2 h1:Otw0F+RHaPQ8XlpzhLLgjsCMcrAIcMO01Zh+ALe3rrE= github.com/flyteorg/protoc-gen-doc v1.4.2/go.mod h1:exDTOVwqpp30eV/EDPFLZy3Pwr2sn6hBC1WIYH/UbIg= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= @@ -1263,6 +1263,7 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.1.2 h1:SMdYLJl312RXuxXziCCHhRsp/tvct9cGKey0yv95tZM= honnef.co/go/tools v0.1.2/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= +k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go b/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go index da7b933302..d970d2106a 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go @@ -1,4 +1,3 @@ -//go:build tools // +build tools package tools @@ -7,6 +6,6 @@ import ( _ "github.com/alvaroloes/enumer" _ "github.com/flyteorg/flytestdlib/cli/pflags" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" - _ "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" _ "github.com/vektra/mockery/cmd/mockery" + _ "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) diff --git a/flytestdlib/boilerplate/flyte/golang_test_targets/Makefile b/flytestdlib/boilerplate/flyte/golang_test_targets/Makefile index 21d8b5b776..280e1e55e4 100644 --- a/flytestdlib/boilerplate/flyte/golang_test_targets/Makefile +++ b/flytestdlib/boilerplate/flyte/golang_test_targets/Makefile @@ -8,6 +8,10 @@ download_tooling: #download dependencies (including test deps) for the package @boilerplate/flyte/golang_test_targets/download_tooling.sh +.PHONY: generate +generate: download_tooling #generate go code + @boilerplate/flyte/golang_test_targets/go-gen.sh + .PHONY: lint lint: download_tooling #lints the package for common code smells GL_DEBUG=linters_output,env golangci-lint run --deadline=5m --exclude deprecated -v diff --git a/flytestdlib/boilerplate/flyte/golang_test_targets/go-gen.sh b/flytestdlib/boilerplate/flyte/golang_test_targets/go-gen.sh new file mode 100755 index 0000000000..54bd6af61b --- /dev/null +++ b/flytestdlib/boilerplate/flyte/golang_test_targets/go-gen.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -ex + +echo "Running go generate" +go generate ./... + +# This section is used by GitHub workflow to ensure that the generation step was run +if [ -n "$DELTA_CHECK" ]; then + DIRTY=$(git status --porcelain) + if [ -n "$DIRTY" ]; then + echo "FAILED: Go code updated without commiting generated code." + echo "Ensure make generate has run and all changes are committed." + DIFF=$(git diff) + echo "diff detected: $DIFF" + DIFF=$(git diff --name-only) + echo "files different: $DIFF" + exit 1 + else + echo "SUCCESS: Generated code is up to date." + fi +fi From 457337c79bba972fec09fb3f32dc1a9906942a6b Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Tue, 28 Dec 2021 15:54:54 +0530 Subject: [PATCH 149/191] Added go generate in workflow (#111) * Added go generate in workflow] Signed-off-by: Yuvraj --- flytestdlib/.github/workflows/pull_request.yml | 10 +++++----- flytestdlib/Makefile | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/flytestdlib/.github/workflows/pull_request.yml b/flytestdlib/.github/workflows/pull_request.yml index ffea087eb5..b4ffc6382e 100644 --- a/flytestdlib/.github/workflows/pull_request.yml +++ b/flytestdlib/.github/workflows/pull_request.yml @@ -43,9 +43,9 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: "0" - - name: GoGenerate and Diff - uses: cedrickring/golang-action@1.6.0 - env: - GO111MODULE: "on" + - uses: actions/setup-go@v2 with: - args: make gen-config && git diff --quiet || { echo "run go gonerate ./..."; exit 1; } + go-version: '1.17' + - name: Go generate and diff + run: DELTA_CHECK=true make generate + diff --git a/flytestdlib/Makefile b/flytestdlib/Makefile index db89bec84c..80ed5f0178 100644 --- a/flytestdlib/Makefile +++ b/flytestdlib/Makefile @@ -24,8 +24,6 @@ compile: mkdir -p ./bin go build -o pflags ./cli/pflags/main.go && mv ./pflags ./bin -gen-config: download_tooling - @go generate ./... .PHONY: test_unit_codecov test_unit_codecov: From a85ef197ea908bc9bf1c8f6df9a98660ad6ae7f2 Mon Sep 17 00:00:00 2001 From: alexlipa91 Date: Thu, 30 Dec 2021 17:47:13 +0100 Subject: [PATCH 150/191] Add labeled Prometheus summary (#112) --- flytestdlib/promutils/labeled/counter.go | 6 +- flytestdlib/promutils/labeled/gauge.go | 12 +- flytestdlib/promutils/labeled/stopwatch.go | 4 +- flytestdlib/promutils/labeled/summary.go | 56 ++++++++ flytestdlib/promutils/labeled/summary_test.go | 127 ++++++++++++++++++ 5 files changed, 194 insertions(+), 11 deletions(-) create mode 100644 flytestdlib/promutils/labeled/summary.go create mode 100644 flytestdlib/promutils/labeled/summary_test.go diff --git a/flytestdlib/promutils/labeled/counter.go b/flytestdlib/promutils/labeled/counter.go index ca193d1c66..e1ef4ebbb3 100644 --- a/flytestdlib/promutils/labeled/counter.go +++ b/flytestdlib/promutils/labeled/counter.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/client_golang/prometheus" ) -// Represents a counter labeled with values from the context. See labeled.SetMetricsKeys for information about to +// Represents a counter labeled with values from the context. See labeled.SetMetricsKeys for information about how to // configure that. type Counter struct { *prometheus.CounterVec @@ -18,7 +18,7 @@ type Counter struct { } // Inc increments the counter by 1. Use Add to increment it by arbitrary non-negative values. The data point will be -// labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. +// labeled with values from context. See labeled.SetMetricsKeys for information about how to configure that. func (c Counter) Inc(ctx context.Context) { counter, err := c.CounterVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, c.additionalLabels...)...)) if err != nil { @@ -32,7 +32,7 @@ func (c Counter) Inc(ctx context.Context) { } // Add adds the given value to the counter. It panics if the value is < 0.. The data point will be labeled with values -// from context. See labeled.SetMetricsKeys for information about to configure that. +// from context. See labeled.SetMetricsKeys for information about how to configure that. func (c Counter) Add(ctx context.Context, v float64) { counter, err := c.CounterVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, c.additionalLabels...)...)) if err != nil { diff --git a/flytestdlib/promutils/labeled/gauge.go b/flytestdlib/promutils/labeled/gauge.go index 6e08f8e9ea..5a056cd64e 100644 --- a/flytestdlib/promutils/labeled/gauge.go +++ b/flytestdlib/promutils/labeled/gauge.go @@ -17,7 +17,7 @@ type Gauge struct { } // Inc increments the gauge by 1. Use Add to increment by arbitrary values. The data point will be -// labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. +// labeled with values from context. See labeled.SetMetricsKeys for information about how to configure that. func (g Gauge) Inc(ctx context.Context) { gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) if err != nil { @@ -31,7 +31,7 @@ func (g Gauge) Inc(ctx context.Context) { } // Add adds the given value to the Gauge. (The value can be negative, resulting in a decrease of the Gauge.) -// The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. +// The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about how to configure that. func (g Gauge) Add(ctx context.Context, v float64) { gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) if err != nil { @@ -45,7 +45,7 @@ func (g Gauge) Add(ctx context.Context, v float64) { } // Set sets the Gauge to an arbitrary value. -// The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. +// The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about how to configure that. func (g Gauge) Set(ctx context.Context, v float64) { gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) if err != nil { @@ -59,7 +59,7 @@ func (g Gauge) Set(ctx context.Context, v float64) { } // Dec decrements the level by 1. Use Sub to decrement by arbitrary values. The data point will be -// labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. +// labeled with values from context. See labeled.SetMetricsKeys for information about how to configure that. func (g Gauge) Dec(ctx context.Context) { gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) if err != nil { @@ -73,7 +73,7 @@ func (g Gauge) Dec(ctx context.Context) { } // Sub adds the given value to the Gauge. The value can be negative, resulting in an increase of the Gauge. -// The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about to configure that. +// The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about how to configure that. func (g Gauge) Sub(ctx context.Context, v float64) { gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) if err != nil { @@ -101,7 +101,7 @@ func (g Gauge) SetToCurrentTime(ctx context.Context) { // Creates a new labeled gauge. Label keys must be set before instantiating. If the unlabeled option is given, // this object will also instantiate and emit another gauge with the given name with an _unlabeled suffix. -// See labeled.SetMetricsKeys for information about to configure that. +// See labeled.SetMetricsKeys for information about how to configure that. func NewGauge(name, description string, scope promutils.Scope, opts ...MetricOption) Gauge { if len(metricKeys) == 0 { panic(ErrNeverSet) diff --git a/flytestdlib/promutils/labeled/stopwatch.go b/flytestdlib/promutils/labeled/stopwatch.go index faccb46227..9d5a4ccd81 100644 --- a/flytestdlib/promutils/labeled/stopwatch.go +++ b/flytestdlib/promutils/labeled/stopwatch.go @@ -46,7 +46,7 @@ func (c StopWatch) Start(ctx context.Context) Timer { } // Observes specified duration between the start and end time. The data point will be labeled with values from context. -// See labeled.SetMetricsKeys for information about to configure that. +// See labeled.SetMetricsKeys for information about how to configure that. func (c StopWatch) Observe(ctx context.Context, start, end time.Time) { w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, c.additionalLabels...)...)) if err != nil { @@ -69,7 +69,7 @@ func (c StopWatch) Time(ctx context.Context, f func()) { } // Creates a new labeled stopwatch. Label keys must be set before instantiating a counter. See labeled.SetMetricsKeys -// for information about to configure that. +// for information about how to configure that. func NewStopWatch(name, description string, scale time.Duration, scope promutils.Scope, opts ...MetricOption) StopWatch { if len(metricKeys) == 0 { panic(ErrNeverSet) diff --git a/flytestdlib/promutils/labeled/summary.go b/flytestdlib/promutils/labeled/summary.go new file mode 100644 index 0000000000..ea28269e96 --- /dev/null +++ b/flytestdlib/promutils/labeled/summary.go @@ -0,0 +1,56 @@ +package labeled + +import ( + "context" + + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils" + "github.com/prometheus/client_golang/prometheus" +) + +// Summary represents a summary labeled with values from the context. See labeled.SetMetricsKeys for information about +// how to configure that. +type Summary struct { + *prometheus.SummaryVec + + prometheus.Summary + additionalLabels []contextutils.Key +} + +// Observe adds a single observation to the summary. +func (s Summary) Observe(ctx context.Context, v float64) { + summary, err := s.SummaryVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, s.additionalLabels...)...)) + if err != nil { + panic(err.Error()) + } + summary.Observe(v) + + if s.Summary != nil { + s.Summary.Observe(v) + } +} + +// NewSummary creates a new labeled summary. Label keys must be set before instantiating. If the unlabeled option is +// given, this object will also instantiate and emit another summary with the given name with an _unlabeled suffix. +// See labeled.SetMetricsKeys for information about how to configure that. +func NewSummary(name, description string, scope promutils.Scope, opts ...MetricOption) Summary { + if len(metricKeys) == 0 { + panic(ErrNeverSet) + } + + s := Summary{} + for _, opt := range opts { + if _, emitUnlabeledMetric := opt.(EmitUnlabeledMetricOption); emitUnlabeledMetric { + s.Summary = scope.MustNewSummary(GetUnlabeledMetricName(name), description) + } else if additionalLabels, casted := opt.(AdditionalLabelsOption); casted { + s.SummaryVec = scope.MustNewSummaryVec(name, description, append(metricStringKeys, additionalLabels.Labels...)...) + s.additionalLabels = contextutils.MetricKeysFromStrings(additionalLabels.Labels) + } + } + + if s.SummaryVec == nil { + s.SummaryVec = scope.MustNewSummaryVec(name, description, metricStringKeys...) + } + + return s +} diff --git a/flytestdlib/promutils/labeled/summary_test.go b/flytestdlib/promutils/labeled/summary_test.go new file mode 100644 index 0000000000..011ff91121 --- /dev/null +++ b/flytestdlib/promutils/labeled/summary_test.go @@ -0,0 +1,127 @@ +package labeled + +import ( + "context" + "strings" + "testing" + + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils" + "github.com/prometheus/client_golang/prometheus/testutil" + "github.com/stretchr/testify/assert" +) + +func TestLabeledSummary(t *testing.T) { + UnsetMetricKeys() + assert.NotPanics(t, func() { + SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey, contextutils.LaunchPlanIDKey) + }) + + t.Run("labeled", func(t *testing.T) { + scope := promutils.NewScope("testscope_summary") + ctx := context.Background() + ctx = contextutils.WithProjectDomain(ctx, "flyte", "dev") + s := NewSummary("unittest", "some desc", scope) + assert.NotNil(t, s) + + s.Observe(ctx, 10) + + const header = ` + # HELP testscope_summary:unittest some desc + # TYPE testscope_summary:unittest summary + ` + var expected = ` + testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.5"} 10 + testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.9"} 10 + testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.99"} 10 + testscope_summary:unittest_sum{domain="dev",lp="",project="flyte",task="",wf=""} 10 + testscope_summary:unittest_count{domain="dev",lp="",project="flyte",task="",wf=""} 1 + ` + err := testutil.CollectAndCompare(s.SummaryVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + s.Observe(ctx, 100) + s.Observe(ctx, 1000) + + expected = ` + testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.5"} 100 + testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.9"} 1000 + testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.99"} 1000 + testscope_summary:unittest_sum{domain="dev",lp="",project="flyte",task="",wf=""} 1110 + testscope_summary:unittest_count{domain="dev",lp="",project="flyte",task="",wf=""} 3 + ` + err = testutil.CollectAndCompare(s.SummaryVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + s.Observe(contextutils.WithProjectDomain(ctx, "flyte", "prod"), 10) + + expected = ` + testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.5"} 100 + testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.9"} 1000 + testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.99"} 1000 + testscope_summary:unittest_sum{domain="dev",lp="",project="flyte",task="",wf=""} 1110 + testscope_summary:unittest_count{domain="dev",lp="",project="flyte",task="",wf=""} 3 + testscope_summary:unittest{domain="prod",lp="",project="flyte",task="",wf="",quantile="0.5"} 10 + testscope_summary:unittest{domain="prod",lp="",project="flyte",task="",wf="",quantile="0.9"} 10 + testscope_summary:unittest{domain="prod",lp="",project="flyte",task="",wf="",quantile="0.99"} 10 + testscope_summary:unittest_sum{domain="prod",lp="",project="flyte",task="",wf=""} 10 + testscope_summary:unittest_count{domain="prod",lp="",project="flyte",task="",wf=""} 1 + ` + err = testutil.CollectAndCompare(s.SummaryVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + }) + + t.Run("extra labels", func(t *testing.T) { + scope := promutils.NewScope("testscope_summary") + ctx := context.Background() + s := NewSummary("unittest2", "some desc", scope, AdditionalLabelsOption{Labels: []string{"method"}}) + assert.NotNil(t, s) + + methodKey := contextutils.Key("method") + s.Observe(context.WithValue(ctx, methodKey, "GET"), 10) + s.Observe(context.WithValue(ctx, methodKey, "POST"), 100) + + const header = ` + # HELP testscope_summary:unittest2 some desc + # TYPE testscope_summary:unittest2 summary + ` + var expected = ` + testscope_summary:unittest2{domain="",lp="",method="GET",project="",task="",wf="",quantile="0.5"} 10 + testscope_summary:unittest2{domain="",lp="",method="GET",project="",task="",wf="",quantile="0.9"} 10 + testscope_summary:unittest2{domain="",lp="",method="GET",project="",task="",wf="",quantile="0.99"} 10 + testscope_summary:unittest2_sum{domain="",lp="",method="GET",project="",task="",wf=""} 10 + testscope_summary:unittest2_count{domain="",lp="",method="GET",project="",task="",wf=""} 1 + testscope_summary:unittest2{domain="",lp="",method="POST",project="",task="",wf="",quantile="0.5"} 100 + testscope_summary:unittest2{domain="",lp="",method="POST",project="",task="",wf="",quantile="0.9"} 100 + testscope_summary:unittest2{domain="",lp="",method="POST",project="",task="",wf="",quantile="0.99"} 100 + testscope_summary:unittest2_sum{domain="",lp="",method="POST",project="",task="",wf=""} 100 + testscope_summary:unittest2_count{domain="",lp="",method="POST",project="",task="",wf=""} 1 + ` + err := testutil.CollectAndCompare(s.SummaryVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + }) + + t.Run("unlabeled", func(t *testing.T) { + scope := promutils.NewScope("testscope_summary") + ctx := context.Background() + ctx = contextutils.WithProjectDomain(ctx, "flyte", "dev") + s := NewSummary("unittest3", "some desc", scope, EmitUnlabeledMetric) + assert.NotNil(t, s) + + s.Observe(ctx, 10) + + const header = ` + # HELP testscope_summary:unittest3_unlabeled some desc + # TYPE testscope_summary:unittest3_unlabeled summary + ` + var expected = ` + testscope_summary:unittest3_unlabeled{quantile="0.5"} 10 + testscope_summary:unittest3_unlabeled{quantile="0.9"} 10 + testscope_summary:unittest3_unlabeled{quantile="0.99"} 10 + testscope_summary:unittest3_unlabeled_sum 10 + testscope_summary:unittest3_unlabeled_count 1 + ` + err := testutil.CollectAndCompare(s.Summary, strings.NewReader(header+expected)) + assert.NoError(t, err) + }) +} From 722cdd10e19ce1e140b54922ab0e1944176ed9fa Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Tue, 8 Feb 2022 20:05:47 -0800 Subject: [PATCH 151/191] Sanitize metric names before creation (#114) --- flytestdlib/promutils/labeled/counter.go | 5 +- flytestdlib/promutils/labeled/gauge.go | 5 +- flytestdlib/promutils/labeled/stopwatch.go | 7 +-- flytestdlib/promutils/scope.go | 55 ++++++++++++++-------- 4 files changed, 45 insertions(+), 27 deletions(-) diff --git a/flytestdlib/promutils/labeled/counter.go b/flytestdlib/promutils/labeled/counter.go index e1ef4ebbb3..04380be8b9 100644 --- a/flytestdlib/promutils/labeled/counter.go +++ b/flytestdlib/promutils/labeled/counter.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/client_golang/prometheus" ) -// Represents a counter labeled with values from the context. See labeled.SetMetricsKeys for information about how to +// Counter represents a counter labeled with values from the context. See labeled.SetMetricsKeys for information about to // configure that. type Counter struct { *prometheus.CounterVec @@ -45,7 +45,7 @@ func (c Counter) Add(ctx context.Context, v float64) { } } -// Creates a new labeled counter. Label keys must be set before instantiating a counter. See labeled.SetMetricsKeys for +// NewCounter creates a new labeled counter. Label keys must be set before instantiating a counter. See labeled.SetMetricsKeys for // information about to configure that. func NewCounter(name, description string, scope promutils.Scope, opts ...MetricOption) Counter { if len(metricKeys) == 0 { @@ -54,6 +54,7 @@ func NewCounter(name, description string, scope promutils.Scope, opts ...MetricO c := Counter{} + name = promutils.SanitizeMetricName(name) for _, opt := range opts { if _, emitUnlabeledMetric := opt.(EmitUnlabeledMetricOption); emitUnlabeledMetric { c.Counter = scope.MustNewCounter(GetUnlabeledMetricName(name), description) diff --git a/flytestdlib/promutils/labeled/gauge.go b/flytestdlib/promutils/labeled/gauge.go index 5a056cd64e..cd0f674adb 100644 --- a/flytestdlib/promutils/labeled/gauge.go +++ b/flytestdlib/promutils/labeled/gauge.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/client_golang/prometheus" ) -// Represents a gauge labeled with values from the context. See labeled.SetMetricsKeys for more information +// Gauge represents a gauge labeled with values from the context. See labeled.SetMetricsKeys for more information type Gauge struct { *prometheus.GaugeVec @@ -99,7 +99,7 @@ func (g Gauge) SetToCurrentTime(ctx context.Context) { } } -// Creates a new labeled gauge. Label keys must be set before instantiating. If the unlabeled option is given, +// NewGauge creates a new labeled gauge. Label keys must be set before instantiating. If the unlabeled option is given, // this object will also instantiate and emit another gauge with the given name with an _unlabeled suffix. // See labeled.SetMetricsKeys for information about how to configure that. func NewGauge(name, description string, scope promutils.Scope, opts ...MetricOption) Gauge { @@ -108,6 +108,7 @@ func NewGauge(name, description string, scope promutils.Scope, opts ...MetricOpt } g := Gauge{} + name = promutils.SanitizeMetricName(name) for _, opt := range opts { if _, emitUnlabeledMetric := opt.(EmitUnlabeledMetricOption); emitUnlabeledMetric { g.Gauge = scope.MustNewGauge(GetUnlabeledMetricName(name), description) diff --git a/flytestdlib/promutils/labeled/stopwatch.go b/flytestdlib/promutils/labeled/stopwatch.go index 9d5a4ccd81..dec0b81046 100644 --- a/flytestdlib/promutils/labeled/stopwatch.go +++ b/flytestdlib/promutils/labeled/stopwatch.go @@ -45,7 +45,7 @@ func (c StopWatch) Start(ctx context.Context) Timer { } } -// Observes specified duration between the start and end time. The data point will be labeled with values from context. +// Observe observes specified duration between the start and end time. The data point will be labeled with values from context. // See labeled.SetMetricsKeys for information about how to configure that. func (c StopWatch) Observe(ctx context.Context, start, end time.Time) { w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, c.additionalLabels...)...)) @@ -59,7 +59,7 @@ func (c StopWatch) Observe(ctx context.Context, start, end time.Time) { } } -// This method observes the elapsed duration since the creation of the timer. The timer is created using a StopWatch. +// Time observes the elapsed duration since the creation of the timer. The timer is created using a StopWatch. // The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about to // configure that. func (c StopWatch) Time(ctx context.Context, f func()) { @@ -68,7 +68,7 @@ func (c StopWatch) Time(ctx context.Context, f func()) { t.Stop() } -// Creates a new labeled stopwatch. Label keys must be set before instantiating a counter. See labeled.SetMetricsKeys +// NewStopWatch creates a new labeled stopwatch. Label keys must be set before instantiating a counter. See labeled.SetMetricsKeys // for information about how to configure that. func NewStopWatch(name, description string, scale time.Duration, scope promutils.Scope, opts ...MetricOption) StopWatch { if len(metricKeys) == 0 { @@ -77,6 +77,7 @@ func NewStopWatch(name, description string, scale time.Duration, scope promutils sw := StopWatch{} + name = promutils.SanitizeMetricName(name) for _, opt := range opts { if _, emitUnableMetric := opt.(EmitUnlabeledMetricOption); emitUnableMetric { sw.StopWatch = scope.MustNewStopWatch(GetUnlabeledMetricName(name), description, scale) diff --git a/flytestdlib/promutils/scope.go b/flytestdlib/promutils/scope.go index f1854b920a..4d29902f2e 100644 --- a/flytestdlib/promutils/scope.go +++ b/flytestdlib/promutils/scope.go @@ -92,7 +92,7 @@ func (s StopWatchVec) GetMetricWith(labels prometheus.Labels) (StopWatch, error) }, nil } -// This is a stoppable instance of a StopWatch or a Timer +// Timer is a stoppable instance of a StopWatch or a Timer // A Timer can only be stopped. On stopping it will output the elapsed duration to prometheus type Timer struct { start time.Time @@ -100,7 +100,7 @@ type Timer struct { timer prometheus.Observer } -// This method observes the elapsed duration since the creation of the timer. The timer is created using a StopWatch +// Stop observes the elapsed duration since the creation of the timer. The timer is created using a StopWatch func (s Timer) Stop() float64 { observed := time.Since(s.start).Nanoseconds() outputScaleDuration := s.outputScale.Nanoseconds() @@ -124,55 +124,55 @@ type SummaryOptions struct { // provide a prefix, but just the name of the metric. As long as the Scope is used to create a new instance of the metric // The prefix (or scope) is automatically set. type Scope interface { - // Creates new prometheus.Gauge metric with the prefix as the CurrentScope + // NewGauge creates new prometheus.Gauge metric with the prefix as the CurrentScope // Name is a string that follows prometheus conventions (mostly [_a-z]) // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information NewGauge(name, description string) (prometheus.Gauge, error) MustNewGauge(name, description string) prometheus.Gauge - // Creates new prometheus.GaugeVec metric with the prefix as the CurrentScope + // NewGaugeVec creates new prometheus.GaugeVec metric with the prefix as the CurrentScope // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information NewGaugeVec(name, description string, labelNames ...string) (*prometheus.GaugeVec, error) MustNewGaugeVec(name, description string, labelNames ...string) *prometheus.GaugeVec - // Creates new prometheus.Summary metric with the prefix as the CurrentScope + // NewSummary creates new prometheus.Summary metric with the prefix as the CurrentScope // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information NewSummary(name, description string) (prometheus.Summary, error) MustNewSummary(name, description string) prometheus.Summary - // Creates new prometheus.Summary metric with custom options, such as a custom set of objectives (i.e., target quantiles). + // NewSummaryWithOptions creates new prometheus.Summary metric with custom options, such as a custom set of objectives (i.e., target quantiles). // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information NewSummaryWithOptions(name, description string, options SummaryOptions) (prometheus.Summary, error) MustNewSummaryWithOptions(name, description string, options SummaryOptions) prometheus.Summary - // Creates new prometheus.SummaryVec metric with the prefix as the CurrentScope + // NewSummaryVec creates new prometheus.SummaryVec metric with the prefix as the CurrentScope // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information NewSummaryVec(name, description string, labelNames ...string) (*prometheus.SummaryVec, error) MustNewSummaryVec(name, description string, labelNames ...string) *prometheus.SummaryVec - // Creates new prometheus.Histogram metric with the prefix as the CurrentScope + // NewHistogram creates new prometheus.Histogram metric with the prefix as the CurrentScope // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information NewHistogram(name, description string) (prometheus.Histogram, error) MustNewHistogram(name, description string) prometheus.Histogram - // Creates new prometheus.HistogramVec metric with the prefix as the CurrentScope + // NewHistogramVec creates new prometheus.HistogramVec metric with the prefix as the CurrentScope // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information NewHistogramVec(name, description string, labelNames ...string) (*prometheus.HistogramVec, error) MustNewHistogramVec(name, description string, labelNames ...string) *prometheus.HistogramVec - // Creates new prometheus.Counter metric with the prefix as the CurrentScope + // NewCounter creates new prometheus.Counter metric with the prefix as the CurrentScope // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information // Important to note, counters are not like typical counters. These are ever increasing and cumulative. // So if you want to observe counters within buckets use Summary/Histogram NewCounter(name, description string) (prometheus.Counter, error) MustNewCounter(name, description string) prometheus.Counter - // Creates new prometheus.GaugeVec metric with the prefix as the CurrentScope + // NewCounterVec creates new prometheus.GaugeVec metric with the prefix as the CurrentScope // Refer to https://prometheus.io/docs/concepts/metric_types/ for more information NewCounterVec(name, description string, labelNames ...string) (*prometheus.CounterVec, error) MustNewCounterVec(name, description string, labelNames ...string) *prometheus.CounterVec - // This is a custom wrapper to create a StopWatch object in the current Scope. + // NewStopWatch is a custom wrapper to create a StopWatch object in the current Scope. // Duration is to specify the scale of the Timer. For example if you are measuring times in milliseconds // pass scale=times.Millisecond // https://golang.org/pkg/time/#Duration @@ -180,7 +180,7 @@ type Scope interface { NewStopWatch(name, description string, scale time.Duration) (StopWatch, error) MustNewStopWatch(name, description string, scale time.Duration) StopWatch - // This is a custom wrapper to create a StopWatch object in the current Scope. + // NewStopWatchVec is a custom wrapper to create a StopWatch object in the current Scope. // Duration is to specify the scale of the Timer. For example if you are measuring times in milliseconds // pass scale=times.Millisecond // https://golang.org/pkg/time/#Duration @@ -188,14 +188,14 @@ type Scope interface { NewStopWatchVec(name, description string, scale time.Duration, labelNames ...string) (*StopWatchVec, error) MustNewStopWatchVec(name, description string, scale time.Duration, labelNames ...string) *StopWatchVec - // In case nesting is desired for metrics, create a new subScope. This is generally useful in creating + // NewSubScope creates a new subScope in case nesting is desired for metrics. This is generally useful in creating // Scoped and SubScoped metrics NewSubScope(name string) Scope - // Returns the current ScopeName. Use for creating your own metrics + // CurrentScope returns the current ScopeName. Use for creating your own metrics CurrentScope() string - // Method that provides a scoped metric name. Can be used, if you want to directly create your own metric + // NewScopedMetricName provides a scoped metric name. Can be used, if you want to directly create your own metric NewScopedMetricName(name string) string } @@ -398,13 +398,14 @@ func (m metricsScope) CurrentScope() string { return m.scope } -// Creates a metric name under the scope. Scope will always have a defaultScopeDelimiterRune as the last character +// NewScopedMetricName creates a metric name under the scope. Scope will always have a defaultScopeDelimiterRune as the +// last character func (m metricsScope) NewScopedMetricName(name string) string { if name == "" { panic("metric name cannot be an empty string") } - return m.scope + name + return SanitizeMetricName(m.scope + name) } func (m metricsScope) NewSubScope(subscopeName string) Scope { @@ -421,7 +422,7 @@ func (m metricsScope) NewSubScope(subscopeName string) Scope { return NewScope(m.scope + subscopeName) } -// Creates a new scope in the format `name + defaultScopeDelimiterRune` +// NewScope creates a new scope in the format `name + defaultScopeDelimiterRune` // If the last character is already a defaultScopeDelimiterRune, then it does not add it to the scope name func NewScope(name string) Scope { if name == "" { @@ -438,7 +439,21 @@ func NewScope(name string) Scope { } } -// Returns a randomly-named scope for use in tests. +// SanitizeMetricName ensures the generates metric name is compatible with the underlying prometheus library. +func SanitizeMetricName(name string) string { + out := strings.Builder{} + for i, b := range name { + if (b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || b == ':' || (b >= '0' && b <= '9' && i > 0) { + out.WriteRune(b) + } else if b == '-' { + out.WriteRune('_') + } + } + + return out.String() +} + +// NewTestScope returns a randomly-named scope for use in tests. // Prometheus requires that metric names begin with a single word, which is generated from the alphabetic testScopeNameCharset. func NewTestScope() Scope { return NewScope("test" + rand.String(6)) From 0cbb3278b40c1f8765be43148a50241caa273db8 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Wed, 9 Feb 2022 10:55:32 -0800 Subject: [PATCH 152/191] santize all scope names and metric names (#115) Signed-off-by: Ketan Umare --- flytestdlib/promutils/scope.go | 8 ++++---- flytestdlib/promutils/scope_test.go | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/flytestdlib/promutils/scope.go b/flytestdlib/promutils/scope.go index 4d29902f2e..326094f3ae 100644 --- a/flytestdlib/promutils/scope.go +++ b/flytestdlib/promutils/scope.go @@ -23,7 +23,7 @@ func panicIfError(err error) { } } -// A Simple StopWatch that works with prometheus summary +// StopWatch implements a stopwatch style interface that works with prometheus summary // It will scale the output to match the expected time scale (milliseconds, seconds etc) // NOTE: Do not create a StopWatch object by hand, use a Scope to get a new instance of the StopWatch object type StopWatch struct { @@ -46,7 +46,7 @@ func (s StopWatch) Start() Timer { } } -// Observes specified duration between the start and end time +// Observe records a specified duration between the start and end time func (s StopWatch) Observe(start, end time.Time) { observed := end.Sub(start).Nanoseconds() outputScaleDuration := s.outputScale.Nanoseconds() @@ -58,7 +58,7 @@ func (s StopWatch) Observe(start, end time.Time) { s.Observer.Observe(scaled) } -// Observes/records the time to execute the given function synchronously +// Time Observes/records the time to execute the given function synchronously func (s StopWatch) Time(f func()) { t := s.Start() f() @@ -435,7 +435,7 @@ func NewScope(name string) Scope { } return metricsScope{ - scope: name, + scope: SanitizeMetricName(name), } } diff --git a/flytestdlib/promutils/scope_test.go b/flytestdlib/promutils/scope_test.go index 610f29f2e4..b27c3b8df8 100644 --- a/flytestdlib/promutils/scope_test.go +++ b/flytestdlib/promutils/scope_test.go @@ -37,6 +37,7 @@ func TestNewScope(t *testing.T) { assert.Equal(t, "test:timer_x", s.NewScopedMetricName("timer_x")) assert.Equal(t, "test:hello:timer:", s.NewSubScope("hello").NewSubScope("timer").CurrentScope()) assert.Equal(t, "test:hello:timer:", s.NewSubScope("hello").NewSubScope("timer:").CurrentScope()) + assert.Equal(t, "test:k8s_array:test_1:", s.NewSubScope("k8s-array").NewSubScope("test-1:").CurrentScope()) } func TestMetricsScope(t *testing.T) { From 757729404372bf47de3d48296d20c3be862d6714 Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Wed, 23 Feb 2022 10:54:36 -0600 Subject: [PATCH 153/191] Allow creation of bitset with 0 size (#116) * allow creation of bitset with 0 size Signed-off-by: Daniel Rammer * removed unecessary math import Signed-off-by: Daniel Rammer * added unit test and fixed lint issue Signed-off-by: Daniel Rammer --- flytestdlib/bitarray/bitset.go | 7 +++++-- flytestdlib/bitarray/bitset_test.go | 8 ++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/flytestdlib/bitarray/bitset.go b/flytestdlib/bitarray/bitset.go index 0fc6299e42..883b9ded65 100644 --- a/flytestdlib/bitarray/bitset.go +++ b/flytestdlib/bitarray/bitset.go @@ -67,7 +67,10 @@ func (s BitSet) DeepCopy() BitSet { // Initializes a new BitSet of the specified size. func NewBitSet(desiredCap uint) *BitSet { - // Create enough blocks to contain the number of intended bits. - a := make(BitSet, ((desiredCap-1)/blockSize)+1) + size := desiredCap / blockSize + if desiredCap%blockSize != 0 { + size++ + } + a := make(BitSet, size) return &a } diff --git a/flytestdlib/bitarray/bitset_test.go b/flytestdlib/bitarray/bitset_test.go index e2dfa42c2e..72e91f70d0 100644 --- a/flytestdlib/bitarray/bitset_test.go +++ b/flytestdlib/bitarray/bitset_test.go @@ -36,6 +36,14 @@ func TestBitSet_Set(t *testing.T) { } func TestNewBitSet(t *testing.T) { + t.Run("Empty", func(t *testing.T) { + b := new(BitSet) + assert.Equal(t, 0, b.BlockCount()) + + b = NewBitSet(0) + assert.Equal(t, 0, b.BlockCount()) + }) + t.Run("Block size", func(t *testing.T) { b := NewBitSet(63) assert.Equal(t, 2, b.BlockCount()) From ba4e46ae6f3ac52b3c50ef5d8b63dc43783ef5d2 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Fri, 4 Mar 2022 17:14:00 +0530 Subject: [PATCH 154/191] Fixed binding issues with slices (#118) * Fixed binding issues with slices Signed-off-by: Prafulla Mahindrakar * Removed unnecessary changes Signed-off-by: Prafulla Mahindrakar --- flytestdlib/cli/pflags/api/generator.go | 3 +++ flytestdlib/cli/pflags/api/testdata/testtype.go | 6 +++--- flytestdlib/cli/pflags/api/testdata/testtype_bind.go | 6 +++--- flytestdlib/cli/pflags/api/testdata/testtype_bind_test.go | 6 +++--- flytestdlib/cli/pflags/api/testdata/testtype_test.go | 6 +++--- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/flytestdlib/cli/pflags/api/generator.go b/flytestdlib/cli/pflags/api/generator.go index 80b92dcfbd..60649c2d2f 100644 --- a/flytestdlib/cli/pflags/api/generator.go +++ b/flytestdlib/cli/pflags/api/generator.go @@ -342,6 +342,9 @@ func discoverFieldsRecursive(ctx context.Context, workingDirPkg string, typ *typ case *types.Slice: logger.Infof(ctx, "[%v] is of a slice type with default value [%v].", tag.Name, tag.DefaultValue) defaultValue := tag.DefaultValue + if len(defaultValueAccessor) > 0 { + defaultValue = appendAccessors(defaultValueAccessor, fieldPath, variable.Name()) + } f, err := buildFieldForSlice(logger.WithIndent(ctx, indent), t, tag.Name, variable.Name(), tag.Usage, defaultValue, bindDefaultVar) if err != nil { diff --git a/flytestdlib/cli/pflags/api/testdata/testtype.go b/flytestdlib/cli/pflags/api/testdata/testtype.go index 2d72c5ce5a..4a86fc15ef 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype.go @@ -53,9 +53,9 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.String(fmt.Sprintf("%v%v", prefix, "str"), DefaultTestType.StringValue, "life is short") cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "bl"), DefaultTestType.BoolValue, "") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "nested.i"), DefaultTestType.NestedType.IntValue, "this is an important flag") - cmdFlags.IntSlice(fmt.Sprintf("%v%v", prefix, "ints"), []int{12, 1}, "") - cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "strs"), []string{"12", "1"}, "") - cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "complexArr"), []string{}, "") + cmdFlags.IntSlice(fmt.Sprintf("%v%v", prefix, "ints"), DefaultTestType.IntArray, "") + cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "strs"), DefaultTestType.StringArray, "") + cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "complexArr"), DefaultTestType.ComplexJSONArray, "") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "c"), DefaultTestType.mustJsonMarshal(DefaultTestType.StringToJSON), "I'm a complex type but can be converted from string.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.type"), DefaultTestType.StorageConfig.Type, "Sets the type of storage to configure [s3/minio/local/mem/stow].") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.endpoint"), DefaultTestType.StorageConfig.Connection.Endpoint.String(), "URL for storage client to connect to.") diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_bind.go b/flytestdlib/cli/pflags/api/testdata/testtype_bind.go index 12be5bd52d..e12dc052ee 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype_bind.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype_bind.go @@ -53,9 +53,9 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultTestType.StringValue, fmt.Sprintf("%v%v", prefix, "str"), DefaultTestType.StringValue, "life is short") cmdFlags.BoolVar(&DefaultTestType.BoolValue, fmt.Sprintf("%v%v", prefix, "bl"), DefaultTestType.BoolValue, "") cmdFlags.IntVar(&DefaultTestType.NestedType.IntValue, fmt.Sprintf("%v%v", prefix, "nested.i"), DefaultTestType.NestedType.IntValue, "this is an important flag") - cmdFlags.IntSliceVar(&[]int{12, 1}, fmt.Sprintf("%v%v", prefix, "ints"), []int{12, 1}, "") - cmdFlags.StringSliceVar(&[]string{"12", "1"}, fmt.Sprintf("%v%v", prefix, "strs"), []string{"12", "1"}, "") - cmdFlags.StringSliceVar(&[]string{}, fmt.Sprintf("%v%v", prefix, "complexArr"), []string{}, "") + cmdFlags.IntSliceVar(&DefaultTestType.IntArray, fmt.Sprintf("%v%v", prefix, "ints"), DefaultTestType.IntArray, "") + cmdFlags.StringSliceVar(&DefaultTestType.StringArray, fmt.Sprintf("%v%v", prefix, "strs"), DefaultTestType.StringArray, "") + cmdFlags.StringSliceVar(&DefaultTestType.ComplexJSONArray, fmt.Sprintf("%v%v", prefix, "complexArr"), DefaultTestType.ComplexJSONArray, "") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "c"), DefaultTestType.mustJsonMarshal(DefaultTestType.StringToJSON), "I'm a complex type but can be converted from string.") cmdFlags.StringVar(&DefaultTestType.StorageConfig.Type, fmt.Sprintf("%v%v", prefix, "storage.type"), DefaultTestType.StorageConfig.Type, "Sets the type of storage to configure [s3/minio/local/mem/stow].") cmdFlags.Var(&DefaultTestType.StorageConfig.Connection.Endpoint, fmt.Sprintf("%v%v", prefix, "storage.connection.endpoint"), "URL for storage client to connect to.") diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_bind_test.go b/flytestdlib/cli/pflags/api/testdata/testtype_bind_test.go index ea5b38e2ca..6aeacdaab7 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype_bind_test.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype_bind_test.go @@ -144,7 +144,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("Test_ints", func(t *testing.T) { t.Run("Override", func(t *testing.T) { - testValue := join_TestType([]int{12, 1}, ",") + testValue := join_TestType(DefaultTestType.IntArray, ",") cmdFlags.Set("ints", testValue) if vIntSlice, err := cmdFlags.GetIntSlice("ints"); err == nil { @@ -158,7 +158,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("Test_strs", func(t *testing.T) { t.Run("Override", func(t *testing.T) { - testValue := join_TestType([]string{"12", "1"}, ",") + testValue := join_TestType(DefaultTestType.StringArray, ",") cmdFlags.Set("strs", testValue) if vStringSlice, err := cmdFlags.GetStringSlice("strs"); err == nil { @@ -172,7 +172,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("Test_complexArr", func(t *testing.T) { t.Run("Override", func(t *testing.T) { - testValue := "1,1" + testValue := DefaultTestType.ComplexJSONArray cmdFlags.Set("complexArr", testValue) if vStringSlice, err := cmdFlags.GetStringSlice("complexArr"); err == nil { diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_test.go b/flytestdlib/cli/pflags/api/testdata/testtype_test.go index 4d8611d1ec..f59d0a2454 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype_test.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype_test.go @@ -144,7 +144,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("Test_ints", func(t *testing.T) { t.Run("Override", func(t *testing.T) { - testValue := join_TestType([]int{12, 1}, ",") + testValue := join_TestType(DefaultTestType.IntArray, ",") cmdFlags.Set("ints", testValue) if vIntSlice, err := cmdFlags.GetIntSlice("ints"); err == nil { @@ -158,7 +158,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("Test_strs", func(t *testing.T) { t.Run("Override", func(t *testing.T) { - testValue := join_TestType([]string{"12", "1"}, ",") + testValue := join_TestType(DefaultTestType.StringArray, ",") cmdFlags.Set("strs", testValue) if vStringSlice, err := cmdFlags.GetStringSlice("strs"); err == nil { @@ -172,7 +172,7 @@ func TestTestType_SetFlags(t *testing.T) { t.Run("Test_complexArr", func(t *testing.T) { t.Run("Override", func(t *testing.T) { - testValue := "1,1" + testValue := DefaultTestType.ComplexJSONArray cmdFlags.Set("complexArr", testValue) if vStringSlice, err := cmdFlags.GetStringSlice("complexArr"); err == nil { From 7550375655dc2d25650e95b3140141a1c0a2d593 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Thu, 24 Mar 2022 08:54:30 -0700 Subject: [PATCH 155/191] Add PresignRequest API (#119) * Add PresignRequest API Signed-off-by: Haytham Abuelfutuh * Unit test and cleanup Signed-off-by: Haytham Abuelfutuh * more cleanup Signed-off-by: Haytham Abuelfutuh * More unit tests Signed-off-by: Haytham Abuelfutuh * Update to latest stow commit Signed-off-by: Haytham Abuelfutuh * Update setup-go action Signed-off-by: Haytham Abuelfutuh * update go Signed-off-by: Haytham Abuelfutuh * Update github actions Signed-off-by: Haytham Abuelfutuh * Update go version Signed-off-by: Haytham Abuelfutuh * Pinning go to 1.17 Signed-off-by: Haytham Abuelfutuh * Update stow version to created release Signed-off-by: Haytham Abuelfutuh --- flytestdlib/.github/workflows/master.yml | 28 +++---- .../.github/workflows/pull_request.yml | 24 +++--- flytestdlib/go.mod | 15 ++-- flytestdlib/go.sum | 43 ++++++---- flytestdlib/storage/cached_rawstore.go | 6 +- flytestdlib/storage/cached_rawstore_test.go | 5 ++ flytestdlib/storage/mem_store.go | 6 ++ .../storage/mocks/composed_protobuf_store.go | 39 +++++++++ flytestdlib/storage/mocks/raw_store.go | 39 +++++++++ flytestdlib/storage/rawstores.go | 6 +- flytestdlib/storage/storage.go | 56 ++++++++----- flytestdlib/storage/stow_store.go | 30 +++++++ flytestdlib/storage/stow_store_test.go | 81 +++++++++++++++++++ flytestdlib/storage/url_path.go | 10 ++- flytestdlib/storage/url_path_test.go | 18 ++++- flytestdlib/storage/utils.go | 6 +- 16 files changed, 326 insertions(+), 86 deletions(-) diff --git a/flytestdlib/.github/workflows/master.yml b/flytestdlib/.github/workflows/master.yml index 007243059c..066194f4bf 100644 --- a/flytestdlib/.github/workflows/master.yml +++ b/flytestdlib/.github/workflows/master.yml @@ -27,7 +27,7 @@ jobs: goreleaser: name: Goreleaser runs-on: ubuntu-latest - needs: [bump-version] + needs: [ bump-version ] steps: - uses: actions/checkout@v2 with: @@ -35,7 +35,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.14 + go-version: '1.17' - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: @@ -52,27 +52,21 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: "0" - - name: Unit Tests - uses: cedrickring/golang-action@1.6.0 - env: - GO111MODULE: "on" + - uses: actions/setup-go@v2 with: - args: make mod_download && make test_unit_codecov + go-version: '1.17' + - name: Unit Tests + run: make mod_download && make test_unit_codecov - name: Push CodeCov uses: codecov/codecov-action@v1 with: file: coverage.txt flags: unittests fail_ci_if_error: true - - name: Lint - uses: cedrickring/golang-action@1.6.0 - env: - GO111MODULE: "on" + - uses: actions/setup-go@v2 with: - args: make install && make lint + go-version: '1.17' + - name: Lint + run: make install && make lint - name: Bench tests - uses: cedrickring/golang-action@1.6.0 - env: - GO111MODULE: "on" - with: - args: make install && make test_benchmark + run: make install && make test_benchmark diff --git a/flytestdlib/.github/workflows/pull_request.yml b/flytestdlib/.github/workflows/pull_request.yml index b4ffc6382e..9c8f7f566f 100644 --- a/flytestdlib/.github/workflows/pull_request.yml +++ b/flytestdlib/.github/workflows/pull_request.yml @@ -11,30 +11,24 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: "0" - - name: Unit Tests - uses: cedrickring/golang-action@1.6.0 - env: - GO111MODULE: "on" + - uses: actions/setup-go@v2 with: - args: make mod_download && make test_unit_codecov + go-version: '1.17' + - name: Unit Tests + run: make mod_download && make test_unit_codecov - name: Push CodeCov uses: codecov/codecov-action@v1 with: file: coverage.txt flags: unittests fail_ci_if_error: true - - name: Lint - uses: cedrickring/golang-action@1.6.0 - env: - GO111MODULE: "on" + - uses: actions/setup-go@v2 with: - args: make install && make lint + go-version: '1.17' + - name: Lint + run: make install && make lint - name: Bench tests - uses: cedrickring/golang-action@1.6.0 - env: - GO111MODULE: "on" - with: - args: make install && make test_benchmark + run: make install && make test_benchmark test-generate-integrity: name: Ensure go generate has run runs-on: ubuntu-latest diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 1b0954e894..18ddde7b4d 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -35,7 +35,10 @@ require ( require ( cloud.google.com/go v0.75.0 // indirect cloud.google.com/go/storage v1.12.0 // indirect - github.com/Azure/azure-sdk-for-go v51.0.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go v62.3.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.17 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect @@ -48,6 +51,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect github.com/go-logr/logr v0.4.0 // indirect + github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect github.com/google/gofuzz v1.1.0 // indirect @@ -68,7 +72,6 @@ require ( github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.15.0 // indirect github.com/prometheus/procfs v0.3.0 // indirect - github.com/satori/go.uuid v1.2.0 // indirect github.com/spf13/afero v1.5.1 // indirect github.com/spf13/cast v1.3.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -78,10 +81,10 @@ require ( golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect golang.org/x/mod v0.4.1 // indirect - golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect + golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 // indirect - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect - golang.org/x/text v0.3.5 // indirect + golang.org/x/sys v0.0.0-20210423082822-04245dca01da // indirect + golang.org/x/text v0.3.7 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/api v0.38.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -94,3 +97,5 @@ require ( k8s.io/klog/v2 v2.5.0 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.0.3 // indirect ) + +replace github.com/graymeta/stow => github.com/flyteorg/stow v0.3.0 diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index 5ded4a82fe..1d044213ef 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -39,9 +39,14 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lUX4= cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v51.0.0+incompatible h1:p7blnyJSjJqf5jflHbSGhIhEpXIgIFmYZNg5uwqweso= -github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v62.3.0+incompatible h1:Ctfsn9UoA/BB4HMYQlbPPgNXdX0tZ4tmb85+KFb2+RE= +github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 h1:qoVeMsc9/fh/yhxVaA0obYjVH/oI/ihrOoMwsLS9KSA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 h1:E+m3SkZCN0Bf5q7YdTs5lSm2CYY3CK4spn5OmUIiQtk= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJNuUB6n7rs5Wsel4dXLe90Um2n4= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= @@ -142,8 +147,9 @@ 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/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -168,6 +174,8 @@ github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/flyteorg/stow v0.3.0 h1:GpWuDDDP1fqLqh5ooOSeuPvD8x6+s0Kldv3S33GccgY= +github.com/flyteorg/stow v0.3.0/go.mod h1:wxg2Iy44Ddn5fT47daJQw1aSuF7ZFjeLL6AWj1zjic0= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -202,6 +210,8 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -287,8 +297,6 @@ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graymeta/stow v0.2.7 h1:b31cB1Ylw/388sYSZxnmpjT2QxC21AaQ8fRnUtE13b4= -github.com/graymeta/stow v0.2.7/go.mod h1:JAs139Zr29qfsecy7b+h9DRsWXbFbsd7LCrbCDYI84k= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -357,8 +365,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= @@ -494,8 +503,6 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -663,13 +670,15 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R 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-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-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-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d h1:20cMwl2fHAzkJMEA+8J4JgqBQcQGzbisXo31MIeenXI= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -741,8 +750,8 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/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-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 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= @@ -751,8 +760,9 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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= @@ -937,8 +947,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/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/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= diff --git a/flytestdlib/storage/cached_rawstore.go b/flytestdlib/storage/cached_rawstore.go index 710937b610..f42f01fd50 100644 --- a/flytestdlib/storage/cached_rawstore.go +++ b/flytestdlib/storage/cached_rawstore.go @@ -35,7 +35,7 @@ type cachedRawStore struct { metrics *cacheMetrics } -// Gets metadata about the reference. This should generally be a light weight operation. +// Head gets metadata about the reference. This should generally be a light weight operation. func (s *cachedRawStore) Head(ctx context.Context, reference DataReference) (Metadata, error) { key := []byte(reference) if oRaw, err := s.cache.Get(key); err == nil { @@ -49,7 +49,7 @@ func (s *cachedRawStore) Head(ctx context.Context, reference DataReference) (Met return s.RawStore.Head(ctx, reference) } -// Retrieves a byte array from the Blob store or an error +// ReadRaw retrieves a byte array from the Blob store or an error func (s *cachedRawStore) ReadRaw(ctx context.Context, reference DataReference) (io.ReadCloser, error) { key := []byte(reference) if oRaw, err := s.cache.Get(key); err == nil { @@ -84,7 +84,7 @@ func (s *cachedRawStore) ReadRaw(ctx context.Context, reference DataReference) ( return ioutils.NewBytesReadCloser(b), err } -// Stores a raw byte array. +// WriteRaw stores a raw byte array. func (s *cachedRawStore) WriteRaw(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error { var buf bytes.Buffer teeReader := io.TeeReader(raw, &buf) diff --git a/flytestdlib/storage/cached_rawstore_test.go b/flytestdlib/storage/cached_rawstore_test.go index c61076f1d7..28372525ea 100644 --- a/flytestdlib/storage/cached_rawstore_test.go +++ b/flytestdlib/storage/cached_rawstore_test.go @@ -72,6 +72,11 @@ type dummyStore struct { WriteRawCb func(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error } +// CreateSignedURL creates a signed url with the provided properties. +func (d *dummyStore) CreateSignedURL(ctx context.Context, reference DataReference, properties SignedURLProperties) (SignedURLResponse, error) { + return SignedURLResponse{}, fmt.Errorf("unsupported") +} + func (d *dummyStore) GetBaseContainerFQN(ctx context.Context) DataReference { return "dummy" } diff --git a/flytestdlib/storage/mem_store.go b/flytestdlib/storage/mem_store.go index b6e8877ed4..39e8fe61cf 100644 --- a/flytestdlib/storage/mem_store.go +++ b/flytestdlib/storage/mem_store.go @@ -3,6 +3,7 @@ package storage import ( "bytes" "context" + "fmt" "io" "io/ioutil" "os" @@ -64,6 +65,11 @@ func (s *InMemoryStore) GetBaseContainerFQN(ctx context.Context) DataReference { return DataReference("") } +// CreateSignedURL creates a signed url with the provided properties. +func (s *InMemoryStore) CreateSignedURL(ctx context.Context, reference DataReference, properties SignedURLProperties) (SignedURLResponse, error) { + return SignedURLResponse{}, fmt.Errorf("unsupported") +} + func NewInMemoryRawStore(_ *Config, scope promutils.Scope) (RawStore, error) { self := &InMemoryStore{ cache: map[DataReference]rawFile{}, diff --git a/flytestdlib/storage/mocks/composed_protobuf_store.go b/flytestdlib/storage/mocks/composed_protobuf_store.go index 4bd5c31850..6e28fbbf2a 100644 --- a/flytestdlib/storage/mocks/composed_protobuf_store.go +++ b/flytestdlib/storage/mocks/composed_protobuf_store.go @@ -50,6 +50,45 @@ func (_m *ComposedProtobufStore) CopyRaw(ctx context.Context, source storage.Dat return r0 } +type ComposedProtobufStore_CreateSignedURL struct { + *mock.Call +} + +func (_m ComposedProtobufStore_CreateSignedURL) Return(_a0 storage.SignedURLResponse, _a1 error) *ComposedProtobufStore_CreateSignedURL { + return &ComposedProtobufStore_CreateSignedURL{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *ComposedProtobufStore) OnCreateSignedURL(ctx context.Context, reference storage.DataReference, properties storage.SignedURLProperties) *ComposedProtobufStore_CreateSignedURL { + c := _m.On("CreateSignedURL", ctx, reference, properties) + return &ComposedProtobufStore_CreateSignedURL{Call: c} +} + +func (_m *ComposedProtobufStore) OnCreateSignedURLMatch(matchers ...interface{}) *ComposedProtobufStore_CreateSignedURL { + c := _m.On("CreateSignedURL", matchers...) + return &ComposedProtobufStore_CreateSignedURL{Call: c} +} + +// CreateSignedURL provides a mock function with given fields: ctx, reference, properties +func (_m *ComposedProtobufStore) CreateSignedURL(ctx context.Context, reference storage.DataReference, properties storage.SignedURLProperties) (storage.SignedURLResponse, error) { + ret := _m.Called(ctx, reference, properties) + + var r0 storage.SignedURLResponse + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference, storage.SignedURLProperties) storage.SignedURLResponse); ok { + r0 = rf(ctx, reference, properties) + } else { + r0 = ret.Get(0).(storage.SignedURLResponse) + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, storage.DataReference, storage.SignedURLProperties) error); ok { + r1 = rf(ctx, reference, properties) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type ComposedProtobufStore_GetBaseContainerFQN struct { *mock.Call } diff --git a/flytestdlib/storage/mocks/raw_store.go b/flytestdlib/storage/mocks/raw_store.go index 1ec9815b0c..9bda8187ad 100644 --- a/flytestdlib/storage/mocks/raw_store.go +++ b/flytestdlib/storage/mocks/raw_store.go @@ -48,6 +48,45 @@ func (_m *RawStore) CopyRaw(ctx context.Context, source storage.DataReference, d return r0 } +type RawStore_CreateSignedURL struct { + *mock.Call +} + +func (_m RawStore_CreateSignedURL) Return(_a0 storage.SignedURLResponse, _a1 error) *RawStore_CreateSignedURL { + return &RawStore_CreateSignedURL{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *RawStore) OnCreateSignedURL(ctx context.Context, reference storage.DataReference, properties storage.SignedURLProperties) *RawStore_CreateSignedURL { + c := _m.On("CreateSignedURL", ctx, reference, properties) + return &RawStore_CreateSignedURL{Call: c} +} + +func (_m *RawStore) OnCreateSignedURLMatch(matchers ...interface{}) *RawStore_CreateSignedURL { + c := _m.On("CreateSignedURL", matchers...) + return &RawStore_CreateSignedURL{Call: c} +} + +// CreateSignedURL provides a mock function with given fields: ctx, reference, properties +func (_m *RawStore) CreateSignedURL(ctx context.Context, reference storage.DataReference, properties storage.SignedURLProperties) (storage.SignedURLResponse, error) { + ret := _m.Called(ctx, reference, properties) + + var r0 storage.SignedURLResponse + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference, storage.SignedURLProperties) storage.SignedURLResponse); ok { + r0 = rf(ctx, reference, properties) + } else { + r0 = ret.Get(0).(storage.SignedURLResponse) + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, storage.DataReference, storage.SignedURLProperties) error); ok { + r1 = rf(ctx, reference, properties) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type RawStore_GetBaseContainerFQN struct { *mock.Call } diff --git a/flytestdlib/storage/rawstores.go b/flytestdlib/storage/rawstores.go index 1651d8a47d..40624b1a55 100644 --- a/flytestdlib/storage/rawstores.go +++ b/flytestdlib/storage/rawstores.go @@ -54,7 +54,7 @@ func createHTTPClient(cfg HTTPClientConfig) *http.Client { return c } -// Creates a new Data Store with the supplied config. +// NewDataStore creates a new Data Store with the supplied config. func NewDataStore(cfg *Config, metricsScope promutils.Scope) (s *DataStore, err error) { defaultClient := http.DefaultClient defer func() { @@ -71,13 +71,13 @@ func NewDataStore(cfg *Config, metricsScope promutils.Scope) (s *DataStore, err } protoStore := NewDefaultProtobufStore(newCachedRawStore(cfg, rawStore, metricsScope), metricsScope) - return NewCompositeDataStore(URLPathConstructor{}, protoStore), nil + return NewCompositeDataStore(NewURLPathConstructor(), protoStore), nil } return &emptyStore, fmt.Errorf("type is of an invalid value [%v]", cfg.Type) } -// Composes a new DataStore. +// NewCompositeDataStore composes a new DataStore. func NewCompositeDataStore(refConstructor ReferenceConstructor, composedProtobufStore ComposedProtobufStore) *DataStore { return &DataStore{ ReferenceConstructor: refConstructor, diff --git a/flytestdlib/storage/storage.go b/flytestdlib/storage/storage.go index c6dbdde9fd..c8320a9c7b 100644 --- a/flytestdlib/storage/storage.go +++ b/flytestdlib/storage/storage.go @@ -1,4 +1,4 @@ -// Defines extensible storage interface. +// Package storage defines extensible storage interface. // This package registers "storage" config section that maps to Config struct. Use NewDataStore(cfg) to initialize a // DataStore with the provided config. The package provides default implementation to access local, S3 (and minio), // and In-Memory storage. Use NewCompositeDataStore to swap any portions of the DataStore interface with an external @@ -9,6 +9,9 @@ package storage import ( "context" "strings" + "time" + + "github.com/graymeta/stow" "io" "net/url" @@ -16,77 +19,92 @@ import ( "github.com/golang/protobuf/proto" ) -// Defines a reference to data location. +// DataReference defines a reference to data location. type DataReference string var emptyStore = DataStore{} -// Holder for recording storage options. It is used to pass Metadata (like headers for S3) and also tags or labels for +// Options holds storage options. It is used to pass Metadata (like headers for S3) and also tags or labels for // objects type Options struct { Metadata map[string]interface{} } -// Placeholder for data reference metadata. +// Metadata is a placeholder for data reference metadata. type Metadata interface { Exists() bool Size() int64 } -// A simplified interface for accessing and storing data in one of the Cloud stores. +// DataStore is a simplified interface for accessing and storing data in one of the Cloud stores. // Today we rely on Stow for multi-cloud support, but this interface abstracts that part type DataStore struct { ComposedProtobufStore ReferenceConstructor } +type SignedURLProperties struct { + Scope stow.ClientMethod + ExpiresIn time.Duration +} + +type SignedURLResponse struct { + URL url.URL +} + //go:generate mockery -name RawStore -case=underscore -// Defines a low level interface for accessing and storing bytes. +// RawStore defines a low level interface for accessing and storing bytes. type RawStore interface { - // returns a FQN DataReference with the configured base init container + // GetBaseContainerFQN returns a FQN DataReference with the configured base init container GetBaseContainerFQN(ctx context.Context) DataReference - // Gets metadata about the reference. This should generally be a light weight operation. + // CreateSignedURL creates a signed url with the provided properties. + CreateSignedURL(ctx context.Context, reference DataReference, properties SignedURLProperties) (SignedURLResponse, error) + + // Head gets metadata about the reference. This should generally be a light weight operation. Head(ctx context.Context, reference DataReference) (Metadata, error) - // Retrieves a byte array from the Blob store or an error + // ReadRaw retrieves a byte array from the Blob store or an error ReadRaw(ctx context.Context, reference DataReference) (io.ReadCloser, error) - // Stores a raw byte array. + // WriteRaw stores a raw byte array. WriteRaw(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error - // Copies from source to destination. + // CopyRaw copies from source to destination. CopyRaw(ctx context.Context, source, destination DataReference, opts Options) error } //go:generate mockery -name ReferenceConstructor -case=underscore -// Defines an interface for building data reference paths. +// ReferenceConstructor defines an interface for building data reference paths. type ReferenceConstructor interface { - // Creates a new dataReference that matches the storage structure. + // ConstructReference creates a new dataReference that matches the storage structure. ConstructReference(ctx context.Context, reference DataReference, nestedKeys ...string) (DataReference, error) + + // FromSignedURL constructs a data reference from a signed URL + //FromSignedURL(ctx context.Context, signedURL string) (DataReference, error) } -// Defines an interface for reading and writing protobuf messages +// ProtobufStore defines an interface for reading and writing protobuf messages type ProtobufStore interface { - // Retrieves the entire blob from blobstore and unmarshals it to the passed protobuf + // ReadProtobuf retrieves the entire blob from blobstore and unmarshals it to the passed protobuf ReadProtobuf(ctx context.Context, reference DataReference, msg proto.Message) error - // Serializes and stores the protobuf. + // WriteProtobuf serializes and stores the protobuf. WriteProtobuf(ctx context.Context, reference DataReference, opts Options, msg proto.Message) error } //go:generate mockery -name ComposedProtobufStore -case=underscore -// A ProtobufStore needs a RawStore to get the RawData. This interface provides all the necessary components to make -// Protobuf fetching work +// ComposedProtobufStore interface includes all the necessary data to allow a ProtobufStore to interact with storage +// through a RawStore. type ComposedProtobufStore interface { RawStore ProtobufStore } -// Splits the data reference into parts. +// Split splits the data reference into parts. func (r DataReference) Split() (scheme, container, key string, err error) { u, err := url.Parse(string(r)) if err != nil { diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 8bc76e8528..9fc4235696 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "io" + "net/url" "sync" "time" @@ -276,6 +277,35 @@ func (s *StowStore) GetBaseContainerFQN(ctx context.Context) DataReference { return s.baseContainerFQN } +func (s *StowStore) CreateSignedURL(ctx context.Context, reference DataReference, properties SignedURLProperties) (SignedURLResponse, error) { + _, container, key, err := reference.Split() + if err != nil { + return SignedURLResponse{}, err + } + + c, err := s.getContainer(ctx, container) + if err != nil { + return SignedURLResponse{}, err + } + + urlStr, err := c.PreSignRequest(ctx, properties.Scope, key, stow.PresignRequestParams{ + ExpiresIn: properties.ExpiresIn, + }) + + if err != nil { + return SignedURLResponse{}, err + } + + urlVal, err := url.Parse(urlStr) + if err != nil { + return SignedURLResponse{}, err + } + + return SignedURLResponse{ + URL: *urlVal, + }, nil +} + func NewStowRawStore(baseContainerFQN DataReference, loc stow.Location, enableDynamicContainerLoading bool, metricsScope promutils.Scope) (*StowStore, error) { failureTypeOption := labeled.AdditionalLabelsOption{Labels: []string{FailureTypeLabel.String()}} self := &StowStore{ diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index 16fff35c76..95cc612c74 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -50,6 +50,12 @@ type mockStowContainer struct { putCB func(name string, r io.Reader, size int64, metadata map[string]interface{}) (stow.Item, error) } +// CreateSignedURL creates a signed url with the provided properties. +func (m mockStowContainer) PreSignRequest(_ context.Context, _ stow.ClientMethod, s string, + _ stow.PresignRequestParams) (url string, err error) { + return s, nil +} + func (m mockStowContainer) ID() string { return m.id } @@ -143,6 +149,81 @@ func TestAwsBucketIsNotFound(t *testing.T) { }) } +func TestStowStore_CreateSignedURL(t *testing.T) { + labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) + + const container = "container" + t.Run("Happy Path", func(t *testing.T) { + testScope := promutils.NewTestScope() + fn := fQNFn["s3"] + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, false, testScope) + assert.NoError(t, err) + + actual, err := s.CreateSignedURL(context.TODO(), DataReference("https://container/path"), SignedURLProperties{}) + assert.NoError(t, err) + assert.Equal(t, "path", actual.URL.String()) + }) + + t.Run("Invalid URL", func(t *testing.T) { + testScope := promutils.NewTestScope() + fn := fQNFn["s3"] + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, false, testScope) + assert.NoError(t, err) + + _, err = s.CreateSignedURL(context.TODO(), DataReference("://container/path"), SignedURLProperties{}) + assert.Error(t, err) + }) + + t.Run("Non existing container", func(t *testing.T) { + testScope := promutils.NewTestScope() + fn := fQNFn["s3"] + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, false, testScope) + assert.NoError(t, err) + + _, err = s.CreateSignedURL(context.TODO(), DataReference("s3://container2/path"), SignedURLProperties{}) + assert.Error(t, err) + }) +} + func TestStowStore_ReadRaw(t *testing.T) { labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) diff --git a/flytestdlib/storage/url_path.go b/flytestdlib/storage/url_path.go index efd070da7e..d5dc9e9d51 100644 --- a/flytestdlib/storage/url_path.go +++ b/flytestdlib/storage/url_path.go @@ -12,9 +12,11 @@ import ( "github.com/flyteorg/flytestdlib/logger" ) -const separator = "/" +const ( + separator = "/" +) -// Implements ReferenceConstructor that assumes paths are URL-compatible. +// URLPathConstructor implements ReferenceConstructor that assumes paths are URL-compatible. type URLPathConstructor struct { } @@ -45,3 +47,7 @@ func (URLPathConstructor) ConstructReference(ctx context.Context, reference Data return DataReference(u.String()), nil } + +func NewURLPathConstructor() URLPathConstructor { + return URLPathConstructor{} +} diff --git a/flytestdlib/storage/url_path_test.go b/flytestdlib/storage/url_path_test.go index 5dc24661cf..c933b8274e 100644 --- a/flytestdlib/storage/url_path_test.go +++ b/flytestdlib/storage/url_path_test.go @@ -9,7 +9,19 @@ import ( func TestUrlPathConstructor_ConstructReference(t *testing.T) { s := URLPathConstructor{} - r, err := s.ConstructReference(context.TODO(), DataReference("hello"), "key1", "key2/", "key3") - assert.NoError(t, err) - assert.Equal(t, "/hello/key1/key2/key3", r.String()) + t.Run("happy path", func(t *testing.T) { + r, err := s.ConstructReference(context.TODO(), DataReference("hello"), "key1", "key2/", "key3") + assert.NoError(t, err) + assert.Equal(t, "/hello/key1/key2/key3", r.String()) + }) + + t.Run("failed to parse base path", func(t *testing.T) { + _, err := s.ConstructReference(context.TODO(), DataReference("*&^#&$@:%//"), "key1", "key2/", "key3") + assert.Error(t, err) + }) + + t.Run("failed to parse nestedKeys", func(t *testing.T) { + _, err := s.ConstructReference(context.TODO(), DataReference("*&^#&$@://"), "key1%", "key2/", "key3") + assert.Error(t, err) + }) } diff --git a/flytestdlib/storage/utils.go b/flytestdlib/storage/utils.go index 880093f1fd..be3af5c64a 100644 --- a/flytestdlib/storage/utils.go +++ b/flytestdlib/storage/utils.go @@ -20,7 +20,7 @@ const ( genericFailureTypeLabel = "Generic" ) -// Gets a value indicating whether the underlying error is a Not Found error. +// IsNotFound gets a value indicating whether the underlying error is a Not Found error. func IsNotFound(err error) bool { if root := errors.Cause(err); os.IsNotExist(root) { return true @@ -33,7 +33,7 @@ func IsNotFound(err error) bool { return false } -// Gets a value indicating whether the underlying error is "already exists" error. +// IsExists gets a value indicating whether the underlying error is "already exists" error. func IsExists(err error) bool { if root := errors.Cause(err); os.IsExist(root) { return true @@ -42,7 +42,7 @@ func IsExists(err error) bool { return false } -// Gets a value indicating whether the root cause of error is a "limit exceeded" error. +// IsExceedsLimit gets a value indicating whether the root cause of error is a "limit exceeded" error. func IsExceedsLimit(err error) bool { return stdErrs.IsCausedBy(err, ErrExceedsLimit) } From 057b3796726514310d4904c015b40e409051d608 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Sun, 27 Mar 2022 15:11:12 -0700 Subject: [PATCH 156/191] Rename stow to flyteorg/stow (#120) --- .../boilerplate/flyte/golang_support_tools/go.mod | 4 ++-- .../boilerplate/flyte/golang_support_tools/go.sum | 6 ++++-- flytestdlib/go.mod | 4 +--- flytestdlib/go.sum | 4 ++-- flytestdlib/storage/storage.go | 2 +- flytestdlib/storage/stow_store.go | 14 +++++++------- flytestdlib/storage/stow_store_test.go | 6 +++--- flytestdlib/storage/utils.go | 2 +- flytestdlib/storage/utils_test.go | 2 +- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod index 307398c89e..892b682185 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod @@ -14,7 +14,7 @@ require ( 4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a // indirect cloud.google.com/go v0.75.0 // indirect cloud.google.com/go/storage v1.12.0 // indirect - github.com/Azure/azure-sdk-for-go v51.0.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go v62.3.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.17 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect @@ -62,6 +62,7 @@ require ( github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gofrs/flock v0.8.0 // indirect + github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect github.com/golang/protobuf v1.4.3 // indirect @@ -135,7 +136,6 @@ require ( github.com/ryancurrah/gomodguard v1.2.0 // indirect github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect github.com/sanposhiho/wastedassign v0.1.3 // indirect - github.com/satori/go.uuid v1.2.0 // indirect github.com/securego/gosec/v2 v2.6.1 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.8.0 // indirect diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum b/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum index a62010d29f..8e30305b14 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum @@ -42,8 +42,9 @@ cloud.google.com/go/storage v1.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lU cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v51.0.0+incompatible h1:p7blnyJSjJqf5jflHbSGhIhEpXIgIFmYZNg5uwqweso= github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v62.3.0+incompatible h1:Ctfsn9UoA/BB4HMYQlbPPgNXdX0tZ4tmb85+KFb2+RE= +github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= @@ -276,6 +277,8 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -698,7 +701,6 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sanposhiho/wastedassign v0.1.3 h1:qIMpTh4NGZYRbFJ+DSpLoVn8F4SLciX2afRvXPefC7w= github.com/sanposhiho/wastedassign v0.1.3/go.mod h1:LGpq5Hsv74QaqM47WtIsRSF/ik9kqk07kchgv66tLVE= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/securego/gosec/v2 v2.6.1 h1:+KCw+uz16FYfFyJ/A5aU6uP7mnrL+j1TbDnk1yN+8R0= diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 18ddde7b4d..fbd4167a21 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -9,11 +9,11 @@ require ( github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 github.com/fatih/color v1.10.0 github.com/fatih/structtag v1.2.0 + github.com/flyteorg/stow v0.3.1 github.com/fsnotify/fsnotify v1.4.9 github.com/ghodss/yaml v1.0.0 github.com/go-test/deep v1.0.7 github.com/golang/protobuf v1.4.3 - github.com/graymeta/stow v0.2.7 github.com/hashicorp/golang-lru v0.5.4 github.com/magiconair/properties v1.8.4 github.com/mitchellh/mapstructure v1.4.1 @@ -97,5 +97,3 @@ require ( k8s.io/klog/v2 v2.5.0 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.0.3 // indirect ) - -replace github.com/graymeta/stow => github.com/flyteorg/stow v0.3.0 diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index 1d044213ef..a05a6d92f1 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -174,8 +174,8 @@ github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/stow v0.3.0 h1:GpWuDDDP1fqLqh5ooOSeuPvD8x6+s0Kldv3S33GccgY= -github.com/flyteorg/stow v0.3.0/go.mod h1:wxg2Iy44Ddn5fT47daJQw1aSuF7ZFjeLL6AWj1zjic0= +github.com/flyteorg/stow v0.3.1 h1:cBMbWl03Gsy5KoA5mutUYTuYpqtT7Pb8+ANGCLnmFEs= +github.com/flyteorg/stow v0.3.1/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= diff --git a/flytestdlib/storage/storage.go b/flytestdlib/storage/storage.go index c8320a9c7b..474e38da7b 100644 --- a/flytestdlib/storage/storage.go +++ b/flytestdlib/storage/storage.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/graymeta/stow" + "github.com/flyteorg/stow" "io" "net/url" diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 9fc4235696..e03c4a6083 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -12,12 +12,12 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" s32 "github.com/aws/aws-sdk-go/service/s3" - "github.com/graymeta/stow/azure" - "github.com/graymeta/stow/google" - "github.com/graymeta/stow/local" - "github.com/graymeta/stow/oracle" - "github.com/graymeta/stow/s3" - "github.com/graymeta/stow/swift" + "github.com/flyteorg/stow/azure" + "github.com/flyteorg/stow/google" + "github.com/flyteorg/stow/local" + "github.com/flyteorg/stow/oracle" + "github.com/flyteorg/stow/s3" + "github.com/flyteorg/stow/swift" "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/logger" @@ -25,7 +25,7 @@ import ( "github.com/flyteorg/flytestdlib/promutils" - "github.com/graymeta/stow" + "github.com/flyteorg/stow" errs "github.com/pkg/errors" ) diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index 95cc612c74..9862968767 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -16,11 +16,11 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" s32 "github.com/aws/aws-sdk-go/service/s3" - "github.com/graymeta/stow/google" - "github.com/graymeta/stow/local" + "github.com/flyteorg/stow/google" + "github.com/flyteorg/stow/local" "github.com/pkg/errors" - "github.com/graymeta/stow" + "github.com/flyteorg/stow" "github.com/stretchr/testify/assert" "github.com/flyteorg/flytestdlib/config" diff --git a/flytestdlib/storage/utils.go b/flytestdlib/storage/utils.go index be3af5c64a..4c2a7bd729 100644 --- a/flytestdlib/storage/utils.go +++ b/flytestdlib/storage/utils.go @@ -7,7 +7,7 @@ import ( stdErrs "github.com/flyteorg/flytestdlib/errors" "github.com/flyteorg/flytestdlib/promutils/labeled" - "github.com/graymeta/stow" + "github.com/flyteorg/stow" "github.com/pkg/errors" ) diff --git a/flytestdlib/storage/utils_test.go b/flytestdlib/storage/utils_test.go index 42cbc6bb0f..adea66d11f 100644 --- a/flytestdlib/storage/utils_test.go +++ b/flytestdlib/storage/utils_test.go @@ -6,7 +6,7 @@ import ( "testing" flyteerrors "github.com/flyteorg/flytestdlib/errors" - "github.com/graymeta/stow" + "github.com/flyteorg/stow" "github.com/pkg/errors" "github.com/stretchr/testify/assert" ) From 3acda64e96263d5cfd81fd6c99b6a812ecf8c7fb Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Thu, 31 Mar 2022 03:53:28 +0000 Subject: [PATCH 157/191] Move database config to flytestdlib (#121) * Move db section to flytestdlib Signed-off-by: Kevin Su * Added log level Signed-off-by: Kevin Su * Bump gorm version Signed-off-by: Kevin Su * Updated tests Signed-off-by: Kevin Su * Fixed lint Signed-off-by: Kevin Su * Addressed comment Signed-off-by: Kevin Su * Addressed comment Signed-off-by: Kevin Su * More tests Signed-off-by: Kevin Su * comments Signed-off-by: Kevin Su * rerun tests Signed-off-by: Kevin Su * Addressed comment Signed-off-by: Kevin Su * More tests Signed-off-by: Kevin Su * address comment Signed-off-by: Kevin Su --- flytestdlib/database/config.go | 116 ++++++++ flytestdlib/database/config_test.go | 41 +++ flytestdlib/database/dbconfig_flags.go | 67 +++++ flytestdlib/database/dbconfig_flags_test.go | 284 ++++++++++++++++++++ flytestdlib/database/testdata/config.yaml | 16 ++ flytestdlib/go.mod | 1 + flytestdlib/go.sum | 20 +- 7 files changed, 530 insertions(+), 15 deletions(-) create mode 100644 flytestdlib/database/config.go create mode 100644 flytestdlib/database/config_test.go create mode 100755 flytestdlib/database/dbconfig_flags.go create mode 100755 flytestdlib/database/dbconfig_flags_test.go create mode 100644 flytestdlib/database/testdata/config.yaml diff --git a/flytestdlib/database/config.go b/flytestdlib/database/config.go new file mode 100644 index 0000000000..4f34739aa6 --- /dev/null +++ b/flytestdlib/database/config.go @@ -0,0 +1,116 @@ +package database + +import ( + "time" + + "github.com/flyteorg/flytestdlib/config" + "gorm.io/gorm/logger" +) + +const ( + database = "database" + postgres = "postgres" +) + +//go:generate pflags DbConfig --default-var=defaultConfig + +var defaultConfig = &DbConfig{ + MaxIdleConnections: 10, + MaxOpenConnections: 1000, + ConnMaxLifeTime: config.Duration{Duration: time.Hour}, + Postgres: PostgresConfig{ + Port: 5432, + User: postgres, + Host: postgres, + DbName: postgres, + ExtraOptions: "sslmode=disable", + }, +} +var configSection = config.MustRegisterSection(database, defaultConfig) + +// DbConfig is used to for initiating the database connection with the store that holds registered +// entities (e.g. workflows, tasks, launch plans...) +type DbConfig struct { + // deprecated: Please use Postgres.Host + DeprecatedHost string `json:"host" pflag:"-,deprecated"` + // deprecated: Please use Postgres.Port + DeprecatedPort int `json:"port" pflag:"-,deprecated"` + // deprecated: Please use Postgres.DbName + DeprecatedDbName string `json:"dbname" pflag:"-,deprecated"` + // deprecated: Please use Postgres.User + DeprecatedUser string `json:"username" pflag:"-,deprecated"` + // deprecated: Please use Postgres.Password + DeprecatedPassword string `json:"password" pflag:"-,deprecated"` + // deprecated: Please use Postgres.PasswordPath + DeprecatedPasswordPath string `json:"passwordPath" pflag:"-,deprecated"` + // deprecated: Please use Postgres.ExtraOptions + DeprecatedExtraOptions string `json:"options" pflag:"-,deprecated"` + // deprecated: Please use Postgres.Debug + DeprecatedDebug bool `json:"debug" pflag:"-,deprecated"` + + EnableForeignKeyConstraintWhenMigrating bool `json:"enableForeignKeyConstraintWhenMigrating" pflag:",Whether to enable gorm foreign keys when migrating the db"` + MaxIdleConnections int `json:"maxIdleConnections" pflag:",maxIdleConnections sets the maximum number of connections in the idle connection pool."` + MaxOpenConnections int `json:"maxOpenConnections" pflag:",maxOpenConnections sets the maximum number of open connections to the database."` + ConnMaxLifeTime config.Duration `json:"connMaxLifeTime" pflag:",sets the maximum amount of time a connection may be reused"` + LogLevel logger.LogLevel `json:"log_level" pflag:"-,"` + Postgres PostgresConfig `json:"postgres,omitempty"` + SQLite SQLiteConfig `json:"sqlite,omitempty"` +} + +// SQLiteConfig can be used to configure +type SQLiteConfig struct { + File string `json:"file" pflag:",The path to the file (existing or new) where the DB should be created / stored. If existing, then this will be re-used, else a new will be created"` +} + +// PostgresConfig includes specific config options for opening a connection to a postgres database. +type PostgresConfig struct { + Host string `json:"host" pflag:",The host name of the database server"` + Port int `json:"port" pflag:",The port name of the database server"` + DbName string `json:"dbname" pflag:",The database name"` + User string `json:"username" pflag:",The database user who is connecting to the server."` + // Either Password or PasswordPath must be set. + Password string `json:"password" pflag:",The database password."` + PasswordPath string `json:"passwordPath" pflag:",Points to the file containing the database password."` + ExtraOptions string `json:"options" pflag:",See http://gorm.io/docs/connecting_to_the_database.html for available options passed, in addition to the above."` + Debug bool `json:"debug" pflag:" Whether or not to start the database connection with debug mode enabled."` +} + +var emptySQLiteCfg = SQLiteConfig{} +var emptyPostgresConfig = PostgresConfig{} + +func (s SQLiteConfig) IsEmpty() bool { + return s == emptySQLiteCfg +} + +func (s PostgresConfig) IsEmpty() bool { + return s == emptyPostgresConfig +} + +func GetConfig() *DbConfig { + databaseConfig := configSection.GetConfig().(*DbConfig) + if len(databaseConfig.DeprecatedHost) > 0 { + databaseConfig.Postgres.Host = databaseConfig.DeprecatedHost + } + if databaseConfig.DeprecatedPort != 0 { + databaseConfig.Postgres.Port = databaseConfig.DeprecatedPort + } + if len(databaseConfig.DeprecatedDbName) > 0 { + databaseConfig.Postgres.DbName = databaseConfig.DeprecatedDbName + } + if len(databaseConfig.DeprecatedUser) > 0 { + databaseConfig.Postgres.User = databaseConfig.DeprecatedUser + } + if len(databaseConfig.DeprecatedPassword) > 0 { + databaseConfig.Postgres.Password = databaseConfig.DeprecatedPassword + } + if len(databaseConfig.DeprecatedPasswordPath) > 0 { + databaseConfig.Postgres.PasswordPath = databaseConfig.DeprecatedPasswordPath + } + if len(databaseConfig.DeprecatedExtraOptions) > 0 { + databaseConfig.Postgres.ExtraOptions = databaseConfig.DeprecatedExtraOptions + } + if databaseConfig.DeprecatedDebug != false { + databaseConfig.Postgres.Debug = databaseConfig.DeprecatedDebug + } + return databaseConfig +} diff --git a/flytestdlib/database/config_test.go b/flytestdlib/database/config_test.go new file mode 100644 index 0000000000..74ee93b717 --- /dev/null +++ b/flytestdlib/database/config_test.go @@ -0,0 +1,41 @@ +package database + +import ( + "context" + "path/filepath" + "testing" + + "github.com/flyteorg/flytestdlib/config" + "github.com/flyteorg/flytestdlib/config/viper" + "github.com/flyteorg/flytestdlib/logger" + "github.com/stretchr/testify/assert" +) + +func TestParseDatabaseConfig(t *testing.T) { + assert.NoError(t, logger.SetConfig(&logger.Config{IncludeSourceCode: true})) + + accessor := viper.NewAccessor(config.Options{ + RootSection: configSection, + SearchPaths: []string{filepath.Join("testdata", "config.yaml")}, + }) + + assert.NoError(t, accessor.UpdateConfig(context.Background())) + + assert.Equal(t, false, GetConfig().EnableForeignKeyConstraintWhenMigrating) + assert.Equal(t, 1000, GetConfig().MaxOpenConnections) + assert.Equal(t, 10, GetConfig().MaxIdleConnections) + assert.Equal(t, config.Duration{Duration: 3600000000000}, GetConfig().ConnMaxLifeTime) + + assert.Equal(t, false, GetConfig().Postgres.IsEmpty()) + assert.Equal(t, 5432, GetConfig().Postgres.Port) + assert.Equal(t, "postgres", GetConfig().Postgres.User) + assert.Equal(t, "postgres", GetConfig().Postgres.Host) + assert.Equal(t, "postgres", GetConfig().Postgres.DbName) + assert.Equal(t, "sslmode=disable", GetConfig().Postgres.ExtraOptions) + assert.Equal(t, "password", GetConfig().Postgres.Password) + assert.Equal(t, "/etc/secret", GetConfig().Postgres.PasswordPath) + assert.Equal(t, true, GetConfig().Postgres.Debug) + + assert.Equal(t, false, GetConfig().SQLite.IsEmpty()) + assert.Equal(t, "admin.db", GetConfig().SQLite.File) +} diff --git a/flytestdlib/database/dbconfig_flags.go b/flytestdlib/database/dbconfig_flags.go new file mode 100755 index 0000000000..c925094cc2 --- /dev/null +++ b/flytestdlib/database/dbconfig_flags.go @@ -0,0 +1,67 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package database + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (DbConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (DbConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (DbConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in DbConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg DbConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("DbConfig", pflag.ExitOnError) + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "enableForeignKeyConstraintWhenMigrating"), defaultConfig.EnableForeignKeyConstraintWhenMigrating, "Whether to enable gorm foreign keys when migrating the db") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "maxIdleConnections"), defaultConfig.MaxIdleConnections, "maxIdleConnections sets the maximum number of connections in the idle connection pool.") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "maxOpenConnections"), defaultConfig.MaxOpenConnections, "maxOpenConnections sets the maximum number of open connections to the database.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connMaxLifeTime"), defaultConfig.ConnMaxLifeTime.String(), "sets the maximum amount of time a connection may be reused") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "postgres.host"), defaultConfig.Postgres.Host, "The host name of the database server") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "postgres.port"), defaultConfig.Postgres.Port, "The port name of the database server") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "postgres.dbname"), defaultConfig.Postgres.DbName, "The database name") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "postgres.username"), defaultConfig.Postgres.User, "The database user who is connecting to the server.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "postgres.password"), defaultConfig.Postgres.Password, "The database password.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "postgres.passwordPath"), defaultConfig.Postgres.PasswordPath, "Points to the file containing the database password.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "postgres.options"), defaultConfig.Postgres.ExtraOptions, "See http://gorm.io/docs/connecting_to_the_database.html for available options passed, in addition to the above.") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "postgres.debug"), defaultConfig.Postgres.Debug, "") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "sqlite.file"), defaultConfig.SQLite.File, "The path to the file (existing or new) where the DB should be created / stored. If existing, then this will be re-used, else a new will be created") + return cmdFlags +} diff --git a/flytestdlib/database/dbconfig_flags_test.go b/flytestdlib/database/dbconfig_flags_test.go new file mode 100755 index 0000000000..2f0a5d53eb --- /dev/null +++ b/flytestdlib/database/dbconfig_flags_test.go @@ -0,0 +1,284 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package database + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsDbConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementDbConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsDbConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookDbConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementDbConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_DbConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookDbConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_DbConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_DbConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_DbConfig(val, result)) +} + +func testDecodeRaw_DbConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_DbConfig(vStringSlice, result)) +} + +func TestDbConfig_GetPFlagSet(t *testing.T) { + val := DbConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestDbConfig_SetFlags(t *testing.T) { + actual := DbConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_enableForeignKeyConstraintWhenMigrating", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("enableForeignKeyConstraintWhenMigrating", testValue) + if vBool, err := cmdFlags.GetBool("enableForeignKeyConstraintWhenMigrating"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vBool), &actual.EnableForeignKeyConstraintWhenMigrating) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_maxIdleConnections", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("maxIdleConnections", testValue) + if vInt, err := cmdFlags.GetInt("maxIdleConnections"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vInt), &actual.MaxIdleConnections) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_maxOpenConnections", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("maxOpenConnections", testValue) + if vInt, err := cmdFlags.GetInt("maxOpenConnections"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vInt), &actual.MaxOpenConnections) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_connMaxLifeTime", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := defaultConfig.ConnMaxLifeTime.String() + + cmdFlags.Set("connMaxLifeTime", testValue) + if vString, err := cmdFlags.GetString("connMaxLifeTime"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vString), &actual.ConnMaxLifeTime) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_postgres.host", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("postgres.host", testValue) + if vString, err := cmdFlags.GetString("postgres.host"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vString), &actual.Postgres.Host) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_postgres.port", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("postgres.port", testValue) + if vInt, err := cmdFlags.GetInt("postgres.port"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vInt), &actual.Postgres.Port) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_postgres.dbname", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("postgres.dbname", testValue) + if vString, err := cmdFlags.GetString("postgres.dbname"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vString), &actual.Postgres.DbName) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_postgres.username", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("postgres.username", testValue) + if vString, err := cmdFlags.GetString("postgres.username"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vString), &actual.Postgres.User) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_postgres.password", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("postgres.password", testValue) + if vString, err := cmdFlags.GetString("postgres.password"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vString), &actual.Postgres.Password) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_postgres.passwordPath", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("postgres.passwordPath", testValue) + if vString, err := cmdFlags.GetString("postgres.passwordPath"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vString), &actual.Postgres.PasswordPath) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_postgres.options", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("postgres.options", testValue) + if vString, err := cmdFlags.GetString("postgres.options"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vString), &actual.Postgres.ExtraOptions) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_postgres.debug", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("postgres.debug", testValue) + if vBool, err := cmdFlags.GetBool("postgres.debug"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vBool), &actual.Postgres.Debug) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_sqlite.file", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("sqlite.file", testValue) + if vString, err := cmdFlags.GetString("sqlite.file"); err == nil { + testDecodeJson_DbConfig(t, fmt.Sprintf("%v", vString), &actual.SQLite.File) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytestdlib/database/testdata/config.yaml b/flytestdlib/database/testdata/config.yaml new file mode 100644 index 0000000000..5eda985943 --- /dev/null +++ b/flytestdlib/database/testdata/config.yaml @@ -0,0 +1,16 @@ +port: 5432 +username: postgres +host: postgres +dbname: postgres +options: "sslmode=disable" +password: "password" +passwordPath: "/etc/secret" +debug: true +postgres: + port: 5432 + username: postgres + host: postgres + dbname: postgres + options: "sslmode=disable" +sqlite: + file: admin.db \ No newline at end of file diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index fbd4167a21..89d9934229 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -27,6 +27,7 @@ require ( golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 golang.org/x/tools v0.1.0 google.golang.org/protobuf v1.25.0 + gorm.io/gorm v1.22.4 k8s.io/api v0.20.2 k8s.io/apimachinery v0.20.2 k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index a05a6d92f1..155bd611bc 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -49,27 +49,19 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -97,7 +89,6 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= @@ -118,7 +109,6 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -281,7 +271,6 @@ github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= 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.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -337,6 +326,9 @@ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.3 h1:PlHq1bSCSZL9K0wUhbm2pGLoTWs2GwVhsP6emvGV/ZI= +github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -420,7 +412,6 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -458,12 +449,10 @@ 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/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= 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/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -959,7 +948,6 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= 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= @@ -975,6 +963,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/gorm v1.22.4 h1:8aPcyEJhY0MAt8aY6Dc524Pn+pO29K+ydu+e/cXSpQM= +gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk= 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= From e2c7ee7cee8d4e831b47c4efc3f915bd93dbd49a Mon Sep 17 00:00:00 2001 From: sgref Date: Sun, 3 Apr 2022 20:21:37 +0200 Subject: [PATCH 158/191] Fix azure stow storage prefix (#123) Signed-off-by: sgref Co-authored-by: sgref --- flytestdlib/storage/stow_store.go | 2 +- flytestdlib/storage/stow_store_test.go | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index e03c4a6083..affd9776ce 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -47,7 +47,7 @@ var fQNFn = map[string]func(string) DataReference{ return DataReference(fmt.Sprintf("sw://%s", bucket)) }, azure.Kind: func(bucket string) DataReference { - return DataReference(fmt.Sprintf("afs://%s", bucket)) + return DataReference(fmt.Sprintf("abfs://%s", bucket)) }, local.Kind: func(bucket string) DataReference { return DataReference(fmt.Sprintf("file://%s", bucket)) diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index 9862968767..c9c022b311 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -16,8 +16,12 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" s32 "github.com/aws/aws-sdk-go/service/s3" + "github.com/flyteorg/stow/azure" "github.com/flyteorg/stow/google" "github.com/flyteorg/stow/local" + "github.com/flyteorg/stow/oracle" + "github.com/flyteorg/stow/s3" + "github.com/flyteorg/stow/swift" "github.com/pkg/errors" "github.com/flyteorg/stow" @@ -648,3 +652,12 @@ func TestStowStore_WriteRaw(t *testing.T) { assert.EqualError(t, err, "Failed to write data [0b] to path [path].: foo") }) } + +func TestStowStore_fQNFn(t *testing.T) { + assert.Equal(t, DataReference("s3://bucket"), fQNFn[s3.Kind]("bucket")) + assert.Equal(t, DataReference("gs://bucket"), fQNFn[google.Kind]("bucket")) + assert.Equal(t, DataReference("os://bucket"), fQNFn[oracle.Kind]("bucket")) + assert.Equal(t, DataReference("sw://bucket"), fQNFn[swift.Kind]("bucket")) + assert.Equal(t, DataReference("abfs://bucket"), fQNFn[azure.Kind]("bucket")) + assert.Equal(t, DataReference("file://bucket"), fQNFn[local.Kind]("bucket")) +} From e88f364393587f56c622866fbff4e9412014ce46 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Sun, 3 Apr 2022 21:38:33 +0000 Subject: [PATCH 159/191] Append the labels that don't exist in metricStringKeys (#124) --- flytestdlib/promutils/labeled/counter.go | 20 +++++++++++++++++-- flytestdlib/promutils/labeled/counter_test.go | 4 +++- flytestdlib/promutils/labeled/gauge.go | 5 +++-- flytestdlib/promutils/labeled/gauge_test.go | 4 +++- flytestdlib/promutils/labeled/stopwatch.go | 5 +++-- .../promutils/labeled/stopwatch_test.go | 4 +++- flytestdlib/promutils/labeled/summary.go | 5 +++-- flytestdlib/promutils/labeled/summary_test.go | 4 +++- 8 files changed, 39 insertions(+), 12 deletions(-) diff --git a/flytestdlib/promutils/labeled/counter.go b/flytestdlib/promutils/labeled/counter.go index 04380be8b9..cb4439b3f1 100644 --- a/flytestdlib/promutils/labeled/counter.go +++ b/flytestdlib/promutils/labeled/counter.go @@ -3,6 +3,8 @@ package labeled import ( "context" + "k8s.io/apimachinery/pkg/util/sets" + "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" "github.com/prometheus/client_golang/prometheus" @@ -45,6 +47,18 @@ func (c Counter) Add(ctx context.Context, v float64) { } } +// GetUniqueLabels Remove labels from additionalLabels that already exist in metricStringKeys +func GetUniqueLabels(metricStringKeys []string, additionalLabels []string) []string { + labels := make([]string, 0, len(additionalLabels)) + metricKeysSet := sets.NewString(metricStringKeys...) + for _, label := range additionalLabels { + if !metricKeysSet.Has(label) { + labels = append(labels, label) + } + } + return labels +} + // NewCounter creates a new labeled counter. Label keys must be set before instantiating a counter. See labeled.SetMetricsKeys for // information about to configure that. func NewCounter(name, description string, scope promutils.Scope, opts ...MetricOption) Counter { @@ -59,8 +73,10 @@ func NewCounter(name, description string, scope promutils.Scope, opts ...MetricO if _, emitUnlabeledMetric := opt.(EmitUnlabeledMetricOption); emitUnlabeledMetric { c.Counter = scope.MustNewCounter(GetUnlabeledMetricName(name), description) } else if additionalLabels, casted := opt.(AdditionalLabelsOption); casted { - c.CounterVec = scope.MustNewCounterVec(name, description, append(metricStringKeys, additionalLabels.Labels...)...) - c.additionalLabels = contextutils.MetricKeysFromStrings(additionalLabels.Labels) + labels := GetUniqueLabels(metricStringKeys, additionalLabels.Labels) + // Here we only append the labels that don't exist in metricStringKeys + c.CounterVec = scope.MustNewCounterVec(name, description, append(metricStringKeys, labels...)...) + c.additionalLabels = contextutils.MetricKeysFromStrings(labels) } } diff --git a/flytestdlib/promutils/labeled/counter_test.go b/flytestdlib/promutils/labeled/counter_test.go index fd656c82e7..1450b90f37 100644 --- a/flytestdlib/promutils/labeled/counter_test.go +++ b/flytestdlib/promutils/labeled/counter_test.go @@ -16,7 +16,9 @@ func TestLabeledCounter(t *testing.T) { }) scope := promutils.NewTestScope() - c := NewCounter("lbl_counter", "help", scope) + // Make sure we will not register the same metrics key again. + option := AdditionalLabelsOption{Labels: []string{contextutils.ProjectKey.String(), contextutils.DomainKey.String()}} + c := NewCounter("lbl_counter", "help", scope, option) assert.NotNil(t, c) ctx := context.TODO() c.Inc(ctx) diff --git a/flytestdlib/promutils/labeled/gauge.go b/flytestdlib/promutils/labeled/gauge.go index cd0f674adb..a658704675 100644 --- a/flytestdlib/promutils/labeled/gauge.go +++ b/flytestdlib/promutils/labeled/gauge.go @@ -113,8 +113,9 @@ func NewGauge(name, description string, scope promutils.Scope, opts ...MetricOpt if _, emitUnlabeledMetric := opt.(EmitUnlabeledMetricOption); emitUnlabeledMetric { g.Gauge = scope.MustNewGauge(GetUnlabeledMetricName(name), description) } else if additionalLabels, casted := opt.(AdditionalLabelsOption); casted { - g.GaugeVec = scope.MustNewGaugeVec(name, description, append(metricStringKeys, additionalLabels.Labels...)...) - g.additionalLabels = contextutils.MetricKeysFromStrings(additionalLabels.Labels) + labels := GetUniqueLabels(metricStringKeys, additionalLabels.Labels) + g.GaugeVec = scope.MustNewGaugeVec(name, description, append(metricStringKeys, labels...)...) + g.additionalLabels = contextutils.MetricKeysFromStrings(labels) } } diff --git a/flytestdlib/promutils/labeled/gauge_test.go b/flytestdlib/promutils/labeled/gauge_test.go index 93668d15fc..232bd4f5e9 100644 --- a/flytestdlib/promutils/labeled/gauge_test.go +++ b/flytestdlib/promutils/labeled/gauge_test.go @@ -20,7 +20,9 @@ func TestLabeledGauge(t *testing.T) { scope := promutils.NewScope("testscope") ctx := context.Background() ctx = contextutils.WithProjectDomain(ctx, "flyte", "dev") - g := NewGauge("unittest", "some desc", scope) + // Make sure we will not register the same metrics key again. + option := AdditionalLabelsOption{Labels: []string{contextutils.ProjectKey.String(), contextutils.DomainKey.String()}} + g := NewGauge("unittest", "some desc", scope, option) assert.NotNil(t, g) g.Inc(ctx) diff --git a/flytestdlib/promutils/labeled/stopwatch.go b/flytestdlib/promutils/labeled/stopwatch.go index dec0b81046..1bc690434d 100644 --- a/flytestdlib/promutils/labeled/stopwatch.go +++ b/flytestdlib/promutils/labeled/stopwatch.go @@ -82,9 +82,10 @@ func NewStopWatch(name, description string, scale time.Duration, scope promutils if _, emitUnableMetric := opt.(EmitUnlabeledMetricOption); emitUnableMetric { sw.StopWatch = scope.MustNewStopWatch(GetUnlabeledMetricName(name), description, scale) } else if additionalLabels, casted := opt.(AdditionalLabelsOption); casted { + labels := GetUniqueLabels(metricStringKeys, additionalLabels.Labels) sw.StopWatchVec = scope.MustNewStopWatchVec(name, description, scale, - append(metricStringKeys, additionalLabels.Labels...)...) - sw.additionalLabels = contextutils.MetricKeysFromStrings(additionalLabels.Labels) + append(metricStringKeys, labels...)...) + sw.additionalLabels = contextutils.MetricKeysFromStrings(labels) } } diff --git a/flytestdlib/promutils/labeled/stopwatch_test.go b/flytestdlib/promutils/labeled/stopwatch_test.go index e28f5a2c2b..08cd51105e 100644 --- a/flytestdlib/promutils/labeled/stopwatch_test.go +++ b/flytestdlib/promutils/labeled/stopwatch_test.go @@ -18,7 +18,9 @@ func TestLabeledStopWatch(t *testing.T) { t.Run("always labeled", func(t *testing.T) { scope := promutils.NewTestScope() - c := NewStopWatch("lbl_counter", "help", time.Second, scope) + // Make sure we will not register the same metrics key again. + option := AdditionalLabelsOption{Labels: []string{contextutils.ProjectKey.String(), contextutils.DomainKey.String()}} + c := NewStopWatch("lbl_counter", "help", time.Second, scope, option) assert.NotNil(t, c) ctx := context.TODO() w := c.Start(ctx) diff --git a/flytestdlib/promutils/labeled/summary.go b/flytestdlib/promutils/labeled/summary.go index ea28269e96..d197eca916 100644 --- a/flytestdlib/promutils/labeled/summary.go +++ b/flytestdlib/promutils/labeled/summary.go @@ -43,8 +43,9 @@ func NewSummary(name, description string, scope promutils.Scope, opts ...MetricO if _, emitUnlabeledMetric := opt.(EmitUnlabeledMetricOption); emitUnlabeledMetric { s.Summary = scope.MustNewSummary(GetUnlabeledMetricName(name), description) } else if additionalLabels, casted := opt.(AdditionalLabelsOption); casted { - s.SummaryVec = scope.MustNewSummaryVec(name, description, append(metricStringKeys, additionalLabels.Labels...)...) - s.additionalLabels = contextutils.MetricKeysFromStrings(additionalLabels.Labels) + labels := GetUniqueLabels(metricStringKeys, additionalLabels.Labels) + s.SummaryVec = scope.MustNewSummaryVec(name, description, append(metricStringKeys, labels...)...) + s.additionalLabels = contextutils.MetricKeysFromStrings(labels) } } diff --git a/flytestdlib/promutils/labeled/summary_test.go b/flytestdlib/promutils/labeled/summary_test.go index 011ff91121..90f9b0e376 100644 --- a/flytestdlib/promutils/labeled/summary_test.go +++ b/flytestdlib/promutils/labeled/summary_test.go @@ -21,7 +21,9 @@ func TestLabeledSummary(t *testing.T) { scope := promutils.NewScope("testscope_summary") ctx := context.Background() ctx = contextutils.WithProjectDomain(ctx, "flyte", "dev") - s := NewSummary("unittest", "some desc", scope) + // Make sure we will not register the same metrics key again. + option := AdditionalLabelsOption{Labels: []string{contextutils.ProjectKey.String(), contextutils.DomainKey.String()}} + s := NewSummary("unittest", "some desc", scope, option) assert.NotNil(t, s) s.Observe(ctx, 10) From 391dd7d8b1c35640fb47dcb1122178c1e009bbb2 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Wed, 6 Apr 2022 13:15:59 -0700 Subject: [PATCH 160/191] Create a separate stow Location for signed url (#125) * Create a separate stow Location for signed url Signed-off-by: Haytham Abuelfutuh * Generate Signed-off-by: Haytham Abuelfutuh * Revert ConnectionConfig deprecation for now Signed-off-by: Haytham Abuelfutuh * updates Signed-off-by: Haytham Abuelfutuh * Update golden test files Signed-off-by: Haytham Abuelfutuh * fix unit test Signed-off-by: Haytham Abuelfutuh * lint Signed-off-by: Haytham Abuelfutuh --- flytestdlib/cli/pflags/api/generator_test.go | 5 +- .../cli/pflags/api/testdata/testtype.go | 4 +- .../cli/pflags/api/testdata/testtype_bind.go | 4 +- flytestdlib/go.mod | 10 +-- flytestdlib/go.sum | 39 ++++++--- flytestdlib/storage/config.go | 18 +++-- flytestdlib/storage/config_flags.go | 4 +- flytestdlib/storage/stow_store.go | 81 +++++++++++++++---- flytestdlib/storage/stow_store_test.go | 20 ++--- flytestdlib/storage/utils.go | 9 +++ 10 files changed, 139 insertions(+), 55 deletions(-) diff --git a/flytestdlib/cli/pflags/api/generator_test.go b/flytestdlib/cli/pflags/api/generator_test.go index 21eee3b026..0990382245 100644 --- a/flytestdlib/cli/pflags/api/generator_test.go +++ b/flytestdlib/cli/pflags/api/generator_test.go @@ -3,7 +3,6 @@ package api import ( "context" "flag" - "fmt" "go/token" "go/types" "io/ioutil" @@ -174,8 +173,8 @@ func TestBuildFieldForMap(t *testing.T) { defaultValue := "" fieldInfo, err := buildFieldForMap(ctx, typesMap, name, goName, usage, defaultValue, false) assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("map of type [interface{/* incomplete */}] is not supported."+ - " Only basic slices or slices of json-unmarshalable types are supported"), err) + assert.Contains(t, err.Error(), "is not supported."+ + " Only basic slices or slices of json-unmarshalable types are supported") assert.NotNil(t, fieldInfo) assert.Equal(t, "", fieldInfo.FlagMethodName) assert.Equal(t, "", fieldInfo.DefaultValue) diff --git a/flytestdlib/cli/pflags/api/testdata/testtype.go b/flytestdlib/cli/pflags/api/testdata/testtype.go index 4a86fc15ef..5f95e2ce95 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype.go @@ -64,8 +64,8 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.secret-key"), DefaultTestType.StorageConfig.Connection.SecretKey, "Secret to use when accesskey is set.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.connection.region"), DefaultTestType.StorageConfig.Connection.Region, "Region to connect to.") cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "storage.connection.disable-ssl"), DefaultTestType.StorageConfig.Connection.DisableSSL, "Disables SSL connection. Should only be used for development.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.stow.kind"), DefaultTestType.StorageConfig.Stow.Kind, "Kind of Stow backend to use. Refer to github/graymeta/stow") - cmdFlags.StringToString(fmt.Sprintf("%v%v", prefix, "storage.stow.config"), DefaultTestType.StorageConfig.Stow.Config, "Configuration for stow backend. Refer to github/graymeta/stow") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.stow.kind"), DefaultTestType.StorageConfig.Stow.Kind, "Kind of Stow backend to use. Refer to github/flyteorg/stow") + cmdFlags.StringToString(fmt.Sprintf("%v%v", prefix, "storage.stow.config"), DefaultTestType.StorageConfig.Stow.Config, "Configuration for stow backend. Refer to github/flyteorg/stow") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "storage.container"), DefaultTestType.StorageConfig.InitContainer, "Initial container (in s3 a bucket) to create -if it doesn't exist-.'") cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "storage.enable-multicontainer"), DefaultTestType.StorageConfig.MultiContainerEnabled, "If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "storage.cache.max_size_mbs"), DefaultTestType.StorageConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") diff --git a/flytestdlib/cli/pflags/api/testdata/testtype_bind.go b/flytestdlib/cli/pflags/api/testdata/testtype_bind.go index e12dc052ee..4fef798cce 100755 --- a/flytestdlib/cli/pflags/api/testdata/testtype_bind.go +++ b/flytestdlib/cli/pflags/api/testdata/testtype_bind.go @@ -64,8 +64,8 @@ func (cfg TestType) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultTestType.StorageConfig.Connection.SecretKey, fmt.Sprintf("%v%v", prefix, "storage.connection.secret-key"), DefaultTestType.StorageConfig.Connection.SecretKey, "Secret to use when accesskey is set.") cmdFlags.StringVar(&DefaultTestType.StorageConfig.Connection.Region, fmt.Sprintf("%v%v", prefix, "storage.connection.region"), DefaultTestType.StorageConfig.Connection.Region, "Region to connect to.") cmdFlags.BoolVar(&DefaultTestType.StorageConfig.Connection.DisableSSL, fmt.Sprintf("%v%v", prefix, "storage.connection.disable-ssl"), DefaultTestType.StorageConfig.Connection.DisableSSL, "Disables SSL connection. Should only be used for development.") - cmdFlags.StringVar(&DefaultTestType.StorageConfig.Stow.Kind, fmt.Sprintf("%v%v", prefix, "storage.stow.kind"), DefaultTestType.StorageConfig.Stow.Kind, "Kind of Stow backend to use. Refer to github/graymeta/stow") - cmdFlags.StringToStringVar(&DefaultTestType.StorageConfig.Stow.Config, fmt.Sprintf("%v%v", prefix, "storage.stow.config"), DefaultTestType.StorageConfig.Stow.Config, "Configuration for stow backend. Refer to github/graymeta/stow") + cmdFlags.StringVar(&DefaultTestType.StorageConfig.Stow.Kind, fmt.Sprintf("%v%v", prefix, "storage.stow.kind"), DefaultTestType.StorageConfig.Stow.Kind, "Kind of Stow backend to use. Refer to github/flyteorg/stow") + cmdFlags.StringToStringVar(&DefaultTestType.StorageConfig.Stow.Config, fmt.Sprintf("%v%v", prefix, "storage.stow.config"), DefaultTestType.StorageConfig.Stow.Config, "Configuration for stow backend. Refer to github/flyteorg/stow") cmdFlags.StringVar(&DefaultTestType.StorageConfig.InitContainer, fmt.Sprintf("%v%v", prefix, "storage.container"), DefaultTestType.StorageConfig.InitContainer, "Initial container (in s3 a bucket) to create -if it doesn't exist-.'") cmdFlags.BoolVar(&DefaultTestType.StorageConfig.MultiContainerEnabled, fmt.Sprintf("%v%v", prefix, "storage.enable-multicontainer"), DefaultTestType.StorageConfig.MultiContainerEnabled, "If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered") cmdFlags.IntVar(&DefaultTestType.StorageConfig.Cache.MaxSizeMegabytes, fmt.Sprintf("%v%v", prefix, "storage.cache.max_size_mbs"), DefaultTestType.StorageConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 89d9934229..828f3b5b2f 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -25,7 +25,7 @@ require ( github.com/spf13/viper v1.7.1 github.com/stretchr/testify v1.7.0 golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 - golang.org/x/tools v0.1.0 + golang.org/x/tools v0.1.10 google.golang.org/protobuf v1.25.0 gorm.io/gorm v1.22.4 k8s.io/api v0.20.2 @@ -79,12 +79,12 @@ require ( github.com/stretchr/objx v0.3.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect go.opencensus.io v0.22.6 // indirect - golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect - golang.org/x/mod v0.4.1 // indirect - golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect + golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 // indirect - golang.org/x/sys v0.0.0-20210423082822-04245dca01da // indirect + golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/api v0.38.0 // indirect diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index 155bd611bc..6e2d1974e0 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -49,19 +49,27 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= +github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -89,6 +97,7 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= @@ -109,6 +118,7 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -271,6 +281,7 @@ github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= 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.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -412,6 +423,7 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -449,10 +461,12 @@ 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/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= 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/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -554,6 +568,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= @@ -586,8 +601,8 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -621,8 +636,8 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -665,9 +680,11 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY 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-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d h1:20cMwl2fHAzkJMEA+8J4JgqBQcQGzbisXo31MIeenXI= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -688,6 +705,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/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= @@ -738,10 +756,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/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-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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= @@ -819,8 +837,8 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/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/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -948,6 +966,7 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= 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= diff --git a/flytestdlib/storage/config.go b/flytestdlib/storage/config.go index 92aa814ddc..d8c4dd95ff 100644 --- a/flytestdlib/storage/config.go +++ b/flytestdlib/storage/config.go @@ -45,7 +45,8 @@ var ( // Config is a common storage config. type Config struct { - Type Type `json:"type" pflag:",Sets the type of storage to configure [s3/minio/local/mem/stow]."` + Type Type `json:"type" pflag:",Sets the type of storage to configure [s3/minio/local/mem/stow]."` + // Deprecated: Please use StowConfig instead Connection ConnectionConfig `json:"connection"` Stow StowConfig `json:"stow,omitempty" pflag:",Storage config for stow backend."` // Container here is misleading, it refers to a Bucket (AWS S3) like blobstore entity. In some terms it could be a table @@ -60,6 +61,12 @@ type Config struct { Cache CachingConfig `json:"cache"` Limits LimitsConfig `json:"limits" pflag:",Sets limits for stores."` DefaultHTTPClient HTTPClientConfig `json:"defaultHttpClient" pflag:",Sets the default http client config."` + SignedURL SignedURLConfig `json:"signedUrl" pflag:",Sets config for SignedURL."` +} + +// SignedURLConfig encapsulates configs specifically used for SignedURL behavior. +type SignedURLConfig struct { + StowConfigOverride map[string]string `json:"stowConfigOverride,omitempty" pflag:"-,Configuration for stow backend. Refer to github/flyteorg/stow"` } // HTTPClientConfig encapsulates common settings that can be applied to an HTTP Client. @@ -78,9 +85,10 @@ type ConnectionConfig struct { DisableSSL bool `json:"disable-ssl" pflag:",Disables SSL connection. Should only be used for development."` } +// StowConfig defines configs for stow as defined in github.com/flyteorg/stow type StowConfig struct { - Kind string `json:"kind,omitempty" pflag:",Kind of Stow backend to use. Refer to github/graymeta/stow"` - Config map[string]string `json:"config,omitempty" pflag:",Configuration for stow backend. Refer to github/graymeta/stow"` + Kind string `json:"kind,omitempty" pflag:",Kind of Stow backend to use. Refer to github/flyteorg/stow"` + Config map[string]string `json:"config,omitempty" pflag:",Configuration for stow backend. Refer to github/flyteorg/stow"` } type CachingConfig struct { @@ -98,12 +106,12 @@ type CachingConfig struct { TargetGCPercent int `json:"target_gc_percent" pflag:",Sets the garbage collection target percentage."` } -// Specifies limits for storage package. +// LimitsConfig specifies limits for storage package. type LimitsConfig struct { GetLimitMegabytes int64 `json:"maxDownloadMBs" pflag:",Maximum allowed download size (in MBs) per call."` } -// Retrieve current global config for storage. +// GetConfig retrieve current global config for storage. func GetConfig() *Config { if c, ok := ConfigSection.GetConfig().(*Config); ok { return c diff --git a/flytestdlib/storage/config_flags.go b/flytestdlib/storage/config_flags.go index c9c2eb9a10..63a41550c2 100755 --- a/flytestdlib/storage/config_flags.go +++ b/flytestdlib/storage/config_flags.go @@ -57,8 +57,8 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.secret-key"), defaultConfig.Connection.SecretKey, "Secret to use when accesskey is set.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "connection.region"), defaultConfig.Connection.Region, "Region to connect to.") cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "connection.disable-ssl"), defaultConfig.Connection.DisableSSL, "Disables SSL connection. Should only be used for development.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "stow.kind"), defaultConfig.Stow.Kind, "Kind of Stow backend to use. Refer to github/graymeta/stow") - cmdFlags.StringToString(fmt.Sprintf("%v%v", prefix, "stow.config"), defaultConfig.Stow.Config, "Configuration for stow backend. Refer to github/graymeta/stow") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "stow.kind"), defaultConfig.Stow.Kind, "Kind of Stow backend to use. Refer to github/flyteorg/stow") + cmdFlags.StringToString(fmt.Sprintf("%v%v", prefix, "stow.config"), defaultConfig.Stow.Config, "Configuration for stow backend. Refer to github/flyteorg/stow") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "container"), defaultConfig.InitContainer, "Initial container (in s3 a bucket) to create -if it doesn't exist-.'") cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "enable-multicontainer"), defaultConfig.MultiContainerEnabled, "If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered") cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "cache.max_size_mbs"), defaultConfig.Cache.MaxSizeMegabytes, "Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used") diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index affd9776ce..175389f6f1 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -5,6 +5,7 @@ import ( "fmt" "io" "net/url" + "strconv" "sync" "time" @@ -108,7 +109,8 @@ func (s StowMetadata) Exists() bool { // Implements DataStore to talk to stow location store. type StowStore struct { copyImpl - loc stow.Location + loc stow.Location + signedURLLoc stow.Location // This is a default configured container. baseContainer stow.Container // If dynamic container loading is enabled, then for any new container that is not the base container @@ -121,8 +123,12 @@ type StowStore struct { } func (s *StowStore) CreateContainer(ctx context.Context, container string) (stow.Container, error) { + return s.createContainer(ctx, locationIDMain, container) +} + +func (s *StowStore) createContainer(ctx context.Context, locID locationID, container string) (stow.Container, error) { logger.Infof(ctx, "Attempting to create container [%s]", container) - c, err := s.loc.CreateContainer(container) + c, err := s.getLocation(locID).CreateContainer(container) if err != nil && !awsBucketAlreadyExists(err) && !IsExists(err) { return nil, fmt.Errorf("unable to initialize container [%v]. Error: %v", container, err) } @@ -130,12 +136,16 @@ func (s *StowStore) CreateContainer(ctx context.Context, container string) (stow } func (s *StowStore) LoadContainer(ctx context.Context, container string, createIfNotFound bool) (stow.Container, error) { - c, err := s.loc.Container(container) + return s.loadContainer(ctx, locationIDMain, container, createIfNotFound) +} + +func (s *StowStore) loadContainer(ctx context.Context, locID locationID, container string, createIfNotFound bool) (stow.Container, error) { + c, err := s.getLocation(locID).Container(container) if err != nil { // IsNotFound is not always guaranteed to be returned if the underlying container doesn't exist! // As of stow v0.2.6, the call to get container elides the lookup when a bucket region is set for S3 containers. if IsNotFound(err) && createIfNotFound { - c, err = s.CreateContainer(ctx, container) + c, err = s.createContainer(ctx, locID, container) if err != nil { logger.Errorf(ctx, "Call to create container [%s] failed. Error %s", container, err) return nil, err @@ -145,29 +155,33 @@ func (s *StowStore) LoadContainer(ctx context.Context, container string, createI return nil, err } } + return c, nil } -func (s *StowStore) getContainer(ctx context.Context, container string) (c stow.Container, err error) { - if s.baseContainer != nil && s.baseContainer.Name() == container { +func (s *StowStore) getContainer(ctx context.Context, locID locationID, container string) (c stow.Container, err error) { + if s.baseContainer != nil && s.baseContainer.Name() == container && locID == locationIDMain { return s.baseContainer, nil } - if !s.enableDynamicContainerLoading { + if !s.enableDynamicContainerLoading && locID == locationIDMain { s.metrics.BadContainer.Inc(ctx) return nil, errs.Wrapf(stow.ErrNotFound, "Conf container:%v != Passed Container:%v. Dynamic loading is disabled", s.baseContainer.Name(), container) } - iface, ok := s.dynamicContainerMap.Load(container) + containerID := locID.String() + container + iface, ok := s.dynamicContainerMap.Load(containerID) if !ok { - c, err := s.LoadContainer(ctx, container, false) + c, err := s.loadContainer(ctx, locID, container, false) if err != nil { logger.Errorf(ctx, "failed to load container [%s] dynamically, error %s", container, err) return nil, err } - s.dynamicContainerMap.Store(container, c) + + s.dynamicContainerMap.Store(containerID, c) return c, nil } + return iface.(stow.Container), nil } @@ -178,7 +192,7 @@ func (s *StowStore) Head(ctx context.Context, reference DataReference) (Metadata return nil, err } - container, err := s.getContainer(ctx, c) + container, err := s.getContainer(ctx, locationIDMain, c) if err != nil { return nil, err } @@ -213,7 +227,7 @@ func (s *StowStore) ReadRaw(ctx context.Context, reference DataReference) (io.Re return nil, err } - container, err := s.getContainer(ctx, c) + container, err := s.getContainer(ctx, locationIDMain, c) if err != nil { return nil, err } @@ -247,7 +261,7 @@ func (s *StowStore) WriteRaw(ctx context.Context, reference DataReference, size return err } - container, err := s.getContainer(ctx, c) + container, err := s.getContainer(ctx, locationIDMain, c) if err != nil { return err } @@ -283,7 +297,7 @@ func (s *StowStore) CreateSignedURL(ctx context.Context, reference DataReference return SignedURLResponse{}, err } - c, err := s.getContainer(ctx, container) + c, err := s.getContainer(ctx, locationIDSignedURL, container) if err != nil { return SignedURLResponse{}, err } @@ -306,10 +320,35 @@ func (s *StowStore) CreateSignedURL(ctx context.Context, reference DataReference }, nil } -func NewStowRawStore(baseContainerFQN DataReference, loc stow.Location, enableDynamicContainerLoading bool, metricsScope promutils.Scope) (*StowStore, error) { +type locationID uint + +const ( + locationIDMain locationID = iota + locationIDSignedURL +) + +func (l locationID) String() string { + return strconv.Itoa(int(l)) +} + +func (s *StowStore) getLocation(id locationID) stow.Location { + switch id { + case locationIDSignedURL: + if s.signedURLLoc != nil { + return s.signedURLLoc + } + + fallthrough + default: + return s.loc + } +} + +func NewStowRawStore(baseContainerFQN DataReference, loc, signedURLLoc stow.Location, enableDynamicContainerLoading bool, metricsScope promutils.Scope) (*StowStore, error) { failureTypeOption := labeled.AdditionalLabelsOption{Labels: []string{FailureTypeLabel.String()}} self := &StowStore{ loc: loc, + signedURLLoc: signedURLLoc, baseContainerFQN: baseContainerFQN, enableDynamicContainerLoading: enableDynamicContainerLoading, dynamicContainerMap: sync.Map{}, @@ -369,7 +408,17 @@ func newStowRawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error return emptyStore, fmt.Errorf("unable to configure the storage for %s. Error: %v", kind, err) } - return NewStowRawStore(fn(cfg.InitContainer), loc, cfg.MultiContainerEnabled, metricsScope) + var signedURLLoc stow.Location + if len(cfg.SignedURL.StowConfigOverride) > 0 { + var newCfg stow.ConfigMap = make(map[string]string, len(cfgMap)) + MergeMaps(newCfg, cfgMap, cfg.SignedURL.StowConfigOverride) + signedURLLoc, err = stow.Dial(kind, newCfg) + if err != nil { + return emptyStore, fmt.Errorf("unable to configure the storage for %s. Error: %v", kind, err) + } + } + + return NewStowRawStore(fn(cfg.InitContainer), loc, signedURLLoc, cfg.MultiContainerEnabled, metricsScope) } func legacyS3ConfigMap(cfg ConnectionConfig) stow.ConfigMap { diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index c9c022b311..4a446f74de 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -173,7 +173,7 @@ func TestStowStore_CreateSignedURL(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, false, testScope) + }, nil, false, testScope) assert.NoError(t, err) actual, err := s.CreateSignedURL(context.TODO(), DataReference("https://container/path"), SignedURLProperties{}) @@ -197,7 +197,7 @@ func TestStowStore_CreateSignedURL(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, false, testScope) + }, nil, false, testScope) assert.NoError(t, err) _, err = s.CreateSignedURL(context.TODO(), DataReference("://container/path"), SignedURLProperties{}) @@ -220,7 +220,7 @@ func TestStowStore_CreateSignedURL(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, false, testScope) + }, nil, false, testScope) assert.NoError(t, err) _, err = s.CreateSignedURL(context.TODO(), DataReference("s3://container2/path"), SignedURLProperties{}) @@ -248,7 +248,7 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, false, testScope) + }, nil, false, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -280,7 +280,7 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, false, testScope) + }, nil, false, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 3*MiB, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -311,7 +311,7 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, false, testScope) + }, nil, false, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 3*MiB, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -340,7 +340,7 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, true, testScope) + }, nil, true, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), "s3://bad-container/path", 0, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -372,7 +372,7 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, true, testScope) + }, nil, true, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), "s3://bad-container/path", 0, Options{}, bytes.NewReader([]byte{})) assert.Error(t, err) @@ -618,7 +618,7 @@ func TestStowStore_WriteRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, true, testScope) + }, nil, true, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -646,7 +646,7 @@ func TestStowStore_WriteRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, true, testScope) + }, nil, true, testScope) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) assert.EqualError(t, err, "Failed to write data [0b] to path [path].: foo") diff --git a/flytestdlib/storage/utils.go b/flytestdlib/storage/utils.go index 4c2a7bd729..40da259046 100644 --- a/flytestdlib/storage/utils.go +++ b/flytestdlib/storage/utils.go @@ -63,6 +63,15 @@ func MapStrings(mapper func(string) string, strings ...string) []string { return strings } +// MergeMaps merges all src maps into dst in order. +func MergeMaps(dst map[string]string, src ...map[string]string) { + for _, m := range src { + for k, v := range m { + dst[k] = v + } + } +} + func incFailureCounterForError(ctx context.Context, counter labeled.Counter, err error) { errCode, found := stdErrs.GetErrorCode(err) if found { From 76684e78947bdb9df8b3056270e3b8956387ff12 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Thu, 7 Apr 2022 17:10:37 -0700 Subject: [PATCH 161/191] Support Content MD5 hash (#126) * Support Content MD5 hash Signed-off-by: Haytham Abuelfutuh * Update to released stow version Signed-off-by: Haytham Abuelfutuh * Update to released stow version Signed-off-by: Haytham Abuelfutuh --- flytestdlib/go.mod | 2 +- flytestdlib/go.sum | 4 ++-- flytestdlib/storage/storage.go | 7 ++++++- flytestdlib/storage/stow_store.go | 3 ++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 828f3b5b2f..bedadd049d 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -9,7 +9,7 @@ require ( github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 github.com/fatih/color v1.10.0 github.com/fatih/structtag v1.2.0 - github.com/flyteorg/stow v0.3.1 + github.com/flyteorg/stow v0.3.3 github.com/fsnotify/fsnotify v1.4.9 github.com/ghodss/yaml v1.0.0 github.com/go-test/deep v1.0.7 diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index 6e2d1974e0..c160604dd4 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -174,8 +174,8 @@ github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/stow v0.3.1 h1:cBMbWl03Gsy5KoA5mutUYTuYpqtT7Pb8+ANGCLnmFEs= -github.com/flyteorg/stow v0.3.1/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= +github.com/flyteorg/stow v0.3.3 h1:tzeNl8mSZFL3oJDi0ACZj6FAineQAF4qyEp6bXtIdQY= +github.com/flyteorg/stow v0.3.3/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= diff --git a/flytestdlib/storage/storage.go b/flytestdlib/storage/storage.go index 474e38da7b..86c4427776 100644 --- a/flytestdlib/storage/storage.go +++ b/flytestdlib/storage/storage.go @@ -43,9 +43,14 @@ type DataStore struct { ReferenceConstructor } +// SignedURLProperties encapsulates properties about the signedURL operation. type SignedURLProperties struct { - Scope stow.ClientMethod + // Scope defines the permission level allowed for the generated URL. + Scope stow.ClientMethod + // ExpiresIn defines the expiration duration for the URL. It's strongly recommended setting it. ExpiresIn time.Duration + // ContentMD5 defines the expected hash of the generated file. It's strongly recommended setting it. + ContentMD5 string } type SignedURLResponse struct { diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 175389f6f1..6793390686 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -303,7 +303,8 @@ func (s *StowStore) CreateSignedURL(ctx context.Context, reference DataReference } urlStr, err := c.PreSignRequest(ctx, properties.Scope, key, stow.PresignRequestParams{ - ExpiresIn: properties.ExpiresIn, + ExpiresIn: properties.ExpiresIn, + ContentMD5: properties.ContentMD5, }) if err != nil { From 8405650bc92cdb4ca64627119b9ec465aa80df13 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Fri, 8 Apr 2022 15:07:16 -0700 Subject: [PATCH 162/191] Set default log level in config to 'warn' (#127) * updates Signed-off-by: Katrina Rogan * fix unit test Signed-off-by: Katrina Rogan --- flytestdlib/database/config.go | 2 -- flytestdlib/logger/config.go | 2 +- flytestdlib/profutils/server_test.go | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/flytestdlib/database/config.go b/flytestdlib/database/config.go index 4f34739aa6..536109597b 100644 --- a/flytestdlib/database/config.go +++ b/flytestdlib/database/config.go @@ -4,7 +4,6 @@ import ( "time" "github.com/flyteorg/flytestdlib/config" - "gorm.io/gorm/logger" ) const ( @@ -52,7 +51,6 @@ type DbConfig struct { MaxIdleConnections int `json:"maxIdleConnections" pflag:",maxIdleConnections sets the maximum number of connections in the idle connection pool."` MaxOpenConnections int `json:"maxOpenConnections" pflag:",maxOpenConnections sets the maximum number of open connections to the database."` ConnMaxLifeTime config.Duration `json:"connMaxLifeTime" pflag:",sets the maximum amount of time a connection may be reused"` - LogLevel logger.LogLevel `json:"log_level" pflag:"-,"` Postgres PostgresConfig `json:"postgres,omitempty"` SQLite SQLiteConfig `json:"sqlite,omitempty"` } diff --git a/flytestdlib/logger/config.go b/flytestdlib/logger/config.go index b600bcb2b9..ac8d59afea 100644 --- a/flytestdlib/logger/config.go +++ b/flytestdlib/logger/config.go @@ -27,7 +27,7 @@ var ( Formatter: FormatterConfig{ Type: FormatterJSON, }, - Level: InfoLevel, + Level: WarnLevel, } configSection = config.MustRegisterSectionWithUpdates(configSectionKey, defaultConfig, func(ctx context.Context, newValue config.Config) { diff --git a/flytestdlib/profutils/server_test.go b/flytestdlib/profutils/server_test.go index d55193524a..cfab64783b 100644 --- a/flytestdlib/profutils/server_test.go +++ b/flytestdlib/profutils/server_test.go @@ -73,7 +73,7 @@ func TestConfigHandler(t *testing.T) { "logger": map[string]interface{}{ "show-source": false, "mute": false, - "level": float64(4), + "level": float64(3), "formatter": map[string]interface{}{ "type": "json", }, From d05d26201e78d22aef02c79207e8e93aacc4dd62 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Mon, 11 Apr 2022 14:39:19 -0700 Subject: [PATCH 163/191] Add util to initialize a gorm logger impl from config (#128) * Add GetGormLogger Signed-off-by: Katrina Rogan * Add GetGormLogger Signed-off-by: Katrina Rogan * goimports Signed-off-by: Katrina Rogan * no op Signed-off-by: Katrina Rogan * try a thing Signed-off-by: Katrina Rogan --- .../.github/workflows/pull_request.yml | 2 +- flytestdlib/database/gorm.go | 50 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 flytestdlib/database/gorm.go diff --git a/flytestdlib/.github/workflows/pull_request.yml b/flytestdlib/.github/workflows/pull_request.yml index 9c8f7f566f..7f83394a00 100644 --- a/flytestdlib/.github/workflows/pull_request.yml +++ b/flytestdlib/.github/workflows/pull_request.yml @@ -17,7 +17,7 @@ jobs: - name: Unit Tests run: make mod_download && make test_unit_codecov - name: Push CodeCov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v1.5.2 with: file: coverage.txt flags: unittests diff --git a/flytestdlib/database/gorm.go b/flytestdlib/database/gorm.go new file mode 100644 index 0000000000..db8f7a32a3 --- /dev/null +++ b/flytestdlib/database/gorm.go @@ -0,0 +1,50 @@ +package database + +import ( + "context" + "log" + "os" + "time" + + "github.com/flyteorg/flytestdlib/logger" + + gormLogger "gorm.io/gorm/logger" +) + +// GetGormLogger converts between the flytestdlib configured log level to the equivalent gorm log level and outputs +// a gorm/logger implementation accordingly configured. +func GetGormLogger(ctx context.Context, logConfig *logger.Config) gormLogger.Interface { + logConfigLevel := logger.ErrorLevel + if logConfig != nil { + logConfigLevel = logConfig.Level + } else { + logger.Debugf(ctx, "No log config block found, setting gorm db log level to: error") + } + var logLevel gormLogger.LogLevel + ignoreRecordNotFoundError := true + switch logConfigLevel { + case logger.PanicLevel: + fallthrough + case logger.FatalLevel: + fallthrough + case logger.ErrorLevel: + logLevel = gormLogger.Error + case logger.WarnLevel: + logLevel = gormLogger.Warn + case logger.InfoLevel: + fallthrough + case logger.DebugLevel: + logLevel = gormLogger.Info + ignoreRecordNotFoundError = false + default: + logLevel = gormLogger.Silent + } + // Copied from gormLogger.Default initialization. The gormLogger interface only allows modifying the LogLevel + // and not IgnoreRecordNotFoundError. + return gormLogger.New(log.New(os.Stdout, "\r\n", log.LstdFlags), gormLogger.Config{ + SlowThreshold: 200 * time.Millisecond, + LogLevel: logLevel, + IgnoreRecordNotFoundError: ignoreRecordNotFoundError, + Colorful: true, + }) +} From d56246143ac87af9214ab11eeebb9187fc843a38 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Thu, 21 Apr 2022 17:56:28 -0700 Subject: [PATCH 164/191] #major release 1.0.0 (#129) Signed-off-by: Haytham Abuelfutuh From 3f29b457995f38891461d7bb7485a686306c6f3b Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Thu, 21 Apr 2022 18:48:22 -0700 Subject: [PATCH 165/191] #major Update README.md (#130) Signed-off-by: Haytham Abuelfutuh --- flytestdlib/README.md | 91 +++++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 42 deletions(-) diff --git a/flytestdlib/README.md b/flytestdlib/README.md index d209e025c7..c3629f1d8c 100644 --- a/flytestdlib/README.md +++ b/flytestdlib/README.md @@ -1,68 +1,72 @@ Common Go Tools ===================== -[![Current Release](https://img.shields.io/github/release/lyft/flytestdlib.svg)](https://github.com/lyft/flytestdlib/releases/latest) -[![Build Status](https://travis-ci.org/lyft/flytestdlib.svg?branch=master)](https://travis-ci.org/lyft/flytestdlib) -[![GoDoc](https://godoc.org/github.com/lyft/flytestdlib?status.svg)](https://godoc.org/github.com/lyft/flytestdlib) +[![Current Release](https://img.shields.io/github/release/flyteorg/flytestdlib.svg)](https://github.com/flyteorg/flytestdlib/releases/latest) +[![Build Status](https://github.com/flyteorg/flytestdlib/workflows/Master/badge.svg?branch=master)](https://github.com/flyteorg/flytestdlib/workflows/Master/badge.svg?branch=master) +[![GoDoc](https://godoc.org/github.com/flyteorg/flytestdlib?status.svg)](https://godoc.org/github.com/flyteorg/flytestdlib) [![License](https://img.shields.io/badge/LICENSE-Apache2.0-ff69b4.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) -[![CodeCoverage](https://img.shields.io/codecov/c/github/lyft/flytestdlib.svg)](https://codecov.io/gh/lyft/flytestdlib) -[![Go Report Card](https://goreportcard.com/badge/github.com/lyft/flytestdlib)](https://goreportcard.com/report/github.com/lyft/flytestdlib) -![Commit activity](https://img.shields.io/github/commit-activity/w/lyft/flytestdlib.svg?style=plastic) -![Commit since last releast](https://img.shields.io/github/commits-since/lyft/flytestdlib/latest.svg?style=plastic) +[![CodeCoverage](https://img.shields.io/codecov/c/github/flyteorg/flytestdlib.svg)](https://codecov.io/gh/flyteorg/flytestdlib) +[![Go Report Card](https://goreportcard.com/badge/github.com/flyteorg/flytestdlib)](https://goreportcard.com/report/github.com/flyteorg/flytestdlib) +![Commit activity](https://img.shields.io/github/commit-activity/w/flyteorg/flytestdlib.svg?style=plastic) +![Commit since last releast](https://img.shields.io/github/commits-since/flyteorg/flytestdlib/latest.svg?style=plastic) [![Slack](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://slack.flyte.org) Shared components we found ourselves building time and time again, so we collected them in one place! This library consists of: - - config - Enables strongly typed config throughout your application. Offers a way to represent config in go structs. takes care of parsing, validating and watching for changes on config. +- config - - cli/pflags + Enables strongly typed config throughout your application. Offers a way to represent config in go structs. takes care + of parsing, validating and watching for changes on config. - Tool to generate a pflags for all fields in a given struct. +- cli/pflags - #### Install + Tool to generate a pflags for all fields in a given struct. - On POSIX systems, run: `curl -sfL https://raw.githubusercontent.com/lyft/flytestdlib/godownloader/godownloader.sh | sh` + #### Install - On Windows: + On POSIX systems, + run: `curl -sfL https://raw.githubusercontent.com/flyteorg/flytestdlib/godownloader/godownloader.sh | sh` - Install scoop: `iex (new-object net.webclient).downloadstring('https://get.scoop.sh')` + On Windows: - Run: `scoop bucket add flytestdlib https://github.com/lyft/flytestdlib.git` + Install scoop: `iex (new-object net.webclient).downloadstring('https://get.scoop.sh')` - Run: `scoop install pflags` + Run: `scoop bucket add flytestdlib https://github.com/flyteorg/flytestdlib.git` - - storage + Run: `scoop install pflags` - Abstract storage library that uses stow behind the scenes to connect to s3/azure/gcs but also offers configurable factory, in-memory storage (for testing) as well as native protobuf support. +- storage - - contextutils + Abstract storage library that uses stow behind the scenes to connect to s3/azure/gcs but also offers configurable + factory, in-memory storage (for testing) as well as native protobuf support. - Wrapper around golang's context to set/get known keys. +- contextutils - - logger + Wrapper around golang's context to set/get known keys. - Wrapper around logrus that's configurable, taggable and context-aware. +- logger - - profutils + Wrapper around logrus that's configurable, taggable and context-aware. - Starts an http server that serves /metrics (exposes prometheus metrics), /healthcheck and /version endpoints. +- profutils - - promutils + Starts an http server that serves /metrics (exposes prometheus metrics), /healthcheck and /version endpoints. - Exposes a Scope instance that's a more convenient way to construct prometheus metrics and scope them per component. +- promutils - - atomic + Exposes a Scope instance that's a more convenient way to construct prometheus metrics and scope them per component. - Wrapper around sync.atomic library to offer AtomicInt32 and other convenient types. +- atomic - - sets + Wrapper around sync.atomic library to offer AtomicInt32 and other convenient types. - Offers strongly types and convenient interface sets. +- sets - - utils - - version + Offers strongly types and convenient interface sets. + +- utils +- version Contributing ------------ @@ -73,7 +77,8 @@ This repo follows [semantic versioning](https://semver.org/). ## Releases -This repository is hooked up with [goreleaser](https://goreleaser.com/). Maintainers are expected to create tags and let goreleaser compose the release message and create a release. +This repository is hooked up with [goreleaser](https://goreleaser.com/). Maintainers are expected to create tags and let +goreleaser compose the release message and create a release. To create a new release, follow these steps: @@ -81,23 +86,25 @@ To create a new release, follow these steps: - [Optional] Create an alpha tag on your branch and push that. - - First get existing tags `git describe --abbrev=0 --tags` + - First get existing tags `git describe --abbrev=0 --tags` - - Figure out the next alpha version (e.g. if tag is v1.2.3 then you should create a v1.2.4-alpha.0 tag) + - Figure out the next alpha version (e.g. if tag is v1.2.3 then you should create a v1.2.4-alpha.0 tag) - - Create a tag `git tag v1.2.4-alpha.0` + - Create a tag `git tag v1.2.4-alpha.0` - - Push tag `git push --tags` + - Push tag `git push --tags` - Merge your changes and checkout master branch `git checkout master && git pull` - Bump version tag and push to branch. - - First get existing tags `git describe --abbrev=0 --tags` + - First get existing tags `git describe --abbrev=0 --tags` - - Figure out the next release version (e.g. if tag is v1.2.3 then you should create a v1.2.4 tag or v1.3.0 or a v2.0.0 depending on what has changed. Refer to [Semantic Versioning](https://semver.org/) for information about when to bump each) + - Figure out the next release version (e.g. if tag is v1.2.3 then you should create a v1.2.4 tag or v1.3.0 or a + v2.0.0 depending on what has changed. Refer to [Semantic Versioning](https://semver.org/) for information about + when to bump each) - - Create a tag `git tag v1.2.4` + - Create a tag `git tag v1.2.4` - - Push tag `git push --tags` + - Push tag `git push --tags` From 3af4e5f34add09440c2a965d1944625c4c904a44 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Thu, 21 Apr 2022 21:30:15 -0700 Subject: [PATCH 166/191] #major bump to 1.0.0 Signed-off-by: Haytham Abuelfutuh --- flytestdlib/.github/workflows/master.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flytestdlib/.github/workflows/master.yml b/flytestdlib/.github/workflows/master.yml index 066194f4bf..2bef89b017 100644 --- a/flytestdlib/.github/workflows/master.yml +++ b/flytestdlib/.github/workflows/master.yml @@ -15,10 +15,10 @@ jobs: steps: - uses: actions/checkout@v2 with: - fetch-depth: "0" + fetch-depth: '0' - name: Bump version and push tag id: bump-version - uses: anothrNick/github-tag-action@1.17.2 + uses: anothrNick/github-tag-action@1.39.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} WITH_V: true From c7548a91d85dc87197e769310a3e3b1812fcc136 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Thu, 21 Apr 2022 21:36:01 -0700 Subject: [PATCH 167/191] #major bump to 1.0.0 (#131) Signed-off-by: Haytham Abuelfutuh From 342604638de6ca55f6e0104aaec91aeb6f0db66c Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Thu, 21 Apr 2022 22:58:11 -0700 Subject: [PATCH 168/191] #major use forked github-tag-action Signed-off-by: Haytham Abuelfutuh --- flytestdlib/.github/workflows/master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytestdlib/.github/workflows/master.yml b/flytestdlib/.github/workflows/master.yml index 2bef89b017..a69588c308 100644 --- a/flytestdlib/.github/workflows/master.yml +++ b/flytestdlib/.github/workflows/master.yml @@ -18,7 +18,7 @@ jobs: fetch-depth: '0' - name: Bump version and push tag id: bump-version - uses: anothrNick/github-tag-action@1.39.0 + uses: flyteorg/github-tag-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} WITH_V: true From b94c578909189208486f88bc4c235794f1dd30e8 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Wed, 27 Apr 2022 23:59:58 +0530 Subject: [PATCH 169/191] added reuseable workflow for boilerplate (#132) * feat: added reuseable workflow for boilerplate Signed-off-by: Yuvraj --- .../workflows/boilerplate-automation.yml | 37 ------------------- .../.github/workflows/upgrade_automation.yml | 12 ++++++ 2 files changed, 12 insertions(+), 37 deletions(-) delete mode 100644 flytestdlib/.github/workflows/boilerplate-automation.yml create mode 100644 flytestdlib/.github/workflows/upgrade_automation.yml diff --git a/flytestdlib/.github/workflows/boilerplate-automation.yml b/flytestdlib/.github/workflows/boilerplate-automation.yml deleted file mode 100644 index d4a76239be..0000000000 --- a/flytestdlib/.github/workflows/boilerplate-automation.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Update Boilerplate Automation -on: - workflow_dispatch: - -jobs: - update-boilerplate: - name: Update Boilerplate - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: "0" - - name: Update Boilerplate - run: | - make update_boilerplate - - name: Create Pull Request - id: cpr - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.FLYTE_BOT_PAT }} - commit-message: Update Boilerplate - committer: Flyte-Bot - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - signoff: true - branch: flyte-bot-update-boilerplate - delete-branch: true - title: 'Update Boilerplate' - body: | - Update Boilerplate - - Auto-generated by [flyte-bot] - labels: | - boilerplate - team-reviewers: | - owners - maintainers - draft: false - diff --git a/flytestdlib/.github/workflows/upgrade_automation.yml b/flytestdlib/.github/workflows/upgrade_automation.yml new file mode 100644 index 0000000000..94fceadd27 --- /dev/null +++ b/flytestdlib/.github/workflows/upgrade_automation.yml @@ -0,0 +1,12 @@ +name: Boilerplate Upgrade Automation +on: + workflow_dispatch: + +jobs: + trigger-upgrade: + name: Boilerplate Upgrade Automation + uses: flyteorg/flytetools/.github/workflows/flyte_automation.yml@master + with: + component: boilerplate + secrets: + FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} \ No newline at end of file From 82e8aac2fd1f188e209434c412c3a78e04acfe52 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Wed, 4 May 2022 12:07:22 -0600 Subject: [PATCH 170/191] Update gorm 'info' log level translation (#134) Signed-off-by: Katrina Rogan --- flytestdlib/database/gorm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flytestdlib/database/gorm.go b/flytestdlib/database/gorm.go index db8f7a32a3..7672806e00 100644 --- a/flytestdlib/database/gorm.go +++ b/flytestdlib/database/gorm.go @@ -30,9 +30,9 @@ func GetGormLogger(ctx context.Context, logConfig *logger.Config) gormLogger.Int case logger.ErrorLevel: logLevel = gormLogger.Error case logger.WarnLevel: - logLevel = gormLogger.Warn - case logger.InfoLevel: fallthrough + case logger.InfoLevel: + logLevel = gormLogger.Warn case logger.DebugLevel: logLevel = gormLogger.Info ignoreRecordNotFoundError = false From c514ced13a98b92dc0cbf98e50c60f7e9eba120a Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 12 May 2022 10:48:25 +0530 Subject: [PATCH 171/191] fix: update default connection to 100 (#135) --- flytestdlib/database/config.go | 2 +- flytestdlib/database/config_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flytestdlib/database/config.go b/flytestdlib/database/config.go index 536109597b..50522c5491 100644 --- a/flytestdlib/database/config.go +++ b/flytestdlib/database/config.go @@ -15,7 +15,7 @@ const ( var defaultConfig = &DbConfig{ MaxIdleConnections: 10, - MaxOpenConnections: 1000, + MaxOpenConnections: 100, ConnMaxLifeTime: config.Duration{Duration: time.Hour}, Postgres: PostgresConfig{ Port: 5432, diff --git a/flytestdlib/database/config_test.go b/flytestdlib/database/config_test.go index 74ee93b717..23fcd2b544 100644 --- a/flytestdlib/database/config_test.go +++ b/flytestdlib/database/config_test.go @@ -22,7 +22,7 @@ func TestParseDatabaseConfig(t *testing.T) { assert.NoError(t, accessor.UpdateConfig(context.Background())) assert.Equal(t, false, GetConfig().EnableForeignKeyConstraintWhenMigrating) - assert.Equal(t, 1000, GetConfig().MaxOpenConnections) + assert.Equal(t, 100, GetConfig().MaxOpenConnections) assert.Equal(t, 10, GetConfig().MaxIdleConnections) assert.Equal(t, config.Duration{Duration: 3600000000000}, GetConfig().ConnMaxLifeTime) From 5818e582a262e9afdb36c4a884657826f4701cd5 Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Thu, 9 Jun 2022 10:57:38 -0500 Subject: [PATCH 172/191] Set unique labels string on prometheus metrics (#136) * computing and setting unique labels string on metrics Signed-off-by: Daniel Rammer * added unit tests to counter Signed-off-by: Daniel Rammer * added unit tests to gauge Signed-off-by: Daniel Rammer * added unit tests to stopwatch Signed-off-by: Daniel Rammer * added unit tests to summary Signed-off-by: Daniel Rammer * fixed lint issue Signed-off-by: Daniel Rammer * fixed another lint issue Signed-off-by: Daniel Rammer --- flytestdlib/promutils/labeled/counter.go | 30 +-- flytestdlib/promutils/labeled/counter_test.go | 117 ++++++++-- flytestdlib/promutils/labeled/gauge.go | 25 +- flytestdlib/promutils/labeled/gauge_test.go | 214 +++++++++--------- flytestdlib/promutils/labeled/stopwatch.go | 20 +- .../promutils/labeled/stopwatch_test.go | 176 ++++++++++++-- flytestdlib/promutils/labeled/summary.go | 17 +- flytestdlib/promutils/labeled/summary_test.go | 186 +++++++++------ 8 files changed, 537 insertions(+), 248 deletions(-) diff --git a/flytestdlib/promutils/labeled/counter.go b/flytestdlib/promutils/labeled/counter.go index cb4439b3f1..66ede96314 100644 --- a/flytestdlib/promutils/labeled/counter.go +++ b/flytestdlib/promutils/labeled/counter.go @@ -16,13 +16,13 @@ type Counter struct { *prometheus.CounterVec prometheus.Counter - additionalLabels []contextutils.Key + labels []contextutils.Key } // Inc increments the counter by 1. Use Add to increment it by arbitrary non-negative values. The data point will be // labeled with values from context. See labeled.SetMetricsKeys for information about how to configure that. func (c Counter) Inc(ctx context.Context) { - counter, err := c.CounterVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, c.additionalLabels...)...)) + counter, err := c.CounterVec.GetMetricWith(contextutils.Values(ctx, c.labels...)) if err != nil { panic(err.Error()) } @@ -36,7 +36,7 @@ func (c Counter) Inc(ctx context.Context) { // Add adds the given value to the counter. It panics if the value is < 0.. The data point will be labeled with values // from context. See labeled.SetMetricsKeys for information about how to configure that. func (c Counter) Add(ctx context.Context, v float64) { - counter, err := c.CounterVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, c.additionalLabels...)...)) + counter, err := c.CounterVec.GetMetricWith(contextutils.Values(ctx, c.labels...)) if err != nil { panic(err.Error()) } @@ -47,18 +47,6 @@ func (c Counter) Add(ctx context.Context, v float64) { } } -// GetUniqueLabels Remove labels from additionalLabels that already exist in metricStringKeys -func GetUniqueLabels(metricStringKeys []string, additionalLabels []string) []string { - labels := make([]string, 0, len(additionalLabels)) - metricKeysSet := sets.NewString(metricStringKeys...) - for _, label := range additionalLabels { - if !metricKeysSet.Has(label) { - labels = append(labels, label) - } - } - return labels -} - // NewCounter creates a new labeled counter. Label keys must be set before instantiating a counter. See labeled.SetMetricsKeys for // information about to configure that. func NewCounter(name, description string, scope promutils.Scope, opts ...MetricOption) Counter { @@ -73,15 +61,19 @@ func NewCounter(name, description string, scope promutils.Scope, opts ...MetricO if _, emitUnlabeledMetric := opt.(EmitUnlabeledMetricOption); emitUnlabeledMetric { c.Counter = scope.MustNewCounter(GetUnlabeledMetricName(name), description) } else if additionalLabels, casted := opt.(AdditionalLabelsOption); casted { - labels := GetUniqueLabels(metricStringKeys, additionalLabels.Labels) - // Here we only append the labels that don't exist in metricStringKeys - c.CounterVec = scope.MustNewCounterVec(name, description, append(metricStringKeys, labels...)...) - c.additionalLabels = contextutils.MetricKeysFromStrings(labels) + // compute unique labels + labelSet := sets.NewString(metricStringKeys...) + labelSet.Insert(additionalLabels.Labels...) + labels := labelSet.List() + + c.CounterVec = scope.MustNewCounterVec(name, description, labels...) + c.labels = contextutils.MetricKeysFromStrings(labels) } } if c.CounterVec == nil { c.CounterVec = scope.MustNewCounterVec(name, description, metricStringKeys...) + c.labels = metricKeys } return c diff --git a/flytestdlib/promutils/labeled/counter_test.go b/flytestdlib/promutils/labeled/counter_test.go index 1450b90f37..1836d71b43 100644 --- a/flytestdlib/promutils/labeled/counter_test.go +++ b/flytestdlib/promutils/labeled/counter_test.go @@ -2,37 +2,112 @@ package labeled import ( "context" + "strings" "testing" "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" + + "github.com/prometheus/client_golang/prometheus/testutil" + "github.com/stretchr/testify/assert" ) func TestLabeledCounter(t *testing.T) { UnsetMetricKeys() assert.NotPanics(t, func() { - SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey, contextutils.LaunchPlanIDKey) + SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) + }) + + t.Run("Labeled", func(t *testing.T) { + scope := promutils.NewScope("testscope_counter") + c := NewCounter("c1", "some desc", scope) + assert.NotNil(t, c) + + ctx := context.TODO() + var header = ` + # HELP testscope_counter:c1 some desc + # TYPE testscope_counter:c1 counter + ` + + c.Inc(ctx) + c.Add(ctx, 1.0) + var expected = ` + testscope_counter:c1{domain="",project="",task="",wf=""} 2 + ` + err := testutil.CollectAndCompare(c.CounterVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + ctx = contextutils.WithProjectDomain(ctx, "project", "domain") + c.Inc(ctx) + c.Add(ctx, 1.0) + expected = ` + testscope_counter:c1{domain="",project="",task="",wf=""} 2 + testscope_counter:c1{domain="domain",project="project",task="",wf=""} 2 + ` + err = testutil.CollectAndCompare(c.CounterVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + ctx = contextutils.WithTaskID(ctx, "task") + c.Inc(ctx) + c.Add(ctx, 1.0) + expected = ` + testscope_counter:c1{domain="",project="",task="",wf=""} 2 + testscope_counter:c1{domain="domain",project="project",task="",wf=""} 2 + testscope_counter:c1{domain="domain",project="project",task="task",wf=""} 2 + ` + err = testutil.CollectAndCompare(c.CounterVec, strings.NewReader(header+expected)) + assert.NoError(t, err) }) - scope := promutils.NewTestScope() - // Make sure we will not register the same metrics key again. - option := AdditionalLabelsOption{Labels: []string{contextutils.ProjectKey.String(), contextutils.DomainKey.String()}} - c := NewCounter("lbl_counter", "help", scope, option) - assert.NotNil(t, c) - ctx := context.TODO() - c.Inc(ctx) - c.Add(ctx, 1.0) - - ctx = contextutils.WithProjectDomain(ctx, "project", "domain") - c.Inc(ctx) - c.Add(ctx, 1.0) - - ctx = contextutils.WithTaskID(ctx, "task") - c.Inc(ctx) - c.Add(ctx, 1.0) - - ctx = contextutils.WithLaunchPlanID(ctx, "lp") - c.Inc(ctx) - c.Add(ctx, 1.0) + t.Run("Unlabeled", func(t *testing.T) { + scope := promutils.NewScope("testscope_counter") + c := NewCounter("c2", "some desc", scope, EmitUnlabeledMetric) + assert.NotNil(t, c) + + ctx := context.TODO() + var header = ` + # HELP testscope_counter:c2_unlabeled some desc + # TYPE testscope_counter:c2_unlabeled counter + ` + + c.Inc(ctx) + c.Add(ctx, 1.0) + var expected = ` + testscope_counter:c2_unlabeled 2 + ` + err := testutil.CollectAndCompare(c.Counter, strings.NewReader(header+expected)) + assert.NoError(t, err) + }) + + t.Run("AdditionalLabels", func(t *testing.T) { + scope := promutils.NewScope("testscope_counter") + opts := AdditionalLabelsOption{Labels: []string{contextutils.ProjectKey.String(), contextutils.ExecIDKey.String()}} + c := NewCounter("c3", "some desc", scope, opts) + assert.NotNil(t, c) + + ctx := context.TODO() + var header = ` + # HELP testscope_counter:c3 some desc + # TYPE testscope_counter:c3 counter + ` + + c.Inc(ctx) + c.Add(ctx, 1.0) + var expected = ` + testscope_counter:c3{domain="",exec_id="",project="",task="",wf=""} 2 + ` + err := testutil.CollectAndCompare(c.CounterVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + ctx = contextutils.WithExecutionID(ctx, "exec_id") + c.Inc(ctx) + c.Add(ctx, 1.0) + expected = ` + testscope_counter:c3{domain="",exec_id="",project="",task="",wf=""} 2 + testscope_counter:c3{domain="",exec_id="exec_id",project="",task="",wf=""} 2 + ` + err = testutil.CollectAndCompare(c.CounterVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + }) } diff --git a/flytestdlib/promutils/labeled/gauge.go b/flytestdlib/promutils/labeled/gauge.go index a658704675..2b4bed677a 100644 --- a/flytestdlib/promutils/labeled/gauge.go +++ b/flytestdlib/promutils/labeled/gauge.go @@ -3,6 +3,8 @@ package labeled import ( "context" + "k8s.io/apimachinery/pkg/util/sets" + "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" "github.com/prometheus/client_golang/prometheus" @@ -13,13 +15,13 @@ type Gauge struct { *prometheus.GaugeVec prometheus.Gauge - additionalLabels []contextutils.Key + labels []contextutils.Key } // Inc increments the gauge by 1. Use Add to increment by arbitrary values. The data point will be // labeled with values from context. See labeled.SetMetricsKeys for information about how to configure that. func (g Gauge) Inc(ctx context.Context) { - gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, g.labels...)) if err != nil { panic(err.Error()) } @@ -33,7 +35,7 @@ func (g Gauge) Inc(ctx context.Context) { // Add adds the given value to the Gauge. (The value can be negative, resulting in a decrease of the Gauge.) // The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about how to configure that. func (g Gauge) Add(ctx context.Context, v float64) { - gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, g.labels...)) if err != nil { panic(err.Error()) } @@ -47,7 +49,7 @@ func (g Gauge) Add(ctx context.Context, v float64) { // Set sets the Gauge to an arbitrary value. // The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about how to configure that. func (g Gauge) Set(ctx context.Context, v float64) { - gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, g.labels...)) if err != nil { panic(err.Error()) } @@ -61,7 +63,7 @@ func (g Gauge) Set(ctx context.Context, v float64) { // Dec decrements the level by 1. Use Sub to decrement by arbitrary values. The data point will be // labeled with values from context. See labeled.SetMetricsKeys for information about how to configure that. func (g Gauge) Dec(ctx context.Context) { - gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, g.labels...)) if err != nil { panic(err.Error()) } @@ -75,7 +77,7 @@ func (g Gauge) Dec(ctx context.Context) { // Sub adds the given value to the Gauge. The value can be negative, resulting in an increase of the Gauge. // The data point will be labeled with values from context. See labeled.SetMetricsKeys for information about how to configure that. func (g Gauge) Sub(ctx context.Context, v float64) { - gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, g.additionalLabels...)...)) + gauge, err := g.GaugeVec.GetMetricWith(contextutils.Values(ctx, g.labels...)) if err != nil { panic(err.Error()) } @@ -113,14 +115,19 @@ func NewGauge(name, description string, scope promutils.Scope, opts ...MetricOpt if _, emitUnlabeledMetric := opt.(EmitUnlabeledMetricOption); emitUnlabeledMetric { g.Gauge = scope.MustNewGauge(GetUnlabeledMetricName(name), description) } else if additionalLabels, casted := opt.(AdditionalLabelsOption); casted { - labels := GetUniqueLabels(metricStringKeys, additionalLabels.Labels) - g.GaugeVec = scope.MustNewGaugeVec(name, description, append(metricStringKeys, labels...)...) - g.additionalLabels = contextutils.MetricKeysFromStrings(labels) + // compute unique labels + labelSet := sets.NewString(metricStringKeys...) + labelSet.Insert(additionalLabels.Labels...) + labels := labelSet.List() + + g.GaugeVec = scope.MustNewGaugeVec(name, description, labels...) + g.labels = contextutils.MetricKeysFromStrings(labels) } } if g.GaugeVec == nil { g.GaugeVec = scope.MustNewGaugeVec(name, description, metricStringKeys...) + g.labels = metricKeys } return g diff --git a/flytestdlib/promutils/labeled/gauge_test.go b/flytestdlib/promutils/labeled/gauge_test.go index 232bd4f5e9..1b477e0ec7 100644 --- a/flytestdlib/promutils/labeled/gauge_test.go +++ b/flytestdlib/promutils/labeled/gauge_test.go @@ -7,122 +7,124 @@ import ( "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" + "github.com/prometheus/client_golang/prometheus/testutil" + "github.com/stretchr/testify/assert" ) func TestLabeledGauge(t *testing.T) { UnsetMetricKeys() assert.NotPanics(t, func() { - SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey, contextutils.LaunchPlanIDKey) + SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) }) - scope := promutils.NewScope("testscope") - ctx := context.Background() - ctx = contextutils.WithProjectDomain(ctx, "flyte", "dev") - // Make sure we will not register the same metrics key again. - option := AdditionalLabelsOption{Labels: []string{contextutils.ProjectKey.String(), contextutils.DomainKey.String()}} - g := NewGauge("unittest", "some desc", scope, option) - assert.NotNil(t, g) - - g.Inc(ctx) - - const header = ` - # HELP testscope:unittest some desc - # TYPE testscope:unittest gauge - ` - var expected = ` - testscope:unittest{domain="dev",lp="",project="flyte",task="",wf=""} 1 - ` - err := testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) - assert.NoError(t, err) - - g.Set(ctx, 42) - expected = ` - testscope:unittest{domain="dev",lp="",project="flyte",task="",wf=""} 42 - ` - err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) - assert.NoError(t, err) - - g.Add(ctx, 1) - expected = ` - testscope:unittest{domain="dev",lp="",project="flyte",task="",wf=""} 43 - ` - err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) - assert.NoError(t, err) - - g.Dec(ctx) - expected = ` - testscope:unittest{domain="dev",lp="",project="flyte",task="",wf=""} 42 - ` - err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) - assert.NoError(t, err) - - g.Sub(ctx, 1) - expected = ` - testscope:unittest{domain="dev",lp="",project="flyte",task="",wf=""} 41 - ` - err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) - assert.NoError(t, err) - - g.SetToCurrentTime(ctx) -} + t.Run("Labeled", func(t *testing.T) { + scope := promutils.NewScope("testscope_gauge") + g := NewGauge("g1", "some desc", scope) + assert.NotNil(t, g) + + ctx := context.TODO() + const header = ` + # HELP testscope_gauge:g1 some desc + # TYPE testscope_gauge:g1 gauge + ` + + g.Inc(ctx) + var expected = ` + testscope_gauge:g1{domain="",project="",task="",wf=""} 1 + ` + err := testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + g.Dec(ctx) + expected = ` + testscope_gauge:g1{domain="",project="",task="",wf=""} 0 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + ctx = contextutils.WithProjectDomain(ctx, "project", "domain") + g.Set(ctx, 42) + expected = ` + testscope_gauge:g1{domain="",project="",task="",wf=""} 0 + testscope_gauge:g1{domain="domain",project="project",task="",wf=""} 42 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + ctx = contextutils.WithTaskID(ctx, "task") + g.Add(ctx, 1) + expected = ` + testscope_gauge:g1{domain="",project="",task="",wf=""} 0 + testscope_gauge:g1{domain="domain",project="project",task="",wf=""} 42 + testscope_gauge:g1{domain="domain",project="project",task="task",wf=""} 1 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + g.Sub(ctx, 1) + expected = ` + testscope_gauge:g1{domain="",project="",task="",wf=""} 0 + testscope_gauge:g1{domain="domain",project="project",task="",wf=""} 42 + testscope_gauge:g1{domain="domain",project="project",task="task",wf=""} 0 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + }) -func TestWithAdditionalLabels(t *testing.T) { - UnsetMetricKeys() - assert.NotPanics(t, func() { - SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey, contextutils.LaunchPlanIDKey) + t.Run("Unlabeled", func(t *testing.T) { + scope := promutils.NewScope("testscope_gauge") + g := NewGauge("g2", "some desc", scope, EmitUnlabeledMetric) + assert.NotNil(t, g) + + ctx := context.TODO() + const header = ` + # HELP testscope_gauge:g2_unlabeled some desc + # TYPE testscope_gauge:g2_unlabeled gauge + ` + + g.Inc(ctx) + var expected = ` + testscope_gauge:g2_unlabeled 1 + ` + err := testutil.CollectAndCompare(g.Gauge, strings.NewReader(header+expected)) + assert.NoError(t, err) + + g.Dec(ctx) + expected = ` + testscope_gauge:g2_unlabeled 0 + ` + err = testutil.CollectAndCompare(g.Gauge, strings.NewReader(header+expected)) + assert.NoError(t, err) }) - scope := promutils.NewScope("testscope") - ctx := context.Background() - ctx = contextutils.WithProjectDomain(ctx, "flyte", "dev") - g := NewGauge("unittestlabeled", "some desc", scope, AdditionalLabelsOption{Labels: []string{"bearing"}}) - assert.NotNil(t, g) - - const header = ` - # HELP testscope:unittestlabeled some desc - # TYPE testscope:unittestlabeled gauge - ` - - g.Inc(ctx) - var expected = ` - testscope:unittestlabeled{bearing="", domain="dev",lp="",project="flyte",task="",wf=""} 1 - ` - err := testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) - assert.NoError(t, err) - - bearingKey := contextutils.Key("bearing") - ctx = context.WithValue(ctx, bearingKey, "123") - g.Set(ctx, 42) - expected = ` - testscope:unittestlabeled{bearing="", domain="dev",lp="",project="flyte",task="",wf=""} 1 - testscope:unittestlabeled{bearing="123", domain="dev",lp="",project="flyte",task="",wf=""} 42 - ` - err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) - assert.NoError(t, err) - - g.Add(ctx, 1) - expected = ` - testscope:unittestlabeled{bearing="", domain="dev",lp="",project="flyte",task="",wf=""} 1 - testscope:unittestlabeled{bearing="123", domain="dev",lp="",project="flyte",task="",wf=""} 43 - ` - err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) - assert.NoError(t, err) - - g.Dec(ctx) - expected = ` - testscope:unittestlabeled{bearing="", domain="dev",lp="",project="flyte",task="",wf=""} 1 - testscope:unittestlabeled{bearing="123", domain="dev",lp="",project="flyte",task="",wf=""} 42 - ` - err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) - assert.NoError(t, err) - - g.Sub(ctx, 42) - expected = ` - testscope:unittestlabeled{bearing="", domain="dev",lp="",project="flyte",task="",wf=""} 1 - testscope:unittestlabeled{bearing="123", domain="dev",lp="",project="flyte",task="",wf=""} 0 - ` - err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) - assert.NoError(t, err) + t.Run("AdditionalLabels", func(t *testing.T) { + scope := promutils.NewScope("testscope_gauge") + opts := AdditionalLabelsOption{Labels: []string{contextutils.ProjectKey.String(), contextutils.ExecIDKey.String()}} + g := NewGauge("g3", "some desc", scope, opts) + assert.NotNil(t, g) + + ctx := context.TODO() + const header = ` + # HELP testscope_gauge:g3 some desc + # TYPE testscope_gauge:g3 gauge + ` + + g.Inc(ctx) + var expected = ` + testscope_gauge:g3{domain="",exec_id="",project="",task="",wf=""} 1 + ` + err := testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + ctx = contextutils.WithExecutionID(ctx, "exec_id") + g.Inc(ctx) + expected = ` + testscope_gauge:g3{domain="",exec_id="",project="",task="",wf=""} 1 + testscope_gauge:g3{domain="",exec_id="exec_id",project="",task="",wf=""} 1 + ` + err = testutil.CollectAndCompare(g.GaugeVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + }) } diff --git a/flytestdlib/promutils/labeled/stopwatch.go b/flytestdlib/promutils/labeled/stopwatch.go index 1bc690434d..efca254003 100644 --- a/flytestdlib/promutils/labeled/stopwatch.go +++ b/flytestdlib/promutils/labeled/stopwatch.go @@ -4,6 +4,8 @@ import ( "context" "time" + "k8s.io/apimachinery/pkg/util/sets" + "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" ) @@ -17,7 +19,7 @@ type StopWatch struct { // across tags. promutils.StopWatch - additionalLabels []contextutils.Key + labels []contextutils.Key } // Start creates a new Instance of the StopWatch called a Timer that is closeable/stoppable. @@ -28,7 +30,7 @@ type StopWatch struct { // .... // } func (c StopWatch) Start(ctx context.Context) Timer { - w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, c.additionalLabels...)...)) + w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, c.labels...)) if err != nil { panic(err.Error()) } @@ -48,7 +50,7 @@ func (c StopWatch) Start(ctx context.Context) Timer { // Observe observes specified duration between the start and end time. The data point will be labeled with values from context. // See labeled.SetMetricsKeys for information about how to configure that. func (c StopWatch) Observe(ctx context.Context, start, end time.Time) { - w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, c.additionalLabels...)...)) + w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, c.labels...)) if err != nil { panic(err.Error()) } @@ -82,15 +84,19 @@ func NewStopWatch(name, description string, scale time.Duration, scope promutils if _, emitUnableMetric := opt.(EmitUnlabeledMetricOption); emitUnableMetric { sw.StopWatch = scope.MustNewStopWatch(GetUnlabeledMetricName(name), description, scale) } else if additionalLabels, casted := opt.(AdditionalLabelsOption); casted { - labels := GetUniqueLabels(metricStringKeys, additionalLabels.Labels) - sw.StopWatchVec = scope.MustNewStopWatchVec(name, description, scale, - append(metricStringKeys, labels...)...) - sw.additionalLabels = contextutils.MetricKeysFromStrings(labels) + // compute unique labels + labelSet := sets.NewString(metricStringKeys...) + labelSet.Insert(additionalLabels.Labels...) + labels := labelSet.List() + + sw.StopWatchVec = scope.MustNewStopWatchVec(name, description, scale, labels...) + sw.labels = contextutils.MetricKeysFromStrings(labels) } } if sw.StopWatchVec == nil { sw.StopWatchVec = scope.MustNewStopWatchVec(name, description, scale, metricStringKeys...) + sw.labels = metricKeys } return sw diff --git a/flytestdlib/promutils/labeled/stopwatch_test.go b/flytestdlib/promutils/labeled/stopwatch_test.go index 08cd51105e..86b6378203 100644 --- a/flytestdlib/promutils/labeled/stopwatch_test.go +++ b/flytestdlib/promutils/labeled/stopwatch_test.go @@ -2,11 +2,15 @@ package labeled import ( "context" + "strings" "testing" "time" "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" + + "github.com/prometheus/client_golang/prometheus/testutil" + "github.com/stretchr/testify/assert" ) @@ -16,35 +20,171 @@ func TestLabeledStopWatch(t *testing.T) { SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) }) - t.Run("always labeled", func(t *testing.T) { - scope := promutils.NewTestScope() - // Make sure we will not register the same metrics key again. - option := AdditionalLabelsOption{Labels: []string{contextutils.ProjectKey.String(), contextutils.DomainKey.String()}} - c := NewStopWatch("lbl_counter", "help", time.Second, scope, option) - assert.NotNil(t, c) + t.Run("Labeled", func(t *testing.T) { + scope := promutils.NewScope("testscope_stopwatch") + s := NewStopWatch("s1", "some desc", time.Minute, scope) + assert.NotNil(t, s) + ctx := context.TODO() - w := c.Start(ctx) + const header = ` + # HELP testscope_stopwatch:s1_m some desc + # TYPE testscope_stopwatch:s1_m summary + ` + + w := s.Start(ctx) w.Stop() + var expected = ` + testscope_stopwatch:s1_m{domain="",project="",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s1_m{domain="",project="",task="",wf="",quantile="0.9"} 0 + testscope_stopwatch:s1_m{domain="",project="",task="",wf="",quantile="0.99"} 0 + testscope_stopwatch:s1_m_sum{domain="",project="",task="",wf=""} 0 + testscope_stopwatch:s1_m_count{domain="",project="",task="",wf=""} 1 + ` + err := testutil.CollectAndCompare(s.StopWatchVec, strings.NewReader(header+expected)) + assert.NoError(t, err) ctx = contextutils.WithProjectDomain(ctx, "project", "domain") - w = c.Start(ctx) + w = s.Start(ctx) w.Stop() + expected = ` + testscope_stopwatch:s1_m{domain="",project="",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s1_m{domain="",project="",task="",wf="",quantile="0.9"} 0 + testscope_stopwatch:s1_m{domain="",project="",task="",wf="",quantile="0.99"} 0 + testscope_stopwatch:s1_m_sum{domain="",project="",task="",wf=""} 0 + testscope_stopwatch:s1_m_count{domain="",project="",task="",wf=""} 1 + testscope_stopwatch:s1_m{domain="domain",project="project",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s1_m{domain="domain",project="project",task="",wf="",quantile="0.9"} 0 + testscope_stopwatch:s1_m{domain="domain",project="project",task="",wf="",quantile="0.99"} 0 + testscope_stopwatch:s1_m_sum{domain="domain",project="project",task="",wf=""} 0 + testscope_stopwatch:s1_m_count{domain="domain",project="project",task="",wf=""} 1 + ` + err = testutil.CollectAndCompare(s.StopWatchVec, strings.NewReader(header+expected)) + assert.NoError(t, err) - ctx = contextutils.WithTaskID(ctx, "task") - w = c.Start(ctx) - w.Stop() + now := time.Now() + s.Observe(ctx, now, now.Add(time.Minute)) + expected = ` + testscope_stopwatch:s1_m{domain="",project="",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s1_m{domain="",project="",task="",wf="",quantile="0.9"} 0 + testscope_stopwatch:s1_m{domain="",project="",task="",wf="",quantile="0.99"} 0 + testscope_stopwatch:s1_m_sum{domain="",project="",task="",wf=""} 0 + testscope_stopwatch:s1_m_count{domain="",project="",task="",wf=""} 1 + testscope_stopwatch:s1_m{domain="domain",project="project",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s1_m{domain="domain",project="project",task="",wf="",quantile="0.9"} 1 + testscope_stopwatch:s1_m{domain="domain",project="project",task="",wf="",quantile="0.99"} 1 + testscope_stopwatch:s1_m_sum{domain="domain",project="project",task="",wf=""} 1 + testscope_stopwatch:s1_m_count{domain="domain",project="project",task="",wf=""} 2 + ` + err = testutil.CollectAndCompare(s.StopWatchVec, strings.NewReader(header+expected)) + assert.NoError(t, err) - c.Observe(ctx, time.Now(), time.Now().Add(time.Second)) - c.Time(ctx, func() { + s.Time(ctx, func() { // Do nothing }) + expected = ` + testscope_stopwatch:s1_m{domain="",project="",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s1_m{domain="",project="",task="",wf="",quantile="0.9"} 0 + testscope_stopwatch:s1_m{domain="",project="",task="",wf="",quantile="0.99"} 0 + testscope_stopwatch:s1_m_sum{domain="",project="",task="",wf=""} 0 + testscope_stopwatch:s1_m_count{domain="",project="",task="",wf=""} 1 + testscope_stopwatch:s1_m{domain="domain",project="project",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s1_m{domain="domain",project="project",task="",wf="",quantile="0.9"} 1 + testscope_stopwatch:s1_m{domain="domain",project="project",task="",wf="",quantile="0.99"} 1 + testscope_stopwatch:s1_m_sum{domain="domain",project="project",task="",wf=""} 1 + testscope_stopwatch:s1_m_count{domain="domain",project="project",task="",wf=""} 3 + ` + err = testutil.CollectAndCompare(s.StopWatchVec, strings.NewReader(header+expected)) + assert.NoError(t, err) }) - t.Run("unlabeled", func(t *testing.T) { - scope := promutils.NewTestScope() - c := NewStopWatch("lbl_counter_2", "help", time.Second, scope, EmitUnlabeledMetric) - assert.NotNil(t, c) + t.Run("Unlabeled", func(t *testing.T) { + scope := promutils.NewScope("testscope_stopwatch") + s := NewStopWatch("s2", "some desc", time.Minute, scope, EmitUnlabeledMetric) + assert.NotNil(t, s) + + ctx := context.TODO() + /*const header = ` + # HELP testscope_stopwatch:s2_m some desc + # TYPE testscope_stopwatch:s2_m summary + `*/ + + w := s.Start(ctx) + w.Stop() + // promutils.StopWatch does not implement prometheus.Collector + /*var expected = ` + testscope_stopwatch:s2_m{quantile="0.5"} 0 + testscope_stopwatch:s2_m{quantile="0.9"} 0 + testscope_stopwatch:s2_m{quantile="0.99"} 0 + testscope_stopwatch:s2_m_sum 0 + testscope_stopwatch:s2_m_count 1 + ` + err := testutil.CollectAndCompare(s.StopWatch, strings.NewReader(header+expected)) + assert.NoError(t, err)*/ + }) - c.Start(context.TODO()) + t.Run("AdditionalLabels", func(t *testing.T) { + scope := promutils.NewScope("testscope_stopwatch") + opts := AdditionalLabelsOption{Labels: []string{contextutils.ProjectKey.String(), contextutils.ExecIDKey.String()}} + s := NewStopWatch("s3", "some desc", time.Minute, scope, opts) + assert.NotNil(t, s) + + ctx := context.TODO() + const header = ` + # HELP testscope_stopwatch:s3_m some desc + # TYPE testscope_stopwatch:s3_m summary + ` + + w := s.Start(ctx) + w.Stop() + var expected = ` + testscope_stopwatch:s3_m{domain="",exec_id="",project="",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s3_m{domain="",exec_id="",project="",task="",wf="",quantile="0.9"} 0 + testscope_stopwatch:s3_m{domain="",exec_id="",project="",task="",wf="",quantile="0.99"} 0 + testscope_stopwatch:s3_m_sum{domain="",exec_id="",project="",task="",wf=""} 0 + testscope_stopwatch:s3_m_count{domain="",exec_id="",project="",task="",wf=""} 1 + ` + err := testutil.CollectAndCompare(s.StopWatchVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + ctx = contextutils.WithProjectDomain(ctx, "project", "domain") + w = s.Start(ctx) + w.Stop() + expected = ` + testscope_stopwatch:s3_m{domain="",exec_id="",project="",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s3_m{domain="",exec_id="",project="",task="",wf="",quantile="0.9"} 0 + testscope_stopwatch:s3_m{domain="",exec_id="",project="",task="",wf="",quantile="0.99"} 0 + testscope_stopwatch:s3_m_sum{domain="",exec_id="",project="",task="",wf=""} 0 + testscope_stopwatch:s3_m_count{domain="",exec_id="",project="",task="",wf=""} 1 + testscope_stopwatch:s3_m{domain="domain",exec_id="",project="project",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s3_m{domain="domain",exec_id="",project="project",task="",wf="",quantile="0.9"} 0 + testscope_stopwatch:s3_m{domain="domain",exec_id="",project="project",task="",wf="",quantile="0.99"} 0 + testscope_stopwatch:s3_m_sum{domain="domain",exec_id="",project="project",task="",wf=""} 0 + testscope_stopwatch:s3_m_count{domain="domain",exec_id="",project="project",task="",wf=""} 1 + ` + err = testutil.CollectAndCompare(s.StopWatchVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + ctx = contextutils.WithExecutionID(ctx, "exec_id") + w = s.Start(ctx) + w.Stop() + expected = ` + testscope_stopwatch:s3_m{domain="",exec_id="",project="",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s3_m{domain="",exec_id="",project="",task="",wf="",quantile="0.9"} 0 + testscope_stopwatch:s3_m{domain="",exec_id="",project="",task="",wf="",quantile="0.99"} 0 + testscope_stopwatch:s3_m_sum{domain="",exec_id="",project="",task="",wf=""} 0 + testscope_stopwatch:s3_m_count{domain="",exec_id="",project="",task="",wf=""} 1 + testscope_stopwatch:s3_m{domain="domain",exec_id="",project="project",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s3_m{domain="domain",exec_id="",project="project",task="",wf="",quantile="0.9"} 0 + testscope_stopwatch:s3_m{domain="domain",exec_id="",project="project",task="",wf="",quantile="0.99"} 0 + testscope_stopwatch:s3_m_sum{domain="domain",exec_id="",project="project",task="",wf=""} 0 + testscope_stopwatch:s3_m_count{domain="domain",exec_id="",project="project",task="",wf=""} 1 + testscope_stopwatch:s3_m{domain="domain",exec_id="exec_id",project="project",task="",wf="",quantile="0.5"} 0 + testscope_stopwatch:s3_m{domain="domain",exec_id="exec_id",project="project",task="",wf="",quantile="0.9"} 0 + testscope_stopwatch:s3_m{domain="domain",exec_id="exec_id",project="project",task="",wf="",quantile="0.99"} 0 + testscope_stopwatch:s3_m_sum{domain="domain",exec_id="exec_id",project="project",task="",wf=""} 0 + testscope_stopwatch:s3_m_count{domain="domain",exec_id="exec_id",project="project",task="",wf=""} 1 + ` + err = testutil.CollectAndCompare(s.StopWatchVec, strings.NewReader(header+expected)) + assert.NoError(t, err) }) } diff --git a/flytestdlib/promutils/labeled/summary.go b/flytestdlib/promutils/labeled/summary.go index d197eca916..665ccd3a48 100644 --- a/flytestdlib/promutils/labeled/summary.go +++ b/flytestdlib/promutils/labeled/summary.go @@ -3,6 +3,8 @@ package labeled import ( "context" + "k8s.io/apimachinery/pkg/util/sets" + "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" "github.com/prometheus/client_golang/prometheus" @@ -14,12 +16,12 @@ type Summary struct { *prometheus.SummaryVec prometheus.Summary - additionalLabels []contextutils.Key + labels []contextutils.Key } // Observe adds a single observation to the summary. func (s Summary) Observe(ctx context.Context, v float64) { - summary, err := s.SummaryVec.GetMetricWith(contextutils.Values(ctx, append(metricKeys, s.additionalLabels...)...)) + summary, err := s.SummaryVec.GetMetricWith(contextutils.Values(ctx, s.labels...)) if err != nil { panic(err.Error()) } @@ -43,14 +45,19 @@ func NewSummary(name, description string, scope promutils.Scope, opts ...MetricO if _, emitUnlabeledMetric := opt.(EmitUnlabeledMetricOption); emitUnlabeledMetric { s.Summary = scope.MustNewSummary(GetUnlabeledMetricName(name), description) } else if additionalLabels, casted := opt.(AdditionalLabelsOption); casted { - labels := GetUniqueLabels(metricStringKeys, additionalLabels.Labels) - s.SummaryVec = scope.MustNewSummaryVec(name, description, append(metricStringKeys, labels...)...) - s.additionalLabels = contextutils.MetricKeysFromStrings(labels) + // compute unique labels + labelSet := sets.NewString(metricStringKeys...) + labelSet.Insert(additionalLabels.Labels...) + labels := labelSet.List() + + s.SummaryVec = scope.MustNewSummaryVec(name, description, labels...) + s.labels = contextutils.MetricKeysFromStrings(labels) } } if s.SummaryVec == nil { s.SummaryVec = scope.MustNewSummaryVec(name, description, metricStringKeys...) + s.labels = metricKeys } return s diff --git a/flytestdlib/promutils/labeled/summary_test.go b/flytestdlib/promutils/labeled/summary_test.go index 90f9b0e376..086f1424ec 100644 --- a/flytestdlib/promutils/labeled/summary_test.go +++ b/flytestdlib/promutils/labeled/summary_test.go @@ -7,76 +7,97 @@ import ( "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" + "github.com/prometheus/client_golang/prometheus/testutil" + "github.com/stretchr/testify/assert" ) func TestLabeledSummary(t *testing.T) { UnsetMetricKeys() assert.NotPanics(t, func() { - SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey, contextutils.LaunchPlanIDKey) + SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) }) - t.Run("labeled", func(t *testing.T) { + t.Run("Labeled", func(t *testing.T) { scope := promutils.NewScope("testscope_summary") - ctx := context.Background() - ctx = contextutils.WithProjectDomain(ctx, "flyte", "dev") - // Make sure we will not register the same metrics key again. - option := AdditionalLabelsOption{Labels: []string{contextutils.ProjectKey.String(), contextutils.DomainKey.String()}} - s := NewSummary("unittest", "some desc", scope, option) + s := NewSummary("s1", "some desc", scope) assert.NotNil(t, s) - s.Observe(ctx, 10) - + ctx := context.TODO() const header = ` - # HELP testscope_summary:unittest some desc - # TYPE testscope_summary:unittest summary + # HELP testscope_summary:s1 some desc + # TYPE testscope_summary:s1 summary ` + + s.Observe(ctx, 10) var expected = ` - testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.5"} 10 - testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.9"} 10 - testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.99"} 10 - testscope_summary:unittest_sum{domain="dev",lp="",project="flyte",task="",wf=""} 10 - testscope_summary:unittest_count{domain="dev",lp="",project="flyte",task="",wf=""} 1 + testscope_summary:s1{domain="",project="",task="",wf="",quantile="0.5"} 10 + testscope_summary:s1{domain="",project="",task="",wf="",quantile="0.9"} 10 + testscope_summary:s1{domain="",project="",task="",wf="",quantile="0.99"} 10 + testscope_summary:s1_sum{domain="",project="",task="",wf=""} 10 + testscope_summary:s1_count{domain="",project="",task="",wf=""} 1 ` err := testutil.CollectAndCompare(s.SummaryVec, strings.NewReader(header+expected)) assert.NoError(t, err) s.Observe(ctx, 100) s.Observe(ctx, 1000) - expected = ` - testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.5"} 100 - testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.9"} 1000 - testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.99"} 1000 - testscope_summary:unittest_sum{domain="dev",lp="",project="flyte",task="",wf=""} 1110 - testscope_summary:unittest_count{domain="dev",lp="",project="flyte",task="",wf=""} 3 + testscope_summary:s1{domain="",project="",task="",wf="",quantile="0.5"} 100 + testscope_summary:s1{domain="",project="",task="",wf="",quantile="0.9"} 1000 + testscope_summary:s1{domain="",project="",task="",wf="",quantile="0.99"} 1000 + testscope_summary:s1_sum{domain="",project="",task="",wf=""} 1110 + testscope_summary:s1_count{domain="",project="",task="",wf=""} 3 ` err = testutil.CollectAndCompare(s.SummaryVec, strings.NewReader(header+expected)) assert.NoError(t, err) - s.Observe(contextutils.WithProjectDomain(ctx, "flyte", "prod"), 10) - + ctx = contextutils.WithProjectDomain(ctx, "project", "domain") + s.Observe(ctx, 10) expected = ` - testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.5"} 100 - testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.9"} 1000 - testscope_summary:unittest{domain="dev",lp="",project="flyte",task="",wf="",quantile="0.99"} 1000 - testscope_summary:unittest_sum{domain="dev",lp="",project="flyte",task="",wf=""} 1110 - testscope_summary:unittest_count{domain="dev",lp="",project="flyte",task="",wf=""} 3 - testscope_summary:unittest{domain="prod",lp="",project="flyte",task="",wf="",quantile="0.5"} 10 - testscope_summary:unittest{domain="prod",lp="",project="flyte",task="",wf="",quantile="0.9"} 10 - testscope_summary:unittest{domain="prod",lp="",project="flyte",task="",wf="",quantile="0.99"} 10 - testscope_summary:unittest_sum{domain="prod",lp="",project="flyte",task="",wf=""} 10 - testscope_summary:unittest_count{domain="prod",lp="",project="flyte",task="",wf=""} 1 + testscope_summary:s1{domain="",project="",task="",wf="",quantile="0.5"} 100 + testscope_summary:s1{domain="",project="",task="",wf="",quantile="0.9"} 1000 + testscope_summary:s1{domain="",project="",task="",wf="",quantile="0.99"} 1000 + testscope_summary:s1_sum{domain="",project="",task="",wf=""} 1110 + testscope_summary:s1_count{domain="",project="",task="",wf=""} 3 + testscope_summary:s1{domain="domain",project="project",task="",wf="",quantile="0.5"} 10 + testscope_summary:s1{domain="domain",project="project",task="",wf="",quantile="0.9"} 10 + testscope_summary:s1{domain="domain",project="project",task="",wf="",quantile="0.99"} 10 + testscope_summary:s1_sum{domain="domain",project="project",task="",wf=""} 10 + testscope_summary:s1_count{domain="domain",project="project",task="",wf=""} 1 ` err = testutil.CollectAndCompare(s.SummaryVec, strings.NewReader(header+expected)) assert.NoError(t, err) }) - t.Run("extra labels", func(t *testing.T) { + t.Run("Unlabeled", func(t *testing.T) { + scope := promutils.NewScope("testscope_summary") + s := NewSummary("s2", "some desc", scope, EmitUnlabeledMetric) + assert.NotNil(t, s) + + ctx := context.TODO() + const header = ` + # HELP testscope_summary:s2_unlabeled some desc + # TYPE testscope_summary:s2_unlabeled summary + ` + + s.Observe(ctx, 10) + var expected = ` + testscope_summary:s2_unlabeled{quantile="0.5"} 10 + testscope_summary:s2_unlabeled{quantile="0.9"} 10 + testscope_summary:s2_unlabeled{quantile="0.99"} 10 + testscope_summary:s2_unlabeled_sum 10 + testscope_summary:s2_unlabeled_count 1 + ` + err := testutil.CollectAndCompare(s.Summary, strings.NewReader(header+expected)) + assert.NoError(t, err) + }) + + /*t.Run("extra labels", func(t *testing.T) { scope := promutils.NewScope("testscope_summary") ctx := context.Background() - s := NewSummary("unittest2", "some desc", scope, AdditionalLabelsOption{Labels: []string{"method"}}) + s := NewSummary("s12", "some desc", scope, AdditionalLabelsOption{Labels: []string{"method"}}) assert.NotNil(t, s) methodKey := contextutils.Key("method") @@ -84,46 +105,85 @@ func TestLabeledSummary(t *testing.T) { s.Observe(context.WithValue(ctx, methodKey, "POST"), 100) const header = ` - # HELP testscope_summary:unittest2 some desc - # TYPE testscope_summary:unittest2 summary + # HELP testscope_summary:s12 some desc + # TYPE testscope_summary:s12 summary ` var expected = ` - testscope_summary:unittest2{domain="",lp="",method="GET",project="",task="",wf="",quantile="0.5"} 10 - testscope_summary:unittest2{domain="",lp="",method="GET",project="",task="",wf="",quantile="0.9"} 10 - testscope_summary:unittest2{domain="",lp="",method="GET",project="",task="",wf="",quantile="0.99"} 10 - testscope_summary:unittest2_sum{domain="",lp="",method="GET",project="",task="",wf=""} 10 - testscope_summary:unittest2_count{domain="",lp="",method="GET",project="",task="",wf=""} 1 - testscope_summary:unittest2{domain="",lp="",method="POST",project="",task="",wf="",quantile="0.5"} 100 - testscope_summary:unittest2{domain="",lp="",method="POST",project="",task="",wf="",quantile="0.9"} 100 - testscope_summary:unittest2{domain="",lp="",method="POST",project="",task="",wf="",quantile="0.99"} 100 - testscope_summary:unittest2_sum{domain="",lp="",method="POST",project="",task="",wf=""} 100 - testscope_summary:unittest2_count{domain="",lp="",method="POST",project="",task="",wf=""} 1 + testscope_summary:s12{domain="",lp="",method="GET",project="",task="",wf="",quantile="0.5"} 10 + testscope_summary:s12{domain="",lp="",method="GET",project="",task="",wf="",quantile="0.9"} 10 + testscope_summary:s12{domain="",lp="",method="GET",project="",task="",wf="",quantile="0.99"} 10 + testscope_summary:s12_sum{domain="",lp="",method="GET",project="",task="",wf=""} 10 + testscope_summary:s12_count{domain="",lp="",method="GET",project="",task="",wf=""} 1 + testscope_summary:s12{domain="",lp="",method="POST",project="",task="",wf="",quantile="0.5"} 100 + testscope_summary:s12{domain="",lp="",method="POST",project="",task="",wf="",quantile="0.9"} 100 + testscope_summary:s12{domain="",lp="",method="POST",project="",task="",wf="",quantile="0.99"} 100 + testscope_summary:s12_sum{domain="",lp="",method="POST",project="",task="",wf=""} 100 + testscope_summary:s12_count{domain="",lp="",method="POST",project="",task="",wf=""} 1 ` err := testutil.CollectAndCompare(s.SummaryVec, strings.NewReader(header+expected)) assert.NoError(t, err) - }) + })*/ - t.Run("unlabeled", func(t *testing.T) { + t.Run("AdditionalLabels", func(t *testing.T) { scope := promutils.NewScope("testscope_summary") - ctx := context.Background() - ctx = contextutils.WithProjectDomain(ctx, "flyte", "dev") - s := NewSummary("unittest3", "some desc", scope, EmitUnlabeledMetric) + opts := AdditionalLabelsOption{Labels: []string{contextutils.ProjectKey.String(), contextutils.ExecIDKey.String()}} + s := NewSummary("s3", "some desc", scope, opts) assert.NotNil(t, s) - s.Observe(ctx, 10) - + ctx := context.TODO() const header = ` - # HELP testscope_summary:unittest3_unlabeled some desc - # TYPE testscope_summary:unittest3_unlabeled summary + # HELP testscope_summary:s3 some desc + # TYPE testscope_summary:s3 summary ` + + s.Observe(ctx, 10) var expected = ` - testscope_summary:unittest3_unlabeled{quantile="0.5"} 10 - testscope_summary:unittest3_unlabeled{quantile="0.9"} 10 - testscope_summary:unittest3_unlabeled{quantile="0.99"} 10 - testscope_summary:unittest3_unlabeled_sum 10 - testscope_summary:unittest3_unlabeled_count 1 + testscope_summary:s3{domain="",exec_id="",project="",task="",wf="",quantile="0.5"} 10 + testscope_summary:s3{domain="",exec_id="",project="",task="",wf="",quantile="0.9"} 10 + testscope_summary:s3{domain="",exec_id="",project="",task="",wf="",quantile="0.99"} 10 + testscope_summary:s3_sum{domain="",exec_id="",project="",task="",wf=""} 10 + testscope_summary:s3_count{domain="",exec_id="",project="",task="",wf=""} 1 ` - err := testutil.CollectAndCompare(s.Summary, strings.NewReader(header+expected)) + err := testutil.CollectAndCompare(s.SummaryVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + ctx = contextutils.WithProjectDomain(ctx, "project", "domain") + s.Observe(ctx, 10) + expected = ` + testscope_summary:s3{domain="",exec_id="",project="",task="",wf="",quantile="0.5"} 10 + testscope_summary:s3{domain="",exec_id="",project="",task="",wf="",quantile="0.9"} 10 + testscope_summary:s3{domain="",exec_id="",project="",task="",wf="",quantile="0.99"} 10 + testscope_summary:s3_sum{domain="",exec_id="",project="",task="",wf=""} 10 + testscope_summary:s3_count{domain="",exec_id="",project="",task="",wf=""} 1 + testscope_summary:s3{domain="domain",exec_id="",project="project",task="",wf="",quantile="0.5"} 10 + testscope_summary:s3{domain="domain",exec_id="",project="project",task="",wf="",quantile="0.9"} 10 + testscope_summary:s3{domain="domain",exec_id="",project="project",task="",wf="",quantile="0.99"} 10 + testscope_summary:s3_sum{domain="domain",exec_id="",project="project",task="",wf=""} 10 + testscope_summary:s3_count{domain="domain",exec_id="",project="project",task="",wf=""} 1 + ` + err = testutil.CollectAndCompare(s.SummaryVec, strings.NewReader(header+expected)) + assert.NoError(t, err) + + ctx = contextutils.WithExecutionID(ctx, "exec_id") + s.Observe(ctx, 10) + expected = ` + testscope_summary:s3{domain="",exec_id="",project="",task="",wf="",quantile="0.5"} 10 + testscope_summary:s3{domain="",exec_id="",project="",task="",wf="",quantile="0.9"} 10 + testscope_summary:s3{domain="",exec_id="",project="",task="",wf="",quantile="0.99"} 10 + testscope_summary:s3_sum{domain="",exec_id="",project="",task="",wf=""} 10 + testscope_summary:s3_count{domain="",exec_id="",project="",task="",wf=""} 1 + testscope_summary:s3{domain="domain",exec_id="",project="project",task="",wf="",quantile="0.5"} 10 + testscope_summary:s3{domain="domain",exec_id="",project="project",task="",wf="",quantile="0.9"} 10 + testscope_summary:s3{domain="domain",exec_id="",project="project",task="",wf="",quantile="0.99"} 10 + testscope_summary:s3_sum{domain="domain",exec_id="",project="project",task="",wf=""} 10 + testscope_summary:s3_count{domain="domain",exec_id="",project="project",task="",wf=""} 1 + testscope_summary:s3{domain="domain",exec_id="exec_id",project="project",task="",wf="",quantile="0.5"} 10 + testscope_summary:s3{domain="domain",exec_id="exec_id",project="project",task="",wf="",quantile="0.9"} 10 + testscope_summary:s3{domain="domain",exec_id="exec_id",project="project",task="",wf="",quantile="0.99"} 10 + testscope_summary:s3_sum{domain="domain",exec_id="exec_id",project="project",task="",wf=""} 10 + testscope_summary:s3_count{domain="domain",exec_id="exec_id",project="project",task="",wf=""} 1 + ` + err = testutil.CollectAndCompare(s.SummaryVec, strings.NewReader(header+expected)) assert.NoError(t, err) }) } From 62c128ff097a61438b179b651efda99dc8cfe63a Mon Sep 17 00:00:00 2001 From: Sean Lin Date: Fri, 8 Jul 2022 10:54:36 -0700 Subject: [PATCH 173/191] Upgrade dependencies (#122) Signed-off-by: Sean Lin --- flytestdlib/go.mod | 86 ++++--- flytestdlib/go.sum | 629 ++++++++++++++++++++++++--------------------- 2 files changed, 378 insertions(+), 337 deletions(-) diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index bedadd049d..27717b3ee0 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -3,30 +3,30 @@ module github.com/flyteorg/flytestdlib go 1.17 require ( - github.com/aws/aws-sdk-go v1.37.1 + github.com/aws/aws-sdk-go v1.43.37 github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 github.com/coocood/freecache v1.1.1 github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 - github.com/fatih/color v1.10.0 + github.com/fatih/color v1.13.0 github.com/fatih/structtag v1.2.0 - github.com/flyteorg/stow v0.3.3 - github.com/fsnotify/fsnotify v1.4.9 + github.com/flyteorg/stow v0.3.4 + github.com/fsnotify/fsnotify v1.5.1 github.com/ghodss/yaml v1.0.0 github.com/go-test/deep v1.0.7 - github.com/golang/protobuf v1.4.3 + github.com/golang/protobuf v1.5.2 github.com/hashicorp/golang-lru v0.5.4 - github.com/magiconair/properties v1.8.4 - github.com/mitchellh/mapstructure v1.4.1 + github.com/magiconair/properties v1.8.6 + github.com/mitchellh/mapstructure v1.4.3 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.9.0 + github.com/prometheus/client_golang v1.12.1 github.com/sirupsen/logrus v1.7.0 - github.com/spf13/cobra v1.1.1 + github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.7.1 - github.com/stretchr/testify v1.7.0 + github.com/spf13/viper v1.11.0 + github.com/stretchr/testify v1.7.1 golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 golang.org/x/tools v0.1.10 - google.golang.org/protobuf v1.25.0 + google.golang.org/protobuf v1.28.0 gorm.io/gorm v1.22.4 k8s.io/api v0.20.2 k8s.io/apimachinery v0.20.2 @@ -34,65 +34,67 @@ require ( ) require ( - cloud.google.com/go v0.75.0 // indirect - cloud.google.com/go/storage v1.12.0 // indirect + cloud.google.com/go v0.100.2 // indirect + cloud.google.com/go/compute v1.5.0 // indirect + cloud.google.com/go/iam v0.3.0 // indirect + cloud.google.com/go/storage v1.14.0 // indirect github.com/Azure/azure-sdk-for-go v62.3.0+incompatible // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.17 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect + github.com/Azure/go-autorest/autorest v0.11.25 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.18 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/logger v0.2.0 // indirect + github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect github.com/go-logr/logr v0.4.0 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang-jwt/jwt/v4 v4.2.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/googleapis/gax-go/v2 v2.3.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/json-iterator/go v1.1.10 // indirect - github.com/jstemmer/go-junit-report v0.9.1 // indirect - github.com/mattn/go-colorable v0.1.8 // indirect - github.com/mattn/go-isatty v0.0.12 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/ncw/swift v1.0.53 // indirect - github.com/pelletier/go-toml v1.8.1 // indirect + github.com/pelletier/go-toml v1.9.4 // indirect + github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.15.0 // indirect - github.com/prometheus/procfs v0.3.0 // indirect - github.com/spf13/afero v1.5.1 // indirect - github.com/spf13/cast v1.3.1 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/cast v1.4.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/stretchr/objx v0.3.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect - go.opencensus.io v0.22.6 // indirect - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect - golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect - golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 // indirect - golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect + golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect + golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect + golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - google.golang.org/api v0.38.0 // indirect + golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect + google.golang.org/api v0.74.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 // indirect - google.golang.org/grpc v1.35.0 // indirect + google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac // indirect + google.golang.org/grpc v1.45.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.62.0 // indirect + gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/klog/v2 v2.5.0 // indirect diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index c160604dd4..e168e3745a 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -3,6 +3,7 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -13,20 +14,37 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV 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.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0Ko= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0 h1:XgtDnVJRCPEUG21gjFiRPz4zI1Mjg16R+NYQjfmU4XY= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2 h1:t9Iw5QH5v4XtlEQaCtUY7x6sCABps8sW0acw7e2WQ6Y= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0 h1:b1zWmYuuHz7gO9kDcM/EpHGr06UgsYNRpNJzI2kFiLM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= 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.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -36,8 +54,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lUX4= -cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= +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/Azure/azure-sdk-for-go v62.3.0+incompatible h1:Ctfsn9UoA/BB4HMYQlbPPgNXdX0tZ4tmb85+KFb2+RE= github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= @@ -49,59 +67,47 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= -github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest v0.11.25 h1:yp+V8DGur2aIUE87ebP8twPLz6k68jtJTlg61mEoByA= +github.com/Azure/go-autorest/autorest v0.11.25/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= -github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/adal v0.9.18 h1:kLnPsRjzZZUF3K5REu/Kc+qMQrvuza2bwSnNdhmzLfQ= +github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= +github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= -github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/aws/aws-sdk-go v1.43.37 h1:kyZ7UjaPZaCik+asF33UFOOYSwr9liDRr/UM/vuw8yY= +github.com/aws/aws-sdk-go v1.43.37/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 h1:VRtJdDi2lqc3MFwmouppm2jlm6icF+7H3WYKpLENMTo= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -109,80 +115,69 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -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= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/stow v0.3.3 h1:tzeNl8mSZFL3oJDi0ACZj6FAineQAF4qyEp6bXtIdQY= -github.com/flyteorg/stow v0.3.3/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= +github.com/flyteorg/stow v0.3.4 h1:gJVz1LCcEQ5ESWoedRxKh4uUv/V/c1eYLVAQVy07PPY= +github.com/flyteorg/stow v0.3.4/go.mod h1:2T2f6KaIWoWCLgI6EFZQgjb83Vg5SolmBwc2O06WQU4= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -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= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -191,7 +186,7 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= @@ -206,26 +201,25 @@ github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL9 github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= +github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -233,6 +227,8 @@ 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/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -246,9 +242,12 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -260,16 +259,20 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.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= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -277,48 +280,49 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-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/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= 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.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0 h1:nRJtk3y8Fm770D42QV6T90ZnvFZyk7agSo3Q+Z9p3WI= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -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/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= @@ -326,17 +330,16 @@ github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uG github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= 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= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.3 h1:PlHq1bSCSZL9K0wUhbm2pGLoTWs2GwVhsP6emvGV/ZI= github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= @@ -345,21 +348,17 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -373,178 +372,128 @@ github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= -github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= 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= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -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/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -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= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= 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/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= -github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= +github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.0-beta.8 h1:dy81yyLYJDwMTifq24Oi/IslOslRrDSb3jwDggjz3Z0= +github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -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= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= 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/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= -github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= 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/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 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/prometheus/procfs v0.3.0 h1:Uehi/mxLK0eiUc0H0++5tpMGTexB8wZ598MIgU8VpDM= -github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.5.1 h1:VHu76Lk0LSP1x254maIu2bplkWpfBWI+B+6fdoZprcg= -github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= +github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -555,54 +504,48 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/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/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.2/go.mod h1:2D7ZejHVMIfog1221iLSYlQRzrtECw3kz4I4VAQm3qI= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok= -go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/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= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -625,8 +568,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -636,17 +579,15 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -657,8 +598,8 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -673,18 +614,28 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/ 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-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5 h1:bRb386wvrE+oBNdF1d/Xh9mQrfQ4ecYhW5qJ5GvTGT4= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -693,8 +644,19 @@ golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 h1:55H5j7lotzuFCEOKDsMch+fRNUQ9DgtyHOUP31FNqKc= -golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -710,11 +672,9 @@ golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -724,17 +684,19 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -748,37 +710,65 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w 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-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/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-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/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= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -786,7 +776,6 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -795,11 +784,9 @@ golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -807,7 +794,6 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -827,24 +813,27 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200828161849-5deb26317202/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20200915173823-2db8f0ff891c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20200918232735-d647fc253266/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-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -861,14 +850,28 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M 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.31.0/go.mod h1:CL+9IBCa2WWU6gRuBWaKqGWLFFwbEUXkfeMkHLQWYWo= -google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= 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/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0 h1:ExR2D+5TYIrMphWgs5JCgwRhEDlPDXXrLwHHMgPHTXE= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= 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= @@ -881,7 +884,6 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -900,32 +902,60 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200831141814-d751682dd103/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200914193844-75d14daec038/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200921151605-7abf4a1a14d5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 h1:uLBY0yHDCj2PMQ98KWDSIDFwn9zK2zh+tgWtbvPPBjI= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +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-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -935,11 +965,23 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji 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.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -949,30 +991,29 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/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/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= -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/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -984,7 +1025,6 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/gorm v1.22.4 h1:8aPcyEJhY0MAt8aY6Dc524Pn+pO29K+ydu+e/cXSpQM= gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk= -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= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1016,4 +1056,3 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From cb612292f88f1d84a13ebaa0788d81dd3b175e82 Mon Sep 17 00:00:00 2001 From: Iaroslav Ciupin Date: Tue, 16 Aug 2022 19:55:17 +0300 Subject: [PATCH 174/191] Extract out data store metrics for re-usability (#138) * Extract out data store metrics for re-usability and add RefreshConfig method to DataStore * Add some tests to improve coverage --- flytestdlib/storage/cached_rawstore.go | 34 +++++------ flytestdlib/storage/cached_rawstore_test.go | 35 ++++------- flytestdlib/storage/copy_impl.go | 14 ++--- flytestdlib/storage/copy_impl_test.go | 14 ++--- flytestdlib/storage/init_test.go | 15 +++++ flytestdlib/storage/mem_store.go | 6 +- flytestdlib/storage/mem_store_test.go | 17 ++---- flytestdlib/storage/protobuf_store.go | 33 ++++++----- flytestdlib/storage/protobuf_store_test.go | 25 ++++++-- flytestdlib/storage/rawstores.go | 65 +++++++++++++++------ flytestdlib/storage/storage.go | 1 + flytestdlib/storage/stow_store.go | 51 ++++++++-------- flytestdlib/storage/stow_store_test.go | 65 +++++++-------------- 13 files changed, 194 insertions(+), 181 deletions(-) create mode 100644 flytestdlib/storage/init_test.go diff --git a/flytestdlib/storage/cached_rawstore.go b/flytestdlib/storage/cached_rawstore.go index f42f01fd50..71f8d66831 100644 --- a/flytestdlib/storage/cached_rawstore.go +++ b/flytestdlib/storage/cached_rawstore.go @@ -9,13 +9,12 @@ import ( "github.com/flyteorg/flytestdlib/errors" + "github.com/coocood/freecache" "github.com/prometheus/client_golang/prometheus" - "github.com/flyteorg/flytestdlib/promutils" - - "github.com/coocood/freecache" "github.com/flyteorg/flytestdlib/ioutils" "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/promutils" ) const neverExpire = 0 @@ -31,7 +30,6 @@ type cacheMetrics struct { type cachedRawStore struct { RawStore cache *freecache.Cache - scope promutils.Scope metrics *cacheMetrics } @@ -102,24 +100,26 @@ func (s *cachedRawStore) WriteRaw(ctx context.Context, reference DataReference, return err } +func newCacheMetrics(scope promutils.Scope) *cacheMetrics { + return &cacheMetrics{ + FetchLatency: scope.MustNewStopWatch("remote_fetch", "Total Time to read from remote metastore", time.Millisecond), + CacheHit: scope.MustNewCounter("cache_hit", "Number of times metadata was found in cache"), + CacheMiss: scope.MustNewCounter("cache_miss", "Number of times metadata was not found in cache and remote fetch was required"), + CacheWriteError: scope.MustNewCounter("cache_write_err", "Failed to write to cache"), + } +} + // Creates a CachedStore if Caching is enabled, otherwise returns a RawStore -func newCachedRawStore(cfg *Config, store RawStore, scope promutils.Scope) RawStore { +func newCachedRawStore(cfg *Config, store RawStore, metrics *cacheMetrics) RawStore { if cfg.Cache.MaxSizeMegabytes > 0 { - c := &cachedRawStore{ - RawStore: store, - cache: freecache.NewCache(cfg.Cache.MaxSizeMegabytes * 1024 * 1024), - scope: scope, - metrics: &cacheMetrics{ - FetchLatency: scope.MustNewStopWatch("remote_fetch", "Total Time to read from remote metastore", time.Millisecond), - CacheHit: scope.MustNewCounter("cache_hit", "Number of times metadata was found in cache"), - CacheMiss: scope.MustNewCounter("cache_miss", "Number of times metadata was not found in cache and remote fetch was required"), - CacheWriteError: scope.MustNewCounter("cache_write_err", "Failed to write to cache"), - }, - } if cfg.Cache.TargetGCPercent > 0 { debug.SetGCPercent(cfg.Cache.TargetGCPercent) } - return c + return &cachedRawStore{ + RawStore: store, + cache: freecache.NewCache(cfg.Cache.MaxSizeMegabytes * 1024 * 1024), + metrics: metrics, + } } return store } diff --git a/flytestdlib/storage/cached_rawstore_test.go b/flytestdlib/storage/cached_rawstore_test.go index 28372525ea..50a03cbae4 100644 --- a/flytestdlib/storage/cached_rawstore_test.go +++ b/flytestdlib/storage/cached_rawstore_test.go @@ -10,57 +10,44 @@ import ( "runtime/debug" "testing" - "github.com/flyteorg/flytestdlib/contextutils" - "github.com/flyteorg/flytestdlib/promutils/labeled" - - "github.com/flyteorg/flytestdlib/promutils" + "github.com/stretchr/testify/assert" "github.com/flyteorg/flytestdlib/ioutils" - "github.com/stretchr/testify/assert" ) func TestNewCachedStore(t *testing.T) { - resetMetricKeys() - t.Run("CachingDisabled", func(t *testing.T) { - testScope := promutils.NewTestScope() cfg := &Config{} - assert.Nil(t, newCachedRawStore(cfg, nil, testScope)) - store, err := NewInMemoryRawStore(cfg, testScope) + assert.Nil(t, newCachedRawStore(cfg, nil, metrics.cacheMetrics)) + store, err := NewInMemoryRawStore(cfg, metrics) assert.NoError(t, err) - assert.Equal(t, store, newCachedRawStore(cfg, store, testScope)) + assert.Equal(t, store, newCachedRawStore(cfg, store, metrics.cacheMetrics)) }) t.Run("CachingEnabled", func(t *testing.T) { - testScope := promutils.NewTestScope() cfg := &Config{ Cache: CachingConfig{ MaxSizeMegabytes: 1, TargetGCPercent: 20, }, } - store, err := NewInMemoryRawStore(cfg, testScope) + store, err := NewInMemoryRawStore(cfg, metrics) assert.NoError(t, err) - cStore := newCachedRawStore(cfg, store, testScope) + cStore := newCachedRawStore(cfg, store, metrics.cacheMetrics) assert.Equal(t, 20, debug.SetGCPercent(100)) assert.NotNil(t, cStore) assert.NotNil(t, cStore.(*cachedRawStore).cache) }) } -func resetMetricKeys() { - labeled.UnsetMetricKeys() - labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) -} - -func dummyCacheStore(t *testing.T, store RawStore, scope promutils.Scope) *cachedRawStore { +func dummyCacheStore(t *testing.T, store RawStore, metrics *cacheMetrics) *cachedRawStore { cfg := &Config{ Cache: CachingConfig{ MaxSizeMegabytes: 1, TargetGCPercent: 20, }, } - cStore := newCachedRawStore(cfg, store, scope) + cStore := newCachedRawStore(cfg, store, metrics) assert.NotNil(t, cStore) return cStore.(*cachedRawStore) } @@ -94,7 +81,6 @@ func (d *dummyStore) WriteRaw(ctx context.Context, reference DataReference, size } func TestCachedRawStore(t *testing.T) { - resetMetricKeys() ctx := context.TODO() k1 := DataReference("k1") k2 := DataReference("k2") @@ -145,11 +131,10 @@ func TestCachedRawStore(t *testing.T) { return nil, fmt.Errorf("err") }, } - testScope := promutils.NewTestScope() - store.copyImpl = newCopyImpl(store, testScope.NewSubScope("copy")) + store.copyImpl = newCopyImpl(store, metrics.copyMetrics) - cStore := dummyCacheStore(t, store, testScope.NewSubScope("x")) + cStore := dummyCacheStore(t, store, metrics.cacheMetrics) t.Run("HeadExists", func(t *testing.T) { m, err := cStore.Head(ctx, k1) diff --git a/flytestdlib/storage/copy_impl.go b/flytestdlib/storage/copy_impl.go index 3b32905ebd..5b0bc3253d 100644 --- a/flytestdlib/storage/copy_impl.go +++ b/flytestdlib/storage/copy_impl.go @@ -6,18 +6,18 @@ import ( "io" "time" - "github.com/flyteorg/flytestdlib/logger" + errs "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/flyteorg/flytestdlib/ioutils" + "github.com/flyteorg/flytestdlib/logger" "github.com/flyteorg/flytestdlib/promutils" "github.com/flyteorg/flytestdlib/promutils/labeled" - errs "github.com/pkg/errors" ) type copyImpl struct { rawStore RawStore - metrics copyMetrics + metrics *copyMetrics } type copyMetrics struct { @@ -64,8 +64,8 @@ func (c copyImpl) CopyRaw(ctx context.Context, source, destination DataReference return nil } -func newCopyMetrics(scope promutils.Scope) copyMetrics { - return copyMetrics{ +func newCopyMetrics(scope promutils.Scope) *copyMetrics { + return ©Metrics{ CopyLatency: labeled.NewStopWatch("overall", "Overall copy latency", time.Millisecond, scope, labeled.EmitUnlabeledMetric), ComputeLengthLatency: labeled.NewStopWatch("length", "Latency involved in computing length of content before writing.", time.Millisecond, scope, labeled.EmitUnlabeledMetric), WriteFailureUnrelatedToCache: scope.MustNewCounter("write_failure_unrelated_to_cache", "Raw store write failures that are not caused by ErrFailedToWriteCache"), @@ -73,9 +73,9 @@ func newCopyMetrics(scope promutils.Scope) copyMetrics { } } -func newCopyImpl(store RawStore, metricsScope promutils.Scope) copyImpl { +func newCopyImpl(store RawStore, metrics *copyMetrics) copyImpl { return copyImpl{ rawStore: store, - metrics: newCopyMetrics(metricsScope.NewSubScope("copy")), + metrics: metrics, } } diff --git a/flytestdlib/storage/copy_impl_test.go b/flytestdlib/storage/copy_impl_test.go index 4504327677..a31770fc0e 100644 --- a/flytestdlib/storage/copy_impl_test.go +++ b/flytestdlib/storage/copy_impl_test.go @@ -9,9 +9,9 @@ import ( "github.com/flyteorg/flytestdlib/errors" - "github.com/flyteorg/flytestdlib/ioutils" - "github.com/flyteorg/flytestdlib/promutils" "github.com/stretchr/testify/assert" + + "github.com/flyteorg/flytestdlib/ioutils" ) type notSeekerReader struct { @@ -44,7 +44,6 @@ func newNotSeekerReader(bytesCount int) *notSeekerReader { } func TestCopyRaw(t *testing.T) { - resetMetricKeys() t.Run("Called", func(t *testing.T) { readerCalled := false writerCalled := false @@ -59,7 +58,7 @@ func TestCopyRaw(t *testing.T) { }, } - copier := newCopyImpl(&store, promutils.NewTestScope()) + copier := newCopyImpl(&store, metrics.copyMetrics) assert.NoError(t, copier.CopyRaw(context.Background(), DataReference("source.pb"), DataReference("dest.pb"), Options{})) assert.True(t, readerCalled) assert.True(t, writerCalled) @@ -79,7 +78,7 @@ func TestCopyRaw(t *testing.T) { }, } - copier := newCopyImpl(&store, promutils.NewTestScope()) + copier := newCopyImpl(&store, metrics.copyMetrics) assert.NoError(t, copier.CopyRaw(context.Background(), DataReference("source.pb"), DataReference("dest.pb"), Options{})) assert.True(t, readerCalled) assert.True(t, writerCalled) @@ -87,7 +86,6 @@ func TestCopyRaw(t *testing.T) { } func TestCopyRaw_CachingErrorHandling(t *testing.T) { - resetMetricKeys() t.Run("CopyRaw with Caching Error", func(t *testing.T) { readerCalled := false writerCalled := false @@ -108,7 +106,7 @@ func TestCopyRaw_CachingErrorHandling(t *testing.T) { }, } - copier := newCopyImpl(&store, promutils.NewTestScope()) + copier := newCopyImpl(&store, metrics.copyMetrics) assert.NoError(t, copier.CopyRaw(context.Background(), DataReference("source.pb"), DataReference("dest.pb"), Options{})) assert.True(t, readerCalled) assert.True(t, writerCalled) @@ -134,7 +132,7 @@ func TestCopyRaw_CachingErrorHandling(t *testing.T) { }, } - copier := newCopyImpl(&store, promutils.NewTestScope()) + copier := newCopyImpl(&store, metrics.copyMetrics) err = copier.CopyRaw(context.Background(), DataReference("source.pb"), DataReference("dest.pb"), Options{}) assert.Error(t, err) assert.True(t, readerCalled) diff --git a/flytestdlib/storage/init_test.go b/flytestdlib/storage/init_test.go new file mode 100644 index 0000000000..b7a4e75a4d --- /dev/null +++ b/flytestdlib/storage/init_test.go @@ -0,0 +1,15 @@ +package storage + +import ( + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils/labeled" +) + +var metrics *dataStoreMetrics + +func init() { + labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) + scope := promutils.NewTestScope() + metrics = newDataStoreMetrics(scope) +} diff --git a/flytestdlib/storage/mem_store.go b/flytestdlib/storage/mem_store.go index 39e8fe61cf..956d826358 100644 --- a/flytestdlib/storage/mem_store.go +++ b/flytestdlib/storage/mem_store.go @@ -7,8 +7,6 @@ import ( "io" "io/ioutil" "os" - - "github.com/flyteorg/flytestdlib/promutils" ) type rawFile = []byte @@ -70,11 +68,11 @@ func (s *InMemoryStore) CreateSignedURL(ctx context.Context, reference DataRefer return SignedURLResponse{}, fmt.Errorf("unsupported") } -func NewInMemoryRawStore(_ *Config, scope promutils.Scope) (RawStore, error) { +func NewInMemoryRawStore(_ *Config, metrics *dataStoreMetrics) (RawStore, error) { self := &InMemoryStore{ cache: map[DataReference]rawFile{}, } - self.copyImpl = newCopyImpl(self, scope) + self.copyImpl = newCopyImpl(self, metrics.copyMetrics) return self, nil } diff --git a/flytestdlib/storage/mem_store_test.go b/flytestdlib/storage/mem_store_test.go index ad3bb84b49..131136a801 100644 --- a/flytestdlib/storage/mem_store_test.go +++ b/flytestdlib/storage/mem_store_test.go @@ -5,15 +5,12 @@ import ( "context" "testing" - "github.com/flyteorg/flytestdlib/promutils" - "github.com/stretchr/testify/assert" ) func TestInMemoryStore_Head(t *testing.T) { t.Run("Empty store", func(t *testing.T) { - testScope := promutils.NewTestScope() - s, err := NewInMemoryRawStore(&Config{}, testScope) + s, err := NewInMemoryRawStore(&Config{}, metrics) assert.NoError(t, err) metadata, err := s.Head(context.TODO(), DataReference("hello")) assert.NoError(t, err) @@ -21,8 +18,7 @@ func TestInMemoryStore_Head(t *testing.T) { }) t.Run("Existing Item", func(t *testing.T) { - testScope := promutils.NewTestScope() - s, err := NewInMemoryRawStore(&Config{}, testScope) + s, err := NewInMemoryRawStore(&Config{}, metrics) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("hello"), 0, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -35,8 +31,7 @@ func TestInMemoryStore_Head(t *testing.T) { func TestInMemoryStore_ReadRaw(t *testing.T) { t.Run("Empty store", func(t *testing.T) { - testScope := promutils.NewTestScope() - s, err := NewInMemoryRawStore(&Config{}, testScope) + s, err := NewInMemoryRawStore(&Config{}, metrics) assert.NoError(t, err) raw, err := s.ReadRaw(context.TODO(), DataReference("hello")) @@ -45,8 +40,7 @@ func TestInMemoryStore_ReadRaw(t *testing.T) { }) t.Run("Existing Item", func(t *testing.T) { - testScope := promutils.NewTestScope() - s, err := NewInMemoryRawStore(&Config{}, testScope) + s, err := NewInMemoryRawStore(&Config{}, metrics) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("hello"), 0, Options{}, bytes.NewReader([]byte{})) @@ -58,8 +52,7 @@ func TestInMemoryStore_ReadRaw(t *testing.T) { } func TestInMemoryStore_Clear(t *testing.T) { - testScope := promutils.NewTestScope() - m, err := NewInMemoryRawStore(&Config{}, testScope) + m, err := NewInMemoryRawStore(&Config{}, metrics) assert.NoError(t, err) mStore := m.(*InMemoryStore) diff --git a/flytestdlib/storage/protobuf_store.go b/flytestdlib/storage/protobuf_store.go index 58b55063b2..1eca509679 100644 --- a/flytestdlib/storage/protobuf_store.go +++ b/flytestdlib/storage/protobuf_store.go @@ -6,14 +6,13 @@ import ( "fmt" "time" - "github.com/flyteorg/flytestdlib/logger" + "github.com/golang/protobuf/proto" + errs "github.com/pkg/errors" + "github.com/prometheus/client_golang/prometheus" "github.com/flyteorg/flytestdlib/ioutils" + "github.com/flyteorg/flytestdlib/logger" "github.com/flyteorg/flytestdlib/promutils" - "github.com/prometheus/client_golang/prometheus" - - "github.com/golang/protobuf/proto" - errs "github.com/pkg/errors" ) type protoMetrics struct { @@ -81,17 +80,21 @@ func (s DefaultProtobufStore) WriteProtobuf(ctx context.Context, reference DataR return nil } -func NewDefaultProtobufStore(store RawStore, metricsScope promutils.Scope) DefaultProtobufStore { +func newProtoMetrics(scope promutils.Scope) *protoMetrics { + return &protoMetrics{ + FetchLatency: scope.MustNewStopWatch("proto_fetch", "Time to read data before unmarshalling", time.Millisecond), + MarshalTime: scope.MustNewStopWatch("marshal", "Time incurred in marshalling data before writing", time.Millisecond), + UnmarshalTime: scope.MustNewStopWatch("unmarshal", "Time incurred in unmarshalling received data", time.Millisecond), + MarshalFailure: scope.MustNewCounter("marshal_failure", "Failures when marshalling"), + UnmarshalFailure: scope.MustNewCounter("unmarshal_failure", "Failures when unmarshalling"), + WriteFailureUnrelatedToCache: scope.MustNewCounter("write_failure_unrelated_to_cache", "Raw store write failures that are not caused by ErrFailedToWriteCache"), + ReadFailureUnrelatedToCache: scope.MustNewCounter("read_failure_unrelated_to_cache", "Raw store read failures that are not caused by ErrFailedToWriteCache"), + } +} + +func NewDefaultProtobufStore(store RawStore, metrics *protoMetrics) DefaultProtobufStore { return DefaultProtobufStore{ RawStore: store, - metrics: &protoMetrics{ - FetchLatency: metricsScope.MustNewStopWatch("proto_fetch", "Time to read data before unmarshalling", time.Millisecond), - MarshalTime: metricsScope.MustNewStopWatch("marshal", "Time incurred in marshalling data before writing", time.Millisecond), - UnmarshalTime: metricsScope.MustNewStopWatch("unmarshal", "Time incurred in unmarshalling received data", time.Millisecond), - MarshalFailure: metricsScope.MustNewCounter("marshal_failure", "Failures when marshalling"), - UnmarshalFailure: metricsScope.MustNewCounter("unmarshal_failure", "Failures when unmarshalling"), - WriteFailureUnrelatedToCache: metricsScope.MustNewCounter("write_failure_unrelated_to_cache", "Raw store write failures that are not caused by ErrFailedToWriteCache"), - ReadFailureUnrelatedToCache: metricsScope.MustNewCounter("read_failure_unrelated_to_cache", "Raw store read failures that are not caused by ErrFailedToWriteCache"), - }, + metrics: metrics, } } diff --git a/flytestdlib/storage/protobuf_store_test.go b/flytestdlib/storage/protobuf_store_test.go index 0f2df567fb..ef874ac081 100644 --- a/flytestdlib/storage/protobuf_store_test.go +++ b/flytestdlib/storage/protobuf_store_test.go @@ -42,20 +42,36 @@ func (m mockBigDataProtoMessage) String() string { func (mockBigDataProtoMessage) ProtoMessage() { } -func TestDefaultProtobufStore_ReadProtobuf(t *testing.T) { +func TestDefaultProtobufStore(t *testing.T) { t.Run("Read after Write", func(t *testing.T) { testScope := promutils.NewTestScope() s, err := NewDataStore(&Config{Type: TypeMemory}, testScope) assert.NoError(t, err) - err = s.WriteProtobuf(context.TODO(), DataReference("hello"), Options{}, &mockProtoMessage{X: 5}) + err = s.WriteProtobuf(context.TODO(), "hello", Options{}, &mockProtoMessage{X: 5}) assert.NoError(t, err) m := &mockProtoMessage{} - err = s.ReadProtobuf(context.TODO(), DataReference("hello"), m) + err = s.ReadProtobuf(context.TODO(), "hello", m) assert.NoError(t, err) assert.Equal(t, int64(5), m.X) }) + + t.Run("invalid type", func(t *testing.T) { + testScope := promutils.NewTestScope() + + _, err := NewDataStore(&Config{Type: "invalid"}, testScope) + + assert.EqualError(t, err, "type is of an invalid value [invalid]") + }) + + t.Run("coudln't create store", func(t *testing.T) { + testScope := promutils.NewTestScope() + + _, err := NewDataStore(&Config{Type: TypeS3}, testScope) + + assert.EqualError(t, err, "initContainer is required even with `enable-multicontainer`") + }) } func TestDefaultProtobufStore_BigDataReadAfterWrite(t *testing.T) { @@ -107,8 +123,7 @@ func TestDefaultProtobufStore_HardErrors(t *testing.T) { return nil, fmt.Errorf(dummyReadErrorMsg) }, } - testScope := promutils.NewTestScope() - pbErroneousStore := NewDefaultProtobufStore(store, testScope) + pbErroneousStore := NewDefaultProtobufStore(store, metrics.protoMetrics) t.Run("Test if hard write errors are handled correctly", func(t *testing.T) { err := pbErroneousStore.WriteProtobuf(ctx, k1, Options{}, &mockProtoMessage{X: 5}) assert.False(t, IsFailedWriteToCache(err)) diff --git a/flytestdlib/storage/rawstores.go b/flytestdlib/storage/rawstores.go index 40624b1a55..0e163d345a 100644 --- a/flytestdlib/storage/rawstores.go +++ b/flytestdlib/storage/rawstores.go @@ -7,7 +7,7 @@ import ( "github.com/flyteorg/flytestdlib/promutils" ) -type dataStoreCreateFn func(cfg *Config, metricsScope promutils.Scope) (RawStore, error) +type dataStoreCreateFn func(cfg *Config, metrics *dataStoreMetrics) (RawStore, error) var stores = map[string]dataStoreCreateFn{ TypeMemory: NewInMemoryRawStore, @@ -54,27 +54,27 @@ func createHTTPClient(cfg HTTPClientConfig) *http.Client { return c } -// NewDataStore creates a new Data Store with the supplied config. -func NewDataStore(cfg *Config, metricsScope promutils.Scope) (s *DataStore, err error) { - defaultClient := http.DefaultClient - defer func() { - http.DefaultClient = defaultClient - }() - - http.DefaultClient = createHTTPClient(cfg.DefaultHTTPClient) - - var rawStore RawStore - if fn, found := stores[cfg.Type]; found { - rawStore, err = fn(cfg, metricsScope) - if err != nil { - return &emptyStore, err - } +type dataStoreMetrics struct { + cacheMetrics *cacheMetrics + protoMetrics *protoMetrics + copyMetrics *copyMetrics + stowMetrics *stowMetrics +} - protoStore := NewDefaultProtobufStore(newCachedRawStore(cfg, rawStore, metricsScope), metricsScope) - return NewCompositeDataStore(NewURLPathConstructor(), protoStore), nil +// newDataStoreMetrics initialises all metrics required for DataStore +func newDataStoreMetrics(scope promutils.Scope) *dataStoreMetrics { + return &dataStoreMetrics{ + cacheMetrics: newCacheMetrics(scope), + protoMetrics: newProtoMetrics(scope), + copyMetrics: newCopyMetrics(scope.NewSubScope("copy")), + stowMetrics: newStowMetrics(scope), } +} - return &emptyStore, fmt.Errorf("type is of an invalid value [%v]", cfg.Type) +// NewDataStore creates a new Data Store with the supplied config. +func NewDataStore(cfg *Config, scope promutils.Scope) (s *DataStore, err error) { + ds := &DataStore{metrics: newDataStoreMetrics(scope)} + return ds, ds.RefreshConfig(cfg) } // NewCompositeDataStore composes a new DataStore. @@ -84,3 +84,30 @@ func NewCompositeDataStore(refConstructor ReferenceConstructor, composedProtobuf ComposedProtobufStore: composedProtobufStore, } } + +// RefreshConfig re-initialises the data store client leaving metrics untouched. +// This is NOT thread-safe! +func (ds *DataStore) RefreshConfig(cfg *Config) error { + defaultClient := http.DefaultClient + defer func() { + http.DefaultClient = defaultClient + }() + + http.DefaultClient = createHTTPClient(cfg.DefaultHTTPClient) + + fn, found := stores[cfg.Type] + if !found { + return fmt.Errorf("type is of an invalid value [%v]", cfg.Type) + } + + rawStore, err := fn(cfg, ds.metrics) + if err != nil { + return err + } + + rawStore = newCachedRawStore(cfg, rawStore, ds.metrics.cacheMetrics) + protoStore := NewDefaultProtobufStore(rawStore, ds.metrics.protoMetrics) + newDS := NewCompositeDataStore(NewURLPathConstructor(), protoStore) + *ds = *newDS + return nil +} diff --git a/flytestdlib/storage/storage.go b/flytestdlib/storage/storage.go index 86c4427776..d6ccf080e0 100644 --- a/flytestdlib/storage/storage.go +++ b/flytestdlib/storage/storage.go @@ -41,6 +41,7 @@ type Metadata interface { type DataStore struct { ComposedProtobufStore ReferenceConstructor + metrics *dataStoreMetrics } // SignedURLProperties encapsulates properties about the signedURL operation. diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 6793390686..d5132d5468 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -9,25 +9,22 @@ import ( "sync" "time" - "github.com/flyteorg/flytestdlib/errors" - "github.com/aws/aws-sdk-go/aws/awserr" s32 "github.com/aws/aws-sdk-go/service/s3" + "github.com/flyteorg/stow" "github.com/flyteorg/stow/azure" "github.com/flyteorg/stow/google" "github.com/flyteorg/stow/local" "github.com/flyteorg/stow/oracle" "github.com/flyteorg/stow/s3" "github.com/flyteorg/stow/swift" + errs "github.com/pkg/errors" "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/errors" "github.com/flyteorg/flytestdlib/logger" - "github.com/flyteorg/flytestdlib/promutils/labeled" - "github.com/flyteorg/flytestdlib/promutils" - - "github.com/flyteorg/stow" - errs "github.com/pkg/errors" + "github.com/flyteorg/flytestdlib/promutils/labeled" ) const ( @@ -345,30 +342,17 @@ func (s *StowStore) getLocation(id locationID) stow.Location { } } -func NewStowRawStore(baseContainerFQN DataReference, loc, signedURLLoc stow.Location, enableDynamicContainerLoading bool, metricsScope promutils.Scope) (*StowStore, error) { - failureTypeOption := labeled.AdditionalLabelsOption{Labels: []string{FailureTypeLabel.String()}} +func NewStowRawStore(baseContainerFQN DataReference, loc, signedURLLoc stow.Location, enableDynamicContainerLoading bool, metrics *dataStoreMetrics) (*StowStore, error) { self := &StowStore{ loc: loc, signedURLLoc: signedURLLoc, baseContainerFQN: baseContainerFQN, enableDynamicContainerLoading: enableDynamicContainerLoading, dynamicContainerMap: sync.Map{}, - metrics: &stowMetrics{ - BadReference: labeled.NewCounter("bad_key", "Indicates the provided storage reference/key is incorrectly formatted", metricsScope, labeled.EmitUnlabeledMetric), - BadContainer: labeled.NewCounter("bad_container", "Indicates request for a container that has not been initialized", metricsScope, labeled.EmitUnlabeledMetric), - - HeadFailure: labeled.NewCounter("head_failure", "Indicates failure in HEAD for a given reference", metricsScope, labeled.EmitUnlabeledMetric), - HeadLatency: labeled.NewStopWatch("head", "Indicates time to fetch metadata using the Head API", time.Millisecond, metricsScope, labeled.EmitUnlabeledMetric), - - ReadFailure: labeled.NewCounter("read_failure", "Indicates failure in GET for a given reference", metricsScope, labeled.EmitUnlabeledMetric, failureTypeOption), - ReadOpenLatency: labeled.NewStopWatch("read_open", "Indicates time to first byte when reading", time.Millisecond, metricsScope, labeled.EmitUnlabeledMetric), - - WriteFailure: labeled.NewCounter("write_failure", "Indicates failure in storing/PUT for a given reference", metricsScope, labeled.EmitUnlabeledMetric, failureTypeOption), - WriteLatency: labeled.NewStopWatch("write", "Time to write an object irrespective of size", time.Millisecond, metricsScope, labeled.EmitUnlabeledMetric), - }, + metrics: metrics.stowMetrics, } - self.copyImpl = newCopyImpl(self, metricsScope) + self.copyImpl = newCopyImpl(self, metrics.copyMetrics) _, c, _, err := baseContainerFQN.Split() if err != nil { return nil, err @@ -381,8 +365,25 @@ func NewStowRawStore(baseContainerFQN DataReference, loc, signedURLLoc stow.Loca return self, nil } +func newStowMetrics(scope promutils.Scope) *stowMetrics { + failureTypeOption := labeled.AdditionalLabelsOption{Labels: []string{FailureTypeLabel.String()}} + return &stowMetrics{ + BadReference: labeled.NewCounter("bad_key", "Indicates the provided storage reference/key is incorrectly formatted", scope, labeled.EmitUnlabeledMetric), + BadContainer: labeled.NewCounter("bad_container", "Indicates request for a container that has not been initialized", scope, labeled.EmitUnlabeledMetric), + + HeadFailure: labeled.NewCounter("head_failure", "Indicates failure in HEAD for a given reference", scope, labeled.EmitUnlabeledMetric), + HeadLatency: labeled.NewStopWatch("head", "Indicates time to fetch metadata using the Head API", time.Millisecond, scope, labeled.EmitUnlabeledMetric), + + ReadFailure: labeled.NewCounter("read_failure", "Indicates failure in GET for a given reference", scope, labeled.EmitUnlabeledMetric, failureTypeOption), + ReadOpenLatency: labeled.NewStopWatch("read_open", "Indicates time to first byte when reading", time.Millisecond, scope, labeled.EmitUnlabeledMetric), + + WriteFailure: labeled.NewCounter("write_failure", "Indicates failure in storing/PUT for a given reference", scope, labeled.EmitUnlabeledMetric, failureTypeOption), + WriteLatency: labeled.NewStopWatch("write", "Time to write an object irrespective of size", time.Millisecond, scope, labeled.EmitUnlabeledMetric), + } +} + // Constructor for the StowRawStore -func newStowRawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error) { +func newStowRawStore(cfg *Config, metrics *dataStoreMetrics) (RawStore, error) { if cfg.InitContainer == "" { return nil, fmt.Errorf("initContainer is required even with `enable-multicontainer`") } @@ -419,7 +420,7 @@ func newStowRawStore(cfg *Config, metricsScope promutils.Scope) (RawStore, error } } - return NewStowRawStore(fn(cfg.InitContainer), loc, signedURLLoc, cfg.MultiContainerEnabled, metricsScope) + return NewStowRawStore(fn(cfg.InitContainer), loc, signedURLLoc, cfg.MultiContainerEnabled, metrics) } func legacyS3ConfigMap(cfg ConnectionConfig) stow.ConfigMap { diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index 4a446f74de..15f12707bd 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -15,7 +15,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" s32 "github.com/aws/aws-sdk-go/service/s3" - + "github.com/flyteorg/stow" "github.com/flyteorg/stow/azure" "github.com/flyteorg/stow/google" "github.com/flyteorg/stow/local" @@ -23,14 +23,11 @@ import ( "github.com/flyteorg/stow/s3" "github.com/flyteorg/stow/swift" "github.com/pkg/errors" - - "github.com/flyteorg/stow" "github.com/stretchr/testify/assert" "github.com/flyteorg/flytestdlib/config" "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/internal/utils" - "github.com/flyteorg/flytestdlib/promutils" "github.com/flyteorg/flytestdlib/promutils/labeled" ) @@ -154,11 +151,8 @@ func TestAwsBucketIsNotFound(t *testing.T) { } func TestStowStore_CreateSignedURL(t *testing.T) { - labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) - const container = "container" t.Run("Happy Path", func(t *testing.T) { - testScope := promutils.NewTestScope() fn := fQNFn["s3"] s, err := NewStowRawStore(fn(container), &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { @@ -173,7 +167,7 @@ func TestStowStore_CreateSignedURL(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, nil, false, testScope) + }, nil, false, metrics) assert.NoError(t, err) actual, err := s.CreateSignedURL(context.TODO(), DataReference("https://container/path"), SignedURLProperties{}) @@ -182,7 +176,6 @@ func TestStowStore_CreateSignedURL(t *testing.T) { }) t.Run("Invalid URL", func(t *testing.T) { - testScope := promutils.NewTestScope() fn := fQNFn["s3"] s, err := NewStowRawStore(fn(container), &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { @@ -197,7 +190,7 @@ func TestStowStore_CreateSignedURL(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, nil, false, testScope) + }, nil, false, metrics) assert.NoError(t, err) _, err = s.CreateSignedURL(context.TODO(), DataReference("://container/path"), SignedURLProperties{}) @@ -205,7 +198,6 @@ func TestStowStore_CreateSignedURL(t *testing.T) { }) t.Run("Non existing container", func(t *testing.T) { - testScope := promutils.NewTestScope() fn := fQNFn["s3"] s, err := NewStowRawStore(fn(container), &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { @@ -220,7 +212,7 @@ func TestStowStore_CreateSignedURL(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, nil, false, testScope) + }, nil, false, metrics) assert.NoError(t, err) _, err = s.CreateSignedURL(context.TODO(), DataReference("s3://container2/path"), SignedURLProperties{}) @@ -229,11 +221,8 @@ func TestStowStore_CreateSignedURL(t *testing.T) { } func TestStowStore_ReadRaw(t *testing.T) { - labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) - const container = "container" t.Run("Happy Path", func(t *testing.T) { - testScope := promutils.NewTestScope() fn := fQNFn["s3"] s, err := NewStowRawStore(fn(container), &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { @@ -248,7 +237,7 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, nil, false, testScope) + }, nil, false, metrics) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -264,7 +253,6 @@ func TestStowStore_ReadRaw(t *testing.T) { }) t.Run("Exceeds limit", func(t *testing.T) { - testScope := promutils.NewTestScope() fn := fQNFn["s3"] s, err := NewStowRawStore(fn(container), &mockStowLoc{ @@ -280,7 +268,7 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, nil, false, testScope) + }, nil, false, metrics) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 3*MiB, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -294,7 +282,6 @@ func TestStowStore_ReadRaw(t *testing.T) { }) t.Run("No Limit", func(t *testing.T) { - testScope := promutils.NewTestScope() fn := fQNFn["s3"] GetConfig().Limits.GetLimitMegabytes = 0 @@ -311,7 +298,7 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, nil, false, testScope) + }, nil, false, metrics) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 3*MiB, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -323,7 +310,6 @@ func TestStowStore_ReadRaw(t *testing.T) { }) t.Run("Happy Path multi-container enabled", func(t *testing.T) { - testScope := promutils.NewTestScope() fn := fQNFn["s3"] s, err := NewStowRawStore(fn(container), &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { @@ -340,7 +326,7 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, nil, true, testScope) + }, nil, true, metrics) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), "s3://bad-container/path", 0, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -357,7 +343,6 @@ func TestStowStore_ReadRaw(t *testing.T) { }) t.Run("Happy Path multi-container bad", func(t *testing.T) { - testScope := promutils.NewTestScope() fn := fQNFn["s3"] s, err := NewStowRawStore(fn(container), &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { @@ -372,7 +357,7 @@ func TestStowStore_ReadRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, nil, true, testScope) + }, nil, true, metrics) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), "s3://bad-container/path", 0, Options{}, bytes.NewReader([]byte{})) assert.Error(t, err) @@ -386,7 +371,6 @@ func TestStowStore_ReadRaw(t *testing.T) { func TestNewLocalStore(t *testing.T) { labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) t.Run("Valid config", func(t *testing.T) { - testScope := promutils.NewTestScope() store, err := newStowRawStore(&Config{ Stow: StowConfig{ Kind: local.Kind, @@ -395,7 +379,7 @@ func TestNewLocalStore(t *testing.T) { }, }, InitContainer: "testdata", - }, testScope.NewSubScope("x")) + }, metrics) assert.NoError(t, err) assert.NotNil(t, store) @@ -409,13 +393,11 @@ func TestNewLocalStore(t *testing.T) { }) t.Run("Invalid config", func(t *testing.T) { - testScope := promutils.NewTestScope() - _, err := newStowRawStore(&Config{}, testScope) + _, err := newStowRawStore(&Config{}, metrics) assert.Error(t, err) }) t.Run("Initialize container", func(t *testing.T) { - testScope := promutils.NewTestScope() tmpDir, err := ioutil.TempDir("", "stdlib_local") assert.NoError(t, err) @@ -431,7 +413,7 @@ func TestNewLocalStore(t *testing.T) { }, }, InitContainer: "tmp", - }, testScope.NewSubScope("y")) + }, metrics) assert.NoError(t, err) assert.NotNil(t, store) @@ -444,7 +426,6 @@ func TestNewLocalStore(t *testing.T) { }) t.Run("missing init container", func(t *testing.T) { - testScope := promutils.NewTestScope() tmpDir, err := ioutil.TempDir("", "stdlib_local") assert.NoError(t, err) @@ -459,14 +440,13 @@ func TestNewLocalStore(t *testing.T) { local.ConfigKeyPath: tmpDir, }, }, - }, testScope.NewSubScope("y")) + }, metrics) assert.Error(t, err) assert.Nil(t, store) }) t.Run("multi-container enabled", func(t *testing.T) { - testScope := promutils.NewTestScope() tmpDir, err := ioutil.TempDir("", "stdlib_local") assert.NoError(t, err) @@ -483,7 +463,7 @@ func TestNewLocalStore(t *testing.T) { }, InitContainer: "tmp", MultiContainerEnabled: true, - }, testScope.NewSubScope("y")) + }, metrics) assert.NoError(t, err) assert.NotNil(t, store) @@ -498,15 +478,14 @@ func TestNewLocalStore(t *testing.T) { func Test_newStowRawStore(t *testing.T) { type args struct { - cfg *Config - metricsScope promutils.Scope + cfg *Config } tests := []struct { name string args args wantErr bool }{ - {"fail", args{&Config{}, promutils.NewTestScope()}, true}, + {"fail", args{&Config{}}, true}, {"google", args{&Config{ InitContainer: "flyte", Stow: StowConfig{ @@ -516,18 +495,18 @@ func Test_newStowRawStore(t *testing.T) { google.ConfigScopes: "y", }, }, - }, promutils.NewTestScope()}, true}, + }}, true}, {"minio", args{&Config{ Type: TypeMinio, InitContainer: "some-container", Connection: ConnectionConfig{ Endpoint: config.URL{URL: utils.MustParseURL("http://minio:9000")}, }, - }, promutils.NewTestScope()}, true}, + }}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := newStowRawStore(tt.args.cfg, tt.args.metricsScope) + got, err := newStowRawStore(tt.args.cfg, metrics) if tt.wantErr { assert.Error(t, err, "newStowRawStore() error = %v, wantErr %v", err, tt.wantErr) return @@ -598,7 +577,6 @@ func TestStowStore_WriteRaw(t *testing.T) { const container = "container" fn := fQNFn["s3"] t.Run("create container when not found", func(t *testing.T) { - testScope := promutils.NewTestScope() var createCalled bool s, err := NewStowRawStore(fn(container), &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { @@ -618,7 +596,7 @@ func TestStowStore_WriteRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, nil, true, testScope) + }, nil, true, metrics) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -634,7 +612,6 @@ func TestStowStore_WriteRaw(t *testing.T) { assert.True(t, containerStoredInDynamicContainerMap) }) t.Run("bubble up generic put errors", func(t *testing.T) { - testScope := promutils.NewTestScope() s, err := NewStowRawStore(fn(container), &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { if id == container { @@ -646,7 +623,7 @@ func TestStowStore_WriteRaw(t *testing.T) { } return nil, fmt.Errorf("container is not supported") }, - }, nil, true, testScope) + }, nil, true, metrics) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) assert.EqualError(t, err, "Failed to write data [0b] to path [path].: foo") From d8e104c122b9335ec00344549be44d73c319d32b Mon Sep 17 00:00:00 2001 From: Iaroslav Ciupin Date: Tue, 16 Aug 2022 22:11:50 +0300 Subject: [PATCH 175/191] Fix RefreshConfig (#139) * Fix RefreshConfig * RefreshConfig unit test Signed-off-by: iaroslav-ciupin --- flytestdlib/storage/protobuf_store_test.go | 38 ++++++++++++++++++++-- flytestdlib/storage/rawstores.go | 1 + 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/flytestdlib/storage/protobuf_store_test.go b/flytestdlib/storage/protobuf_store_test.go index ef874ac081..d662ef536f 100644 --- a/flytestdlib/storage/protobuf_store_test.go +++ b/flytestdlib/storage/protobuf_store_test.go @@ -5,13 +5,17 @@ import ( "fmt" "io" "math/rand" + "net/http" + "net/http/httptest" "testing" - "github.com/flyteorg/flytestdlib/promutils" - + "github.com/flyteorg/stow/s3" "github.com/golang/protobuf/proto" errs "github.com/pkg/errors" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/flyteorg/flytestdlib/promutils" ) type mockProtoMessage struct { @@ -57,6 +61,36 @@ func TestDefaultProtobufStore(t *testing.T) { assert.Equal(t, int64(5), m.X) }) + t.Run("RefreshConfig", func(t *testing.T) { + testScope := promutils.NewTestScope() + s, err := NewDataStore(&Config{Type: TypeMemory}, testScope) + require.NoError(t, err) + require.IsType(t, DefaultProtobufStore{}, s.ComposedProtobufStore) + require.IsType(t, &InMemoryStore{}, s.ComposedProtobufStore.(DefaultProtobufStore).RawStore) + + oldMetrics := s.metrics + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + })) + defer server.Close() + + err = s.RefreshConfig(&Config{ + Type: TypeMinio, + Stow: StowConfig{ + Kind: TypeS3, + Config: map[string]string{ + s3.ConfigAccessKeyID: "key", + s3.ConfigSecretKey: "sec", + s3.ConfigEndpoint: server.URL, + }}, + InitContainer: "b"}) + + assert.NoError(t, err) + require.IsType(t, DefaultProtobufStore{}, s.ComposedProtobufStore) + assert.IsType(t, &StowStore{}, s.ComposedProtobufStore.(DefaultProtobufStore).RawStore) + assert.Equal(t, oldMetrics, s.metrics) + }) + t.Run("invalid type", func(t *testing.T) { testScope := promutils.NewTestScope() diff --git a/flytestdlib/storage/rawstores.go b/flytestdlib/storage/rawstores.go index 0e163d345a..f99cd8e3d3 100644 --- a/flytestdlib/storage/rawstores.go +++ b/flytestdlib/storage/rawstores.go @@ -108,6 +108,7 @@ func (ds *DataStore) RefreshConfig(cfg *Config) error { rawStore = newCachedRawStore(cfg, rawStore, ds.metrics.cacheMetrics) protoStore := NewDefaultProtobufStore(rawStore, ds.metrics.protoMetrics) newDS := NewCompositeDataStore(NewURLPathConstructor(), protoStore) + newDS.metrics = ds.metrics *ds = *newDS return nil } From 093f4234d7010140b4a6a611bb495113012cf872 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Tue, 30 Aug 2022 15:13:33 -0700 Subject: [PATCH 176/191] Upgrade go dependencies (#133) * Update stow version Signed-off-by: Haytham Abuelfutuh * run unit tests on go 1.18 Signed-off-by: Haytham Abuelfutuh * Reset changes and only update stow Signed-off-by: Haytham Abuelfutuh * Remove file-move-based change since fsnotify nolonger supports it Signed-off-by: Haytham Abuelfutuh * Move to go 1.18 in gh wf Signed-off-by: Haytham Abuelfutuh * use common lint wf Signed-off-by: Haytham Abuelfutuh * install golangci-lang through curl Signed-off-by: Haytham Abuelfutuh * move to go bin path Signed-off-by: Haytham Abuelfutuh * fix lint Signed-off-by: Haytham Abuelfutuh * use go 1.18 Signed-off-by: Haytham Abuelfutuh * another try Signed-off-by: Haytham Abuelfutuh * Move problematic comments to Example() blocks Signed-off-by: Haytham Abuelfutuh * more Signed-off-by: Haytham Abuelfutuh * wip Signed-off-by: Haytham Abuelfutuh * fix lint issues Signed-off-by: Haytham Abuelfutuh Signed-off-by: Haytham Abuelfutuh --- .../.github/workflows/pull_request.yml | 16 +- .../flyte/golang_support_tools/go.mod | 293 ++-- .../flyte/golang_support_tools/go.sum | 1259 +++++++++-------- .../golang_test_targets/download_tooling.sh | 3 +- flytestdlib/cache/auto_refresh.go | 29 +- flytestdlib/cli/pflags/api/tag.go | 6 +- flytestdlib/config/tests/accessor_test.go | 57 +- flytestdlib/futures/future.go | 9 +- flytestdlib/futures/future_test.go | 12 + flytestdlib/go.mod | 42 +- flytestdlib/go.sum | 200 +-- flytestdlib/pbhash/pbhash.go | 6 +- flytestdlib/profutils/server.go | 9 +- .../promutils/labeled/metric_option_test.go | 6 +- flytestdlib/promutils/labeled/stopwatch.go | 6 - .../promutils/labeled/stopwatch_test.go | 12 + flytestdlib/promutils/scope.go | 5 - flytestdlib/promutils/scope_test.go | 13 + flytestdlib/storage/copy_impl.go | 4 +- flytestdlib/utils/auto_refresh_cache.go | 21 +- flytestdlib/utils/prototest/test_type.pb.go | 5 +- 21 files changed, 1006 insertions(+), 1007 deletions(-) diff --git a/flytestdlib/.github/workflows/pull_request.yml b/flytestdlib/.github/workflows/pull_request.yml index 7f83394a00..fbc7b27ccf 100644 --- a/flytestdlib/.github/workflows/pull_request.yml +++ b/flytestdlib/.github/workflows/pull_request.yml @@ -4,7 +4,7 @@ on: pull_request jobs: tests-lint: - name: Run tests and lint + name: Run tests runs-on: ubuntu-latest steps: - name: Checkout @@ -13,7 +13,7 @@ jobs: fetch-depth: "0" - uses: actions/setup-go@v2 with: - go-version: '1.17' + go-version: '1.18' - name: Unit Tests run: make mod_download && make test_unit_codecov - name: Push CodeCov @@ -22,13 +22,13 @@ jobs: file: coverage.txt flags: unittests fail_ci_if_error: true - - uses: actions/setup-go@v2 - with: - go-version: '1.17' - - name: Lint - run: make install && make lint - name: Bench tests run: make install && make test_benchmark + lint: + name: Lint + uses: flyteorg/flytetools/.github/workflows/lint.yml@master + with: + go-version: '1.18' test-generate-integrity: name: Ensure go generate has run runs-on: ubuntu-latest @@ -39,7 +39,7 @@ jobs: fetch-depth: "0" - uses: actions/setup-go@v2 with: - go-version: '1.17' + go-version: '1.18' - name: Go generate and diff run: DELTA_CHECK=true make generate diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod index 892b682185..1912aff6a7 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod @@ -1,191 +1,236 @@ module github.com/flyteorg/boilerplate -go 1.17 +go 1.18 require ( github.com/alvaroloes/enumer v1.1.2 - github.com/flyteorg/flytestdlib v0.4.7 - github.com/golangci/golangci-lint v1.38.0 + github.com/flyteorg/flytestdlib v1.0.7 + github.com/golangci/golangci-lint v1.49.0 github.com/pseudomuto/protoc-gen-doc v1.4.1 github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 ) require ( - 4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a // indirect - cloud.google.com/go v0.75.0 // indirect - cloud.google.com/go/storage v1.12.0 // indirect - github.com/Azure/azure-sdk-for-go v62.3.0+incompatible // indirect + 4d63.com/gochecknoglobals v0.1.0 // indirect + cloud.google.com/go v0.104.0 // indirect + cloud.google.com/go/compute v1.9.0 // indirect + cloud.google.com/go/iam v0.3.0 // indirect + cloud.google.com/go/storage v1.26.0 // indirect + github.com/Antonboom/errname v0.1.7 // indirect + github.com/Antonboom/nilnil v0.1.1 // indirect + github.com/Azure/azure-sdk-for-go v66.0.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.17 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect + github.com/Azure/go-autorest/autorest v0.11.28 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.21 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/logger v0.2.0 // indirect + github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/BurntSushi/toml v0.3.1 // indirect + github.com/BurntSushi/toml v1.2.0 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect + github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver v1.5.0 // indirect - github.com/Masterminds/sprig v2.15.0+incompatible // indirect - github.com/OpenPeeDeeP/depguard v1.0.1 // indirect + github.com/Masterminds/sprig v2.22.0+incompatible // indirect + github.com/OpenPeeDeeP/depguard v1.1.0 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect - github.com/aokoli/goutils v1.0.1 // indirect - github.com/ashanbrown/forbidigo v1.1.0 // indirect - github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a // indirect - github.com/aws/aws-sdk-go v1.37.1 // indirect + github.com/alingse/asasalint v0.0.11 // indirect + github.com/ashanbrown/forbidigo v1.3.0 // indirect + github.com/ashanbrown/makezero v1.1.1 // indirect + github.com/aws/aws-sdk-go v1.44.87 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bkielbasa/cyclop v1.2.0 // indirect - github.com/bombsimon/wsl/v3 v3.2.0 // indirect - github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect - github.com/charithe/durationcheck v0.0.6 // indirect - github.com/coocood/freecache v1.1.1 // indirect - github.com/daixiang0/gci v0.2.8 // indirect + github.com/blizzy78/varnamelen v0.8.0 // indirect + github.com/bombsimon/wsl/v3 v3.3.0 // indirect + github.com/breml/bidichk v0.2.3 // indirect + github.com/breml/errchkjson v0.3.0 // indirect + github.com/butuzov/ireturn v0.1.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/charithe/durationcheck v0.0.9 // indirect + github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect + github.com/coocood/freecache v1.2.2 // indirect + github.com/curioswitch/go-reassign v0.1.2 // indirect + github.com/daixiang0/gci v0.7.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/denis-tingajkin/go-header v0.4.2 // indirect - github.com/envoyproxy/protoc-gen-validate v0.3.0-java // indirect + github.com/denis-tingaikin/go-header v0.4.3 // indirect + github.com/envoyproxy/protoc-gen-validate v0.6.7 // indirect github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 // indirect - github.com/esimonov/ifshort v1.0.1 // indirect - github.com/fatih/color v1.10.0 // indirect + github.com/esimonov/ifshort v1.0.4 // indirect + github.com/ettle/strcase v0.1.1 // indirect + github.com/fatih/color v1.13.0 // indirect github.com/fatih/structtag v1.2.0 // indirect - github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect - github.com/fsnotify/fsnotify v1.4.9 // indirect - github.com/fzipp/gocyclo v0.3.1 // indirect + github.com/firefart/nonamedreturns v1.0.4 // indirect + github.com/flyteorg/stow v0.3.6 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/fzipp/gocyclo v0.6.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-critic/go-critic v0.5.4 // indirect - github.com/go-logr/logr v0.4.0 // indirect + github.com/go-critic/go-critic v0.6.5 // indirect + github.com/go-logr/logr v1.2.3 // indirect github.com/go-toolsmith/astcast v1.0.0 // indirect - github.com/go-toolsmith/astcopy v1.0.0 // indirect - github.com/go-toolsmith/astequal v1.0.0 // indirect + github.com/go-toolsmith/astcopy v1.0.2 // indirect + github.com/go-toolsmith/astequal v1.0.3 // indirect github.com/go-toolsmith/astfmt v1.0.0 // indirect github.com/go-toolsmith/astp v1.0.0 // indirect github.com/go-toolsmith/strparse v1.0.0 // indirect github.com/go-toolsmith/typep v1.0.2 // indirect - github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect + github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect github.com/gobwas/glob v0.2.3 // indirect - github.com/gofrs/flock v0.8.0 // indirect + github.com/gofrs/flock v0.8.1 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect - github.com/golang/protobuf v1.4.3 // indirect + github.com/golang-jwt/jwt/v4 v4.4.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect - github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 // indirect + github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect github.com/golangci/misspell v0.3.5 // indirect - github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5 // indirect + github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect - github.com/google/go-cmp v0.5.4 // indirect - github.com/google/uuid v1.1.2 // indirect - github.com/googleapis/gax-go/v2 v2.0.5 // indirect - github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254 // indirect - github.com/gostaticanalysis/analysisutil v0.4.1 // indirect - github.com/gostaticanalysis/comment v1.4.1 // indirect - github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + github.com/googleapis/gax-go/v2 v2.5.1 // indirect + github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect + github.com/gostaticanalysis/analysisutil v0.7.1 // indirect + github.com/gostaticanalysis/comment v1.4.2 // indirect + github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect github.com/gostaticanalysis/nilerr v0.1.1 // indirect - github.com/graymeta/stow v0.2.7 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/huandu/xstrings v1.0.0 // indirect - github.com/imdario/mergo v0.3.5 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/jgautheron/goconst v1.4.0 // indirect - github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d // indirect + github.com/hexops/gotextdiff v1.0.3 // indirect + github.com/huandu/xstrings v1.3.2 // indirect + github.com/imdario/mergo v0.3.13 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/jgautheron/goconst v1.5.1 // indirect + github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/jstemmer/go-junit-report v0.9.1 // indirect - github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0 // indirect - github.com/kisielk/errcheck v1.6.0 // indirect + github.com/julz/importas v0.1.0 // indirect + github.com/kisielk/errcheck v1.6.2 // indirect github.com/kisielk/gotool v1.0.0 // indirect - github.com/kulti/thelper v0.4.0 // indirect - github.com/kunwardeep/paralleltest v1.0.2 // indirect + github.com/kulti/thelper v0.6.3 // indirect + github.com/kunwardeep/paralleltest v1.0.6 // indirect github.com/kyoh86/exportloopref v0.1.8 // indirect - github.com/magefile/mage v1.10.0 // indirect - github.com/magiconair/properties v1.8.4 // indirect - github.com/maratori/testpackage v1.0.1 // indirect + github.com/ldez/gomoddirectives v0.2.3 // indirect + github.com/ldez/tagliatelle v0.3.1 // indirect + github.com/leonklingele/grouper v1.1.0 // indirect + github.com/lufeee/execinquery v1.2.1 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/maratori/testpackage v1.1.0 // indirect github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect - github.com/mattn/go-colorable v0.1.8 // indirect - github.com/mattn/go-isatty v0.0.12 // indirect - github.com/mattn/go-runewidth v0.0.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mbilski/exhaustivestruct v1.2.0 // indirect - github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81 // indirect - github.com/mgechev/revive v1.0.3 // indirect + github.com/mgechev/revive v1.2.3 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.4.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moricho/tparallel v0.2.1 // indirect - github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 // indirect - github.com/nakabonne/nestif v0.3.0 // indirect - github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88 // indirect + github.com/mwitkow/go-proto-validators v0.3.2 // indirect + github.com/nakabonne/nestif v0.3.1 // indirect + github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect github.com/ncw/swift v1.0.53 // indirect - github.com/nishanths/exhaustive v0.1.0 // indirect - github.com/nishanths/predeclared v0.2.1 // indirect - github.com/olekukonko/tablewriter v0.0.4 // indirect - github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 // indirect - github.com/pelletier/go-toml v1.8.1 // indirect + github.com/nishanths/exhaustive v0.8.1 // indirect + github.com/nishanths/predeclared v0.2.2 // indirect + github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/pascaldekloe/name v1.0.1 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f // indirect - github.com/prometheus/client_golang v1.9.0 // indirect + github.com/polyfloyd/go-errorlint v1.0.2 // indirect + github.com/prometheus/client_golang v1.13.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.15.0 // indirect - github.com/prometheus/procfs v0.3.0 // indirect - github.com/pseudomuto/protokit v0.2.0 // indirect - github.com/quasilyte/go-ruleguard v0.3.0 // indirect - github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect - github.com/ryancurrah/gomodguard v1.2.0 // indirect + github.com/prometheus/common v0.37.0 // indirect + github.com/prometheus/procfs v0.8.0 // indirect + github.com/pseudomuto/protokit v0.2.1 // indirect + github.com/quasilyte/go-ruleguard v0.3.18 // indirect + github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f // indirect + github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect + github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect + github.com/rivo/uniseg v0.3.4 // indirect + github.com/ryancurrah/gomodguard v1.2.4 // indirect github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect - github.com/sanposhiho/wastedassign v0.1.3 // indirect - github.com/securego/gosec/v2 v2.6.1 // indirect + github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect + github.com/sashamelentyev/interfacebloat v1.1.0 // indirect + github.com/sashamelentyev/usestdlibvars v1.15.1 // indirect + github.com/securego/gosec/v2 v2.13.1 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect - github.com/sirupsen/logrus v1.8.0 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect + github.com/sivchari/containedctx v1.0.2 // indirect + github.com/sivchari/nosnakecase v1.7.0 // indirect + github.com/sivchari/tenv v1.7.0 // indirect github.com/sonatard/noctx v0.0.1 // indirect github.com/sourcegraph/go-diff v0.6.1 // indirect - github.com/spf13/afero v1.5.1 // indirect - github.com/spf13/cast v1.3.1 // indirect - github.com/spf13/cobra v1.1.3 // indirect + github.com/spf13/afero v1.9.2 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.7.1 // indirect - github.com/ssgreg/nlreturn/v2 v2.1.0 // indirect - github.com/stretchr/objx v0.3.0 // indirect - github.com/stretchr/testify v1.7.0 // indirect - github.com/subosito/gotenv v1.2.0 // indirect - github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b // indirect - github.com/tetafro/godot v1.4.4 // indirect - github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94 // indirect - github.com/tomarrell/wrapcheck v0.0.0-20201130113247-1683564d9756 // indirect - github.com/tommy-muehle/go-mnd/v2 v2.3.1 // indirect + github.com/spf13/viper v1.12.0 // indirect + github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect + github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect + github.com/stretchr/objx v0.4.0 // indirect + github.com/stretchr/testify v1.8.0 // indirect + github.com/subosito/gotenv v1.4.1 // indirect + github.com/sylvia7788/contextcheck v1.0.8 // indirect + github.com/tdakkota/asciicheck v0.1.1 // indirect + github.com/tetafro/godot v1.4.11 // indirect + github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect + github.com/timonwong/logrlint v0.4.0 // indirect + github.com/tomarrell/wrapcheck/v2 v2.6.2 // indirect + github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect github.com/ultraware/funlen v0.0.3 // indirect - github.com/ultraware/whitespace v0.0.4 // indirect - github.com/uudashr/gocognit v1.0.1 // indirect - go.opencensus.io v0.22.6 // indirect - golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect - golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect - golang.org/x/mod v0.4.1 // indirect - golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect - golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 // indirect - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect - golang.org/x/text v0.3.5 // indirect - golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect - golang.org/x/tools v0.1.0 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - google.golang.org/api v0.38.0 // indirect + github.com/ultraware/whitespace v0.0.5 // indirect + github.com/uudashr/gocognit v1.0.6 // indirect + github.com/yagipy/maintidx v1.0.0 // indirect + github.com/yeya24/promlinter v0.2.0 // indirect + gitlab.com/bosi/decorder v0.2.3 // indirect + go.opencensus.io v0.23.0 // indirect + go.uber.org/atomic v1.10.0 // indirect + go.uber.org/multierr v1.8.0 // indirect + go.uber.org/zap v1.23.0 // indirect + golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect + golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect + golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 // indirect + golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect + golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b // indirect + golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 // indirect + golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde // indirect + golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect + golang.org/x/tools v0.1.12 // indirect + golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect + google.golang.org/api v0.94.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 // indirect - google.golang.org/grpc v1.35.0 // indirect - google.golang.org/protobuf v1.25.0 // indirect - gopkg.in/ini.v1 v1.62.0 // indirect + google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf // indirect + google.golang.org/grpc v1.49.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - honnef.co/go/tools v0.1.2 // indirect - k8s.io/apimachinery v0.20.2 // indirect - k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 // indirect - k8s.io/klog/v2 v2.5.0 // indirect - mvdan.cc/gofumpt v0.1.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + honnef.co/go/tools v0.3.3 // indirect + k8s.io/apimachinery v0.25.0 // indirect + k8s.io/client-go v0.25.0 // indirect + k8s.io/klog/v2 v2.70.1 // indirect + k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 // indirect + mvdan.cc/gofumpt v0.3.1 // indirect mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect - mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 // indirect + mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 // indirect ) replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum b/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum index 8e30305b14..44e4f605f4 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum @@ -1,10 +1,11 @@ -4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a h1:wFEQiK85fRsEVF0CRrPAos5LoAryUsIX1kPW/WrIqFw= -4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= +4d63.com/gochecknoglobals v0.1.0 h1:zeZSRqj5yCg28tCkIV/z/lWbwvNm5qnKVS15PI8nhD0= +4d63.com/gochecknoglobals v0.1.0/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -15,20 +16,42 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV 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.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0Ko= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0 h1:XgtDnVJRCPEUG21gjFiRPz4zI1Mjg16R+NYQjfmU4XY= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.104.0 h1:gSmWO7DY1vOm0MVU6DNXM11BWHHsTUmsC5cv1fuW5X8= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.9.0 h1:ED/FP4xv8GJw63v556/ASNc1CeeLUO2Bs8nzaHchkHg= +cloud.google.com/go/compute v1.9.0/go.mod h1:lWv1h/zUWTm/LozzfTJhBSkd6ShQq8la8VeeuOEGxfY= 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.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -38,61 +61,61 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lUX4= -cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.26.0 h1:lYAGjknyDJirSzfwUlkv4Nsnj7od7foxQNH/fqZqles= +cloud.google.com/go/storage v1.26.0/go.mod h1:mk/N7YwIKEWyTvXAWQCIeiCTdLoRH6Pd5xmSnolQLTI= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v62.3.0+incompatible h1:Ctfsn9UoA/BB4HMYQlbPPgNXdX0tZ4tmb85+KFb2+RE= -github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Antonboom/errname v0.1.7 h1:mBBDKvEYwPl4WFFNwec1CZO096G6vzK9vvDQzAwkako= +github.com/Antonboom/errname v0.1.7/go.mod h1:g0ONh16msHIPgJSGsecu1G/dcF2hlYR/0SddnIAGavU= +github.com/Antonboom/nilnil v0.1.1 h1:PHhrh5ANKFWRBh7TdYmyyq2gyT2lotnvFvvFbylF81Q= +github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= +github.com/Azure/azure-sdk-for-go v66.0.0+incompatible h1:bmmC38SlE8/E81nNADlgmVGurPWMHDX2YNXVQMrBpEE= +github.com/Azure/azure-sdk-for-go v66.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2 h1:lneMk5qtUMulXa/eVxjVd+/bDYMEDIqYpLzLa2/EsNI= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 h1:Yoicul8bnVdQrhDMTHxdEckRGX01XvwXDHUT9zYZ3k0= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 h1:XUNQ4mw+zJmaA2KXzP9JlQiecy1SI+Eog7xVkPiqIbg= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1 h1:QSdcrd/UFJv6Bp/CfoVf2SrENpFn9P6Yh8yb+xNhYMM= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1/go.mod h1:eZ4g6GUvXiGulfIbbhh1Xr4XwUYaYaWMqzGD/284wCA= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= -github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= -github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= +github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= +github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/Azure/go-autorest/autorest/adal v0.9.21 h1:jjQnVFXPfekaqb8vIsv2G1lxshoW+oGv4MDlhRtnYZk= +github.com/Azure/go-autorest/autorest/adal v0.9.21/go.mod h1:zua7mBUaCc5YnSLKYgGJR/w5ePdMDA6H56upLsHzA9U= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= +github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= -github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= +github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= +github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= +github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.15.0+incompatible h1:0gSxPGWS9PAr7U2NsQ2YQg6juRDINkUyuvbb4b2Xm8w= github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us= -github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/OpenPeeDeeP/depguard v1.1.0 h1:pjK9nLPS1FwQYGGpPxoMYpe7qACHOhAWQMQzV71i49o= +github.com/OpenPeeDeeP/depguard v1.1.0/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -100,199 +123,175 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= +github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= +github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= -github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/aokoli/goutils v1.0.1 h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/ashanbrown/forbidigo v1.1.0 h1:SJOPJyqsrVL3CvR0veFZFmIM0fXS/Kvyikqvfphd0Z4= -github.com/ashanbrown/forbidigo v1.1.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= -github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a h1:/U9tbJzDRof4fOR51vwzWdIBsIH6R2yU0KG1MBRM2Js= -github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= -github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= +github.com/ashanbrown/forbidigo v1.3.0 h1:VkYIwb/xxdireGAdJNZoo24O4lmnEWkactplBlWTShc= +github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= +github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= +github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= +github.com/aws/aws-sdk-go v1.44.87 h1:u/1sm8MNUSQHt8MGLEQHAj4r3lns3w0B1IXelPKbpn4= +github.com/aws/aws-sdk-go v1.44.87/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bkielbasa/cyclop v1.2.0 h1:7Jmnh0yL2DjKfw28p86YTd/B4lRGcNuu12sKE35sM7A= github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= -github.com/bombsimon/wsl/v3 v3.2.0 h1:x3QUbwW7tPGcCNridvqmhSRthZMTALnkg5/1J+vaUas= -github.com/bombsimon/wsl/v3 v3.2.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= -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/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= +github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bombsimon/wsl/v3 v3.3.0 h1:Mka/+kRLoQJq7g2rggtgQsjuI/K5Efd87WX96EWFxjM= +github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= +github.com/breml/bidichk v0.2.3 h1:qe6ggxpTfA8E75hdjWPZ581sY3a2lnl0IRxLQFelECI= +github.com/breml/bidichk v0.2.3/go.mod h1:8u2C6DnAy0g2cEq+k/A2+tr9O1s+vHGxWn0LTc70T2A= +github.com/breml/errchkjson v0.3.0 h1:YdDqhfqMT+I1vIxPSas44P+9Z9HzJwCeAzjB8PxP1xw= +github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92zSDFcofU= +github.com/butuzov/ireturn v0.1.1 h1:QvrO2QF2+/Cx1WA/vETCIYBKtRjc30vesdoPUNo1EbY= +github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.6 h1:Tsy7EppNow2pDC0jN7Hsmcb6mHd71ZbI1vFissRBtc0= -github.com/charithe/durationcheck v0.0.6/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.9 h1:mPP4ucLrf/rKZiIG/a9IPXHGlh8p4CzgpyTy6EEutYk= +github.com/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= +github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 h1:E7LT642ysztPWE0dfz43cWOvMiF42DyTRC+eZIaO4yI= +github.com/chavacava/garif v0.0.0-20220630083739-93517212f375/go.mod h1:4m1Rv7xfuwWPNKXlThldNuJvutYM6J95wNuuVmn55To= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= -github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/coocood/freecache v1.2.2 h1:UPkJCxhRujykq1jXuwxAPgDHnm6lKGrLZPnuHzgWRtE= +github.com/coocood/freecache v1.2.2/go.mod h1:RBUWa/Cy+OHdfTGFEhEuE1pMCMX51Ncizj7rthiQ3vk= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/daixiang0/gci v0.2.8 h1:1mrIGMBQsBu0P7j7m1M8Lb+ZeZxsZL+jyGX4YoMJJpg= -github.com/daixiang0/gci v0.2.8/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= +github.com/cristalhq/acmd v0.8.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= +github.com/curioswitch/go-reassign v0.1.2 h1:ekM07+z+VFT560Exz4mTv0/s1yU9gem6CJc/tlYpkmI= +github.com/curioswitch/go-reassign v0.1.2/go.mod h1:bFJIHgtTM3hRm2sKXSPkbwNjSFyGURQXyn4IXD2qwfQ= +github.com/daixiang0/gci v0.7.0 h1:HNMLrke+ycKtL0d55TxzNqRw/5lNjBXZLCJ6916RWaA= +github.com/daixiang0/gci v0.7.0/go.mod h1:EpVfrztufwVgQRXjnX4zuNinEpLj5OmMjtu/+MB0V0c= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/denis-tingajkin/go-header v0.4.2 h1:jEeSF4sdv8/3cT/WY8AgDHUoItNSoEZ7qg9dX7pc218= -github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= +github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 h1:qxIJwfSemSCqhG3/lEw1Rm+wYbegjuKsqy0ZqnIpL14= github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0/go.mod h1:KfdIkmkpVY3n2sc1ykFj01uMviOiXH2HMhUCvA5FYGg= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.3.0-java h1:bV5JGEB1ouEzZa0hgVDFFiClrUEuGWRaAc/3mxR2QK0= github.com/envoyproxy/protoc-gen-validate v0.3.0-java/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.7 h1:qcZcULcd/abmQg6dwigimCNEyi4gg31M/xaciQlDml8= +github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= -github.com/esimonov/ifshort v1.0.1 h1:p7hlWD15c9XwvwxYg3W7f7UZHmwg7l9hC0hBiF95gd0= -github.com/esimonov/ifshort v1.0.1/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= -github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= +github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= +github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= +github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flytestdlib v0.4.7 h1:SMPPXI3j/MjP7D2fqaR+lPQkTrqYS7xZbwsgJI2F8SU= -github.com/flyteorg/flytestdlib v0.4.7/go.mod h1:fv1ar34LJLMTaf0tbfetisLykUlARi7rP+NQTUn6QQs= +github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= +github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= +github.com/flyteorg/flytestdlib v1.0.7 h1:ctK+h8RsRwlV5NLTkaqTwgXQ7YMS4nszDJRi1z/iBfg= +github.com/flyteorg/flytestdlib v1.0.7/go.mod h1:WTe0k3DmmrKFjj3hwiIbjjdCK89X63MBzBbXhQ4Yxf0= github.com/flyteorg/protoc-gen-doc v1.4.2 h1:Otw0F+RHaPQ8XlpzhLLgjsCMcrAIcMO01Zh+ALe3rrE= github.com/flyteorg/protoc-gen-doc v1.4.2/go.mod h1:exDTOVwqpp30eV/EDPFLZy3Pwr2sn6hBC1WIYH/UbIg= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -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= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fzipp/gocyclo v0.3.1 h1:A9UeX3HJSXTBzvHzhqoYVuE0eAhe+aM8XBCCwsPMZOc= -github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/flyteorg/stow v0.3.6 h1:jt50ciM14qhKBaIrB+ppXXY+SXB59FNREFgTJqCyqIk= +github.com/flyteorg/stow v0.3.6/go.mod h1:5dfBitPM004dwaZdoVylVjxFT4GWAgI0ghAndhNUzCo= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= +github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-critic/go-critic v0.5.4 h1:fPNMqImVjELN6Du7NVVuvKA4cgASNmc7e4zSYQCOnv8= -github.com/go-critic/go-critic v0.5.4/go.mod h1:cjB4YGw+n/+X8gREApej7150Uyy1Tg8If6F2XOAUXNE= +github.com/go-critic/go-critic v0.6.5 h1:fDaR/5GWURljXwF8Eh31T2GZNz9X4jeboS912mWF8Uo= +github.com/go-critic/go-critic v0.6.5/go.mod h1:ezfP/Lh7MA6dBNn4c6ab5ALv3sKnZVLx37tr00uuaOY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= -github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0 h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= +github.com/go-toolsmith/astcopy v1.0.2 h1:YnWf5Rnh1hUudj11kei53kI57quN/VH6Hp1n+erozn0= +github.com/go-toolsmith/astcopy v1.0.2/go.mod h1:4TcEdbElGc9twQEYpVo/aieIXfHhiuLh4aLAck6dO7Y= github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.2/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= +github.com/go-toolsmith/astequal v1.0.3 h1:+LVdyRatFS+XO78SGV4I3TCEA0AC7fKEGma+fH+674o= +github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k= github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg= github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= +github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5 h1:eD9POs68PHkwrx7hAB78z1cb6PfGq/jyWn3wJywsH1o= +github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5/go.mod h1:3NAwwmD4uY/yggRxoEjk/S00MIV3A+H7rrE3i87eYxM= github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-toolsmith/typep v1.0.2 h1:8xdsa1+FSIH/RhEkgnD1j2CJOy5mNllW1Q9tRiYwvlk= github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b h1:khEcpUM4yFcxg4/FHQWkvVRmgijNXRfzkIDHh23ggEo= github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= +github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= -github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= +github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -300,6 +299,8 @@ 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/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -313,27 +314,30 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= +github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6J5HIP8ZtyMdiDscjMLfRBSPuzVVeo= +github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.38.0 h1:hgZsLRzZrjhpp44Ak+fhXNzgrbDF39ETf22a+Jd3fJQ= -github.com/golangci/golangci-lint v1.38.0/go.mod h1:Knp/sd5ATrVp7EOzWzwIIFH+c8hUfpW+oOQb8NvdZDo= +github.com/golangci/golangci-lint v1.49.0 h1:I8WHOavragDttlLHtSraHn/h39C+R60bEQ5NoGcHQr8= +github.com/golangci/golangci-lint v1.49.0/go.mod h1:+V/7lLv449R6w9mQ3WdV0EKh7Je/jTylMeSwBZcLeWE= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= github.com/golangci/misspell v0.3.5 h1:pLzmVdl3VxTOncgzHcvLOKirdvcx/TydsClUQXTehjo= github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5 h1:c9Mqqrm/Clj5biNaG7rABrmwUq88nHh0uABo2b/WYmc= -github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= +github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 h1:DIPQnGy2Gv2FSA4B/hh8Q7xx3B7AIDk3DAMeHclH1vQ= +github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCkMoKvUvlf89F6O7H2LYdhr1zBh736mBItOdRs= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -347,15 +351,19 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -363,404 +371,324 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/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.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/gookit/color v1.3.6/go.mod h1:R3ogXq2B9rTbXoSHJ1HyUVAZ3poOJHpd9nQmyGZsfvQ= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254 h1:Nb2aRlC404yz7gQIfRZxX9/MLvQiqXyiBTJtgAy6yrI= -github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1 h1:kBRZU0PSuI7PspsSb/ChWoVResUcwNVIdpB049pKTiw= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 h1:PVRE9d4AQKmbelZ7emNig1+NT27DUmKZn5qXxfio54U= +github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= -github.com/gostaticanalysis/analysisutil v0.4.1 h1:/7clKqrVfiVwiBQLM0Uke4KvXnO6JcCTS7HwF2D6wG8= -github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= +github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= -github.com/gostaticanalysis/comment v1.4.1 h1:xHopR5L2lRz6OsjH4R2HG5wRhW9ySl3FsHIvi5pcXwc= github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= -github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5 h1:rx8127mFPqXXsfPSo8BwnIU97MKFZc89WHAHt8PwDVY= -github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= +github.com/gostaticanalysis/comment v1.4.2 h1:hlnx5+S2fY9Zo9ePo4AhgYsYHbM2+eAv8m/s1JiCd6Q= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/forcetypeassert v0.1.0 h1:6eUflI3DiGusXGK6X7cCcIgVCpZ2CiZ1Q7jl6ZxNV70= +github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= -github.com/graymeta/stow v0.2.7 h1:b31cB1Ylw/388sYSZxnmpjT2QxC21AaQ8fRnUtE13b4= -github.com/graymeta/stow v0.2.7/go.mod h1:JAs139Zr29qfsecy7b+h9DRsWXbFbsd7LCrbCDYI84k= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -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/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -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= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0 h1:pO2K/gKgKaat5LdpAhxhluX2GPQMaI3W5FUz/I/UnWk= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= +github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jgautheron/goconst v1.4.0 h1:hp9XKUpe/MPyDamUbfsrGpe+3dnY2whNK4EtB86dvLM= -github.com/jgautheron/goconst v1.4.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d h1:BYDZtm80MLJpTWalkwHxNnIbO/2akQHERcfLq4TbIWE= -github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d/go.mod h1:/EZlaYCnEX24i7qdVhT9du5JrtFWYRQr67bVgR7JJC8= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= +github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= +github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0 h1:exZBMUS/kB/AhxSj/9lIIxhqkCpXXdKScjFWQUTbi3M= -github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= +github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.0 h1:YTDO4pNy7AUN/021p+JGHycQyYNIyMoenM1YDVK6RlY= -github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.6.2 h1:uGQ9xI8/pgc9iOoCe7kWQgRE6SBTrCGmTSf0LrEtY7c= +github.com/kisielk/errcheck v1.6.2/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.4.0 h1:2Nx7XbdbE/BYZeoip2mURKUdtHQRuy6Ug+wR7K9ywNM= -github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= -github.com/kunwardeep/paralleltest v1.0.2 h1:/jJRv0TiqPoEy/Y8dQxCFJhD56uS/pnvtatgTZBHokU= -github.com/kunwardeep/paralleltest v1.0.2/go.mod h1:ZPqNm1fVHPllh5LPVujzbVz1JN2GhLxSfY+oqUsvG30= +github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= +github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= +github.com/kunwardeep/paralleltest v1.0.6 h1:FCKYMF1OF2+RveWlABsdnmsvJrei5aoyZoaGS+Ugg8g= +github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1YuwCsJO/0kL9Zes= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kyoh86/exportloopref v0.1.8 h1:5Ry/at+eFdkX9Vsdw3qU4YkvGtzuVfzT4X7S77LoN/M= github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= +github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= +github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/ldez/tagliatelle v0.3.1 h1:3BqVVlReVUZwafJUwQ+oxbx2BEX2vUG4Yu/NOfMiKiM= +github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= +github.com/leonklingele/grouper v1.1.0 h1:tC2y/ygPbMFSBOs3DcyaEMKnnwH7eYKzohOtRrf0SAg= +github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= -github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= -github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/maratori/testpackage v1.0.1 h1:QtJ5ZjqapShm0w5DosRjg0PRlSdAdlx+W6cCKoALdbQ= -github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= +github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= +github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= +github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/maratori/testpackage v1.1.0 h1:GJY4wlzQhuBusMF1oahQCBtUV/AQ/k69IZ68vxaac2Q= +github.com/maratori/testpackage v1.1.0/go.mod h1:PeAhzU8qkCwdGEMTEupsHJNlQu2gZopMC6RjbhmHeDc= github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 h1:pWxk9e//NbPwfxat7RXkts09K+dEBJWakUWwICVqYbA= github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= 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/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81 h1:QASJXOGm2RZ5Ardbc86qNFvby9AqkLDibfChMtAg5QM= -github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/mgechev/revive v1.0.3 h1:z3FL6IFFN3JKzHYHD8O1ExH9g/4lAGJ5x1+9rPZgsFg= -github.com/mgechev/revive v1.0.3/go.mod h1:POGGZagSo/0frdr7VeAifzS5Uka0d0GPiM35MsTO8nE= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mgechev/revive v1.2.3 h1:NzIEEa9+WimQ6q2Ov7OcNeySS/IOcwtkQ8RAh0R5UJ4= +github.com/mgechev/revive v1.2.3/go.mod h1:iAWlQishqCuj4yhV24FTnKSXGpbAA+0SckXB8GQMX/Q= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moricho/tparallel v0.2.1 h1:95FytivzT6rYzdJLdtfn6m1bfFJylOJK41+lgv/EHf4= github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= -github.com/mozilla/tls-observatory v0.0.0-20201209171846-0547674fceff/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 h1:28i1IjGcx8AofiB4N3q5Yls55VEaitzuEPkFJEVgGkA= github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nakabonne/nestif v0.3.0 h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw= -github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88 h1:o+O3Cd1HO9CTgxE3/C8p5I5Y4C0yYWbF8d4IkfOLtcQ= -github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= -github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/mwitkow/go-proto-validators v0.3.2 h1:qRlmpTzm2pstMKKzTdvwPCF5QfBNURSlAgN/R+qbKos= +github.com/mwitkow/go-proto-validators v0.3.2/go.mod h1:ej0Qp0qMgHN/KtDyUt+Q1/tA7a5VarXUOUxD+oeD30w= +github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= +github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6FxaNu/BnU2OAaLF86eTVhP2hjTB6iMvItA= +github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.1.0 h1:kVlMw8h2LHPMGUVqUj6230oQjjTMFjwcZrnkhXzFfl8= -github.com/nishanths/exhaustive v0.1.0/go.mod h1:S1j9110vxV1ECdCudXRkeMnFQ/DQk9ajLT0Uf2MYZQQ= -github.com/nishanths/predeclared v0.2.1 h1:1TXtjmy4f3YCFjTxRd8zcFHOmoUir+gp0ESzjFzG2sw= -github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -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/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= -github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.4 h1:NiTx7EEvBzu9sFOD1zORteLSt3o8gnlvZZwSE9TnY9U= -github.com/onsi/gomega v1.10.4/go.mod h1:g/HbgYopi++010VEqkFgJHKC09uJiW9UkXvMUuKHUCQ= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -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= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 h1:/I3lTljEEDNYLho3/FUB7iD/oc2cEFgVmbHzV+O0PtU= +github.com/nishanths/exhaustive v0.8.1 h1:0QKNascWv9qIHY7zRoZSxeRr6kuk5aAT3YXLTiDmjTo= +github.com/nishanths/exhaustive v0.8.1/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg= +github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= +github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= +github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1/go.mod h1:eD5JxqMiuNYyFNmyY9rkJ/slN8y59oEu4Ei7F8OoKWQ= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= -github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pascaldekloe/name v1.0.1 h1:9lnXOHeqeHHnWLbKfH6X98+4+ETVqFqxN09UXSjcMb0= +github.com/pascaldekloe/name v1.0.1/go.mod h1:Z//MfYJnH4jVpQ9wkclwu2I2MkHmXTlT9wR5UZScttM= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= +github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= -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= +github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f h1:xAw10KgJqG5NJDfmRqJ05Z0IFblKumjtMeyiOLxj3+4= -github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= +github.com/polyfloyd/go-errorlint v1.0.2 h1:kp1yvHflYhTmw5m3MmBy8SCyQkKPjwDthVuMH0ug6Yk= +github.com/polyfloyd/go-errorlint v1.0.2/go.mod h1:APVvOesVSAnne5SClsPxPdfvZTVDojXh1/G3qb5wjGI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= -github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= +github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= 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/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -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.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= 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.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 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/prometheus/procfs v0.3.0 h1:Uehi/mxLK0eiUc0H0++5tpMGTexB8wZ598MIgU8VpDM= -github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/pseudomuto/protokit v0.2.0 h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ8RpM= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= -github.com/quasilyte/go-ruleguard v0.3.0 h1:A3OfpsK2ynOTbz/KMi62qWzignjGCOZVChATSf4P+A0= -github.com/quasilyte/go-ruleguard v0.3.0/go.mod h1:p2miAhLp6fERzFNbcuQ4bevXs8rgK//uCHsUDkumITg= -github.com/quasilyte/go-ruleguard/dsl v0.0.0-20210106184943-e47d54850b18/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/dsl v0.0.0-20210115110123-c73ee1cbff1f/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/pseudomuto/protokit v0.2.1 h1:kCYpE3thoR6Esm0CUvd5xbrDTOZPvQPTDeyXpZfrJdk= +github.com/pseudomuto/protokit v0.2.1/go.mod h1:gt7N5Rz2flBzYafvaxyIxMZC0TTF5jDZfRnw25hAAyo= +github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= +github.com/quasilyte/go-ruleguard v0.3.18 h1:sd+abO1PEI9fkYennwzHn9kl3nqP6M5vE7FiOzZ+5CE= +github.com/quasilyte/go-ruleguard v0.3.18/go.mod h1:lOIzcYlgxrQ2sGJ735EHXmf/e9MJ516j16K/Ifcttvs= +github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.21/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 h1:L8QM9bvf68pVdQ3bCFZMDmnt9yqcMBro1pC7F+IPYMY= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= +github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f h1:6Gtn2i04RD0gVyYf2/IUMTIs+qYleBt4zxDqkLTcu4U= +github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.3.4 h1:3Z3Eu6FGHZWSfNKJTOUiPatWwfc7DzJRU04jFUqJODw= +github.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.2.0 h1:YWfhGOrXwLGiqcC/u5EqG6YeS8nh+1fw0HEc85CVZro= -github.com/ryancurrah/gomodguard v1.2.0/go.mod h1:rNqbC4TOIdUDcVMSIpNNAzTbzXAZa6W5lnUepvuMMgQ= +github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.2.4 h1:CpMSDKan0LtNGGhPrvupAoLeObRFjND8/tU1rEOtBp4= +github.com/ryancurrah/gomodguard v1.2.4/go.mod h1:+Kem4VjWwvFpUJRJSwa16s1tBJe+vbv02+naTow2f6M= github.com/ryanrolds/sqlclosecheck v0.3.0 h1:AZx+Bixh8zdUBxUA1NxbxVAS78vTPq4rCb8OUZI9xFw= github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sanposhiho/wastedassign v0.1.3 h1:qIMpTh4NGZYRbFJ+DSpLoVn8F4SLciX2afRvXPefC7w= -github.com/sanposhiho/wastedassign v0.1.3/go.mod h1:LGpq5Hsv74QaqM47WtIsRSF/ik9kqk07kchgv66tLVE= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/securego/gosec/v2 v2.6.1 h1:+KCw+uz16FYfFyJ/A5aU6uP7mnrL+j1TbDnk1yN+8R0= -github.com/securego/gosec/v2 v2.6.1/go.mod h1:I76p3NTHBXsGhybUW+cEQ692q2Vp+A0Z6ZLzDIZy+Ao= +github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= +github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= +github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= +github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= +github.com/sashamelentyev/usestdlibvars v1.15.1 h1:dnc7NDHGpYXYzDi5UWbfxIj9Y54ToKOtq9YNWacaHng= +github.com/sashamelentyev/usestdlibvars v1.15.1/go.mod h1:Wjq/mtFdeKAOEvn/NCRy7IvHRZvEpnOU0ZPrjNKr3zU= +github.com/securego/gosec/v2 v2.13.1 h1:7mU32qn2dyC81MH9L2kefnQyRMUarfDER3iQyMHcjYM= +github.com/securego/gosec/v2 v2.13.1/go.mod h1:EO1sImBMBWFjOTFzMWfTRrZW6M15gm60ljzrmy/wtHo= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= -github.com/shirou/gopsutil/v3 v3.21.1/go.mod h1:igHnfak0qnw1biGeI2qKQvu0ZkwvEkUcCLlYhZzdr/4= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= -github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sivchari/containedctx v1.0.2 h1:0hLQKpgC53OVF1VT7CeoFHk9YKstur1XOgfYIc1yrHI= +github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= +github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= +github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= +github.com/sivchari/tenv v1.7.0 h1:d4laZMBK6jpe5PWepxlV9S+LC0yXqvYHiq8E6ceoVVE= +github.com/sivchari/tenv v1.7.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/sonatard/noctx v0.0.1 h1:VC1Qhl6Oxx9vvWo3UDgrGXYCeKCe3Wbw7qAWL6FrmTY= github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/go-diff v0.6.1 h1:hmA1LzxW0n1c3Q4YbrFgg4P99GSnebYa3x8gr0HZqLQ= github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.5.1 h1:VHu76Lk0LSP1x254maIu2bplkWpfBWI+B+6fdoZprcg= -github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/ssgreg/nlreturn/v2 v2.1.0 h1:6/s4Rc49L6Uo6RLjhWZGBpWWjfzk2yrf1nIW8m4wgVA= -github.com/ssgreg/nlreturn/v2 v2.1.0/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= +github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= -github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -768,74 +696,80 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b h1:HxLVTlqcHhFAz3nWUcuvpH7WuOMv8LQoCWmruLfFH2U= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= -github.com/tetafro/godot v1.4.4 h1:VAtLEoAMmopIzHVWVBrztjVWDeYm1OD/DKqhqXR4828= -github.com/tetafro/godot v1.4.4/go.mod h1:FVDd4JuKliW3UgjswZfJfHq4vAx0bD/Jd5brJjGeaz4= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94 h1:ig99OeTyDwQWhPe2iw9lwfQVF1KB3Q4fpP3X7/2VBG8= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck v0.0.0-20201130113247-1683564d9756 h1:zV5mu0ESwb+WnzqVaW2z1DdbAP0S46UtjY8DHQupQP4= -github.com/tomarrell/wrapcheck v0.0.0-20201130113247-1683564d9756/go.mod h1:yiFB6fFoV7saXirUGfuK+cPtUh4NX/Hf5y2WC2lehu0= -github.com/tommy-muehle/go-mnd/v2 v2.3.1 h1:a1S4+4HSXDJMgeODJH/t0EEKxcVla6Tasw+Zx9JJMog= -github.com/tommy-muehle/go-mnd/v2 v2.3.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/sylvia7788/contextcheck v1.0.8 h1:Uk1S0K326MH6obdpYj1kYriU/g/5oXZM8Dc27ttpezM= +github.com/sylvia7788/contextcheck v1.0.8/go.mod h1:9XDxwvxyuKD+8N+a7Gs7bfWLityh5t70g/GjdEt2N2M= +github.com/tdakkota/asciicheck v0.1.1 h1:PKzG7JUTUmVspQTDqtkX9eSiLGossXTybutHwTXuO0A= +github.com/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= +github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= +github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.4.11 h1:BVoBIqAf/2QdbFmSwAWnaIqDivZdOV0ZRwEm6jivLKw= +github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= +github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 h1:kl4KhGNsJIbDHS9/4U9yQo1UcPQM0kOMJHn29EoH/Ro= +github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= +github.com/timonwong/logrlint v0.4.0 h1:NO1LBfWw9DEByynMNuCbvzczXSS08wTTjOVu/4cWPdg= +github.com/timonwong/logrlint v0.4.0/go.mod h1:5V+qRnjYXE74IDzxox865j/FoTfEEoJDyV0yT3RMu6g= +github.com/tomarrell/wrapcheck/v2 v2.6.2 h1:3dI6YNcrJTQ/CJQ6M/DUkc0gnqYSIk6o0rChn9E/D0M= +github.com/tomarrell/wrapcheck/v2 v2.6.2/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0IvAB9Rdwyilxvg= +github.com/tommy-muehle/go-mnd/v2 v2.5.0 h1:iAj0a8e6+dXSL7Liq0aXPox36FiN1dBbjA6lt9fl65s= +github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iLA= github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg= -github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= -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/uudashr/gocognit v1.0.1 h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjPs= -github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= -github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI= +github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= +github.com/uudashr/gocognit v1.0.6 h1:2Cgi6MweCsdB6kpcVQp7EW4U23iBFQWfTXiWlyp842Y= +github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= +github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= +github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= +github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +gitlab.com/bosi/decorder v0.2.3 h1:gX4/RgK16ijY8V+BRQHAySfQAb354T7/xQpDB2n10P0= +gitlab.com/bosi/decorder v0.2.3/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok= -go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/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= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= +go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -846,6 +780,11 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 h1:tnebWN09GYg9OLPss1KXj8txwZc6X6uMr6VFdcGNbHw= +golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 h1:Ic/qN6TEifvObMGQy72k0n1LlJr7DjWWEi+MOsDOiSk= +golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -858,8 +797,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -869,17 +808,17 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -890,8 +829,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -902,21 +839,34 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/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-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/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/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b h1:ZmngSVLe/wycRns9MKikG9OWIEjGcGAkacif7oYQaUY= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -925,8 +875,20 @@ golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 h1:55H5j7lotzuFCEOKDsMch+fRNUQ9DgtyHOUP31FNqKc= -golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 h1:2o1E+E8TpNLklK9nHiPiK1uzIYrIHt+cQx3ynCwq9V8= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= 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= @@ -938,33 +900,25 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde h1:ejfdSekXMDxDLbRrJMwUk6KnSLZ2McaUCVcIKM+N6jc= +golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -979,48 +933,79 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/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-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201024232916-9f70ab9862d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/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-20201214210602-f9fddec55a1e/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/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/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-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 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-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/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= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= @@ -1030,13 +1015,11 @@ golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524210228-3d17549cdc6b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1044,10 +1027,7 @@ golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1055,7 +1035,6 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1071,7 +1050,6 @@ golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -1086,36 +1064,40 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200828161849-5deb26317202/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20200915173823-2db8f0ff891c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20200918232735-d647fc253266/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201011145850-ed2f50202694/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210102185154-773b96fafca2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/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/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1132,14 +1114,32 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M 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.31.0/go.mod h1:CL+9IBCa2WWU6gRuBWaKqGWLFFwbEUXkfeMkHLQWYWo= -google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= 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/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.94.0 h1:KtKM9ru3nzQioV1HLlUf1cR7vMYJIpgls5VhAYQXIwA= +google.golang.org/api v0.94.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= 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= @@ -1153,7 +1153,6 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -1172,32 +1171,70 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200831141814-d751682dd103/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200914193844-75d14daec038/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200921151605-7abf4a1a14d5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 h1:uLBY0yHDCj2PMQ98KWDSIDFwn9zK2zh+tgWtbvPPBjI= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +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-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf h1:Q5xNKbTSFwkuaaGaR7CMcXEM5sy19KYdUU8iF8/iRC0= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -1207,11 +1244,27 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji 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.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1221,30 +1274,25 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/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/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/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/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1252,9 +1300,10 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1262,35 +1311,25 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.1.2 h1:SMdYLJl312RXuxXziCCHhRsp/tvct9cGKey0yv95tZM= -honnef.co/go/tools v0.1.2/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= -k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= -k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= -k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= -k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 h1:d+LBRNY3c/KGp7lDblRlUJkayx4Vla7WUTIazoGMdYo= -k8s.io/client-go v0.0.0-20210217172142-7279fc64d847/go.mod h1:q0EaghmVye2uui19vxSZ2NG6ssgUWgjudO6vrwXneSI= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +honnef.co/go/tools v0.3.3 h1:oDx7VAwstgpYpb3wv0oxiZlxY+foCpRAwY7Vk6XpAgA= +honnef.co/go/tools v0.3.3/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= +k8s.io/apimachinery v0.25.0 h1:MlP0r6+3XbkUG2itd6vp3oxbtdQLQI94fD5gCS+gnoU= +k8s.io/apimachinery v0.25.0/go.mod h1:qMx9eAk0sZQGsXGu86fab8tZdffHbwUfsvzqKn4mfB0= +k8s.io/client-go v0.25.0 h1:CVWIaCETLMBNiTUta3d5nzRbXvY5Hy9Dpl+VvREpu5E= +k8s.io/client-go v0.25.0/go.mod h1:lxykvypVfKilxhTklov0wz1FoaUZ8X4EwbhS6rpRfN8= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= -k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -mvdan.cc/gofumpt v0.1.0 h1:hsVv+Y9UsZ/mFZTxJZuHVI6shSQCtzZ11h1JEFPAZLw= -mvdan.cc/gofumpt v0.1.0/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= +k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= +k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 h1:H9TCJUUx+2VA0ZiD9lvtaX8fthFsMoD+Izn93E/hm8U= +k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +mvdan.cc/gofumpt v0.3.1 h1:avhhrOmv0IuvQVK7fvwV91oFSGAk5/6Po8GXTzICeu8= +mvdan.cc/gofumpt v0.3.1/go.mod h1:w3ymliuxvzVx8DAutBnVyDqYb1Niy/yCJt/lk821YCE= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 h1:HT3e4Krq+IE44tiN36RvVEb6tvqeIdtsVSsxmNPqlFU= -mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= +mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 h1:seuXWbRB1qPrS3NQnHmFKLJLtskWyueeIzmLXghMGgk= +mvdan.cc/unparam v0.0.0-20220706161116-678bad134442/go.mod h1:F/Cxw/6mVrNKqrR2YjFf5CaW0Bw4RL8RfbEf4GRggJk= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh b/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh index c0ab06b063..e7fc7af009 100755 --- a/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh +++ b/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -18,7 +18,6 @@ set -e tools=( "github.com/vektra/mockery/cmd/mockery" "github.com/flyteorg/flytestdlib/cli/pflags" - "github.com/golangci/golangci-lint/cmd/golangci-lint" "github.com/alvaroloes/enumer" "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) @@ -28,6 +27,8 @@ echo "Using temp directory ${tmp_dir}" cp -R boilerplate/flyte/golang_support_tools/* $tmp_dir pushd "$tmp_dir" +curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0 + for tool in "${tools[@]}" do echo "Installing ${tool}" diff --git a/flytestdlib/cache/auto_refresh.go b/flytestdlib/cache/auto_refresh.go index 09a85ae39e..d4bed3e96e 100644 --- a/flytestdlib/cache/auto_refresh.go +++ b/flytestdlib/cache/auto_refresh.go @@ -81,15 +81,14 @@ const ( Update ) -// Your implementation of this function for your cache instance is responsible for returning -// 1. The new Item, and -// 2. What action should be taken. The sync function has no insight into your object, and needs to be -// told explicitly if the new item is different from the old one. +// SyncFunc func type. Your implementation of this function for your cache instance is responsible for returning +// The new Item and what action should be taken. The sync function has no insight into your object, and needs to be +// told explicitly if the new item is different from the old one. type SyncFunc func(ctx context.Context, batch Batch) ( updatedBatch []ItemSyncResponse, err error) -// Your implementation of this function for your cache instance is responsible for subdividing -// the list of cache items into batches. +// CreateBatchesFunc is a func type. Your implementation of this function for your cache instance is responsible for +// subdividing the list of cache items into batches. type CreateBatchesFunc func(ctx context.Context, snapshot []ItemWrapper) (batches []Batch, err error) type itemWrapper struct { @@ -202,10 +201,8 @@ func (w *autoRefresh) DeleteDelayed(id ItemID) error { return nil } -// This function is called internally by its own timer. Roughly, it will, -// - List keys -// - Create batches of keys based on createBatchesCb -// - Enqueue all the batches into the workqueue +// This function is called internally by its own timer. Roughly, it will list keys, create batches of keys based on +// createBatchesCb and, enqueue all the batches into the workqueue. func (w *autoRefresh) enqueueBatches(ctx context.Context) error { keys := w.lruMap.Keys() w.metrics.Size.Set(float64(len(keys))) @@ -236,15 +233,15 @@ func (w *autoRefresh) enqueueBatches(ctx context.Context) error { } // There are w.parallelizm instances of this function running all the time, each one will: -// - Retrieve an item from the workqueue -// - For each batch of the keys, call syncCb, which tells us if the items have been updated -// - If any has, then overwrite the item in the cache. +// - Retrieve an item from the workqueue +// - For each batch of the keys, call syncCb, which tells us if the items have been updated +// -- If any has, then overwrite the item in the cache. // // What happens when the number of things that a user is trying to keep track of exceeds the size // of the cache? Trivial case where the cache is size 1 and we're trying to keep track of two things. -// * Plugin asks for update on item 1 - cache evicts item 2, stores 1 and returns it unchanged -// * Plugin asks for update on item 2 - cache evicts item 1, stores 2 and returns it unchanged -// * Sync loop updates item 2, repeat +// * Plugin asks for update on item 1 - cache evicts item 2, stores 1 and returns it unchanged +// * Plugin asks for update on item 2 - cache evicts item 1, stores 2 and returns it unchanged +// * Sync loop updates item 2, repeat func (w *autoRefresh) sync(ctx context.Context) (err error) { defer func() { var isErr bool diff --git a/flytestdlib/cli/pflags/api/tag.go b/flytestdlib/cli/pflags/api/tag.go index 5d4a2d8e57..9b070743bc 100644 --- a/flytestdlib/cli/pflags/api/tag.go +++ b/flytestdlib/cli/pflags/api/tag.go @@ -13,9 +13,9 @@ const ( JSONTagName = "json" ) -// Represents parsed PFlag Go-struct tag. +// Tag represents parsed PFlag Go-struct tag. // type Foo struct { -// StringValue string `json:"str" pflag:"\"hello world\",This is a string value"` +// StringValue string `json:"str" pflag:"\"hello world\",This is a string value"` // } // Name will be "str", Default value is "hello world" and Usage is "This is a string value" type Tag struct { @@ -24,7 +24,7 @@ type Tag struct { Usage string } -// Parses tag. Name is computed from json tag, defaultvalue is the name of the pflag tag and usage is the concatenation +// ParseTag parses tag. Name is computed from json tag, defaultvalue is the name of the pflag tag and usage is the concatenation // of all options for pflag tag. // e.g. `json:"name" pflag:"2,this is a useful param"` func ParseTag(tag string) (t Tag, err error) { diff --git a/flytestdlib/config/tests/accessor_test.go b/flytestdlib/config/tests/accessor_test.go index 28fa27ed8e..813e2794c6 100644 --- a/flytestdlib/config/tests/accessor_test.go +++ b/flytestdlib/config/tests/accessor_test.go @@ -39,7 +39,7 @@ func getRandInt() uint64 { return binary.BigEndian.Uint64(b) } -func tempFileName(pattern string) string { +func tempFileName(dir, pattern string) string { // TODO: Remove this hack after we use Go1.11 everywhere: // https://github.com/golang/go/commit/191efbc419d7e5dec842c20841f6f716da4b561d @@ -50,7 +50,11 @@ func tempFileName(pattern string) string { prefix = pattern } - return filepath.Join(os.TempDir(), prefix+k8sRand.String(6)+suffix) + if len(dir) == 0 { + dir = os.TempDir() + } + + return filepath.Join(dir, prefix+k8sRand.String(6)+suffix) } func populateConfigData(configPath string) (TestConfig, error) { @@ -434,7 +438,7 @@ func TestAccessor_UpdateConfig(t *testing.T) { }) t.Run(fmt.Sprintf("[%v] Change handler", provider(config.Options{}).ID()), func(t *testing.T) { - configFile := tempFileName("config-*.yaml") + configFile := tempFileName("", "config-*.yaml") defer func() { assert.NoError(t, os.Remove(configFile)) }() cfg, err := populateConfigData(configFile) assert.NoError(t, err) @@ -458,38 +462,6 @@ func TestAccessor_UpdateConfig(t *testing.T) { assert.True(t, called) }) - t.Run(fmt.Sprintf("[%v] Change handler on change", provider(config.Options{}).ID()), func(t *testing.T) { - configFile := tempFileName("config-*.yaml") - defer func() { assert.NoError(t, os.Remove(configFile)) }() - _, err := populateConfigData(configFile) - assert.NoError(t, err) - - reg := config.NewRootSection() - _, err = reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) - assert.NoError(t, err) - - opts := config.Options{ - SearchPaths: []string{configFile}, - RootSection: reg, - } - v := provider(opts) - err = v.UpdateConfig(context.TODO()) - assert.NoError(t, err) - - r := reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) - firstValue := r.StringValue - - _, err = populateConfigData(configFile) - assert.NoError(t, err) - - // Wait enough for the file change notification to propagate. - time.Sleep(5 * time.Second) - - r = reg.GetSection(MyComponentSectionKey).GetConfig().(*MyComponentConfig) - secondValue := r.StringValue - assert.NotEqual(t, firstValue, secondValue) - }) - t.Run(fmt.Sprintf("[%v] Change handler k8s configmaps", provider(config.Options{}).ID()), func(t *testing.T) { reg := config.NewRootSection() section, err := reg.RegisterSection(MyComponentSectionKey, &MyComponentConfig{}) @@ -562,7 +534,7 @@ func TestAccessor_UpdateConfig(t *testing.T) { } func changeSymLink(targetPath, symLink string) error { - tmpLink := tempFileName("temp-sym-link-*") + tmpLink := tempFileName("", "temp-sym-link-*") if runtime.GOOS == "windows" { // #nosec G204 err := exec.Command("mklink", filepath.Clean(tmpLink), filepath.Clean(targetPath)).Run() @@ -586,12 +558,13 @@ func changeSymLink(targetPath, symLink string) error { return exec.Command("ln", "-sfn", filepath.Clean(targetPath), filepath.Clean(symLink)).Run() } -// 1. Create Dir structure: -// |_ data1 -// |_ config.yaml -// |_ data (symlink for data1) -// |_ config.yaml (symlink for data/config.yaml -recursively a symlink of data1/config.yaml) func newSymlinkedConfigFile(t *testing.T) (watchDir, configFile string, cleanup func()) { + // 1. Create Dir structure: + // |_ data1 + // |_ config.yaml + // |_ data (symlink for data1) + // |_ config.yaml (symlink for data/config.yaml -recursively a symlink of data1/config.yaml) + watchDir, err := ioutil.TempDir("", "config-test-") assert.NoError(t, err) @@ -686,7 +659,7 @@ func runEqualTest(t *testing.T, accessor accessorCreatorFn, expected interface{} raw, err := yaml.Marshal(m) assert.NoError(t, err) - f := tempFileName("test_type_*.yaml") + f := tempFileName("", "test_type_*.yaml") assert.NoError(t, err) defer func() { assert.NoError(t, os.Remove(f)) }() diff --git a/flytestdlib/futures/future.go b/flytestdlib/futures/future.go index a90e6907b7..a023fb8cad 100644 --- a/flytestdlib/futures/future.go +++ b/flytestdlib/futures/future.go @@ -1,11 +1,4 @@ -// This module implements a simple Async Futures for golang -// Usage: -// f := NewAsyncFuture(childCtx, func(ctx2 context.Context) (interface{}, error) { -// can do large async / non blocking work -// return ... -// } -// f.Ready() // can be checked for completion -// f.Get() .. will block till the given sub-routine returns +// Package futures implements a simple Async Futures for golang package futures import ( diff --git a/flytestdlib/futures/future_test.go b/flytestdlib/futures/future_test.go index 0ff617e298..83e23c664f 100644 --- a/flytestdlib/futures/future_test.go +++ b/flytestdlib/futures/future_test.go @@ -10,6 +10,18 @@ import ( "github.com/stretchr/testify/assert" ) +func Example() { + ctx := context.Background() + f := NewAsyncFuture(ctx, func(ctx2 context.Context) (interface{}, error) { + // can do large async / non-blocking work + time.Sleep(time.Second) + return "hello", nil + }) + + f.Ready() // can be checked for completion + _, _ = f.Get(ctx) // will block till the given sub-routine returns +} + func TestNewSyncFuture(t *testing.T) { type args struct { val interface{} diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 27717b3ee0..5002bbeadb 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -1,15 +1,15 @@ module github.com/flyteorg/flytestdlib -go 1.17 +go 1.18 require ( - github.com/aws/aws-sdk-go v1.43.37 + github.com/aws/aws-sdk-go v1.44.2 github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 github.com/coocood/freecache v1.1.1 github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 github.com/fatih/color v1.13.0 github.com/fatih/structtag v1.2.0 - github.com/flyteorg/stow v0.3.4 + github.com/flyteorg/stow v0.3.6 github.com/fsnotify/fsnotify v1.5.1 github.com/ghodss/yaml v1.0.0 github.com/go-test/deep v1.0.7 @@ -25,7 +25,7 @@ require ( github.com/spf13/viper v1.11.0 github.com/stretchr/testify v1.7.1 golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 - golang.org/x/tools v0.1.10 + golang.org/x/tools v0.1.12 google.golang.org/protobuf v1.28.0 gorm.io/gorm v1.22.4 k8s.io/api v0.20.2 @@ -34,16 +34,16 @@ require ( ) require ( - cloud.google.com/go v0.100.2 // indirect - cloud.google.com/go/compute v1.5.0 // indirect + cloud.google.com/go v0.101.0 // indirect + cloud.google.com/go/compute v1.6.1 // indirect cloud.google.com/go/iam v0.3.0 // indirect - cloud.google.com/go/storage v1.14.0 // indirect - github.com/Azure/azure-sdk-for-go v62.3.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 // indirect - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 // indirect + cloud.google.com/go/storage v1.22.0 // indirect + github.com/Azure/azure-sdk-for-go v63.4.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.25 // indirect + github.com/Azure/go-autorest/autorest v0.11.27 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.18 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect @@ -55,10 +55,12 @@ require ( github.com/go-logr/logr v0.4.0 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.2.0 // indirect + github.com/golang-jwt/jwt/v4 v4.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/google/go-cmp v0.5.8 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/googleapis/gax-go/v2 v2.3.0 // indirect + github.com/googleapis/go-type-adapters v1.0.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect @@ -82,17 +84,17 @@ require ( github.com/stretchr/objx v0.3.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect - golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect + golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect + golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect + golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect - golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect + golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect - google.golang.org/api v0.74.0 // indirect + google.golang.org/api v0.76.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac // indirect - google.golang.org/grpc v1.45.0 // indirect + google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46 // indirect + google.golang.org/grpc v1.46.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index e168e3745a..b235518a81 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -28,8 +28,9 @@ cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+Y cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2 h1:t9Iw5QH5v4XtlEQaCtUY7x6sCABps8sW0acw7e2WQ6Y= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.101.0 h1:g+LL+JvpvdyGtcaD2xw2mSByE/6F9s471eJSoaysM84= +cloud.google.com/go v0.101.0/go.mod h1:hEiddgDb77jDQ+I80tURYNJEnuwPzFU8awCFFRLKjW0= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -38,11 +39,12 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0 h1:b1zWmYuuHz7gO9kDcM/EpHGr06UgsYNRpNJzI2kFiLM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= 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.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -54,22 +56,24 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5TU= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cloud.google.com/go/storage v1.22.0 h1:NUV0NNp9nkBuW66BFRLuMgldN60C57ET3dhbwLIYio8= +cloud.google.com/go/storage v1.22.0/go.mod h1:GbaLEoMqbVm6sx3Z0R++gSiBlgMv6yUi2q1DeGFKQgE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v62.3.0+incompatible h1:Ctfsn9UoA/BB4HMYQlbPPgNXdX0tZ4tmb85+KFb2+RE= -github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 h1:qoVeMsc9/fh/yhxVaA0obYjVH/oI/ihrOoMwsLS9KSA= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 h1:E+m3SkZCN0Bf5q7YdTs5lSm2CYY3CK4spn5OmUIiQtk= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJNuUB6n7rs5Wsel4dXLe90Um2n4= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= +github.com/Azure/azure-sdk-for-go v63.4.0+incompatible h1:fle3M5Q7vr8auaiPffKyUQmLbvYeqpw30bKU6PrWJFo= +github.com/Azure/azure-sdk-for-go v63.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.1 h1:3CVsSo4mp8NDWO11tHzN/mdo2zP0CtaSK5IcwBjfqRA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.1/go.mod h1:w5pDIZuawUmY3Bj4tVx3Xb8KS96ToB0j315w9rqpAg0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.14.0 h1:NVS/4LOQfkBpk+B1VopIzv1ptmYeEskA8w/3K/w7vjo= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.2 h1:Px2KVERcYEg2Lv25AqC2hVr0xUWaq94wuEObLIkYzmA= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.2/go.mod h1:CdSJQNNzZhCkwDaV27XV1w48ZBPtxe7mlrZAsPNxD5g= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.0 h1:0nJeKDmB7a1a8RDMjTltahlPsaNlWjq/LpkZleSwINk= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.0/go.mod h1:mbwxKc/fW+IkF0GG591MuXw0KuEQBDkeRoZ9vmVJPxg= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest v0.11.25 h1:yp+V8DGur2aIUE87ebP8twPLz6k68jtJTlg61mEoByA= -github.com/Azure/go-autorest/autorest v0.11.25/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= +github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= +github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.18 h1:kLnPsRjzZZUF3K5REu/Kc+qMQrvuza2bwSnNdhmzLfQ= github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= @@ -79,15 +83,14 @@ github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935 github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -99,22 +102,15 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.43.37 h1:kyZ7UjaPZaCik+asF33UFOOYSwr9liDRr/UM/vuw8yY= -github.com/aws/aws-sdk-go v1.43.37/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.2 h1:5VBk5r06bgxgRKVaUtm1/4NT/rtrnH2E4cnAYv5zgQc= +github.com/aws/aws-sdk-go v1.44.2/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 h1:VRtJdDi2lqc3MFwmouppm2jlm6icF+7H3WYKpLENMTo= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -122,12 +118,9 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -136,19 +129,17 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= -github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= @@ -161,18 +152,17 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/stow v0.3.4 h1:gJVz1LCcEQ5ESWoedRxKh4uUv/V/c1eYLVAQVy07PPY= -github.com/flyteorg/stow v0.3.4/go.mod h1:2T2f6KaIWoWCLgI6EFZQgjb83Vg5SolmBwc2O06WQU4= +github.com/flyteorg/stow v0.3.6 h1:jt50ciM14qhKBaIrB+ppXXY+SXB59FNREFgTJqCyqIk= +github.com/flyteorg/stow v0.3.6/go.mod h1:5dfBitPM004dwaZdoVylVjxFT4GWAgI0ghAndhNUzCo= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -204,16 +194,17 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ= +github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -262,8 +253,9 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -271,8 +263,9 @@ github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPg github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -288,9 +281,9 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -300,40 +293,18 @@ github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/Oth github.com/googleapis/gax-go/v2 v2.3.0 h1:nRJtk3y8Fm770D42QV6T90ZnvFZyk7agSo3Q+Z9p3WI= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -343,14 +314,12 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.3 h1:PlHq1bSCSZL9K0wUhbm2pGLoTWs2GwVhsP6emvGV/ZI= github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -367,39 +336,26 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= 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.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -416,7 +372,6 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -424,27 +379,21 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.0-beta.8 h1:dy81yyLYJDwMTifq24Oi/IslOslRrDSb3jwDggjz3Z0= github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= 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/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= @@ -455,14 +404,12 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.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.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= @@ -470,9 +417,6 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -509,16 +453,11 @@ github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMT github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= -go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.2/go.mod h1:2D7ZejHVMIfog1221iLSYlQRzrtECw3kz4I4VAQm3qI= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -528,15 +467,11 @@ 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.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -544,8 +479,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f h1:OeJjE6G4dgCY4PIXvIRQbE8+RX+uXZyGhUy/ksMGJoc= +golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -581,8 +516,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -599,7 +534,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -624,18 +558,15 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5 h1:bRb386wvrE+oBNdF1d/Xh9mQrfQ4ecYhW5qJ5GvTGT4= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -651,7 +582,6 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= @@ -668,13 +598,11 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/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= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -684,11 +612,8 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -696,7 +621,6 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -720,12 +644,10 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w 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-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -739,8 +661,6 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -749,8 +669,9 @@ golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -784,7 +705,6 @@ golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -826,8 +746,8 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -863,14 +783,15 @@ google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6 google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0 h1:ExR2D+5TYIrMphWgs5JCgwRhEDlPDXXrLwHHMgPHTXE= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.76.0 h1:UkZl25bR1FHNqtK/EKs3vCdpZtUO6gea3YElTwc8pQg= +google.golang.org/api v0.76.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -920,6 +841,7 @@ google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= @@ -937,8 +859,6 @@ google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= @@ -950,8 +870,13 @@ google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg= +google.golang.org/genproto v0.0.0-20220405205423-9d709892a2bf/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46 h1:G1IeWbjrqEq9ChWxEuRPJu6laA67+XgTFHVSAvepr38= +google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -979,8 +904,9 @@ google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1000,16 +926,14 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/flytestdlib/pbhash/pbhash.go b/flytestdlib/pbhash/pbhash.go index adfeca963f..9aff349190 100644 --- a/flytestdlib/pbhash/pbhash.go +++ b/flytestdlib/pbhash/pbhash.go @@ -15,13 +15,11 @@ var marshaller = &jsonpb.Marshaler{} func fromHashToByteArray(input [32]byte) []byte { output := make([]byte, 32) - for idx, val := range input { - output[idx] = val - } + copy(output, input[:]) return output } -// Generate a deterministic hash in bytes for the pb object +// ComputeHash generate a deterministic hash in bytes for the pb object func ComputeHash(ctx context.Context, pb proto.Message) ([]byte, error) { // We marshal the pb object to JSON first which should provide a consistent mapping of pb to json fields as stated // here: https://developers.google.com/protocol-buffers/docs/proto3#json diff --git a/flytestdlib/profutils/server.go b/flytestdlib/profutils/server.go index cd69326649..14089d550a 100644 --- a/flytestdlib/profutils/server.go +++ b/flytestdlib/profutils/server.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "net/http" + "time" "github.com/flyteorg/flytestdlib/config" "github.com/flyteorg/flytestdlib/logger" @@ -94,7 +95,13 @@ func configHandler(w http.ResponseWriter, req *http.Request) { // Starts an http server on the given port func StartProfilingServer(ctx context.Context, pprofPort int) error { logger.Infof(ctx, "Starting profiling server on port [%v]", pprofPort) - e := http.ListenAndServe(fmt.Sprintf(":%d", pprofPort), nil) + srv := &http.Server{ + ReadTimeout: 5 * time.Second, + WriteTimeout: 10 * time.Second, + Addr: fmt.Sprintf(":%d", pprofPort), + } + + e := srv.ListenAndServe() if e != nil { logger.Errorf(ctx, "Failed to start profiling server. Error: %v", e) return fmt.Errorf("failed to start profiling server, %s", e) diff --git a/flytestdlib/promutils/labeled/metric_option_test.go b/flytestdlib/promutils/labeled/metric_option_test.go index 0a070f7420..dc0f680d5d 100644 --- a/flytestdlib/promutils/labeled/metric_option_test.go +++ b/flytestdlib/promutils/labeled/metric_option_test.go @@ -2,12 +2,8 @@ package labeled import ( "testing" - - "github.com/stretchr/testify/assert" ) func TestMetricOption(t *testing.T) { - var opt MetricOption = &EmitUnlabeledMetric - _, isMetricOption := opt.(MetricOption) - assert.True(t, isMetricOption) + var _ MetricOption = &EmitUnlabeledMetric } diff --git a/flytestdlib/promutils/labeled/stopwatch.go b/flytestdlib/promutils/labeled/stopwatch.go index efca254003..c78872841f 100644 --- a/flytestdlib/promutils/labeled/stopwatch.go +++ b/flytestdlib/promutils/labeled/stopwatch.go @@ -23,12 +23,6 @@ type StopWatch struct { } // Start creates a new Instance of the StopWatch called a Timer that is closeable/stoppable. -// Common pattern to time a scope would be -// { -// timer := stopWatch.Start(ctx) -// defer timer.Stop() -// .... -// } func (c StopWatch) Start(ctx context.Context) Timer { w, err := c.StopWatchVec.GetMetricWith(contextutils.Values(ctx, c.labels...)) if err != nil { diff --git a/flytestdlib/promutils/labeled/stopwatch_test.go b/flytestdlib/promutils/labeled/stopwatch_test.go index 86b6378203..16f0b40139 100644 --- a/flytestdlib/promutils/labeled/stopwatch_test.go +++ b/flytestdlib/promutils/labeled/stopwatch_test.go @@ -14,6 +14,18 @@ import ( "github.com/stretchr/testify/assert" ) +func ExampleStopWatch_Start() { + ctx := context.Background() + stopWatch := NewStopWatch("test", "this is an example stopwatch", time.Millisecond, promutils.NewTestScope()) + { + timer := stopWatch.Start(ctx) + defer timer.Stop() + + // An operation you want to measure the time for. + time.Sleep(time.Second) + } +} + func TestLabeledStopWatch(t *testing.T) { UnsetMetricKeys() assert.NotPanics(t, func() { diff --git a/flytestdlib/promutils/scope.go b/flytestdlib/promutils/scope.go index 326094f3ae..f8db381f69 100644 --- a/flytestdlib/promutils/scope.go +++ b/flytestdlib/promutils/scope.go @@ -33,11 +33,6 @@ type StopWatch struct { // Start creates a new Instance of the StopWatch called a Timer that is closeable/stoppable. // Common pattern to time a scope would be -// { -// timer := stopWatch.Start() -// defer timer.Stop() -// .... -// } func (s StopWatch) Start() Timer { return Timer{ start: time.Now(), diff --git a/flytestdlib/promutils/scope_test.go b/flytestdlib/promutils/scope_test.go index b27c3b8df8..4c44c8bac3 100644 --- a/flytestdlib/promutils/scope_test.go +++ b/flytestdlib/promutils/scope_test.go @@ -24,6 +24,19 @@ func TestDurationToString(t *testing.T) { assert.Equal(t, "ns", DurationToString(1)) } +func ExampleStopWatch_Start() { + scope := NewTestScope() + stopWatch, _ := scope.NewStopWatch("test", "This is a test stop watch", time.Millisecond) + + { + timer := stopWatch.Start() + defer timer.Stop() + + // Do the operation you want to measure + time.Sleep(time.Second) + } +} + func TestNewScope(t *testing.T) { assert.Panics(t, func() { NewScope("") diff --git a/flytestdlib/storage/copy_impl.go b/flytestdlib/storage/copy_impl.go index 5b0bc3253d..0aa7327c7b 100644 --- a/flytestdlib/storage/copy_impl.go +++ b/flytestdlib/storage/copy_impl.go @@ -27,9 +27,9 @@ type copyMetrics struct { ReadFailureUnrelatedToCache prometheus.Counter } -// A naiive implementation for copy that reads all data locally then writes them to destination. +// CopyRaw is a naiive implementation for copy that reads all data locally then writes them to destination. // TODO: We should upstream an API change to stow to implement copy more natively. E.g. Use s3 copy: -// https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectUsingREST.html +// https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectUsingREST.html func (c copyImpl) CopyRaw(ctx context.Context, source, destination DataReference, opts Options) error { rc, err := c.rawStore.ReadRaw(ctx, source) diff --git a/flytestdlib/utils/auto_refresh_cache.go b/flytestdlib/utils/auto_refresh_cache.go index b29f384b13..0491ba86f2 100644 --- a/flytestdlib/utils/auto_refresh_cache.go +++ b/flytestdlib/utils/auto_refresh_cache.go @@ -47,10 +47,9 @@ const ( Delete ) -// Your implementation of this function for your cache instance is responsible for returning -// 1. The new CacheItem, and -// 2. What action should be taken. The sync function has no insight into your object, and needs to be -// told explicitly if the new item is different from the old one. +// CacheSyncItem is a func type. Your implementation of this function for your cache instance is responsible for returning +// The new CacheItem what action should be taken. The sync function has no insight into your object, and needs to be +// told explicitly if the new item is different from the old one. // Deprecated: This utility is deprecated, it has been refactored and moved into `cache` package. type CacheSyncItem func(ctx context.Context, obj CacheItem) ( newItem CacheItem, result CacheSyncAction, err error) @@ -123,17 +122,15 @@ func (w *autoRefreshCache) GetOrCreate(item CacheItem) (CacheItem, error) { return item, nil } -// This function is called internally by its own timer. Roughly, it will, -// - List keys -// - For each of the keys, call syncCb, which tells us if the item has been updated -// - If it has, then do a remove followed by an add. We can get away with this because it is guaranteed that -// this loop will run to completion before the next one begins. +// This function is called internally by its own timer. Roughly, it will list keys and for each of the keys, call +// syncCb, which tells us if the item has been updated. If it has, then do a remove followed by an add. We can get away +// with this because it is guaranteed that this loop will run to completion before the next one begins. // // What happens when the number of things that a user is trying to keep track of exceeds the size // of the cache? Trivial case where the cache is size 1 and we're trying to keep track of two things. -// * Plugin asks for update on item 1 - cache evicts item 2, stores 1 and returns it unchanged -// * Plugin asks for update on item 2 - cache evicts item 1, stores 2 and returns it unchanged -// * Sync loop updates item 2, repeat +// * Plugin asks for update on item 1 - cache evicts item 2, stores 1 and returns it unchanged +// * Plugin asks for update on item 2 - cache evicts item 1, stores 2 and returns it unchanged +// * Sync loop updates item 2, repeat func (w *autoRefreshCache) sync(ctx context.Context) { keys := w.lruMap.Keys() for _, k := range keys { diff --git a/flytestdlib/utils/prototest/test_type.pb.go b/flytestdlib/utils/prototest/test_type.pb.go index df4538bd69..7495748680 100644 --- a/flytestdlib/utils/prototest/test_type.pb.go +++ b/flytestdlib/utils/prototest/test_type.pb.go @@ -7,11 +7,12 @@ package prototest import ( + reflect "reflect" + sync "sync" + proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( From 9d05e81dd7618722deab7a67afc76a6a5231dd32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nick=20M=C3=BCller?= Date: Tue, 13 Sep 2022 00:42:23 +0200 Subject: [PATCH 177/191] Deletion of data from storage (#140) --- flytestdlib/storage/cached_rawstore.go | 14 +- flytestdlib/storage/cached_rawstore_test.go | 21 ++ flytestdlib/storage/mem_store.go | 11 + flytestdlib/storage/mem_store_test.go | 23 ++ flytestdlib/storage/storage.go | 3 + flytestdlib/storage/stow_store.go | 30 +++ flytestdlib/storage/stow_store_test.go | 224 +++++++++++++++++--- 7 files changed, 297 insertions(+), 29 deletions(-) diff --git a/flytestdlib/storage/cached_rawstore.go b/flytestdlib/storage/cached_rawstore.go index 71f8d66831..f3808282ab 100644 --- a/flytestdlib/storage/cached_rawstore.go +++ b/flytestdlib/storage/cached_rawstore.go @@ -33,7 +33,7 @@ type cachedRawStore struct { metrics *cacheMetrics } -// Head gets metadata about the reference. This should generally be a light weight operation. +// Head gets metadata about the reference. This should generally be a lightweight operation. func (s *cachedRawStore) Head(ctx context.Context, reference DataReference) (Metadata, error) { key := []byte(reference) if oRaw, err := s.cache.Get(key); err == nil { @@ -100,6 +100,18 @@ func (s *cachedRawStore) WriteRaw(ctx context.Context, reference DataReference, return err } +// Delete removes the referenced data from the cache as well as underlying store. +func (s *cachedRawStore) Delete(ctx context.Context, reference DataReference) error { + key := []byte(reference) + if deleted := s.cache.Del(key); deleted { + s.metrics.CacheHit.Inc() + } else { + s.metrics.CacheMiss.Inc() + } + + return s.RawStore.Delete(ctx, reference) +} + func newCacheMetrics(scope promutils.Scope) *cacheMetrics { return &cacheMetrics{ FetchLatency: scope.MustNewStopWatch("remote_fetch", "Total Time to read from remote metastore", time.Millisecond), diff --git a/flytestdlib/storage/cached_rawstore_test.go b/flytestdlib/storage/cached_rawstore_test.go index 50a03cbae4..85fa0be18c 100644 --- a/flytestdlib/storage/cached_rawstore_test.go +++ b/flytestdlib/storage/cached_rawstore_test.go @@ -57,6 +57,7 @@ type dummyStore struct { HeadCb func(ctx context.Context, reference DataReference) (Metadata, error) ReadRawCb func(ctx context.Context, reference DataReference) (io.ReadCloser, error) WriteRawCb func(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) error + DeleteCb func(ctx context.Context, reference DataReference) error } // CreateSignedURL creates a signed url with the provided properties. @@ -80,6 +81,10 @@ func (d *dummyStore) WriteRaw(ctx context.Context, reference DataReference, size return d.WriteRawCb(ctx, reference, size, opts, raw) } +func (d *dummyStore) Delete(ctx context.Context, reference DataReference) error { + return d.DeleteCb(ctx, reference) +} + func TestCachedRawStore(t *testing.T) { ctx := context.TODO() k1 := DataReference("k1") @@ -130,6 +135,12 @@ func TestCachedRawStore(t *testing.T) { } return nil, fmt.Errorf("err") }, + DeleteCb: func(ctx context.Context, reference DataReference) error { + if reference == "k1" { + return nil + } + return fmt.Errorf("err") + }, } store.copyImpl = newCopyImpl(store, metrics.copyMetrics) @@ -199,4 +210,14 @@ func TestCachedRawStore(t *testing.T) { assert.Equal(t, bigD, b) assert.True(t, readCalled) }) + + t.Run("DeleteExists", func(t *testing.T) { + err := cStore.Delete(ctx, k1) + assert.NoError(t, err) + }) + + t.Run("DeleteNotExists", func(t *testing.T) { + err := cStore.Delete(ctx, k2) + assert.Error(t, err) + }) } diff --git a/flytestdlib/storage/mem_store.go b/flytestdlib/storage/mem_store.go index 956d826358..ae9062fed9 100644 --- a/flytestdlib/storage/mem_store.go +++ b/flytestdlib/storage/mem_store.go @@ -42,6 +42,17 @@ func (s *InMemoryStore) ReadRaw(ctx context.Context, reference DataReference) (i return nil, os.ErrNotExist } +// Delete removes the referenced data from the cache map. +func (s *InMemoryStore) Delete(ctx context.Context, reference DataReference) error { + if _, found := s.cache[reference]; !found { + return os.ErrNotExist + } + + delete(s.cache, reference) + + return nil +} + func (s *InMemoryStore) WriteRaw(ctx context.Context, reference DataReference, size int64, opts Options, raw io.Reader) ( err error) { diff --git a/flytestdlib/storage/mem_store_test.go b/flytestdlib/storage/mem_store_test.go index 131136a801..829b086a26 100644 --- a/flytestdlib/storage/mem_store_test.go +++ b/flytestdlib/storage/mem_store_test.go @@ -69,3 +69,26 @@ func TestInMemoryStore_Clear(t *testing.T) { assert.Error(t, err) assert.True(t, IsNotFound(err)) } + +func TestInMemoryStore_Delete(t *testing.T) { + m, err := NewInMemoryRawStore(&Config{}, metrics) + assert.NoError(t, err) + + mStore := m.(*InMemoryStore) + err = m.WriteRaw(context.TODO(), DataReference("hello"), 0, Options{}, bytes.NewReader([]byte("world"))) + assert.NoError(t, err) + + _, err = m.ReadRaw(context.TODO(), DataReference("hello")) + assert.NoError(t, err) + + err = mStore.Delete(context.TODO(), DataReference("hello")) + assert.NoError(t, err) + + _, err = m.ReadRaw(context.TODO(), DataReference("hello")) + assert.Error(t, err) + assert.True(t, IsNotFound(err)) + + err = mStore.Delete(context.TODO(), DataReference("hello")) + assert.Error(t, err) + assert.True(t, IsNotFound(err)) +} diff --git a/flytestdlib/storage/storage.go b/flytestdlib/storage/storage.go index d6ccf080e0..f380c419a5 100644 --- a/flytestdlib/storage/storage.go +++ b/flytestdlib/storage/storage.go @@ -79,6 +79,9 @@ type RawStore interface { // CopyRaw copies from source to destination. CopyRaw(ctx context.Context, source, destination DataReference, opts Options) error + + // Delete removes the referenced data from the blob store. + Delete(ctx context.Context, reference DataReference) error } //go:generate mockery -name ReferenceConstructor -case=underscore diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index d5132d5468..75eeb666b9 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -87,6 +87,9 @@ type stowMetrics struct { WriteFailure labeled.Counter WriteLatency labeled.StopWatch + + DeleteFailure labeled.Counter + DeleteLatency labeled.StopWatch } // Metadata that will be returned @@ -284,6 +287,30 @@ func (s *StowStore) WriteRaw(ctx context.Context, reference DataReference, size return nil } +// Delete removes the referenced data from the blob store. +func (s *StowStore) Delete(ctx context.Context, reference DataReference) error { + _, c, k, err := reference.Split() + if err != nil { + s.metrics.BadReference.Inc(ctx) + return err + } + + container, err := s.getContainer(ctx, locationIDMain, c) + if err != nil { + return err + } + + t := s.metrics.DeleteLatency.Start(ctx) + defer t.Stop() + + if err := container.RemoveItem(k); err != nil { + incFailureCounterForError(ctx, s.metrics.DeleteFailure, err) + return errs.Wrapf(err, "failed to remove item at path %q from container", k) + } + + return nil +} + func (s *StowStore) GetBaseContainerFQN(ctx context.Context) DataReference { return s.baseContainerFQN } @@ -379,6 +406,9 @@ func newStowMetrics(scope promutils.Scope) *stowMetrics { WriteFailure: labeled.NewCounter("write_failure", "Indicates failure in storing/PUT for a given reference", scope, labeled.EmitUnlabeledMetric, failureTypeOption), WriteLatency: labeled.NewStopWatch("write", "Time to write an object irrespective of size", time.Millisecond, scope, labeled.EmitUnlabeledMetric), + + DeleteFailure: labeled.NewCounter("delete_failure", "Indicates failure in removing/DELETE for a given reference", scope, labeled.EmitUnlabeledMetric, failureTypeOption), + DeleteLatency: labeled.NewStopWatch("delete", "Time to delete an object irrespective of size", time.Millisecond, scope, labeled.EmitUnlabeledMetric), } } diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index 15f12707bd..7da0c32ee2 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -77,7 +77,13 @@ func (mockStowContainer) Items(prefix, cursor string, count int) ([]stow.Item, s return []stow.Item{}, "", nil } -func (mockStowContainer) RemoveItem(id string) error { +func (m mockStowContainer) RemoveItem(id string) error { + if _, found := m.items[id]; !found { + return stow.ErrNotFound + } + + delete(m.items, id) + return nil } @@ -223,6 +229,7 @@ func TestStowStore_CreateSignedURL(t *testing.T) { func TestStowStore_ReadRaw(t *testing.T) { const container = "container" t.Run("Happy Path", func(t *testing.T) { + ctx := context.Background() fn := fQNFn["s3"] s, err := NewStowRawStore(fn(container), &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { @@ -239,12 +246,8 @@ func TestStowStore_ReadRaw(t *testing.T) { }, }, nil, false, metrics) assert.NoError(t, err) - err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 0, Options{}, bytes.NewReader([]byte{})) - assert.NoError(t, err) - metadata, err := s.Head(context.TODO(), DataReference("s3://container/path")) - assert.NoError(t, err) - assert.True(t, metadata.Exists()) - raw, err := s.ReadRaw(context.TODO(), DataReference("s3://container/path")) + dataReference := writeTestFile(ctx, t, s, "s3://container/path") + raw, err := s.ReadRaw(ctx, dataReference) assert.NoError(t, err) rawBytes, err := ioutil.ReadAll(raw) assert.NoError(t, err) @@ -253,6 +256,7 @@ func TestStowStore_ReadRaw(t *testing.T) { }) t.Run("Exceeds limit", func(t *testing.T) { + ctx := context.Background() fn := fQNFn["s3"] s, err := NewStowRawStore(fn(container), &mockStowLoc{ @@ -270,18 +274,15 @@ func TestStowStore_ReadRaw(t *testing.T) { }, }, nil, false, metrics) assert.NoError(t, err) - err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 3*MiB, Options{}, bytes.NewReader([]byte{})) - assert.NoError(t, err) - metadata, err := s.Head(context.TODO(), DataReference("s3://container/path")) - assert.NoError(t, err) - assert.True(t, metadata.Exists()) - _, err = s.ReadRaw(context.TODO(), DataReference("s3://container/path")) + dataReference := writeTestFileWithSize(ctx, t, s, "s3://container/path", 3*MiB) + _, err = s.ReadRaw(ctx, dataReference) assert.Error(t, err) assert.True(t, IsExceedsLimit(err)) assert.NotNil(t, errors.Cause(err)) }) t.Run("No Limit", func(t *testing.T) { + ctx := context.Background() fn := fQNFn["s3"] GetConfig().Limits.GetLimitMegabytes = 0 @@ -300,16 +301,13 @@ func TestStowStore_ReadRaw(t *testing.T) { }, }, nil, false, metrics) assert.NoError(t, err) - err = s.WriteRaw(context.TODO(), DataReference("s3://container/path"), 3*MiB, Options{}, bytes.NewReader([]byte{})) - assert.NoError(t, err) - metadata, err := s.Head(context.TODO(), DataReference("s3://container/path")) - assert.NoError(t, err) - assert.True(t, metadata.Exists()) - _, err = s.ReadRaw(context.TODO(), DataReference("s3://container/path")) + dataReference := writeTestFileWithSize(ctx, t, s, "s3://container/path", 3*MiB) + _, err = s.ReadRaw(ctx, dataReference) assert.Nil(t, err) }) t.Run("Happy Path multi-container enabled", func(t *testing.T) { + ctx := context.Background() fn := fQNFn["s3"] s, err := NewStowRawStore(fn(container), &mockStowLoc{ ContainerCb: func(id string) (stow.Container, error) { @@ -328,13 +326,8 @@ func TestStowStore_ReadRaw(t *testing.T) { }, }, nil, true, metrics) assert.NoError(t, err) - err = s.WriteRaw(context.TODO(), "s3://bad-container/path", 0, Options{}, bytes.NewReader([]byte{})) - assert.NoError(t, err) - metadata, err := s.Head(context.TODO(), "s3://bad-container/path") - if assert.NoError(t, err) { - assert.True(t, metadata.Exists()) - } - raw, err := s.ReadRaw(context.TODO(), "s3://bad-container/path") + dataReference := writeTestFile(ctx, t, s, "s3://bad-container/path") + raw, err := s.ReadRaw(context.TODO(), dataReference) assert.NoError(t, err) rawBytes, err := ioutil.ReadAll(raw) assert.NoError(t, err) @@ -553,7 +546,7 @@ func TestLoadContainer(t *testing.T) { }, }, } - _, err := stowStore.LoadContainer(context.Background(), "container", true) + _, err := stowStore.LoadContainer(context.TODO(), "container", true) assert.EqualError(t, err, "unable to initialize container [container]. Error: foo") }) t.Run("No create if not found", func(t *testing.T) { @@ -567,7 +560,7 @@ func TestLoadContainer(t *testing.T) { }, }, } - _, err := stowStore.LoadContainer(context.Background(), "container", false) + _, err := stowStore.LoadContainer(context.TODO(), "container", false) assert.EqualError(t, err, stow.ErrNotFound.Error()) }) } @@ -638,3 +631,178 @@ func TestStowStore_fQNFn(t *testing.T) { assert.Equal(t, DataReference("abfs://bucket"), fQNFn[azure.Kind]("bucket")) assert.Equal(t, DataReference("file://bucket"), fQNFn[local.Kind]("bucket")) } + +func TestStowStore_Delete(t *testing.T) { + const container = "container" + + t.Run("Happy Path", func(t *testing.T) { + ctx := context.TODO() + fn := fQNFn["s3"] + + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, nil, false, metrics) + assert.NoError(t, err) + + dataReference := writeTestFile(ctx, t, s, "s3://container/path") + + err = s.Delete(ctx, dataReference) + assert.NoError(t, err) + + metadata, err := s.Head(ctx, dataReference) + assert.NoError(t, err) + assert.False(t, metadata.Exists()) + }) + + t.Run("Happy Path multi-container enabled", func(t *testing.T) { + ctx := context.TODO() + fn := fQNFn["s3"] + + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } else if id == "bad-container" { + return newMockStowContainer("bad-container"), nil + } + return nil, fmt.Errorf("container is not supported") + }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, nil, true, metrics) + assert.NoError(t, err) + + dataReference := writeTestFile(ctx, t, s, "s3://container/path") + dataReference2 := writeTestFile(ctx, t, s, "s3://bad-container/path") + + err = s.Delete(ctx, dataReference) + assert.NoError(t, err) + err = s.Delete(ctx, dataReference2) + assert.NoError(t, err) + + metadata, err := s.Head(ctx, dataReference) + assert.NoError(t, err) + assert.False(t, metadata.Exists()) + metadata, err = s.Head(ctx, dataReference2) + assert.NoError(t, err) + assert.False(t, metadata.Exists()) + }) + + t.Run("Unknown item", func(t *testing.T) { + ctx := context.TODO() + fn := fQNFn["s3"] + + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, nil, false, metrics) + assert.NoError(t, err) + + dataReference := writeTestFile(ctx, t, s, "s3://container/path") + + err = s.Delete(ctx, DataReference("s3://container/bad-path")) + assert.Error(t, err) + assert.True(t, errors.Is(err, stow.ErrNotFound)) + + metadata, err := s.Head(ctx, dataReference) + assert.NoError(t, err) + assert.True(t, metadata.Exists()) + }) + + t.Run("Unknown container", func(t *testing.T) { + ctx := context.TODO() + fn := fQNFn["s3"] + + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, nil, false, metrics) + assert.NoError(t, err) + + dataReference := writeTestFile(ctx, t, s, "s3://container/path") + + err = s.Delete(ctx, DataReference("s3://bad-container/path")) + assert.Error(t, err) + assert.True(t, errors.Is(err, stow.ErrNotFound)) + + metadata, err := s.Head(ctx, dataReference) + assert.NoError(t, err) + assert.True(t, metadata.Exists()) + }) + + t.Run("Invalid data reference", func(t *testing.T) { + ctx := context.TODO() + fn := fQNFn["s3"] + + s, err := NewStowRawStore(fn(container), &mockStowLoc{ + ContainerCb: func(id string) (stow.Container, error) { + if id == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + CreateContainerCb: func(name string) (stow.Container, error) { + if name == container { + return newMockStowContainer(container), nil + } + return nil, fmt.Errorf("container is not supported") + }, + }, nil, false, metrics) + assert.NoError(t, err) + + err = s.Delete(ctx, DataReference("://bad-container/path")) + assert.Error(t, err) + }) +} + +func writeTestFile(ctx context.Context, t *testing.T, s *StowStore, path string) DataReference { + return writeTestFileWithSize(ctx, t, s, path, 0) +} + +func writeTestFileWithSize(ctx context.Context, t *testing.T, s *StowStore, path string, size int64) DataReference { + reference := DataReference(path) + + err := s.WriteRaw(ctx, reference, size, Options{}, bytes.NewReader([]byte{})) + assert.NoError(t, err) + + metadata, err := s.Head(ctx, reference) + assert.NoError(t, err) + assert.True(t, metadata.Exists()) + + return reference +} From a25a57d3fc9598d74646f5d2a4a7d8b89b3b949e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nick=20M=C3=BCller?= Date: Mon, 31 Oct 2022 22:26:42 +0100 Subject: [PATCH 178/191] NewDefaultProtobufStore accepts scope instead of metrics again (#141) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Required in propeller tests (protoMetrics are not exported) Added NewDefaultProtobufStoreWithMetrics for package internal usage Ran make generate Signed-off-by: Nick Müller Signed-off-by: Nick Müller --- .../storage/mocks/composed_protobuf_store.go | 32 +++++++++++++++++++ flytestdlib/storage/mocks/raw_store.go | 32 +++++++++++++++++++ flytestdlib/storage/protobuf_store.go | 6 +++- flytestdlib/storage/protobuf_store_test.go | 2 +- flytestdlib/storage/rawstores.go | 2 +- 5 files changed, 71 insertions(+), 3 deletions(-) diff --git a/flytestdlib/storage/mocks/composed_protobuf_store.go b/flytestdlib/storage/mocks/composed_protobuf_store.go index 6e28fbbf2a..0b645edada 100644 --- a/flytestdlib/storage/mocks/composed_protobuf_store.go +++ b/flytestdlib/storage/mocks/composed_protobuf_store.go @@ -89,6 +89,38 @@ func (_m *ComposedProtobufStore) CreateSignedURL(ctx context.Context, reference return r0, r1 } +type ComposedProtobufStore_Delete struct { + *mock.Call +} + +func (_m ComposedProtobufStore_Delete) Return(_a0 error) *ComposedProtobufStore_Delete { + return &ComposedProtobufStore_Delete{Call: _m.Call.Return(_a0)} +} + +func (_m *ComposedProtobufStore) OnDelete(ctx context.Context, reference storage.DataReference) *ComposedProtobufStore_Delete { + c := _m.On("Delete", ctx, reference) + return &ComposedProtobufStore_Delete{Call: c} +} + +func (_m *ComposedProtobufStore) OnDeleteMatch(matchers ...interface{}) *ComposedProtobufStore_Delete { + c := _m.On("Delete", matchers...) + return &ComposedProtobufStore_Delete{Call: c} +} + +// Delete provides a mock function with given fields: ctx, reference +func (_m *ComposedProtobufStore) Delete(ctx context.Context, reference storage.DataReference) error { + ret := _m.Called(ctx, reference) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference) error); ok { + r0 = rf(ctx, reference) + } else { + r0 = ret.Error(0) + } + + return r0 +} + type ComposedProtobufStore_GetBaseContainerFQN struct { *mock.Call } diff --git a/flytestdlib/storage/mocks/raw_store.go b/flytestdlib/storage/mocks/raw_store.go index 9bda8187ad..cb9d9b150b 100644 --- a/flytestdlib/storage/mocks/raw_store.go +++ b/flytestdlib/storage/mocks/raw_store.go @@ -87,6 +87,38 @@ func (_m *RawStore) CreateSignedURL(ctx context.Context, reference storage.DataR return r0, r1 } +type RawStore_Delete struct { + *mock.Call +} + +func (_m RawStore_Delete) Return(_a0 error) *RawStore_Delete { + return &RawStore_Delete{Call: _m.Call.Return(_a0)} +} + +func (_m *RawStore) OnDelete(ctx context.Context, reference storage.DataReference) *RawStore_Delete { + c := _m.On("Delete", ctx, reference) + return &RawStore_Delete{Call: c} +} + +func (_m *RawStore) OnDeleteMatch(matchers ...interface{}) *RawStore_Delete { + c := _m.On("Delete", matchers...) + return &RawStore_Delete{Call: c} +} + +// Delete provides a mock function with given fields: ctx, reference +func (_m *RawStore) Delete(ctx context.Context, reference storage.DataReference) error { + ret := _m.Called(ctx, reference) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference) error); ok { + r0 = rf(ctx, reference) + } else { + r0 = ret.Error(0) + } + + return r0 +} + type RawStore_GetBaseContainerFQN struct { *mock.Call } diff --git a/flytestdlib/storage/protobuf_store.go b/flytestdlib/storage/protobuf_store.go index 1eca509679..e9a284dd58 100644 --- a/flytestdlib/storage/protobuf_store.go +++ b/flytestdlib/storage/protobuf_store.go @@ -92,7 +92,11 @@ func newProtoMetrics(scope promutils.Scope) *protoMetrics { } } -func NewDefaultProtobufStore(store RawStore, metrics *protoMetrics) DefaultProtobufStore { +func NewDefaultProtobufStore(store RawStore, scope promutils.Scope) DefaultProtobufStore { + return NewDefaultProtobufStoreWithMetrics(store, newProtoMetrics(scope)) +} + +func NewDefaultProtobufStoreWithMetrics(store RawStore, metrics *protoMetrics) DefaultProtobufStore { return DefaultProtobufStore{ RawStore: store, metrics: metrics, diff --git a/flytestdlib/storage/protobuf_store_test.go b/flytestdlib/storage/protobuf_store_test.go index d662ef536f..78b10ba8fd 100644 --- a/flytestdlib/storage/protobuf_store_test.go +++ b/flytestdlib/storage/protobuf_store_test.go @@ -157,7 +157,7 @@ func TestDefaultProtobufStore_HardErrors(t *testing.T) { return nil, fmt.Errorf(dummyReadErrorMsg) }, } - pbErroneousStore := NewDefaultProtobufStore(store, metrics.protoMetrics) + pbErroneousStore := NewDefaultProtobufStoreWithMetrics(store, metrics.protoMetrics) t.Run("Test if hard write errors are handled correctly", func(t *testing.T) { err := pbErroneousStore.WriteProtobuf(ctx, k1, Options{}, &mockProtoMessage{X: 5}) assert.False(t, IsFailedWriteToCache(err)) diff --git a/flytestdlib/storage/rawstores.go b/flytestdlib/storage/rawstores.go index f99cd8e3d3..eafeff54ca 100644 --- a/flytestdlib/storage/rawstores.go +++ b/flytestdlib/storage/rawstores.go @@ -106,7 +106,7 @@ func (ds *DataStore) RefreshConfig(cfg *Config) error { } rawStore = newCachedRawStore(cfg, rawStore, ds.metrics.cacheMetrics) - protoStore := NewDefaultProtobufStore(rawStore, ds.metrics.protoMetrics) + protoStore := NewDefaultProtobufStoreWithMetrics(rawStore, ds.metrics.protoMetrics) newDS := NewCompositeDataStore(NewURLPathConstructor(), protoStore) newDS.metrics = ds.metrics *ds = *newDS From 54dd736d762c3abf4bce97698ddeac8451c433e7 Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Wed, 2 Nov 2022 11:12:08 -0500 Subject: [PATCH 179/191] bump go versions to 1.18 (#142) Signed-off-by: Dan Rammer Signed-off-by: Dan Rammer --- flytestdlib/.github/workflows/master.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flytestdlib/.github/workflows/master.yml b/flytestdlib/.github/workflows/master.yml index a69588c308..34294a3a3f 100644 --- a/flytestdlib/.github/workflows/master.yml +++ b/flytestdlib/.github/workflows/master.yml @@ -35,7 +35,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: '1.17' + go-version: '1.18' - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: @@ -54,7 +54,7 @@ jobs: fetch-depth: "0" - uses: actions/setup-go@v2 with: - go-version: '1.17' + go-version: '1.18' - name: Unit Tests run: make mod_download && make test_unit_codecov - name: Push CodeCov @@ -65,7 +65,7 @@ jobs: fail_ci_if_error: true - uses: actions/setup-go@v2 with: - go-version: '1.17' + go-version: '1.18' - name: Lint run: make install && make lint - name: Bench tests From 346c1d9c35f612c6ce5eb491a21efbc81e434391 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Mon, 7 Nov 2022 23:43:03 +0100 Subject: [PATCH 180/191] codecov action version bump (#143) * Updated codecov action version to 3.1.1 Signed-off-by: Ali Abbas Jaffri * Removed codecov updater utility Signed-off-by: Ali Abbas Jaffri Signed-off-by: Ali Abbas Jaffri --- flytestdlib/.github/workflows/master.yml | 2 +- flytestdlib/Makefile | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/flytestdlib/.github/workflows/master.yml b/flytestdlib/.github/workflows/master.yml index 34294a3a3f..3209583876 100644 --- a/flytestdlib/.github/workflows/master.yml +++ b/flytestdlib/.github/workflows/master.yml @@ -58,7 +58,7 @@ jobs: - name: Unit Tests run: make mod_download && make test_unit_codecov - name: Push CodeCov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3.1.1 with: file: coverage.txt flags: unittests diff --git a/flytestdlib/Makefile b/flytestdlib/Makefile index 80ed5f0178..0b5dae5a70 100644 --- a/flytestdlib/Makefile +++ b/flytestdlib/Makefile @@ -28,4 +28,3 @@ compile: .PHONY: test_unit_codecov test_unit_codecov: go test ./... -race -coverprofile=coverage.txt -covermode=atomic - curl -s https://codecov.io/bash > codecov_bash.sh && bash codecov_bash.sh From 2d1e7395e45bf00599fb648ad519b6a7ea2f9a04 Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Mon, 14 Nov 2022 10:47:51 -0600 Subject: [PATCH 181/191] Ignore codecov upload failures (#144) * disable codecov Signed-off-by: Dan Rammer * bump codecov action verison Signed-off-by: Dan Rammer Signed-off-by: Dan Rammer --- flytestdlib/.github/workflows/master.yml | 2 +- flytestdlib/.github/workflows/pull_request.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flytestdlib/.github/workflows/master.yml b/flytestdlib/.github/workflows/master.yml index 3209583876..fdfb76d518 100644 --- a/flytestdlib/.github/workflows/master.yml +++ b/flytestdlib/.github/workflows/master.yml @@ -62,7 +62,7 @@ jobs: with: file: coverage.txt flags: unittests - fail_ci_if_error: true + fail_ci_if_error: false - uses: actions/setup-go@v2 with: go-version: '1.18' diff --git a/flytestdlib/.github/workflows/pull_request.yml b/flytestdlib/.github/workflows/pull_request.yml index fbc7b27ccf..88d81f6202 100644 --- a/flytestdlib/.github/workflows/pull_request.yml +++ b/flytestdlib/.github/workflows/pull_request.yml @@ -17,11 +17,11 @@ jobs: - name: Unit Tests run: make mod_download && make test_unit_codecov - name: Push CodeCov - uses: codecov/codecov-action@v1.5.2 + uses: codecov/codecov-action@v3.1.1 with: file: coverage.txt flags: unittests - fail_ci_if_error: true + fail_ci_if_error: false - name: Bench tests run: make install && make test_benchmark lint: From 2fa2c4e1551ee634fde8bf28152cc9f4f37d7384 Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Fri, 2 Dec 2022 15:58:53 -0600 Subject: [PATCH 182/191] adding signal to context (#137) Signed-off-by: Daniel Rammer Signed-off-by: Daniel Rammer --- flytestdlib/contextutils/context.go | 6 ++++++ flytestdlib/contextutils/context_test.go | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/flytestdlib/contextutils/context.go b/flytestdlib/contextutils/context.go index 9bc6a48d79..3b8224a79c 100644 --- a/flytestdlib/contextutils/context.go +++ b/flytestdlib/contextutils/context.go @@ -24,6 +24,7 @@ const ( RoutineLabelKey Key = "routine" LaunchPlanIDKey Key = "lp" ResourceVersionKey Key = "res_ver" + SignalIDKey Key = "signal" ) func (k Key) String() string { @@ -126,6 +127,11 @@ func WithTaskType(ctx context.Context, taskType string) context.Context { return context.WithValue(ctx, TaskTypeKey, taskType) } +// Gets a new context with SignalID set. +func WithSignalID(ctx context.Context, signalID string) context.Context { + return context.WithValue(ctx, SignalIDKey, signalID) +} + // Gets a new context with Go Routine label key set and a label assigned to the context using pprof.Labels. // You can then call pprof.SetGoroutineLabels(ctx) to annotate the current go-routine and have that show up in // pprof analysis. diff --git a/flytestdlib/contextutils/context_test.go b/flytestdlib/contextutils/context_test.go index e2effe3a6b..f6cb842731 100644 --- a/flytestdlib/contextutils/context_test.go +++ b/flytestdlib/contextutils/context_test.go @@ -102,6 +102,13 @@ func TestWithTaskID(t *testing.T) { assert.Equal(t, "task", ctx.Value(TaskIDKey)) } +func TestWithSignalID(t *testing.T) { + ctx := context.Background() + assert.Nil(t, ctx.Value(SignalIDKey)) + ctx = WithSignalID(ctx, "signal") + assert.Equal(t, "signal", ctx.Value(SignalIDKey)) +} + func TestGetFields(t *testing.T) { ctx := context.Background() ctx = WithJobID(WithNamespace(ctx, "ns123"), "job123") From 9ad34a10e67b6716713cbaaa4ba115b0749f965c Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Tue, 7 Feb 2023 06:52:12 -0600 Subject: [PATCH 183/191] bumping go version to 1.19 (#150) Signed-off-by: Daniel Rammer --- flytestdlib/.github/workflows/master.yml | 6 +++--- flytestdlib/.github/workflows/pull_request.yml | 6 +++--- flytestdlib/go.mod | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/flytestdlib/.github/workflows/master.yml b/flytestdlib/.github/workflows/master.yml index fdfb76d518..3c25d004e4 100644 --- a/flytestdlib/.github/workflows/master.yml +++ b/flytestdlib/.github/workflows/master.yml @@ -35,7 +35,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: '1.18' + go-version: '1.19' - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: @@ -54,7 +54,7 @@ jobs: fetch-depth: "0" - uses: actions/setup-go@v2 with: - go-version: '1.18' + go-version: '1.19' - name: Unit Tests run: make mod_download && make test_unit_codecov - name: Push CodeCov @@ -65,7 +65,7 @@ jobs: fail_ci_if_error: false - uses: actions/setup-go@v2 with: - go-version: '1.18' + go-version: '1.19' - name: Lint run: make install && make lint - name: Bench tests diff --git a/flytestdlib/.github/workflows/pull_request.yml b/flytestdlib/.github/workflows/pull_request.yml index 88d81f6202..39c22142a3 100644 --- a/flytestdlib/.github/workflows/pull_request.yml +++ b/flytestdlib/.github/workflows/pull_request.yml @@ -13,7 +13,7 @@ jobs: fetch-depth: "0" - uses: actions/setup-go@v2 with: - go-version: '1.18' + go-version: '1.19' - name: Unit Tests run: make mod_download && make test_unit_codecov - name: Push CodeCov @@ -28,7 +28,7 @@ jobs: name: Lint uses: flyteorg/flytetools/.github/workflows/lint.yml@master with: - go-version: '1.18' + go-version: '1.19' test-generate-integrity: name: Ensure go generate has run runs-on: ubuntu-latest @@ -39,7 +39,7 @@ jobs: fetch-depth: "0" - uses: actions/setup-go@v2 with: - go-version: '1.18' + go-version: '1.19' - name: Go generate and diff run: DELTA_CHECK=true make generate diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 5002bbeadb..6119e61c3b 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -1,6 +1,6 @@ module github.com/flyteorg/flytestdlib -go 1.18 +go 1.19 require ( github.com/aws/aws-sdk-go v1.44.2 From 406ca6c32b810eb71f1936c61aa373c30ac598df Mon Sep 17 00:00:00 2001 From: Iaroslav Ciupin Date: Sat, 11 Feb 2023 21:18:58 +0200 Subject: [PATCH 184/191] Add git branch to version package (#151) * Add git branch to version package Signed-off-by: Iaroslav Ciupin --- flytestdlib/version/version.go | 9 ++++++++- flytestdlib/version/version_test.go | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/flytestdlib/version/version.go b/flytestdlib/version/version.go index 08536c05e4..edddc4c421 100644 --- a/flytestdlib/version/version.go +++ b/flytestdlib/version/version.go @@ -1,6 +1,7 @@ package version import ( + "fmt" "time" "github.com/sirupsen/logrus" @@ -18,12 +19,18 @@ var ( Version = "unknown" // Build timestamp BuildTime = time.Now().String() + // Git branch that was used to build the binary + GitBranch = "" ) // Use this method to log the build information for the current app. The app name should be provided. To inject the build // and version information refer to the top-level comment in this file func LogBuildInformation(appName string) { logrus.Info("------------------------------------------------------------------------") - logrus.Infof("App [%s], Version [%s], BuildSHA [%s], BuildTS [%s]", appName, Version, Build, BuildTime) + msg := fmt.Sprintf("App [%s], Version [%s], BuildSHA [%s], BuildTS [%s]", appName, Version, Build, BuildTime) + if GitBranch != "" { + msg += fmt.Sprintf(", Git Branch [%s]", GitBranch) + } + logrus.Info(msg) logrus.Info("------------------------------------------------------------------------") } diff --git a/flytestdlib/version/version_test.go b/flytestdlib/version/version_test.go index be7826ab76..933507567c 100644 --- a/flytestdlib/version/version_test.go +++ b/flytestdlib/version/version_test.go @@ -21,9 +21,10 @@ func TestLogBuildInformation(t *testing.T) { n := time.Now() BuildTime = n.String() + GitBranch = "main" buf := bytes.NewBufferString("") logrus.SetFormatter(dFormat{}) logrus.SetOutput(buf) LogBuildInformation("hello") - assert.Equal(t, buf.String(), fmt.Sprintf("------------------------------------------------------------------------App [hello], Version [unknown], BuildSHA [unknown], BuildTS [%s]------------------------------------------------------------------------", n.String())) + assert.Equal(t, buf.String(), fmt.Sprintf("------------------------------------------------------------------------App [hello], Version [unknown], BuildSHA [unknown], BuildTS [%s], Git Branch [main]------------------------------------------------------------------------", n.String())) } From 7376dd0abc86e7f2764001827f6f786d7c672727 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Sat, 8 Apr 2023 09:44:17 -0700 Subject: [PATCH 185/191] Add a new requestID to Log fields (#157) * Add a new requestID to Log fields Signed-off-by: Haytham Abuelfutuh * Also set the requestID on grpc outgoing requests Signed-off-by: Haytham Abuelfutuh * set key and value Signed-off-by: Haytham Abuelfutuh * lint :( Signed-off-by: Haytham Abuelfutuh * Use more commonly used string for request id Signed-off-by: Haytham Abuelfutuh * using request-id instead per PR Comment discussion Signed-off-by: Haytham Abuelfutuh * reverting to x- prefix to keep OOB behavior sane Signed-off-by: Haytham Abuelfutuh --------- Signed-off-by: Haytham Abuelfutuh --- flytestdlib/contextutils/context.go | 44 +++++++++++++++--------- flytestdlib/contextutils/context_test.go | 3 +- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/flytestdlib/contextutils/context.go b/flytestdlib/contextutils/context.go index 3b8224a79c..797d9a8089 100644 --- a/flytestdlib/contextutils/context.go +++ b/flytestdlib/contextutils/context.go @@ -1,10 +1,12 @@ -// Contains common flyte context utils. +// Package contextutils contains common flyte context utils. package contextutils import ( "context" "fmt" "runtime/pprof" + + "google.golang.org/grpc/metadata" ) type Key string @@ -25,6 +27,7 @@ const ( LaunchPlanIDKey Key = "lp" ResourceVersionKey Key = "res_ver" SignalIDKey Key = "signal" + RequestIDKey Key = "x-request-id" ) func (k Key) String() string { @@ -43,6 +46,7 @@ var logKeys = []Key{ RoutineLabelKey, LaunchPlanIDKey, ResourceVersionKey, + RequestIDKey, } // MetricKeysFromStrings is a convenience method to convert a slice of strings into a slice of Keys @@ -56,17 +60,17 @@ func MetricKeysFromStrings(keys []string) []Key { return res } -// Gets a new context with the resource version set. +// WithResourceVersion gets a new context with the resource version set. func WithResourceVersion(ctx context.Context, resourceVersion string) context.Context { return context.WithValue(ctx, ResourceVersionKey, resourceVersion) } -// Gets a new context with namespace set. +// WithNamespace gets a new context with namespace set. func WithNamespace(ctx context.Context, namespace string) context.Context { return context.WithValue(ctx, NamespaceKey, namespace) } -// Gets a new context with JobId set. If the existing context already has a job id, the new context will have +// WithJobID gets a new context with JobId set. If the existing context already has a job id, the new context will have // / set as the job id. func WithJobID(ctx context.Context, jobID string) context.Context { existingJobID := ctx.Value(JobIDKey) @@ -77,22 +81,22 @@ func WithJobID(ctx context.Context, jobID string) context.Context { return context.WithValue(ctx, JobIDKey, jobID) } -// Gets a new context with AppName set. +// WithAppName gets a new context with AppName set. func WithAppName(ctx context.Context, appName string) context.Context { return context.WithValue(ctx, AppNameKey, appName) } -// Gets a new context with Phase set. +// WithPhase gets a new context with Phase set. func WithPhase(ctx context.Context, phase string) context.Context { return context.WithValue(ctx, PhaseKey, phase) } -// Gets a new context with ExecutionID set. +// WithExecutionID gets a new context with ExecutionID set. func WithExecutionID(ctx context.Context, execID string) context.Context { return context.WithValue(ctx, ExecIDKey, execID) } -// Gets a new context with NodeID (nested) set. +// WithNodeID gets a new context with NodeID (nested) set. func WithNodeID(ctx context.Context, nodeID string) context.Context { existingNodeID := ctx.Value(NodeIDKey) if existingNodeID != nil { @@ -101,38 +105,44 @@ func WithNodeID(ctx context.Context, nodeID string) context.Context { return context.WithValue(ctx, NodeIDKey, nodeID) } -// Gets a new context with WorkflowName set. +// WithWorkflowID gets a new context with WorkflowName set. func WithWorkflowID(ctx context.Context, workflow string) context.Context { return context.WithValue(ctx, WorkflowIDKey, workflow) } -// Gets a new context with a launch plan ID set. +// WithLaunchPlanID gets a new context with a launch plan ID set. func WithLaunchPlanID(ctx context.Context, launchPlan string) context.Context { return context.WithValue(ctx, LaunchPlanIDKey, launchPlan) } -// Get new context with Project and Domain values set +// WithProjectDomain gets new context with Project and Domain values set func WithProjectDomain(ctx context.Context, project, domain string) context.Context { c := context.WithValue(ctx, ProjectKey, project) return context.WithValue(c, DomainKey, domain) } -// Gets a new context with WorkflowName set. +// WithTaskID gets a new context with WorkflowName set. func WithTaskID(ctx context.Context, taskID string) context.Context { return context.WithValue(ctx, TaskIDKey, taskID) } -// Gets a new context with TaskType set. +// WithTaskType gets a new context with TaskType set. func WithTaskType(ctx context.Context, taskType string) context.Context { return context.WithValue(ctx, TaskTypeKey, taskType) } -// Gets a new context with SignalID set. +// WithSignalID gets a new context with SignalID set. func WithSignalID(ctx context.Context, signalID string) context.Context { return context.WithValue(ctx, SignalIDKey, signalID) } -// Gets a new context with Go Routine label key set and a label assigned to the context using pprof.Labels. +// WithRequestID gets a new context with RequestID set. +func WithRequestID(ctx context.Context, requestID string) context.Context { + return metadata.AppendToOutgoingContext(context.WithValue(ctx, RequestIDKey, requestID), RequestIDKey.String(), requestID) +} + +// WithGoroutineLabel gets a new context with Go Routine label key set and a label assigned to the context using +// pprof.Labels. // You can then call pprof.SetGoroutineLabels(ctx) to annotate the current go-routine and have that show up in // pprof analysis. func WithGoroutineLabel(ctx context.Context, routineLabel string) context.Context { @@ -156,8 +166,8 @@ func addStringFieldWithDefaults(ctx context.Context, m map[string]string, fieldK m[fieldKey.String()] = val.(string) } -// Gets a map of all known logKeys set on the context. logKeys are special and should be used incase, context fields -// are to be added to the log lines. +// GetLogFields gets a map of all known logKeys set on the context. logKeys are special and should be used incase, +// context fields are to be added to the log lines. func GetLogFields(ctx context.Context) map[string]interface{} { res := map[string]interface{}{} for _, k := range logKeys { diff --git a/flytestdlib/contextutils/context_test.go b/flytestdlib/contextutils/context_test.go index f6cb842731..976a2184be 100644 --- a/flytestdlib/contextutils/context_test.go +++ b/flytestdlib/contextutils/context_test.go @@ -111,10 +111,11 @@ func TestWithSignalID(t *testing.T) { func TestGetFields(t *testing.T) { ctx := context.Background() - ctx = WithJobID(WithNamespace(ctx, "ns123"), "job123") + ctx = WithRequestID(WithJobID(WithNamespace(ctx, "ns123"), "job123"), "req123") m := GetLogFields(ctx) assert.Equal(t, "ns123", m[NamespaceKey.String()]) assert.Equal(t, "job123", m[JobIDKey.String()]) + assert.Equal(t, "req123", m[RequestIDKey.String()]) } func TestValues(t *testing.T) { From 7c33e872b661c8207e625ec1284e84e1c9eeadcc Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Fri, 7 Jul 2023 07:35:51 -0700 Subject: [PATCH 186/191] Update .goreleaser.yml (#158) --- flytestdlib/.goreleaser.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/flytestdlib/.goreleaser.yml b/flytestdlib/.goreleaser.yml index 4c49f2f96e..ee92bdce36 100644 --- a/flytestdlib/.goreleaser.yml +++ b/flytestdlib/.goreleaser.yml @@ -13,12 +13,16 @@ builds: ldflags: - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} archives: - - replacements: - darwin: macOS - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 + - name_template: |- + flytestdlib_{{ .Tag }}_ + {{- if eq .Os "darwin" }}Darwin + {{- else if eq .Os "linux" }}Linux + {{- else if eq .Os "windows" }}Windows + {{- else }}{{ .Os }}{{ end }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} format_overrides: - goos: windows format: zip From 8f33134b218515af49e80649ac842c9686b7fd8c Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Fri, 7 Jul 2023 10:29:46 -0700 Subject: [PATCH 187/191] Extend length of docs section to 120 characters (#159) Signed-off-by: eduardo apolinario Co-authored-by: eduardo apolinario --- flytestdlib/config/config_cmd.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/flytestdlib/config/config_cmd.go b/flytestdlib/config/config_cmd.go index 086009e263..97db03f958 100644 --- a/flytestdlib/config/config_cmd.go +++ b/flytestdlib/config/config_cmd.go @@ -16,11 +16,12 @@ import ( ) const ( - PathFlag = "file" - StrictModeFlag = "strict" - CommandValidate = "validate" - CommandDiscover = "discover" - CommandDocs = "docs" + PathFlag = "file" + StrictModeFlag = "strict" + CommandValidate = "validate" + CommandDiscover = "discover" + CommandDocs = "docs" + DocsSectionLength = 120 ) type AccessorProvider func(options Options) Accessor @@ -182,10 +183,10 @@ func printToc(orderedSectionKeys sets.String) { func printTitle(title string, isSubsection bool) { if isSubsection { fmt.Println(title) - fmt.Println(strings.Repeat("^", 80)) + fmt.Println(strings.Repeat("^", DocsSectionLength)) } else { fmt.Println("Section:", title) - fmt.Println(strings.Repeat("=", 80)) + fmt.Println(strings.Repeat("=", DocsSectionLength)) } fmt.Println() } @@ -198,7 +199,7 @@ func printSection(name string, dataType string, defaultValue string, description fmt.Printf("%s ", name) fmt.Printf("(%s)\n", dataType) - fmt.Println(strings.Repeat(c, 80)) + fmt.Println(strings.Repeat(c, DocsSectionLength)) fmt.Println() if description != "" { fmt.Printf("%s\n\n", description) From cefc926df61ea9a90bed86983062cabccb77cc90 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Tue, 11 Jul 2023 07:57:19 -0700 Subject: [PATCH 188/191] Stow head etag (#160) * Implement Etag() in storage layer Signed-off-by: Haytham Abuelfutuh * go mod tidy Signed-off-by: Haytham Abuelfutuh * Actually propagating etag Signed-off-by: Haytham Abuelfutuh * Implement UnionMeta store Signed-off-by: Haytham Abuelfutuh * Allow registeration of additional stow stores Signed-off-by: Haytham Abuelfutuh * Support grpc NotFound in IsNotFound() Signed-off-by: Haytham Abuelfutuh * correct error code check Signed-off-by: Haytham Abuelfutuh * Cleanup Signed-off-by: Haytham Abuelfutuh * more cleanup Signed-off-by: Haytham Abuelfutuh * PR Feedback Signed-off-by: Haytham Abuelfutuh * lint and nits Signed-off-by: Yee Hing Tong --------- Signed-off-by: Haytham Abuelfutuh Signed-off-by: Yee Hing Tong Co-authored-by: Yee Hing Tong --- .../cli/pflags/api/namedtype_enumer.go | 1 - flytestdlib/go.mod | 56 ++-- flytestdlib/go.sum | 275 ++++-------------- flytestdlib/storage/cached_rawstore_test.go | 4 +- flytestdlib/storage/config.go | 1 + flytestdlib/storage/mem_store.go | 19 +- flytestdlib/storage/mem_store_test.go | 12 +- flytestdlib/storage/protobuf_store_test.go | 2 +- flytestdlib/storage/rawstores.go | 14 +- flytestdlib/storage/storage.go | 1 + flytestdlib/storage/stow_store.go | 41 ++- flytestdlib/storage/stow_store_test.go | 12 +- flytestdlib/storage/utils.go | 7 + 13 files changed, 173 insertions(+), 272 deletions(-) diff --git a/flytestdlib/cli/pflags/api/namedtype_enumer.go b/flytestdlib/cli/pflags/api/namedtype_enumer.go index 4ea1621a7c..ffceef622d 100644 --- a/flytestdlib/cli/pflags/api/namedtype_enumer.go +++ b/flytestdlib/cli/pflags/api/namedtype_enumer.go @@ -1,6 +1,5 @@ // Code generated by "enumer --type=NamedType --trimprefix=NamedType -json"; DO NOT EDIT. -// package api import ( diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 6119e61c3b..775205f5c6 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -13,20 +13,21 @@ require ( github.com/fsnotify/fsnotify v1.5.1 github.com/ghodss/yaml v1.0.0 github.com/go-test/deep v1.0.7 - github.com/golang/protobuf v1.5.2 + github.com/golang/protobuf v1.5.3 github.com/hashicorp/golang-lru v0.5.4 github.com/magiconair/properties v1.8.6 - github.com/mitchellh/mapstructure v1.4.3 + github.com/mitchellh/mapstructure v1.5.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.12.1 github.com/sirupsen/logrus v1.7.0 github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.11.0 - github.com/stretchr/testify v1.7.1 - golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 - golang.org/x/tools v0.1.12 - google.golang.org/protobuf v1.28.0 + github.com/stretchr/testify v1.8.4 + golang.org/x/time v0.1.0 + golang.org/x/tools v0.6.0 + google.golang.org/grpc v1.56.1 + google.golang.org/protobuf v1.30.0 gorm.io/gorm v1.22.4 k8s.io/api v0.20.2 k8s.io/apimachinery v0.20.2 @@ -34,10 +35,11 @@ require ( ) require ( - cloud.google.com/go v0.101.0 // indirect - cloud.google.com/go/compute v1.6.1 // indirect - cloud.google.com/go/iam v0.3.0 // indirect - cloud.google.com/go/storage v1.22.0 // indirect + cloud.google.com/go v0.110.0 // indirect + cloud.google.com/go/compute v1.19.1 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/iam v0.13.0 // indirect + cloud.google.com/go/storage v1.28.1 // indirect github.com/Azure/azure-sdk-for-go v63.4.0+incompatible // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.2 // indirect @@ -50,17 +52,18 @@ require ( github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v0.4.0 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/googleapis/gax-go/v2 v2.3.0 // indirect - github.com/googleapis/go-type-adapters v1.0.0 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect + github.com/googleapis/gax-go/v2 v2.7.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect @@ -78,27 +81,26 @@ require ( github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.32.1 // indirect github.com/prometheus/procfs v0.7.3 // indirect - github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/afero v1.9.2 // indirect github.com/spf13/cast v1.4.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/stretchr/objx v0.3.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect - go.opencensus.io v0.23.0 // indirect + go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect - golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect - golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect - golang.org/x/text v0.3.7 // indirect - golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect - google.golang.org/api v0.76.0 // indirect + golang.org/x/mod v0.8.0 // indirect + golang.org/x/net v0.9.0 // indirect + golang.org/x/oauth2 v0.7.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/text v0.9.0 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/api v0.114.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46 // indirect - google.golang.org/grpc v1.46.0 // indirect + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.5.0 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.0.3 // indirect ) diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index b235518a81..bd3bebe01a 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -17,36 +17,23 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.101.0 h1:g+LL+JvpvdyGtcaD2xw2mSByE/6F9s471eJSoaysM84= -cloud.google.com/go v0.101.0/go.mod h1:hEiddgDb77jDQ+I80tURYNJEnuwPzFU8awCFFRLKjW0= +cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= +cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY= +cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= 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/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= +cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= +cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -57,8 +44,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.22.0 h1:NUV0NNp9nkBuW66BFRLuMgldN60C57ET3dhbwLIYio8= -cloud.google.com/go/storage v1.22.0/go.mod h1:GbaLEoMqbVm6sx3Z0R++gSiBlgMv6yUi2q1DeGFKQgE= +cloud.google.com/go/storage v1.28.1 h1:F5QDG5ChchaAVQhINh24U99OWHURqrW8OmQcGKXcbgI= +cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v63.4.0+incompatible h1:fle3M5Q7vr8auaiPffKyUQmLbvYeqpw30bKU6PrWJFo= github.com/Azure/azure-sdk-for-go v63.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= @@ -101,7 +88,6 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.44.2 h1:5VBk5r06bgxgRKVaUtm1/4NT/rtrnH2E4cnAYv5zgQc= github.com/aws/aws-sdk-go v1.44.2/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= @@ -115,8 +101,9 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -125,12 +112,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -149,10 +130,6 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= @@ -218,8 +195,6 @@ 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/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -235,10 +210,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 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= @@ -252,10 +226,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -263,9 +235,7 @@ github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPg github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -276,29 +246,21 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-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/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/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.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0 h1:nRJtk3y8Fm770D42QV6T90ZnvFZyk7agSo3Q+Z9p3WI= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= +github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= @@ -357,8 +319,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k 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/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -414,7 +376,6 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -425,8 +386,8 @@ github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= @@ -441,32 +402,34 @@ github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUs github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= -github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -504,7 +467,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -515,9 +477,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -554,19 +515,12 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY 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/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -576,17 +530,9 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= +golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= 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= @@ -597,7 +543,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -642,36 +588,17 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-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-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -680,16 +607,16 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-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-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -741,19 +668,14 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -773,25 +695,8 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.76.0 h1:UkZl25bR1FHNqtK/EKs3vCdpZtUO6gea3YElTwc8pQg= -google.golang.org/api v0.76.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= +google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -823,7 +728,6 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -836,47 +740,9 @@ google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6D 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-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-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220405205423-9d709892a2bf/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46 h1:G1IeWbjrqEq9ChWxEuRPJu6laA67+XgTFHVSAvepr38= -google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -890,24 +756,11 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ= +google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= 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= @@ -920,9 +773,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -937,7 +789,6 @@ gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -945,8 +796,8 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/gorm v1.22.4 h1:8aPcyEJhY0MAt8aY6Dc524Pn+pO29K+ydu+e/cXSpQM= gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/flytestdlib/storage/cached_rawstore_test.go b/flytestdlib/storage/cached_rawstore_test.go index 85fa0be18c..153aa0ebfb 100644 --- a/flytestdlib/storage/cached_rawstore_test.go +++ b/flytestdlib/storage/cached_rawstore_test.go @@ -19,7 +19,7 @@ func TestNewCachedStore(t *testing.T) { t.Run("CachingDisabled", func(t *testing.T) { cfg := &Config{} assert.Nil(t, newCachedRawStore(cfg, nil, metrics.cacheMetrics)) - store, err := NewInMemoryRawStore(cfg, metrics) + store, err := NewInMemoryRawStore(context.TODO(), cfg, metrics) assert.NoError(t, err) assert.Equal(t, store, newCachedRawStore(cfg, store, metrics.cacheMetrics)) }) @@ -31,7 +31,7 @@ func TestNewCachedStore(t *testing.T) { TargetGCPercent: 20, }, } - store, err := NewInMemoryRawStore(cfg, metrics) + store, err := NewInMemoryRawStore(context.TODO(), cfg, metrics) assert.NoError(t, err) cStore := newCachedRawStore(cfg, store, metrics.cacheMetrics) assert.Equal(t, 20, debug.SetGCPercent(100)) diff --git a/flytestdlib/storage/config.go b/flytestdlib/storage/config.go index d8c4dd95ff..3908205756 100644 --- a/flytestdlib/storage/config.go +++ b/flytestdlib/storage/config.go @@ -49,6 +49,7 @@ type Config struct { // Deprecated: Please use StowConfig instead Connection ConnectionConfig `json:"connection"` Stow StowConfig `json:"stow,omitempty" pflag:",Storage config for stow backend."` + // Container here is misleading, it refers to a Bucket (AWS S3) like blobstore entity. In some terms it could be a table InitContainer string `json:"container" pflag:",Initial container (in s3 a bucket) to create -if it doesn't exist-.'"` // By default if this is not enabled, multiple containers are not supported by the storage layer. Only the configured `container` InitContainer will be allowed to requests data from. But, if enabled then data will be loaded to written to any diff --git a/flytestdlib/storage/mem_store.go b/flytestdlib/storage/mem_store.go index ae9062fed9..abe4de12cd 100644 --- a/flytestdlib/storage/mem_store.go +++ b/flytestdlib/storage/mem_store.go @@ -3,6 +3,8 @@ package storage import ( "bytes" "context" + "crypto/md5" // #nosec + "encoding/hex" "fmt" "io" "io/ioutil" @@ -19,6 +21,7 @@ type InMemoryStore struct { type MemoryMetadata struct { exists bool size int64 + etag string } func (m MemoryMetadata) Size() int64 { @@ -29,9 +32,21 @@ func (m MemoryMetadata) Exists() bool { return m.exists } +func (m MemoryMetadata) Etag() string { + return m.etag +} + func (s *InMemoryStore) Head(ctx context.Context, reference DataReference) (Metadata, error) { data, found := s.cache[reference] - return MemoryMetadata{exists: found, size: int64(len(data))}, nil + var hash [md5.Size]byte + if found { + hash = md5.Sum(data) // #nosec + } + + return MemoryMetadata{ + exists: found, size: int64(len(data)), + etag: hex.EncodeToString(hash[:]), + }, nil } func (s *InMemoryStore) ReadRaw(ctx context.Context, reference DataReference) (io.ReadCloser, error) { @@ -79,7 +94,7 @@ func (s *InMemoryStore) CreateSignedURL(ctx context.Context, reference DataRefer return SignedURLResponse{}, fmt.Errorf("unsupported") } -func NewInMemoryRawStore(_ *Config, metrics *dataStoreMetrics) (RawStore, error) { +func NewInMemoryRawStore(_ context.Context, _ *Config, metrics *dataStoreMetrics) (RawStore, error) { self := &InMemoryStore{ cache: map[DataReference]rawFile{}, } diff --git a/flytestdlib/storage/mem_store_test.go b/flytestdlib/storage/mem_store_test.go index 829b086a26..fc58ed1151 100644 --- a/flytestdlib/storage/mem_store_test.go +++ b/flytestdlib/storage/mem_store_test.go @@ -10,7 +10,7 @@ import ( func TestInMemoryStore_Head(t *testing.T) { t.Run("Empty store", func(t *testing.T) { - s, err := NewInMemoryRawStore(&Config{}, metrics) + s, err := NewInMemoryRawStore(context.TODO(), &Config{}, metrics) assert.NoError(t, err) metadata, err := s.Head(context.TODO(), DataReference("hello")) assert.NoError(t, err) @@ -18,7 +18,7 @@ func TestInMemoryStore_Head(t *testing.T) { }) t.Run("Existing Item", func(t *testing.T) { - s, err := NewInMemoryRawStore(&Config{}, metrics) + s, err := NewInMemoryRawStore(context.TODO(), &Config{}, metrics) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("hello"), 0, Options{}, bytes.NewReader([]byte{})) assert.NoError(t, err) @@ -31,7 +31,7 @@ func TestInMemoryStore_Head(t *testing.T) { func TestInMemoryStore_ReadRaw(t *testing.T) { t.Run("Empty store", func(t *testing.T) { - s, err := NewInMemoryRawStore(&Config{}, metrics) + s, err := NewInMemoryRawStore(context.TODO(), &Config{}, metrics) assert.NoError(t, err) raw, err := s.ReadRaw(context.TODO(), DataReference("hello")) @@ -40,7 +40,7 @@ func TestInMemoryStore_ReadRaw(t *testing.T) { }) t.Run("Existing Item", func(t *testing.T) { - s, err := NewInMemoryRawStore(&Config{}, metrics) + s, err := NewInMemoryRawStore(context.TODO(), &Config{}, metrics) assert.NoError(t, err) err = s.WriteRaw(context.TODO(), DataReference("hello"), 0, Options{}, bytes.NewReader([]byte{})) @@ -52,7 +52,7 @@ func TestInMemoryStore_ReadRaw(t *testing.T) { } func TestInMemoryStore_Clear(t *testing.T) { - m, err := NewInMemoryRawStore(&Config{}, metrics) + m, err := NewInMemoryRawStore(context.TODO(), &Config{}, metrics) assert.NoError(t, err) mStore := m.(*InMemoryStore) @@ -71,7 +71,7 @@ func TestInMemoryStore_Clear(t *testing.T) { } func TestInMemoryStore_Delete(t *testing.T) { - m, err := NewInMemoryRawStore(&Config{}, metrics) + m, err := NewInMemoryRawStore(context.TODO(), &Config{}, metrics) assert.NoError(t, err) mStore := m.(*InMemoryStore) diff --git a/flytestdlib/storage/protobuf_store_test.go b/flytestdlib/storage/protobuf_store_test.go index 78b10ba8fd..18ae0b36ae 100644 --- a/flytestdlib/storage/protobuf_store_test.go +++ b/flytestdlib/storage/protobuf_store_test.go @@ -74,7 +74,7 @@ func TestDefaultProtobufStore(t *testing.T) { })) defer server.Close() - err = s.RefreshConfig(&Config{ + err = s.RefreshConfig(context.TODO(), &Config{ Type: TypeMinio, Stow: StowConfig{ Kind: TypeS3, diff --git a/flytestdlib/storage/rawstores.go b/flytestdlib/storage/rawstores.go index eafeff54ca..f8d345c71d 100644 --- a/flytestdlib/storage/rawstores.go +++ b/flytestdlib/storage/rawstores.go @@ -1,13 +1,14 @@ package storage import ( + "context" "fmt" "net/http" "github.com/flyteorg/flytestdlib/promutils" ) -type dataStoreCreateFn func(cfg *Config, metrics *dataStoreMetrics) (RawStore, error) +type dataStoreCreateFn func(ctx context.Context, cfg *Config, metrics *dataStoreMetrics) (RawStore, error) var stores = map[string]dataStoreCreateFn{ TypeMemory: NewInMemoryRawStore, @@ -73,8 +74,13 @@ func newDataStoreMetrics(scope promutils.Scope) *dataStoreMetrics { // NewDataStore creates a new Data Store with the supplied config. func NewDataStore(cfg *Config, scope promutils.Scope) (s *DataStore, err error) { + return NewDataStoreWithContext(context.Background(), cfg, scope) +} + +// NewDataStoreWithContext creates a new Data Store with the supplied config and context. +func NewDataStoreWithContext(ctx context.Context, cfg *Config, scope promutils.Scope) (s *DataStore, err error) { ds := &DataStore{metrics: newDataStoreMetrics(scope)} - return ds, ds.RefreshConfig(cfg) + return ds, ds.RefreshConfig(ctx, cfg) } // NewCompositeDataStore composes a new DataStore. @@ -87,7 +93,7 @@ func NewCompositeDataStore(refConstructor ReferenceConstructor, composedProtobuf // RefreshConfig re-initialises the data store client leaving metrics untouched. // This is NOT thread-safe! -func (ds *DataStore) RefreshConfig(cfg *Config) error { +func (ds *DataStore) RefreshConfig(ctx context.Context, cfg *Config) error { defaultClient := http.DefaultClient defer func() { http.DefaultClient = defaultClient @@ -100,7 +106,7 @@ func (ds *DataStore) RefreshConfig(cfg *Config) error { return fmt.Errorf("type is of an invalid value [%v]", cfg.Type) } - rawStore, err := fn(cfg, ds.metrics) + rawStore, err := fn(ctx, cfg, ds.metrics) if err != nil { return err } diff --git a/flytestdlib/storage/storage.go b/flytestdlib/storage/storage.go index f380c419a5..34d75917cf 100644 --- a/flytestdlib/storage/storage.go +++ b/flytestdlib/storage/storage.go @@ -34,6 +34,7 @@ type Options struct { type Metadata interface { Exists() bool Size() int64 + Etag() string } // DataStore is a simplified interface for accessing and storing data in one of the Cloud stores. diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 75eeb666b9..ab63521f42 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -52,6 +52,16 @@ var fQNFn = map[string]func(string) DataReference{ }, } +// RegisterStowKind registers a new kind of stow store. +func RegisterStowKind(kind string, f func(string) DataReference) error { + if _, ok := fQNFn[kind]; ok { + return fmt.Errorf("kind [%v] already registered", kind) + } + + fQNFn[kind] = f + return nil +} + // Checks if the error is AWS S3 bucket not found error func awsBucketIsNotFound(err error) bool { if awsErr, errOk := errs.Cause(err).(awserr.Error); errOk { @@ -92,10 +102,11 @@ type stowMetrics struct { DeleteLatency labeled.StopWatch } -// Metadata that will be returned +// StowMetadata that will be returned type StowMetadata struct { exists bool size int64 + etag string } func (s StowMetadata) Size() int64 { @@ -106,6 +117,10 @@ func (s StowMetadata) Exists() bool { return s.exists } +func (s StowMetadata) Etag() string { + return s.etag +} + // Implements DataStore to talk to stow location store. type StowStore struct { copyImpl @@ -200,15 +215,19 @@ func (s *StowStore) Head(ctx context.Context, reference DataReference) (Metadata t := s.metrics.HeadLatency.Start(ctx) item, err := container.Item(k) if err == nil { - if _, err = item.Metadata(); err == nil { - size, err := item.Size() - if err == nil { - t.Stop() - return StowMetadata{ - exists: true, - size: size, - }, nil - } + if _, err = item.Metadata(); err != nil { + // Err will be caught below + } else if size, err := item.Size(); err != nil { + // Err will be caught below + } else if etag, err := item.ETag(); err != nil { + // Err will be caught below + } else { + t.Stop() + return StowMetadata{ + exists: true, + size: size, + etag: etag, + }, nil } } @@ -413,7 +432,7 @@ func newStowMetrics(scope promutils.Scope) *stowMetrics { } // Constructor for the StowRawStore -func newStowRawStore(cfg *Config, metrics *dataStoreMetrics) (RawStore, error) { +func newStowRawStore(_ context.Context, cfg *Config, metrics *dataStoreMetrics) (RawStore, error) { if cfg.InitContainer == "" { return nil, fmt.Errorf("initContainer is required even with `enable-multicontainer`") } diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index 7da0c32ee2..5c635560ba 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -364,7 +364,7 @@ func TestStowStore_ReadRaw(t *testing.T) { func TestNewLocalStore(t *testing.T) { labeled.SetMetricKeys(contextutils.ProjectKey, contextutils.DomainKey, contextutils.WorkflowIDKey, contextutils.TaskIDKey) t.Run("Valid config", func(t *testing.T) { - store, err := newStowRawStore(&Config{ + store, err := newStowRawStore(context.TODO(), &Config{ Stow: StowConfig{ Kind: local.Kind, Config: map[string]string{ @@ -386,7 +386,7 @@ func TestNewLocalStore(t *testing.T) { }) t.Run("Invalid config", func(t *testing.T) { - _, err := newStowRawStore(&Config{}, metrics) + _, err := newStowRawStore(context.TODO(), &Config{}, metrics) assert.Error(t, err) }) @@ -398,7 +398,7 @@ func TestNewLocalStore(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, stats) - store, err := newStowRawStore(&Config{ + store, err := newStowRawStore(context.TODO(), &Config{ Stow: StowConfig{ Kind: local.Kind, Config: map[string]string{ @@ -426,7 +426,7 @@ func TestNewLocalStore(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, stats) - store, err := newStowRawStore(&Config{ + store, err := newStowRawStore(context.TODO(), &Config{ Stow: StowConfig{ Kind: local.Kind, Config: map[string]string{ @@ -447,7 +447,7 @@ func TestNewLocalStore(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, stats) - store, err := newStowRawStore(&Config{ + store, err := newStowRawStore(context.TODO(), &Config{ Stow: StowConfig{ Kind: local.Kind, Config: map[string]string{ @@ -499,7 +499,7 @@ func Test_newStowRawStore(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := newStowRawStore(tt.args.cfg, metrics) + got, err := newStowRawStore(context.TODO(), tt.args.cfg, metrics) if tt.wantErr { assert.Error(t, err, "newStowRawStore() error = %v, wantErr %v", err, tt.wantErr) return diff --git a/flytestdlib/storage/utils.go b/flytestdlib/storage/utils.go index 40da259046..0c3f7d7754 100644 --- a/flytestdlib/storage/utils.go +++ b/flytestdlib/storage/utils.go @@ -4,6 +4,9 @@ import ( "context" "os" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + stdErrs "github.com/flyteorg/flytestdlib/errors" "github.com/flyteorg/flytestdlib/promutils/labeled" @@ -30,6 +33,10 @@ func IsNotFound(err error) bool { return true } + if status.Code(err) == codes.NotFound { + return true + } + return false } From ce408967e3ae55aa4de22a9b1e350c20103a059c Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Mon, 17 Jul 2023 10:32:43 -0700 Subject: [PATCH 189/191] Remove welcomebot from boilerplate (#161) Signed-off-by: eduardo apolinario Co-authored-by: eduardo apolinario --- flytestdlib/.github/config.yml | 16 ---------------- .../boilerplate/flyte/welcome_bot/Readme.rst | 8 -------- .../boilerplate/flyte/welcome_bot/config.yml | 16 ---------------- .../boilerplate/flyte/welcome_bot/update.sh | 15 --------------- flytestdlib/boilerplate/update.cfg | 1 - 5 files changed, 56 deletions(-) delete mode 100644 flytestdlib/.github/config.yml delete mode 100644 flytestdlib/boilerplate/flyte/welcome_bot/Readme.rst delete mode 100644 flytestdlib/boilerplate/flyte/welcome_bot/config.yml delete mode 100755 flytestdlib/boilerplate/flyte/welcome_bot/update.sh diff --git a/flytestdlib/.github/config.yml b/flytestdlib/.github/config.yml deleted file mode 100644 index 73da252e52..0000000000 --- a/flytestdlib/.github/config.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Comment to be posted on PRs from first-time contributors in your repository -newPRWelcomeComment: | - Thank you for opening this pull request! 🙌 - - These tips will help get your PR across the finish line: - - - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. - - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). - -# Comment to be posted to on pull requests merged by a first time user -firstPRMergeComment: > - Congrats on merging your first pull request! 🎉 - -# Comment to be posted on first-time issues -newIssueWelcomeComment: > - Thank you for opening your first issue here! 🛠 diff --git a/flytestdlib/boilerplate/flyte/welcome_bot/Readme.rst b/flytestdlib/boilerplate/flyte/welcome_bot/Readme.rst deleted file mode 100644 index ea18781185..0000000000 --- a/flytestdlib/boilerplate/flyte/welcome_bot/Readme.rst +++ /dev/null @@ -1,8 +0,0 @@ -Config File -- Welcome Bot -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Provides a ``config.yml`` file. - -**To Enable:** - -Add ``flyte/config.yml`` to your ``boilerplate/update.cfg`` file. \ No newline at end of file diff --git a/flytestdlib/boilerplate/flyte/welcome_bot/config.yml b/flytestdlib/boilerplate/flyte/welcome_bot/config.yml deleted file mode 100644 index 73da252e52..0000000000 --- a/flytestdlib/boilerplate/flyte/welcome_bot/config.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Comment to be posted on PRs from first-time contributors in your repository -newPRWelcomeComment: | - Thank you for opening this pull request! 🙌 - - These tips will help get your PR across the finish line: - - - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. - - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). - -# Comment to be posted to on pull requests merged by a first time user -firstPRMergeComment: > - Congrats on merging your first pull request! 🎉 - -# Comment to be posted on first-time issues -newIssueWelcomeComment: > - Thank you for opening your first issue here! 🛠 diff --git a/flytestdlib/boilerplate/flyte/welcome_bot/update.sh b/flytestdlib/boilerplate/flyte/welcome_bot/update.sh deleted file mode 100755 index 2db64ac3f1..0000000000 --- a/flytestdlib/boilerplate/flyte/welcome_bot/update.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: -# -# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst - -set -e - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" - -# Clone the config.yml file -echo " - copying ${DIR}/config.yml to the root directory." -cp "${DIR}"/config.yml "${DIR}"/../../../.github/config.yml - diff --git a/flytestdlib/boilerplate/update.cfg b/flytestdlib/boilerplate/update.cfg index caa58e0db1..d163cc3e72 100644 --- a/flytestdlib/boilerplate/update.cfg +++ b/flytestdlib/boilerplate/update.cfg @@ -1,5 +1,4 @@ flyte/golang_test_targets flyte/golang_support_tools flyte/pull_request_template -flyte/welcome_bot flyte/code_of_conduct From 088bbf283f0395ebe73f97250d75bc407c7812ec Mon Sep 17 00:00:00 2001 From: Gopal Vashishtha <15335863+gvashishtha@users.noreply.github.com> Date: Fri, 4 Aug 2023 18:07:18 -0700 Subject: [PATCH 190/191] Bumping stow version (#162) --- flytestdlib/go.mod | 2 +- flytestdlib/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 775205f5c6..b907b931b2 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -9,7 +9,7 @@ require ( github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 github.com/fatih/color v1.13.0 github.com/fatih/structtag v1.2.0 - github.com/flyteorg/stow v0.3.6 + github.com/flyteorg/stow v0.3.7 github.com/fsnotify/fsnotify v1.5.1 github.com/ghodss/yaml v1.0.0 github.com/go-test/deep v1.0.7 diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index bd3bebe01a..bbe81e8dd1 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -138,8 +138,8 @@ github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/stow v0.3.6 h1:jt50ciM14qhKBaIrB+ppXXY+SXB59FNREFgTJqCyqIk= -github.com/flyteorg/stow v0.3.6/go.mod h1:5dfBitPM004dwaZdoVylVjxFT4GWAgI0ghAndhNUzCo= +github.com/flyteorg/stow v0.3.7 h1:Cx7j8/Ux6+toD5hp5fy++927V+yAcAttDeQAlUD/864= +github.com/flyteorg/stow v0.3.7/go.mod h1:5dfBitPM004dwaZdoVylVjxFT4GWAgI0ghAndhNUzCo= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= From afecec7f2abb130c4f4f8458946b9ffff17783ec Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Tue, 22 Aug 2023 11:38:00 -0500 Subject: [PATCH 191/191] Updating boilerplate to lock golangci-lint version (#163) Signed-off-by: Daniel Rammer --- .../flyte/golang_support_tools/go.mod | 273 +++--- .../flyte/golang_support_tools/go.sum | 888 ++++++++---------- .../flyte/golang_support_tools/tools.go | 3 +- .../golang_test_targets/download_tooling.sh | 7 +- 4 files changed, 535 insertions(+), 636 deletions(-) diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod index 1912aff6a7..2cfeb8aa3a 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.mod @@ -1,238 +1,247 @@ module github.com/flyteorg/boilerplate -go 1.18 +go 1.19 require ( + github.com/EngHabu/mockery v0.0.0-20220405200825-3f76291311cf github.com/alvaroloes/enumer v1.1.2 - github.com/flyteorg/flytestdlib v1.0.7 - github.com/golangci/golangci-lint v1.49.0 + github.com/flyteorg/flytestdlib v0.4.16 + github.com/golangci/golangci-lint v1.53.3 github.com/pseudomuto/protoc-gen-doc v1.4.1 - github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 ) require ( - 4d63.com/gochecknoglobals v0.1.0 // indirect - cloud.google.com/go v0.104.0 // indirect - cloud.google.com/go/compute v1.9.0 // indirect - cloud.google.com/go/iam v0.3.0 // indirect - cloud.google.com/go/storage v1.26.0 // indirect - github.com/Antonboom/errname v0.1.7 // indirect - github.com/Antonboom/nilnil v0.1.1 // indirect - github.com/Azure/azure-sdk-for-go v66.0.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1 // indirect + 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect + 4d63.com/gochecknoglobals v0.2.1 // indirect + cloud.google.com/go v0.110.2 // indirect + cloud.google.com/go/compute v1.19.3 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/iam v1.1.2 // indirect + cloud.google.com/go/storage v1.29.0 // indirect + github.com/4meepo/tagalign v1.2.2 // indirect + github.com/Abirdcfly/dupword v0.0.11 // indirect + github.com/Antonboom/errname v0.1.10 // indirect + github.com/Antonboom/nilnil v0.1.5 // indirect + github.com/Azure/azure-sdk-for-go v62.3.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.28 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.21 // indirect + github.com/Azure/go-autorest/autorest v0.11.17 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect + github.com/Azure/go-autorest/logger v0.2.0 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/BurntSushi/toml v1.2.0 // indirect + github.com/BurntSushi/toml v1.3.2 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect - github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver v1.5.0 // indirect - github.com/Masterminds/sprig v2.22.0+incompatible // indirect - github.com/OpenPeeDeeP/depguard v1.1.0 // indirect + github.com/Masterminds/sprig v2.15.0+incompatible // indirect + github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect + github.com/alexkohler/nakedret/v2 v2.0.2 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect - github.com/ashanbrown/forbidigo v1.3.0 // indirect + github.com/aokoli/goutils v1.0.1 // indirect + github.com/ashanbrown/forbidigo v1.5.3 // indirect github.com/ashanbrown/makezero v1.1.1 // indirect - github.com/aws/aws-sdk-go v1.44.87 // indirect + github.com/aws/aws-sdk-go v1.37.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bkielbasa/cyclop v1.2.0 // indirect + github.com/bkielbasa/cyclop v1.2.1 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect - github.com/bombsimon/wsl/v3 v3.3.0 // indirect - github.com/breml/bidichk v0.2.3 // indirect - github.com/breml/errchkjson v0.3.0 // indirect - github.com/butuzov/ireturn v0.1.1 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/charithe/durationcheck v0.0.9 // indirect - github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect - github.com/coocood/freecache v1.2.2 // indirect - github.com/curioswitch/go-reassign v0.1.2 // indirect - github.com/daixiang0/gci v0.7.0 // indirect + github.com/bombsimon/wsl/v3 v3.4.0 // indirect + github.com/breml/bidichk v0.2.4 // indirect + github.com/breml/errchkjson v0.3.1 // indirect + github.com/butuzov/ireturn v0.2.0 // indirect + github.com/butuzov/mirror v1.1.0 // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/charithe/durationcheck v0.0.10 // indirect + github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect + github.com/coocood/freecache v1.1.1 // indirect + github.com/curioswitch/go-reassign v0.2.0 // indirect + github.com/daixiang0/gci v0.10.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect - github.com/envoyproxy/protoc-gen-validate v0.6.7 // indirect + github.com/envoyproxy/protoc-gen-validate v0.10.0 // indirect github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 // indirect github.com/esimonov/ifshort v1.0.4 // indirect github.com/ettle/strcase v0.1.1 // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/firefart/nonamedreturns v1.0.4 // indirect - github.com/flyteorg/stow v0.3.6 // indirect + github.com/flyteorg/stow v0.3.1 // indirect + github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-critic/go-critic v0.6.5 // indirect - github.com/go-logr/logr v1.2.3 // indirect - github.com/go-toolsmith/astcast v1.0.0 // indirect - github.com/go-toolsmith/astcopy v1.0.2 // indirect - github.com/go-toolsmith/astequal v1.0.3 // indirect - github.com/go-toolsmith/astfmt v1.0.0 // indirect - github.com/go-toolsmith/astp v1.0.0 // indirect - github.com/go-toolsmith/strparse v1.0.0 // indirect - github.com/go-toolsmith/typep v1.0.2 // indirect + github.com/go-critic/go-critic v0.8.1 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-toolsmith/astcast v1.1.0 // indirect + github.com/go-toolsmith/astcopy v1.1.0 // indirect + github.com/go-toolsmith/astequal v1.1.0 // indirect + github.com/go-toolsmith/astfmt v1.1.0 // indirect + github.com/go-toolsmith/astp v1.1.0 // indirect + github.com/go-toolsmith/strparse v1.1.0 // indirect + github.com/go-toolsmith/typep v1.1.0 // indirect github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.4.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect - github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect + github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 // indirect github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect - github.com/golangci/misspell v0.3.5 // indirect + github.com/golangci/misspell v0.4.0 // indirect github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/google/s2a-go v0.1.4 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect - github.com/googleapis/gax-go/v2 v2.5.1 // indirect - github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect + github.com/googleapis/gax-go/v2 v2.11.0 // indirect + github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect github.com/gostaticanalysis/comment v1.4.2 // indirect github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect github.com/gostaticanalysis/nilerr v0.1.1 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect - github.com/huandu/xstrings v1.3.2 // indirect - github.com/imdario/mergo v0.3.13 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/huandu/xstrings v1.0.0 // indirect + github.com/imdario/mergo v0.3.5 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jgautheron/goconst v1.5.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/julz/importas v0.1.0 // indirect - github.com/kisielk/errcheck v1.6.2 // indirect + github.com/kisielk/errcheck v1.6.3 // indirect github.com/kisielk/gotool v1.0.0 // indirect + github.com/kkHAIKE/contextcheck v1.1.4 // indirect github.com/kulti/thelper v0.6.3 // indirect - github.com/kunwardeep/paralleltest v1.0.6 // indirect - github.com/kyoh86/exportloopref v0.1.8 // indirect + github.com/kunwardeep/paralleltest v1.0.7 // indirect + github.com/kyoh86/exportloopref v0.1.11 // indirect github.com/ldez/gomoddirectives v0.2.3 // indirect - github.com/ldez/tagliatelle v0.3.1 // indirect - github.com/leonklingele/grouper v1.1.0 // indirect + github.com/ldez/tagliatelle v0.5.0 // indirect + github.com/leonklingele/grouper v1.1.1 // indirect github.com/lufeee/execinquery v1.2.1 // indirect github.com/magiconair/properties v1.8.6 // indirect - github.com/maratori/testpackage v1.1.0 // indirect - github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect + github.com/maratori/testableexamples v1.0.0 // indirect + github.com/maratori/testpackage v1.1.1 // indirect + github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mbilski/exhaustivestruct v1.2.0 // indirect - github.com/mgechev/revive v1.2.3 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mgechev/revive v1.3.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/moricho/tparallel v0.2.1 // indirect - github.com/mwitkow/go-proto-validators v0.3.2 // indirect + github.com/moricho/tparallel v0.3.1 // indirect + github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 // indirect github.com/nakabonne/nestif v0.3.1 // indirect github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect github.com/ncw/swift v1.0.53 // indirect - github.com/nishanths/exhaustive v0.8.1 // indirect + github.com/nishanths/exhaustive v0.11.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect + github.com/nunnatsa/ginkgolinter v0.12.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/pascaldekloe/name v1.0.1 // indirect + github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect - github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v1.0.2 // indirect - github.com/prometheus/client_golang v1.13.0 // indirect + github.com/polyfloyd/go-errorlint v1.4.2 // indirect + github.com/prometheus/client_golang v1.12.1 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/pseudomuto/protokit v0.2.1 // indirect - github.com/quasilyte/go-ruleguard v0.3.18 // indirect - github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/pseudomuto/protokit v0.2.0 // indirect + github.com/quasilyte/go-ruleguard v0.3.19 // indirect + github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/rivo/uniseg v0.3.4 // indirect - github.com/ryancurrah/gomodguard v1.2.4 // indirect - github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect + github.com/ryancurrah/gomodguard v1.3.0 // indirect + github.com/ryanrolds/sqlclosecheck v0.4.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect - github.com/sashamelentyev/usestdlibvars v1.15.1 // indirect - github.com/securego/gosec/v2 v2.13.1 // indirect + github.com/sashamelentyev/usestdlibvars v1.23.0 // indirect + github.com/securego/gosec/v2 v2.16.0 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect - github.com/sirupsen/logrus v1.9.0 // indirect - github.com/sivchari/containedctx v1.0.2 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/sivchari/containedctx v1.0.3 // indirect github.com/sivchari/nosnakecase v1.7.0 // indirect - github.com/sivchari/tenv v1.7.0 // indirect - github.com/sonatard/noctx v0.0.1 // indirect - github.com/sourcegraph/go-diff v0.6.1 // indirect - github.com/spf13/afero v1.9.2 // indirect + github.com/sivchari/tenv v1.7.1 // indirect + github.com/sonatard/noctx v0.0.2 // indirect + github.com/sourcegraph/go-diff v0.7.0 // indirect + github.com/spf13/afero v1.8.2 // indirect github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/cobra v1.5.0 // indirect + github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.12.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect - github.com/stretchr/objx v0.4.0 // indirect - github.com/stretchr/testify v1.8.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/testify v1.8.4 // indirect github.com/subosito/gotenv v1.4.1 // indirect - github.com/sylvia7788/contextcheck v1.0.8 // indirect - github.com/tdakkota/asciicheck v0.1.1 // indirect + github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect + github.com/tdakkota/asciicheck v0.2.0 // indirect github.com/tetafro/godot v1.4.11 // indirect - github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect - github.com/timonwong/logrlint v0.4.0 // indirect - github.com/tomarrell/wrapcheck/v2 v2.6.2 // indirect - github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect + github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect + github.com/timonwong/loggercheck v0.9.4 // indirect + github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect + github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/ultraware/funlen v0.0.3 // indirect github.com/ultraware/whitespace v0.0.5 // indirect github.com/uudashr/gocognit v1.0.6 // indirect + github.com/xen0n/gosmopolitan v1.2.1 // indirect github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.2.0 // indirect + github.com/ykadowak/zerologlint v0.1.2 // indirect gitlab.com/bosi/decorder v0.2.3 // indirect - go.opencensus.io v0.23.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.8.0 // indirect - go.uber.org/zap v1.23.0 // indirect - golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect - golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect - golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b // indirect - golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 // indirect - golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde // indirect - golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect - golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect - golang.org/x/tools v0.1.12 // indirect - golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect - google.golang.org/api v0.94.0 // indirect + go.opencensus.io v0.24.0 // indirect + go.tmz.dev/musttag v0.7.0 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.24.0 // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect + golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect + golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect + golang.org/x/tools v0.11.1 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf // indirect - google.golang.org/grpc v1.49.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + google.golang.org/grpc v1.55.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - honnef.co/go/tools v0.3.3 // indirect - k8s.io/apimachinery v0.25.0 // indirect - k8s.io/client-go v0.25.0 // indirect - k8s.io/klog/v2 v2.70.1 // indirect - k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 // indirect - mvdan.cc/gofumpt v0.3.1 // indirect + honnef.co/go/tools v0.4.3 // indirect + k8s.io/apimachinery v0.20.2 // indirect + k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 // indirect + k8s.io/klog/v2 v2.5.0 // indirect + mvdan.cc/gofumpt v0.5.0 // indirect mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect - mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 // indirect + mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d // indirect ) -replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 - replace github.com/pseudomuto/protoc-gen-doc => github.com/flyteorg/protoc-gen-doc v1.4.2 diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum b/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum index 44e4f605f4..4cc434803e 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/go.sum @@ -1,5 +1,7 @@ -4d63.com/gochecknoglobals v0.1.0 h1:zeZSRqj5yCg28tCkIV/z/lWbwvNm5qnKVS15PI8nhD0= -4d63.com/gochecknoglobals v0.1.0/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= +4d63.com/gocheckcompilerdirectives v1.2.1 h1:AHcMYuw56NPjq/2y615IGg2kYkBdTvOaojYCBcRE7MA= +4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= +4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= +4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -19,39 +21,22 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.104.0 h1:gSmWO7DY1vOm0MVU6DNXM11BWHHsTUmsC5cv1fuW5X8= -cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.110.2 h1:sdFPBr6xG9/wkBbfhmUz/JmZC7X6LavQgcrVINrKiVA= +cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.9.0 h1:ED/FP4xv8GJw63v556/ASNc1CeeLUO2Bs8nzaHchkHg= -cloud.google.com/go/compute v1.9.0/go.mod h1:lWv1h/zUWTm/LozzfTJhBSkd6ShQq8la8VeeuOEGxfY= +cloud.google.com/go/compute v1.19.3 h1:DcTwsFgGev/wV5+q8o2fzgcHOaac+DKGC91ZlvpsQds= +cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= 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/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v1.1.2 h1:gacbrBdWcoVmGLozRuStX45YKvJtzIjJdAolzUs1sm4= +cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -62,65 +47,71 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= -cloud.google.com/go/storage v1.26.0 h1:lYAGjknyDJirSzfwUlkv4Nsnj7od7foxQNH/fqZqles= -cloud.google.com/go/storage v1.26.0/go.mod h1:mk/N7YwIKEWyTvXAWQCIeiCTdLoRH6Pd5xmSnolQLTI= +cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= +cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Antonboom/errname v0.1.7 h1:mBBDKvEYwPl4WFFNwec1CZO096G6vzK9vvDQzAwkako= -github.com/Antonboom/errname v0.1.7/go.mod h1:g0ONh16msHIPgJSGsecu1G/dcF2hlYR/0SddnIAGavU= -github.com/Antonboom/nilnil v0.1.1 h1:PHhrh5ANKFWRBh7TdYmyyq2gyT2lotnvFvvFbylF81Q= -github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= -github.com/Azure/azure-sdk-for-go v66.0.0+incompatible h1:bmmC38SlE8/E81nNADlgmVGurPWMHDX2YNXVQMrBpEE= -github.com/Azure/azure-sdk-for-go v66.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2 h1:lneMk5qtUMulXa/eVxjVd+/bDYMEDIqYpLzLa2/EsNI= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 h1:Yoicul8bnVdQrhDMTHxdEckRGX01XvwXDHUT9zYZ3k0= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 h1:XUNQ4mw+zJmaA2KXzP9JlQiecy1SI+Eog7xVkPiqIbg= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1 h1:QSdcrd/UFJv6Bp/CfoVf2SrENpFn9P6Yh8yb+xNhYMM= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1/go.mod h1:eZ4g6GUvXiGulfIbbhh1Xr4XwUYaYaWMqzGD/284wCA= +github.com/4meepo/tagalign v1.2.2 h1:kQeUTkFTaBRtd/7jm8OKJl9iHk0gAO+TDFPHGSna0aw= +github.com/4meepo/tagalign v1.2.2/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= +github.com/Abirdcfly/dupword v0.0.11 h1:z6v8rMETchZXUIuHxYNmlUAuKuB21PeaSymTed16wgU= +github.com/Abirdcfly/dupword v0.0.11/go.mod h1:wH8mVGuf3CP5fsBTkfWwwwKTjDnVVCxtU8d8rgeVYXA= +github.com/Antonboom/errname v0.1.10 h1:RZ7cYo/GuZqjr1nuJLNe8ZH+a+Jd9DaZzttWzak9Bls= +github.com/Antonboom/errname v0.1.10/go.mod h1:xLeiCIrvVNpUtsN0wxAh05bNIZpqE22/qDMnTBTttiA= +github.com/Antonboom/nilnil v0.1.5 h1:X2JAdEVcbPaOom2TUa1FxZ3uyuUlex0XMLGYMemu6l0= +github.com/Antonboom/nilnil v0.1.5/go.mod h1:I24toVuBKhfP5teihGWctrRiPbRKHwZIFOvc6v3HZXk= +github.com/Azure/azure-sdk-for-go v62.3.0+incompatible h1:Ctfsn9UoA/BB4HMYQlbPPgNXdX0tZ4tmb85+KFb2+RE= +github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 h1:qoVeMsc9/fh/yhxVaA0obYjVH/oI/ihrOoMwsLS9KSA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 h1:E+m3SkZCN0Bf5q7YdTs5lSm2CYY3CK4spn5OmUIiQtk= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJNuUB6n7rs5Wsel4dXLe90Um2n4= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= -github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.21 h1:jjQnVFXPfekaqb8vIsv2G1lxshoW+oGv4MDlhRtnYZk= -github.com/Azure/go-autorest/autorest/adal v0.9.21/go.mod h1:zua7mBUaCc5YnSLKYgGJR/w5ePdMDA6H56upLsHzA9U= +github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= +github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= +github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= -github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/EngHabu/mockery v0.0.0-20220405200825-3f76291311cf h1:M7A2Tn3R8rVgsoJHHKkmkpiNOItys4GxJj6JytRjdDg= +github.com/EngHabu/mockery v0.0.0-20220405200825-3f76291311cf/go.mod h1:Kya4Y46gyq/3TEyAzeNe5UkCk+W9apy5KbuX+5KnZ6M= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= -github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.15.0+incompatible h1:0gSxPGWS9PAr7U2NsQ2YQg6juRDINkUyuvbb4b2Xm8w= github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.1.0 h1:pjK9nLPS1FwQYGGpPxoMYpe7qACHOhAWQMQzV71i49o= -github.com/OpenPeeDeeP/depguard v1.1.0/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= +github.com/OpenPeeDeeP/depguard/v2 v2.1.0 h1:aQl70G173h/GZYhWf36aE5H0KaujXfVMnn/f1kSDVYY= +github.com/OpenPeeDeeP/depguard/v2 v2.1.0/go.mod h1:PUBgk35fX4i7JDmwzlJwJ+GMe6NfO1723wmJMgPThNQ= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alexkohler/nakedret/v2 v2.0.2 h1:qnXuZNvv3/AxkAb22q/sEsEpcA99YxLFACDtEw9TPxE= +github.com/alexkohler/nakedret/v2 v2.0.2/go.mod h1:2b8Gkk0GsOrqQv/gPWjNLDSKwG8I5moSXG1K4VIBcTQ= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= @@ -128,39 +119,45 @@ github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqr github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/aokoli/goutils v1.0.1 h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/ashanbrown/forbidigo v1.3.0 h1:VkYIwb/xxdireGAdJNZoo24O4lmnEWkactplBlWTShc= -github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/ashanbrown/forbidigo v1.5.3 h1:jfg+fkm/snMx+V9FBwsl1d340BV/99kZGv5jN9hBoXk= +github.com/ashanbrown/forbidigo v1.5.3/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= -github.com/aws/aws-sdk-go v1.44.87 h1:u/1sm8MNUSQHt8MGLEQHAj4r3lns3w0B1IXelPKbpn4= -github.com/aws/aws-sdk-go v1.44.87/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= +github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bkielbasa/cyclop v1.2.0 h1:7Jmnh0yL2DjKfw28p86YTd/B4lRGcNuu12sKE35sM7A= -github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= +github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= +github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= -github.com/bombsimon/wsl/v3 v3.3.0 h1:Mka/+kRLoQJq7g2rggtgQsjuI/K5Efd87WX96EWFxjM= -github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= -github.com/breml/bidichk v0.2.3 h1:qe6ggxpTfA8E75hdjWPZ581sY3a2lnl0IRxLQFelECI= -github.com/breml/bidichk v0.2.3/go.mod h1:8u2C6DnAy0g2cEq+k/A2+tr9O1s+vHGxWn0LTc70T2A= -github.com/breml/errchkjson v0.3.0 h1:YdDqhfqMT+I1vIxPSas44P+9Z9HzJwCeAzjB8PxP1xw= -github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92zSDFcofU= -github.com/butuzov/ireturn v0.1.1 h1:QvrO2QF2+/Cx1WA/vETCIYBKtRjc30vesdoPUNo1EbY= -github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= +github.com/bombsimon/wsl/v3 v3.4.0 h1:RkSxjT3tmlptwfgEgTgU+KYKLI35p/tviNXNXiL2aNU= +github.com/bombsimon/wsl/v3 v3.4.0/go.mod h1:KkIB+TXkqy6MvK9BDZVbZxKNYsE1/oLRJbIFtf14qqo= +github.com/breml/bidichk v0.2.4 h1:i3yedFWWQ7YzjdZJHnPo9d/xURinSq3OM+gyM43K4/8= +github.com/breml/bidichk v0.2.4/go.mod h1:7Zk0kRFt1LIZxtQdl9W9JwGAcLTTkOs+tN7wuEYGJ3s= +github.com/breml/errchkjson v0.3.1 h1:hlIeXuspTyt8Y/UmP5qy1JocGNR00KQHgfaNtRAjoxQ= +github.com/breml/errchkjson v0.3.1/go.mod h1:XroxrzKjdiutFyW3nWhw34VGg7kiMsDQox73yWCGI2U= +github.com/butuzov/ireturn v0.2.0 h1:kCHi+YzC150GE98WFuZQu9yrTn6GEydO2AuPLbTgnO4= +github.com/butuzov/ireturn v0.2.0/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= +github.com/butuzov/mirror v1.1.0 h1:ZqX54gBVMXu78QLoiqdwpl2mgmoOJTk7s4p4o+0avZI= +github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7GF45AE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.9 h1:mPP4ucLrf/rKZiIG/a9IPXHGlh8p4CzgpyTy6EEutYk= -github.com/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= -github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 h1:E7LT642ysztPWE0dfz43cWOvMiF42DyTRC+eZIaO4yI= -github.com/chavacava/garif v0.0.0-20220630083739-93517212f375/go.mod h1:4m1Rv7xfuwWPNKXlThldNuJvutYM6J95wNuuVmn55To= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= +github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= +github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 h1:W9o46d2kbNL06lq7UNDPV0zYLzkrde/bjIqO02eoll0= +github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8/go.mod h1:gakxgyXaaPkxvLw1XQxNGK4I37ys9iBRzNUx/B7pUCo= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -170,105 +167,112 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/coocood/freecache v1.2.2 h1:UPkJCxhRujykq1jXuwxAPgDHnm6lKGrLZPnuHzgWRtE= -github.com/coocood/freecache v1.2.2/go.mod h1:RBUWa/Cy+OHdfTGFEhEuE1pMCMX51Ncizj7rthiQ3vk= +github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= +github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cristalhq/acmd v0.8.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= -github.com/curioswitch/go-reassign v0.1.2 h1:ekM07+z+VFT560Exz4mTv0/s1yU9gem6CJc/tlYpkmI= -github.com/curioswitch/go-reassign v0.1.2/go.mod h1:bFJIHgtTM3hRm2sKXSPkbwNjSFyGURQXyn4IXD2qwfQ= -github.com/daixiang0/gci v0.7.0 h1:HNMLrke+ycKtL0d55TxzNqRw/5lNjBXZLCJ6916RWaA= -github.com/daixiang0/gci v0.7.0/go.mod h1:EpVfrztufwVgQRXjnX4zuNinEpLj5OmMjtu/+MB0V0c= +github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= +github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= +github.com/daixiang0/gci v0.10.1 h1:eheNA3ljF6SxnPD/vE4lCBusVHmV3Rs3dkKvFrJ7MR0= +github.com/daixiang0/gci v0.10.1/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 h1:qxIJwfSemSCqhG3/lEw1Rm+wYbegjuKsqy0ZqnIpL14= -github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0/go.mod h1:KfdIkmkpVY3n2sc1ykFj01uMviOiXH2HMhUCvA5FYGg= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.3.0-java/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.7 h1:qcZcULcd/abmQg6dwigimCNEyi4gg31M/xaciQlDml8= -github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= +github.com/envoyproxy/protoc-gen-validate v0.10.0 h1:oIfnZFdC0YhpNNEX+SuIqko4cqqVZeN9IGTrhZje83Y= +github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= -github.com/flyteorg/flytestdlib v1.0.7 h1:ctK+h8RsRwlV5NLTkaqTwgXQ7YMS4nszDJRi1z/iBfg= -github.com/flyteorg/flytestdlib v1.0.7/go.mod h1:WTe0k3DmmrKFjj3hwiIbjjdCK89X63MBzBbXhQ4Yxf0= +github.com/flyteorg/flytestdlib v0.4.16 h1:r4dCPUOqoE9xCAhOw9KDB7O6cBoCxyEtepIWYcj93H0= +github.com/flyteorg/flytestdlib v0.4.16/go.mod h1:WA5Y4hrcgD0ybGOKJVOQ4sP8q7NLRV+S5SWOlH0axgM= github.com/flyteorg/protoc-gen-doc v1.4.2 h1:Otw0F+RHaPQ8XlpzhLLgjsCMcrAIcMO01Zh+ALe3rrE= github.com/flyteorg/protoc-gen-doc v1.4.2/go.mod h1:exDTOVwqpp30eV/EDPFLZy3Pwr2sn6hBC1WIYH/UbIg= -github.com/flyteorg/stow v0.3.6 h1:jt50ciM14qhKBaIrB+ppXXY+SXB59FNREFgTJqCyqIk= -github.com/flyteorg/stow v0.3.6/go.mod h1:5dfBitPM004dwaZdoVylVjxFT4GWAgI0ghAndhNUzCo= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/flyteorg/stow v0.3.1 h1:cBMbWl03Gsy5KoA5mutUYTuYpqtT7Pb8+ANGCLnmFEs= +github.com/flyteorg/stow v0.3.1/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-critic/go-critic v0.6.5 h1:fDaR/5GWURljXwF8Eh31T2GZNz9X4jeboS912mWF8Uo= -github.com/go-critic/go-critic v0.6.5/go.mod h1:ezfP/Lh7MA6dBNn4c6ab5ALv3sKnZVLx37tr00uuaOY= +github.com/go-critic/go-critic v0.8.1 h1:16omCF1gN3gTzt4j4J6fKI/HnRojhEp+Eks6EuKw3vw= +github.com/go-critic/go-critic v0.8.1/go.mod h1:kpzXl09SIJX1cr9TB/g/sAG+eFEl7ZS9f9cqvZtyNl0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.2 h1:YnWf5Rnh1hUudj11kei53kI57quN/VH6Hp1n+erozn0= -github.com/go-toolsmith/astcopy v1.0.2/go.mod h1:4TcEdbElGc9twQEYpVo/aieIXfHhiuLh4aLAck6dO7Y= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astequal v1.0.2/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= -github.com/go-toolsmith/astequal v1.0.3 h1:+LVdyRatFS+XO78SGV4I3TCEA0AC7fKEGma+fH+674o= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= +github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= +github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= +github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= -github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5 h1:eD9POs68PHkwrx7hAB78z1cb6PfGq/jyWn3wJywsH1o= -github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5/go.mod h1:3NAwwmD4uY/yggRxoEjk/S00MIV3A+H7rrE3i87eYxM= -github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= +github.com/go-toolsmith/astequal v1.1.0 h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ06E1dTw= +github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= +github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= +github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= +github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= +github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= +github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.2 h1:8xdsa1+FSIH/RhEkgnD1j2CJOy5mNllW1Q9tRiYwvlk= -github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= +github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= +github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= +github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= @@ -278,14 +282,9 @@ github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14j github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= -github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -299,8 +298,6 @@ 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/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -316,26 +313,25 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6J5HIP8ZtyMdiDscjMLfRBSPuzVVeo= github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.49.0 h1:I8WHOavragDttlLHtSraHn/h39C+R60bEQ5NoGcHQr8= -github.com/golangci/golangci-lint v1.49.0/go.mod h1:+V/7lLv449R6w9mQ3WdV0EKh7Je/jTylMeSwBZcLeWE= +github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 h1:amWTbTGqOZ71ruzrdA+Nx5WA3tV1N0goTspwmKCQvBY= +github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs= +github.com/golangci/golangci-lint v1.53.3 h1:CUcRafczT4t1F+mvdkUm6KuOpxUZTl0yWN/rSU6sSMo= +github.com/golangci/golangci-lint v1.53.3/go.mod h1:W4Gg3ONq6p3Jl+0s/h9Gr0j7yEgHJWWZO2bHl2tBUXM= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.3.5 h1:pLzmVdl3VxTOncgzHcvLOKirdvcx/TydsClUQXTehjo= -github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/misspell v0.4.0 h1:KtVB/hTK4bbL/S6bs64rYyk8adjmh1BygbBiaAiX+a0= +github.com/golangci/misspell v0.4.0/go.mod h1:W6O/bwV6lGDxUCChm2ykw9NQdd5bYd1Xkjo88UcWyJc= github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 h1:DIPQnGy2Gv2FSA4B/hh8Q7xx3B7AIDk3DAMeHclH1vQ= github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCkMoKvUvlf89F6O7H2LYdhr1zBh736mBItOdRs= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= @@ -354,16 +350,16 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -374,38 +370,28 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-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/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1 h1:kBRZU0PSuI7PspsSb/ChWoVResUcwNVIdpB049pKTiw= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= +github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 h1:PVRE9d4AQKmbelZ7emNig1+NT27DUmKZn5qXxfio54U= -github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= +github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 h1:mrEEilTAUmaAORhssPPkxj84TsHrPMLBGW2Z4SoTxm8= +github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= -github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= github.com/gostaticanalysis/comment v1.4.2 h1:hlnx5+S2fY9Zo9ePo4AhgYsYHbM2+eAv8m/s1JiCd6Q= github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= @@ -415,10 +401,10 @@ github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3 github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -430,18 +416,16 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.0.0 h1:pO2K/gKgKaat5LdpAhxhluX2GPQMaI3W5FUz/I/UnWk= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= -github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= @@ -452,7 +436,6 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -466,132 +449,134 @@ github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.2 h1:uGQ9xI8/pgc9iOoCe7kWQgRE6SBTrCGmTSf0LrEtY7c= -github.com/kisielk/errcheck v1.6.2/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= +github.com/kisielk/errcheck v1.6.3 h1:dEKh+GLHcWm2oN34nMvDzn1sqI0i0WxPvrgiJA5JuM8= +github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8= +github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= -github.com/kunwardeep/paralleltest v1.0.6 h1:FCKYMF1OF2+RveWlABsdnmsvJrei5aoyZoaGS+Ugg8g= -github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1YuwCsJO/0kL9Zes= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kyoh86/exportloopref v0.1.8 h1:5Ry/at+eFdkX9Vsdw3qU4YkvGtzuVfzT4X7S77LoN/M= -github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= +github.com/kunwardeep/paralleltest v1.0.7 h1:2uCk94js0+nVNQoHZNLBkAR1DQJrVzw6T0RMzJn55dQ= +github.com/kunwardeep/paralleltest v1.0.7/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= +github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= +github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= -github.com/ldez/tagliatelle v0.3.1 h1:3BqVVlReVUZwafJUwQ+oxbx2BEX2vUG4Yu/NOfMiKiM= -github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= -github.com/leonklingele/grouper v1.1.0 h1:tC2y/ygPbMFSBOs3DcyaEMKnnwH7eYKzohOtRrf0SAg= -github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= +github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= +github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU= +github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= -github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/maratori/testpackage v1.1.0 h1:GJY4wlzQhuBusMF1oahQCBtUV/AQ/k69IZ68vxaac2Q= -github.com/maratori/testpackage v1.1.0/go.mod h1:PeAhzU8qkCwdGEMTEupsHJNlQu2gZopMC6RjbhmHeDc= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 h1:pWxk9e//NbPwfxat7RXkts09K+dEBJWakUWwICVqYbA= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= +github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= +github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04= +github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= +github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= +github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= 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/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/revive v1.2.3 h1:NzIEEa9+WimQ6q2Ov7OcNeySS/IOcwtkQ8RAh0R5UJ4= -github.com/mgechev/revive v1.2.3/go.mod h1:iAWlQishqCuj4yhV24FTnKSXGpbAA+0SckXB8GQMX/Q= -github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mgechev/revive v1.3.2 h1:Wb8NQKBaALBJ3xrrj4zpwJwqwNA6nDpyJSEQWcCka6U= +github.com/mgechev/revive v1.3.2/go.mod h1:UCLtc7o5vg5aXCwdUTU1kEBQ1v+YXPAkYDIDXbrs5I0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moricho/tparallel v0.2.1 h1:95FytivzT6rYzdJLdtfn6m1bfFJylOJK41+lgv/EHf4= -github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= +github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 h1:28i1IjGcx8AofiB4N3q5Yls55VEaitzuEPkFJEVgGkA= github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= -github.com/mwitkow/go-proto-validators v0.3.2 h1:qRlmpTzm2pstMKKzTdvwPCF5QfBNURSlAgN/R+qbKos= -github.com/mwitkow/go-proto-validators v0.3.2/go.mod h1:ej0Qp0qMgHN/KtDyUt+Q1/tA7a5VarXUOUxD+oeD30w= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6FxaNu/BnU2OAaLF86eTVhP2hjTB6iMvItA= github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.8.1 h1:0QKNascWv9qIHY7zRoZSxeRr6kuk5aAT3YXLTiDmjTo= -github.com/nishanths/exhaustive v0.8.1/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg= +github.com/nishanths/exhaustive v0.11.0 h1:T3I8nUGhl/Cwu5Z2hfc92l0e04D2GEW6e0l8pzda2l0= +github.com/nishanths/exhaustive v0.11.0/go.mod h1:RqwDsZ1xY0dNdqHho2z6X+bgzizwbLYOWnZbbl2wLB4= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= +github.com/nunnatsa/ginkgolinter v0.12.1 h1:vwOqb5Nu05OikTXqhvLdHCGcx5uthIYIl0t79UVrERQ= +github.com/nunnatsa/ginkgolinter v0.12.1/go.mod h1:AK8Ab1PypVrcGUusuKD8RDcl2KgsIwvNaaxAlyHSzso= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= -github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 h1:/I3lTljEEDNYLho3/FUB7iD/oc2cEFgVmbHzV+O0PtU= github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1/go.mod h1:eD5JxqMiuNYyFNmyY9rkJ/slN8y59oEu4Ei7F8OoKWQ= -github.com/pascaldekloe/name v1.0.1 h1:9lnXOHeqeHHnWLbKfH6X98+4+ETVqFqxN09UXSjcMb0= -github.com/pascaldekloe/name v1.0.1/go.mod h1:Z//MfYJnH4jVpQ9wkclwu2I2MkHmXTlT9wR5UZScttM= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/polyfloyd/go-errorlint v1.0.2 h1:kp1yvHflYhTmw5m3MmBy8SCyQkKPjwDthVuMH0ug6Yk= -github.com/polyfloyd/go-errorlint v1.0.2/go.mod h1:APVvOesVSAnne5SClsPxPdfvZTVDojXh1/G3qb5wjGI= +github.com/polyfloyd/go-errorlint v1.4.2 h1:CU+O4181IxFDdPH6t/HT7IiDj1I7zxNi1RIUxYwn8d0= +github.com/polyfloyd/go-errorlint v1.4.2/go.mod h1:k6fU/+fQe38ednoZS51T7gSIGQW1y94d6TkSr35OzH8= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -600,52 +585,40 @@ github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/pseudomuto/protokit v0.2.0 h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ8RpM= github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= -github.com/pseudomuto/protokit v0.2.1 h1:kCYpE3thoR6Esm0CUvd5xbrDTOZPvQPTDeyXpZfrJdk= -github.com/pseudomuto/protokit v0.2.1/go.mod h1:gt7N5Rz2flBzYafvaxyIxMZC0TTF5jDZfRnw25hAAyo= -github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= -github.com/quasilyte/go-ruleguard v0.3.18 h1:sd+abO1PEI9fkYennwzHn9kl3nqP6M5vE7FiOzZ+5CE= -github.com/quasilyte/go-ruleguard v0.3.18/go.mod h1:lOIzcYlgxrQ2sGJ735EHXmf/e9MJ516j16K/Ifcttvs= -github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/dsl v0.3.21/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= -github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f h1:6Gtn2i04RD0gVyYf2/IUMTIs+qYleBt4zxDqkLTcu4U= -github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/go-ruleguard v0.3.19 h1:tfMnabXle/HzOb5Xe9CUZYWXKfkS1KwRmZyPmD9nVcc= +github.com/quasilyte/go-ruleguard v0.3.19/go.mod h1:lHSn69Scl48I7Gt9cX3VrbsZYvYiBYszZOZW4A+oTEw= +github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= +github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.3.4 h1:3Z3Eu6FGHZWSfNKJTOUiPatWwfc7DzJRU04jFUqJODw= -github.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.2.4 h1:CpMSDKan0LtNGGhPrvupAoLeObRFjND8/tU1rEOtBp4= -github.com/ryancurrah/gomodguard v1.2.4/go.mod h1:+Kem4VjWwvFpUJRJSwa16s1tBJe+vbv02+naTow2f6M= -github.com/ryanrolds/sqlclosecheck v0.3.0 h1:AZx+Bixh8zdUBxUA1NxbxVAS78vTPq4rCb8OUZI9xFw= -github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= +github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJHMLuTw= +github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= +github.com/ryanrolds/sqlclosecheck v0.4.0 h1:i8SX60Rppc1wRuyQjMciLqIzV3xnoHB7/tXbr6RGYNI= +github.com/ryanrolds/sqlclosecheck v0.4.0/go.mod h1:TBRRjzL31JONc9i4XMinicuo+s+E8yKZ5FN8X3G6CKQ= github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= -github.com/sashamelentyev/usestdlibvars v1.15.1 h1:dnc7NDHGpYXYzDi5UWbfxIj9Y54ToKOtq9YNWacaHng= -github.com/sashamelentyev/usestdlibvars v1.15.1/go.mod h1:Wjq/mtFdeKAOEvn/NCRy7IvHRZvEpnOU0ZPrjNKr3zU= -github.com/securego/gosec/v2 v2.13.1 h1:7mU32qn2dyC81MH9L2kefnQyRMUarfDER3iQyMHcjYM= -github.com/securego/gosec/v2 v2.13.1/go.mod h1:EO1sImBMBWFjOTFzMWfTRrZW6M15gm60ljzrmy/wtHo= +github.com/sashamelentyev/usestdlibvars v1.23.0 h1:01h+/2Kd+NblNItNeux0veSL5cBF1jbEOPrEhDzGYq0= +github.com/sashamelentyev/usestdlibvars v1.23.0/go.mod h1:YPwr/Y1LATzHI93CqoPUN/2BzGQ/6N/cl/KwgR0B/aU= +github.com/securego/gosec/v2 v2.16.0 h1:Pi0JKoasQQ3NnoRao/ww/N/XdynIB9NRYYZT5CyOs5U= +github.com/securego/gosec/v2 v2.16.0/go.mod h1:xvLcVZqUfo4aAQu56TNv7/Ltz6emAOQAEsrZrt7uGlI= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= @@ -653,30 +626,30 @@ github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOms github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sivchari/containedctx v1.0.2 h1:0hLQKpgC53OVF1VT7CeoFHk9YKstur1XOgfYIc1yrHI= -github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= +github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= -github.com/sivchari/tenv v1.7.0 h1:d4laZMBK6jpe5PWepxlV9S+LC0yXqvYHiq8E6ceoVVE= -github.com/sivchari/tenv v1.7.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= -github.com/sonatard/noctx v0.0.1 h1:VC1Qhl6Oxx9vvWo3UDgrGXYCeKCe3Wbw7qAWL6FrmTY= -github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= -github.com/sourcegraph/go-diff v0.6.1 h1:hmA1LzxW0n1c3Q4YbrFgg4P99GSnebYa3x8gr0HZqLQ= -github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= +github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= +github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= +github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= +github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= +github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= +github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= @@ -687,8 +660,10 @@ github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -698,38 +673,45 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/sylvia7788/contextcheck v1.0.8 h1:Uk1S0K326MH6obdpYj1kYriU/g/5oXZM8Dc27ttpezM= -github.com/sylvia7788/contextcheck v1.0.8/go.mod h1:9XDxwvxyuKD+8N+a7Gs7bfWLityh5t70g/GjdEt2N2M= -github.com/tdakkota/asciicheck v0.1.1 h1:PKzG7JUTUmVspQTDqtkX9eSiLGossXTybutHwTXuO0A= -github.com/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= +github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= +github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= +github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= +github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= github.com/tetafro/godot v1.4.11 h1:BVoBIqAf/2QdbFmSwAWnaIqDivZdOV0ZRwEm6jivLKw= github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= -github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 h1:kl4KhGNsJIbDHS9/4U9yQo1UcPQM0kOMJHn29EoH/Ro= -github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/timonwong/logrlint v0.4.0 h1:NO1LBfWw9DEByynMNuCbvzczXSS08wTTjOVu/4cWPdg= -github.com/timonwong/logrlint v0.4.0/go.mod h1:5V+qRnjYXE74IDzxox865j/FoTfEEoJDyV0yT3RMu6g= -github.com/tomarrell/wrapcheck/v2 v2.6.2 h1:3dI6YNcrJTQ/CJQ6M/DUkc0gnqYSIk6o0rChn9E/D0M= -github.com/tomarrell/wrapcheck/v2 v2.6.2/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0IvAB9Rdwyilxvg= -github.com/tommy-muehle/go-mnd/v2 v2.5.0 h1:iAj0a8e6+dXSL7Liq0aXPox36FiN1dBbjA6lt9fl65s= -github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= +github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= +github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= +github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= +github.com/tomarrell/wrapcheck/v2 v2.8.1 h1:HxSqDSN0sAt0yJYsrcYVoEeyM4aI9yAm3KQpIXDJRhQ= +github.com/tomarrell/wrapcheck/v2 v2.8.1/go.mod h1:/n2Q3NZ4XFT50ho6Hbxg+RV1uyo2Uow/Vdm9NQcl5SE= +github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= +github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iLA= github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI= github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/uudashr/gocognit v1.0.6 h1:2Cgi6MweCsdB6kpcVQp7EW4U23iBFQWfTXiWlyp842Y= github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= +github.com/xen0n/gosmopolitan v1.2.1 h1:3pttnTuFumELBRSh+KQs1zcz4fN6Zy7aB0xlnQSn1Iw= +github.com/xen0n/gosmopolitan v1.2.1/go.mod h1:JsHq/Brs1o050OOdmzHeOr0N7OtlnKRAGAsElF8xBQA= github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= +github.com/ykadowak/zerologlint v0.1.2 h1:Um4P5RMmelfjQqQJKtE8ZW+dLZrXrENeIzWWKw800U4= +github.com/ykadowak/zerologlint v0.1.2/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -739,37 +721,41 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/bosi/decorder v0.2.3 h1:gX4/RgK16ijY8V+BRQHAySfQAb354T7/xQpDB2n10P0= gitlab.com/bosi/decorder v0.2.3/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= +go-simpler.org/assert v0.5.0 h1:+5L/lajuQtzmbtEfh69sr5cRf2/xZzyJhFjoOz/PPqs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.tmz.dev/musttag v0.7.0 h1:QfytzjTWGXZmChoX0L++7uQN+yRCPfyFm+whsM+lfGc= +go.tmz.dev/musttag v0.7.0/go.mod h1:oTFPvgOkJmp5kYL02S8+jrH0eLrBIl57rzWeA26zDEM= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= -go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -780,11 +766,12 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 h1:tnebWN09GYg9OLPss1KXj8txwZc6X6uMr6VFdcGNbHw= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4= +golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 h1:Ic/qN6TEifvObMGQy72k0n1LlJr7DjWWEi+MOsDOiSk= -golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= +golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -798,7 +785,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -810,13 +796,17 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -829,6 +819,7 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -843,30 +834,26 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/ 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-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b h1:ZmngSVLe/wycRns9MKikG9OWIEjGcGAkacif7oYQaUY= -golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -876,19 +863,9 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 h1:2o1E+E8TpNLklK9nHiPiK1uzIYrIHt+cQx3ynCwq9V8= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= 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= @@ -901,12 +878,13 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde h1:ejfdSekXMDxDLbRrJMwUk6KnSLZ2McaUCVcIKM+N6jc= -golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -915,14 +893,15 @@ 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-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -939,93 +918,79 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-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-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= -golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524210228-3d17549cdc6b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1036,7 +1001,6 @@ golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1049,30 +1013,22 @@ golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -1080,24 +1036,23 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= +golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.11.1 h1:ojD5zOW8+7dOGzdnNgersm8aPfcDjhMp12UfG93NIMc= +golang.org/x/tools v0.11.1/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1117,28 +1072,8 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.94.0 h1:KtKM9ru3nzQioV1HLlUf1cR7vMYJIpgls5VhAYQXIwA= -google.golang.org/api v0.94.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= +google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1184,53 +1119,13 @@ google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6D 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-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-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf h1:Q5xNKbTSFwkuaaGaR7CMcXEM5sy19KYdUU8iF8/iRC0= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc h1:8DyZCyvI8mE1IdLy/60bS+52xfymkE72wv1asokgtao= +google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1249,22 +1144,9 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= 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= @@ -1277,19 +1159,20 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1301,7 +1184,6 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1311,25 +1193,33 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.3.3 h1:oDx7VAwstgpYpb3wv0oxiZlxY+foCpRAwY7Vk6XpAgA= -honnef.co/go/tools v0.3.3/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= -k8s.io/apimachinery v0.25.0 h1:MlP0r6+3XbkUG2itd6vp3oxbtdQLQI94fD5gCS+gnoU= -k8s.io/apimachinery v0.25.0/go.mod h1:qMx9eAk0sZQGsXGu86fab8tZdffHbwUfsvzqKn4mfB0= -k8s.io/client-go v0.25.0 h1:CVWIaCETLMBNiTUta3d5nzRbXvY5Hy9Dpl+VvREpu5E= -k8s.io/client-go v0.25.0/go.mod h1:lxykvypVfKilxhTklov0wz1FoaUZ8X4EwbhS6rpRfN8= +honnef.co/go/tools v0.4.3 h1:o/n5/K5gXqk8Gozvs2cnL0F2S1/g1vcGCAx2vETjITw= +honnef.co/go/tools v0.4.3/go.mod h1:36ZgoUOrqOk1GxwHhyryEkq8FQWkUO2xGuSMhUCcdvA= +k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= +k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= +k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= +k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 h1:d+LBRNY3c/KGp7lDblRlUJkayx4Vla7WUTIazoGMdYo= +k8s.io/client-go v0.0.0-20210217172142-7279fc64d847/go.mod h1:q0EaghmVye2uui19vxSZ2NG6ssgUWgjudO6vrwXneSI= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= -k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 h1:H9TCJUUx+2VA0ZiD9lvtaX8fthFsMoD+Izn93E/hm8U= -k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -mvdan.cc/gofumpt v0.3.1 h1:avhhrOmv0IuvQVK7fvwV91oFSGAk5/6Po8GXTzICeu8= -mvdan.cc/gofumpt v0.3.1/go.mod h1:w3ymliuxvzVx8DAutBnVyDqYb1Niy/yCJt/lk821YCE= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= +k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +mvdan.cc/gofumpt v0.5.0 h1:0EQ+Z56k8tXjj/6TQD25BFNKQXpCvT0rnansIc7Ug5E= +mvdan.cc/gofumpt v0.5.0/go.mod h1:HBeVDtMKRZpXyxFciAirzdKklDlGu8aAy1wEbH5Y9js= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 h1:seuXWbRB1qPrS3NQnHmFKLJLtskWyueeIzmLXghMGgk= -mvdan.cc/unparam v0.0.0-20220706161116-678bad134442/go.mod h1:F/Cxw/6mVrNKqrR2YjFf5CaW0Bw4RL8RfbEf4GRggJk= +mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d h1:3rvTIIM22r9pvXk+q3swxUQAQOxksVMGK7sml4nG57w= +mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d/go.mod h1:IeHQjmn6TOD+e4Z3RFiZMMsLVL+A96Nvptar8Fj71is= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go b/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go index d970d2106a..43de03450c 100644 --- a/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go +++ b/flytestdlib/boilerplate/flyte/golang_support_tools/tools.go @@ -1,11 +1,12 @@ +//go:build tools // +build tools package tools import ( + _ "github.com/EngHabu/mockery/cmd/mockery" _ "github.com/alvaroloes/enumer" _ "github.com/flyteorg/flytestdlib/cli/pflags" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" - _ "github.com/vektra/mockery/cmd/mockery" _ "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) diff --git a/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh b/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh index e7fc7af009..c7e5577ef3 100755 --- a/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh +++ b/flytestdlib/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -16,8 +16,9 @@ set -e # List of tools to go get # In the format of ":" or ":" if no cli tools=( - "github.com/vektra/mockery/cmd/mockery" - "github.com/flyteorg/flytestdlib/cli/pflags" + "github.com/EngHabu/mockery/cmd/mockery" + "github.com/flyteorg/flytestdlib/cli/pflags@latest" + "github.com/golangci/golangci-lint/cmd/golangci-lint" "github.com/alvaroloes/enumer" "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) @@ -27,8 +28,6 @@ echo "Using temp directory ${tmp_dir}" cp -R boilerplate/flyte/golang_support_tools/* $tmp_dir pushd "$tmp_dir" -curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0 - for tool in "${tools[@]}" do echo "Installing ${tool}"