From 96dfb9832baea8e69f13a0c2f8f62e57090be727 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:06:05 +0530 Subject: [PATCH 01/20] [dep][go](deps): Bump google.golang.org/grpc from 1.64.0 to 1.64.1 (#4326) --- go.mod | 4 ++-- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 874b9bc2d1..b98759e69f 100644 --- a/go.mod +++ b/go.mod @@ -57,8 +57,8 @@ require ( github.com/zclconf/go-cty v1.14.4 github.com/zclconf/go-cty-yaml v1.0.3 golang.org/x/exp v0.0.0-20231006140011-7918f672742d - golang.org/x/sync v0.8.0 - golang.org/x/text v0.17.0 + golang.org/x/sync v0.7.0 + golang.org/x/text v0.16.0 google.golang.org/grpc v1.64.1 google.golang.org/protobuf v1.34.1 gopkg.in/olahol/melody.v1 v1.0.0-20170518105555-d52139073376 diff --git a/go.sum b/go.sum index b037b48bbf..17c3772056 100644 --- a/go.sum +++ b/go.sum @@ -1153,8 +1153,8 @@ 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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= 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= From d1c4080559ce2455c6e830931cfc22819268525d Mon Sep 17 00:00:00 2001 From: Nathan Mische Date: Fri, 30 Aug 2024 07:45:41 -0400 Subject: [PATCH 02/20] Make plugin start timeout configurable. (#4321) --- pkg/cmdconfig/viper.go | 4 +++- pkg/constants/args.go | 1 + pkg/constants/default_options.go | 1 + pkg/constants/duration.go | 1 + pkg/constants/env.go | 2 ++ pkg/pluginmanager_service/plugin_manager.go | 21 ++++++++++++++++++--- pkg/steampipeconfig/modconfig/plugin.go | 12 +++++++++++- pkg/steampipeconfig/options/plugin.go | 16 +++++++++++++++- 8 files changed, 52 insertions(+), 6 deletions(-) diff --git a/pkg/cmdconfig/viper.go b/pkg/cmdconfig/viper.go index 8e5efd44d9..33a40a4461 100644 --- a/pkg/cmdconfig/viper.go +++ b/pkg/cmdconfig/viper.go @@ -2,10 +2,11 @@ package cmdconfig import ( "fmt" - "github.com/turbot/steampipe/pkg/filepaths" "log" "os" + "github.com/turbot/steampipe/pkg/filepaths" + filehelpers "github.com/turbot/go-kit/files" "github.com/turbot/steampipe/pkg/steampipeconfig" @@ -175,6 +176,7 @@ func setDefaultsFromEnv() { constants.EnvCacheMaxTTL: {[]string{constants.ArgCacheMaxTtl}, Int}, constants.EnvMemoryMaxMb: {[]string{constants.ArgMemoryMaxMb}, Int}, constants.EnvMemoryMaxMbPlugin: {[]string{constants.ArgMemoryMaxMbPlugin}, Int}, + constants.EnvPluginStartTimeout: {[]string{constants.ArgPluginStartTimeout}, Int}, // we need this value to go into different locations constants.EnvCacheEnabled: {[]string{ diff --git a/pkg/constants/args.go b/pkg/constants/args.go index 1aa13a6276..0b280547e8 100644 --- a/pkg/constants/args.go +++ b/pkg/constants/args.go @@ -71,6 +71,7 @@ const ( ArgDatabaseSSLPassword = "database-ssl-password" ArgMemoryMaxMb = "memory-max-mb" ArgMemoryMaxMbPlugin = "memory-max-mb-plugin" + ArgPluginStartTimeout = "plugin-start-timeout" ) // metaquery mode arguments diff --git a/pkg/constants/default_options.go b/pkg/constants/default_options.go index a30bd9b684..1eb6fb1fae 100644 --- a/pkg/constants/default_options.go +++ b/pkg/constants/default_options.go @@ -33,5 +33,6 @@ const DefaultConnectionConfigContent = ` # options "plugin" { # memory_max_mb = "1024" # the default maximum memory to allow a plugin process - used if there is not max memory specified in the 'plugin' block' for that plugin +# start_timeout = 30 # maximum time (in seconds) to wait for a plugin to start up # } ` diff --git a/pkg/constants/duration.go b/pkg/constants/duration.go index 610173e0f1..dadadbb7b6 100644 --- a/pkg/constants/duration.go +++ b/pkg/constants/duration.go @@ -9,4 +9,5 @@ var ( DBRecoveryTimeout = 24 * time.Hour DBRecoveryRetryBackoff = 200 * time.Millisecond ServicePingInterval = 50 * time.Millisecond + PluginStartTimeout = 30 * time.Second ) diff --git a/pkg/constants/env.go b/pkg/constants/env.go index 23dc527382..4c5765b8ea 100644 --- a/pkg/constants/env.go +++ b/pkg/constants/env.go @@ -43,4 +43,6 @@ const ( EnvMemoryMaxMb = "STEAMPIPE_MEMORY_MAX_MB" EnvMemoryMaxMbPlugin = "STEAMPIPE_PLUGIN_MEMORY_MAX_MB" + + EnvPluginStartTimeout = "STEAMPIPE_PLUGIN_START_TIMEOUT" ) diff --git a/pkg/pluginmanager_service/plugin_manager.go b/pkg/pluginmanager_service/plugin_manager.go index 8288b66270..8070e42a21 100644 --- a/pkg/pluginmanager_service/plugin_manager.go +++ b/pkg/pluginmanager_service/plugin_manager.go @@ -668,9 +668,24 @@ func (m *PluginManager) notifyNewDynamicSchemas(pluginClient *sdkgrpc.PluginClie } func (m *PluginManager) waitForPluginLoad(p *runningPlugin, req *pb.GetRequest) error { - log.Printf("[TRACE] waitForPluginLoad (%p)", req) - // TODO make this configurable - pluginStartTimeoutSecs := 30 + + pluginConfig := m.plugins[p.pluginInstance] + if pluginConfig == nil { + // not expected + return sperr.New("plugin manager has no config for plugin instance %s", p.pluginInstance) + } + pluginStartTimeoutSecs := pluginConfig.GetStartTimeout() + if pluginStartTimeoutSecs == 0 { + if viper.IsSet(constants.ArgMemoryMaxMbPlugin) { + pluginStartTimeoutSecs = viper.GetInt64(constants.ArgPluginStartTimeout) + } + } + if pluginStartTimeoutSecs == 0 { + // if we don't have any timeout set use 30 seconds + pluginStartTimeoutSecs = int64(30) + } + + log.Printf("[TRACE] waitForPluginLoad: waiting %d seconds (%p)", pluginStartTimeoutSecs, req) // wait for the plugin to be initialized select { diff --git a/pkg/steampipeconfig/modconfig/plugin.go b/pkg/steampipeconfig/modconfig/plugin.go index 1cd439cabc..e34495c318 100644 --- a/pkg/steampipeconfig/modconfig/plugin.go +++ b/pkg/steampipeconfig/modconfig/plugin.go @@ -13,6 +13,7 @@ type Plugin struct { Instance string `hcl:"name,label" db:"plugin_instance"` Alias string `hcl:"source,optional"` MemoryMaxMb *int `hcl:"memory_max_mb,optional" db:"memory_max_mb"` + StartTimeout *int `hcl:"start_timeout,optional"` Limiters []*RateLimiter `hcl:"limiter,block" db:"limiters"` FileName *string `db:"file_name"` StartLineNumber *int `db:"start_line_number"` @@ -61,6 +62,15 @@ func (l *Plugin) GetMaxMemoryBytes() int64 { } return int64(1024 * 1024 * memoryMaxMb) } + +func (l *Plugin) GetStartTimeout() int64 { + startTimout := 0 + if l.StartTimeout != nil { + startTimout = *l.StartTimeout + } + return int64(startTimout) +} + func (l *Plugin) GetLimiterMap() map[string]*RateLimiter { res := make(map[string]*RateLimiter, len(l.Limiters)) for _, l := range l.Limiters { @@ -74,6 +84,7 @@ func (l *Plugin) Equals(other *Plugin) bool { return l.Instance == other.Instance && l.Alias == other.Alias && l.GetMaxMemoryBytes() == other.GetMaxMemoryBytes() && + l.GetStartTimeout() == other.GetStartTimeout() && l.Plugin == other.Plugin && // compare limiters ignoring order maps.EqualFunc(l.GetLimiterMap(), other.GetLimiterMap(), func(l, r *RateLimiter) bool { return l.Equals(r) }) @@ -91,4 +102,3 @@ func ResolvePluginImageRef(pluginAlias string) string { // ok so there is no plugin block reference - build the plugin image ref from the PluginAlias field return ociinstaller.NewSteampipeImageRef(pluginAlias).DisplayImageRef() } - diff --git a/pkg/steampipeconfig/options/plugin.go b/pkg/steampipeconfig/options/plugin.go index f1d0eb6592..f67f28fab6 100644 --- a/pkg/steampipeconfig/options/plugin.go +++ b/pkg/steampipeconfig/options/plugin.go @@ -8,7 +8,8 @@ import ( ) type Plugin struct { - MemoryMaxMb *int `hcl:"memory_max_mb"` + MemoryMaxMb *int `hcl:"memory_max_mb"` + StartTimeout *int `hcl:"start_timeout"` } // ConfigMap creates a config map that can be merged with viper @@ -18,6 +19,11 @@ func (t *Plugin) ConfigMap() map[string]interface{} { if t.MemoryMaxMb != nil { res[constants.ArgMemoryMaxMbPlugin] = t.MemoryMaxMb } + if t.StartTimeout != nil { + res[constants.ArgPluginStartTimeout] = t.StartTimeout + } else { + res[constants.ArgPluginStartTimeout] = constants.PluginStartTimeout.Seconds() + } return res } @@ -30,6 +36,9 @@ func (t *Plugin) Merge(otherOptions Options) { if o.MemoryMaxMb != nil { t.MemoryMaxMb = o.MemoryMaxMb } + if o.StartTimeout != nil { + t.StartTimeout = o.StartTimeout + } } } @@ -43,6 +52,11 @@ func (t *Plugin) String() string { } else { str = append(str, fmt.Sprintf(" MemoryMaxMb: %d", *t.MemoryMaxMb)) } + if t.StartTimeout == nil { + str = append(str, " PluginStartTimeout: nil") + } else { + str = append(str, fmt.Sprintf(" PluginStartTimeout: %d", *t.StartTimeout)) + } return strings.Join(str, "\n") } From 2b899b95f79d3744d88a6eea4ec3f83422eb5cd0 Mon Sep 17 00:00:00 2001 From: Puskar Basu <45908484+pskrbasu@users.noreply.github.com> Date: Mon, 2 Sep 2024 14:15:35 +0530 Subject: [PATCH 03/20] Update FDW version to 1.11.7 - Add ability to configure plugin startup timeout --- CHANGELOG.md | 4 ++++ pkg/constants/db.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f5fc93c5f..f73a21f80d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.24.0 [tbd] +_Whats new_ +- Add ability to configure plugin startup timeout. ([#4320](https://github.com/turbot/steampipe/issues/4320)) + ## v0.23.5 [2024-08-21] _Bug fixes_ - Fix issue where refresh connections was not creating a new connection if it was not in the search path. ([#4353](https://github.com/turbot/steampipe/issues/4353)) diff --git a/pkg/constants/db.go b/pkg/constants/db.go index 142834dfe8..c20bb4f44c 100644 --- a/pkg/constants/db.go +++ b/pkg/constants/db.go @@ -28,7 +28,7 @@ const ( // constants for installing db and fdw images const ( DatabaseVersion = "14.2.0" - FdwVersion = "1.11.6" + FdwVersion = "1.11.7" // PostgresImageRef is the OCI Image ref for the database binaries PostgresImageRef = "us-docker.pkg.dev/steampipe/steampipe/db:14.2.0" From d7b1544e0611e5f3e5fe040eac348cfff7b53f43 Mon Sep 17 00:00:00 2001 From: Puskar Basu <45908484+pskrbasu@users.noreply.github.com> Date: Mon, 2 Sep 2024 14:17:01 +0530 Subject: [PATCH 04/20] Move FDW and Postgres DB from Google Artifact Registry to GH Container Registry. Closes #4344 --- .github/workflows/buildDBImage.yml | 25 ++++++++----------------- pkg/constants/db.go | 6 +++--- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/.github/workflows/buildDBImage.yml b/.github/workflows/buildDBImage.yml index 7bfabab0c9..707b7e690d 100644 --- a/.github/workflows/buildDBImage.yml +++ b/.github/workflows/buildDBImage.yml @@ -19,7 +19,7 @@ on: env: PROJECT_ID: steampipe IMAGE_NAME: db - CORE_REPO: us-docker.pkg.dev/steampipe/steampipe + CORE_REPO: ghcr.io/turbot/steampipe ORG: turbot CONFIG_SCHEMA_VERSION: "2020-11-18" VERSION: ${{ github.event.inputs.version }} @@ -65,23 +65,13 @@ jobs: with: ref: ${{ github.event.inputs.branch }} - - name: 'Authenticate to Google Cloud' - uses: 'google-github-actions/auth@v2' + # Login to GHCR + - name: Log in to the Container registry + uses: docker/login-action@v2 with: - service_account: ${{ secrets.GCP_GITHUB_ACTION_PUSH_ARTIFACTS }} - credentials_json: ${{ secrets.GCP_GITHUB_ACTION_PUSH_ARTIFACTS_CREDENTIAL_JSON }} - - - name: Get GCloud CLI - uses: google-github-actions/setup-gcloud@v2.1.0 - with: - project_id: ${{ env.PROJECT_ID }} - - - name: Setup GCloud CLI - run: |- - gcloud config list - gcloud components install beta - gcloud components install alpha --quiet - gcloud beta auth configure-docker us-docker.pkg.dev + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GH_PUBLISH_ACCESS_TOKEN }} - name: Pull & Extract - darwin amd64 run: |- @@ -147,6 +137,7 @@ jobs: run: |- oras version + # Publish to GHCR - name: Push to Registry run: |- REF="$CORE_REPO/$IMAGE_NAME:$VERSION" diff --git a/pkg/constants/db.go b/pkg/constants/db.go index c20bb4f44c..01e65738b3 100644 --- a/pkg/constants/db.go +++ b/pkg/constants/db.go @@ -31,10 +31,10 @@ const ( FdwVersion = "1.11.7" // PostgresImageRef is the OCI Image ref for the database binaries - PostgresImageRef = "us-docker.pkg.dev/steampipe/steampipe/db:14.2.0" - PostgresImageDigest = "sha256:a75637209f1bc2fa9885216f7972dfa0d82010a25d3cbfc07baceba8d16f4a93" + PostgresImageRef = "ghcr.io/turbot/steampipe/db:14.2.0" + PostgresImageDigest = "sha256:1972eee02bbd3bf52f8cce30a5109ab017f310a85d45a31ddd1623f1dfe455fa" - FdwImageRef = "us-docker.pkg.dev/steampipe/steampipe/fdw:" + FdwVersion + FdwImageRef = "ghcr.io/turbot/steampipe/fdw:" + FdwVersion FdwBinaryFileName = "steampipe_postgres_fdw.so" ) From 39c7428a5388d0678d6c89568a230e3c5b0c7fcb Mon Sep 17 00:00:00 2001 From: Patrick Decat Date: Mon, 2 Sep 2024 10:56:31 +0200 Subject: [PATCH 05/20] Fix: Update plugin manager to properly flag shutdown is happening. Closes #4365 --- pkg/pluginmanager_service/plugin_manager.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkg/pluginmanager_service/plugin_manager.go b/pkg/pluginmanager_service/plugin_manager.go index 8070e42a21..3f75ad47b8 100644 --- a/pkg/pluginmanager_service/plugin_manager.go +++ b/pkg/pluginmanager_service/plugin_manager.go @@ -53,9 +53,10 @@ type PluginManager struct { // map lock mut sync.RWMutex - // shutdown syncronozation + // shutdown synchronization // do not start any plugins while shutting down - shutdownMut sync.Mutex + shutdownMut sync.RWMutex + shuttingDown bool // do not shutdown until all plugins have loaded startPluginWg sync.WaitGroup @@ -259,6 +260,8 @@ func (m *PluginManager) Shutdown(*pb.ShutdownRequest) (resp *pb.ShutdownResponse // lock shutdownMut before waiting for startPluginWg // this enables us to exit from ensurePlugin early if needed m.shutdownMut.Lock() + m.shuttingDown = true + m.shutdownMut.Unlock() m.startPluginWg.Wait() // close our pool @@ -316,7 +319,7 @@ func (m *PluginManager) ensurePlugin(pluginInstance string, connectionConfigs [] }() // do not install a plugin while shutting down - if m.shuttingDown() { + if m.isShuttingDown() { return nil, fmt.Errorf("plugin manager is shutting down") } @@ -563,7 +566,7 @@ func (m *PluginManager) initializePlugin(connectionConfigs []*sdkproto.Connectio } // provide opportunity to avoid setting connection configs if we are shutting down - if m.shuttingDown() { + if m.isShuttingDown() { log.Printf("[INFO] aborting plugin %s initialization - plugin manager is shutting down", pluginName) return nil, fmt.Errorf("plugin manager is shutting down") } @@ -607,12 +610,10 @@ func (m *PluginManager) initializePlugin(connectionConfigs []*sdkproto.Connectio } // return whether the plugin manager is shutting down -func (m *PluginManager) shuttingDown() bool { - if !m.shutdownMut.TryLock() { - return true - } - m.shutdownMut.Unlock() - return false +func (m *PluginManager) isShuttingDown() bool { + m.shutdownMut.RLock() + defer m.shutdownMut.RUnlock() + return m.shuttingDown } // populate map of connection configs for each plugin instance From 105f8da397e99fb0bd1b22bb217dd28f66ca72d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:14:24 +0530 Subject: [PATCH 06/20] [dep][go](deps): Bump google.golang.org/grpc from 1.64.1 to 1.66.0 (#4361) --- go.mod | 20 +++++++++----------- go.sum | 33 ++++++++++++++------------------- 2 files changed, 23 insertions(+), 30 deletions(-) diff --git a/go.mod b/go.mod index b98759e69f..df389323ea 100644 --- a/go.mod +++ b/go.mod @@ -57,9 +57,9 @@ require ( github.com/zclconf/go-cty v1.14.4 github.com/zclconf/go-cty-yaml v1.0.3 golang.org/x/exp v0.0.0-20231006140011-7918f672742d - golang.org/x/sync v0.7.0 - golang.org/x/text v0.16.0 - google.golang.org/grpc v1.64.1 + golang.org/x/sync v0.8.0 + golang.org/x/text v0.17.0 + google.golang.org/grpc v1.66.0 google.golang.org/protobuf v1.34.1 gopkg.in/olahol/melody.v1 v1.0.0-20170518105555-d52139073376 oras.land/oras-go/v2 v2.5.0 @@ -68,8 +68,7 @@ require ( require ( cloud.google.com/go v0.112.1 // indirect - cloud.google.com/go/compute v1.25.1 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/storage v1.38.0 // indirect dario.cat/mergo v1.0.0 // indirect @@ -89,7 +88,7 @@ require ( github.com/bytedance/sonic v1.11.6 // indirect github.com/bytedance/sonic/loader v0.1.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/cloudwego/iasm v0.2.0 // indirect @@ -117,7 +116,7 @@ require ( github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/goccy/go-json v0.10.2 // indirect - github.com/golang/glog v1.2.0 // indirect + github.com/golang/glog v1.2.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.4 // indirect @@ -204,16 +203,15 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/arch v0.8.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/term v0.21.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect google.golang.org/api v0.169.0 // indirect - google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 17c3772056..f1b5fff5c0 100644 --- a/go.sum +++ b/go.sum @@ -68,10 +68,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz 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.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU= -cloud.google.com/go/compute v1.25.1/go.mod h1:oopOIR53ly6viBYxaDhBfJwzUAxf1zE//uf3IB011ls= -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/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -262,8 +260,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA 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/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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= 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= @@ -401,8 +399,8 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a 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/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -1021,8 +1019,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= -golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= 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= @@ -1149,7 +1147,6 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.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.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= @@ -1282,8 +1279,6 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww 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/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= 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= @@ -1387,10 +1382,10 @@ google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= -google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:+rdxYoE3E5htTEWIe15GlN6IfvbURM//Jt0mmkmm6ZU= +google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= 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= @@ -1426,8 +1421,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= 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= From 006884a7c79c88acc559f4cff666b9f24c60ec4d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:14:45 +0530 Subject: [PATCH 07/20] Bump elliptic from 6.5.4 to 6.5.7 in /ui/dashboard (#4358) --- ui/dashboard/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/dashboard/yarn.lock b/ui/dashboard/yarn.lock index 0b9b836c92..d588174176 100644 --- a/ui/dashboard/yarn.lock +++ b/ui/dashboard/yarn.lock @@ -8753,9 +8753,9 @@ electron-to-chromium@^1.4.477: integrity sha512-KGKjcafTpOxda0kqwQ72M0tDmX6RsGhUJTy0Hr7slt0+CgHh9Oex8JdjY9Og68dUkTLUlBOJC0A5W5Mw3QSGCg== elliptic@^6.5.3, elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + version "6.5.7" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.7.tgz#8ec4da2cb2939926a1b9a73619d768207e647c8b" + integrity sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q== dependencies: bn.js "^4.11.9" brorand "^1.1.0" From 53c96f6dea9f26fa4ed524e993095669f8435d4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:15:05 +0530 Subject: [PATCH 08/20] [dep][go](deps): Bump github.com/spf13/cobra from 1.8.0 to 1.8.1 (#4355) --- go.mod | 2 +- go.sum | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index df389323ea..15d141426d 100644 --- a/go.mod +++ b/go.mod @@ -43,7 +43,7 @@ require ( github.com/shiena/ansicolor v0.0.0-20230509054315-a9deabde6e02 github.com/shirou/gopsutil v3.21.11+incompatible github.com/sirupsen/logrus v1.9.3 - github.com/spf13/cobra v1.8.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.18.2 github.com/stevenle/topsort v0.2.0 diff --git a/go.sum b/go.sum index f1b5fff5c0..abeb9fea5c 100644 --- a/go.sum +++ b/go.sum @@ -293,7 +293,7 @@ github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5Z github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= @@ -769,8 +769,8 @@ github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNo github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= From a9aa64b5cab46a007fa9f5e08fe7618da1a674f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:16:00 +0530 Subject: [PATCH 09/20] [dep][go](deps): Bump github.com/hashicorp/go-version (#4305) --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 15d141426d..987653eba4 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/hashicorp/go-cleanhttp v0.5.2 github.com/hashicorp/go-hclog v1.6.3 github.com/hashicorp/go-plugin v1.6.0 - github.com/hashicorp/go-version v1.6.0 + github.com/hashicorp/go-version v1.7.0 github.com/hashicorp/hcl/v2 v2.20.1 github.com/jackc/pgconn v1.14.3 github.com/jackc/pgx/v5 v5.6.0 diff --git a/go.sum b/go.sum index abeb9fea5c..f1c9e9dff1 100644 --- a/go.sum +++ b/go.sum @@ -530,8 +530,9 @@ github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhE github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -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/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.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/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= From 841fa769447bcdc3989f4620dbf27477495f0ae9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:16:54 +0530 Subject: [PATCH 10/20] Bump tmpl from 1.0.4 to 1.0.5 in /ui/dashboard (#4301) --- ui/dashboard/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/dashboard/yarn.lock b/ui/dashboard/yarn.lock index d588174176..7709ecb1e3 100644 --- a/ui/dashboard/yarn.lock +++ b/ui/dashboard/yarn.lock @@ -17703,9 +17703,9 @@ tmp@^0.2.1: rimraf "^3.0.0" tmpl@1.0.x: - version "1.0.4" - resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz" - integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== to-arraybuffer@^1.0.0: version "1.0.1" From c44b089899c2f03c73b042edd89429c8346add0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:19:03 +0530 Subject: [PATCH 11/20] Bump ws from 7.5.6 to 7.5.10 in /ui/dashboard (#4313) --- ui/dashboard/yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/dashboard/yarn.lock b/ui/dashboard/yarn.lock index 7709ecb1e3..2864e12f20 100644 --- a/ui/dashboard/yarn.lock +++ b/ui/dashboard/yarn.lock @@ -19140,14 +19140,14 @@ write-file-atomic@^3.0.0: typedarray-to-buffer "^3.1.5" ws@^7.4.6: - version "7.5.6" - resolved "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz" - integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA== + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== ws@^8.1.0, ws@^8.2.3: - version "8.4.0" - resolved "https://registry.npmjs.org/ws/-/ws-8.4.0.tgz" - integrity sha512-IHVsKe2pjajSUIl4KYMQOdlyliovpEPquKkqbwswulszzI7r0SfQrxnXdWAEqOlDCLrVSJzo+O1hAwdog2sKSQ== + version "8.17.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== x-default-browser@^0.4.0: version "0.4.0" From 3f79f7e86535301f36abd2c565eaecfdaa32b7ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:27:53 +0530 Subject: [PATCH 12/20] [dep][actions](deps): Bump google-github-actions/setup-gcloud (#4345) --- .github/workflows/release_cli_and_assets.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release_cli_and_assets.yml b/.github/workflows/release_cli_and_assets.yml index 1d01368946..23cd5a27e1 100644 --- a/.github/workflows/release_cli_and_assets.yml +++ b/.github/workflows/release_cli_and_assets.yml @@ -72,7 +72,7 @@ jobs: credentials_json: ${{ secrets.GCP_GITHUB_ACTION_PUSH_ARTIFACTS_CREDENTIAL_JSON }} - name: Get GCloud CLI - uses: google-github-actions/setup-gcloud@v2.1.0 + uses: google-github-actions/setup-gcloud@v2.1.1 with: project_id: ${{ env.PROJECT_ID }} @@ -121,7 +121,7 @@ jobs: credentials_json: ${{ secrets.GCP_GITHUB_ACTION_PUSH_ARTIFACTS_CREDENTIAL_JSON }} - name: Get GCloud CLI - uses: google-github-actions/setup-gcloud@v2.1.0 + uses: google-github-actions/setup-gcloud@v2.1.1 with: project_id: ${{ env.PROJECT_ID }} @@ -771,7 +771,7 @@ jobs: # credentials_json: ${{ secrets.GCP_GITHUB_ACTION_PUSH_ARTIFACTS_CREDENTIAL_JSON }} # - name: Get GCloud CLI - # uses: google-github-actions/setup-gcloud@v2.1.0 + # uses: google-github-actions/setup-gcloud@v2.1.1 # with: # project_id: ${{ env.PROJECT_ID }} From fe1e8fcf20c1ba1c47afc764bc5b398ee6a15a8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:28:28 +0530 Subject: [PATCH 13/20] [dep][go](deps): Bump github.com/hashicorp/go-plugin from 1.6.0 to 1.6.1 (#4304) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 987653eba4..7d35506289 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/google/uuid v1.6.0 github.com/hashicorp/go-cleanhttp v0.5.2 github.com/hashicorp/go-hclog v1.6.3 - github.com/hashicorp/go-plugin v1.6.0 + github.com/hashicorp/go-plugin v1.6.1 github.com/hashicorp/go-version v1.7.0 github.com/hashicorp/hcl/v2 v2.20.1 github.com/jackc/pgconn v1.14.3 diff --git a/go.sum b/go.sum index f1c9e9dff1..fdb5eec9df 100644 --- a/go.sum +++ b/go.sum @@ -524,8 +524,8 @@ github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB1 github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= 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-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= -github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= +github.com/hashicorp/go-plugin v1.6.1 h1:P7MR2UP6gNKGPp+y7EZw2kOiq4IR9WiqLvp0XOsVdwI= +github.com/hashicorp/go-plugin v1.6.1/go.mod h1:XPHFku2tFo3o3QKFgSYo+cghcUhw1NA1hZyMK0PWAw0= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= From 27ba5c538a6e43c584bd39a82018ca59ce9bb835 Mon Sep 17 00:00:00 2001 From: Puskar Basu <45908484+pskrbasu@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:44:53 +0530 Subject: [PATCH 14/20] Update query JSON output to be consistent across pipelings - also handle duplicate column names. Closes #4317 --- pkg/db/db_client/db_client_execute.go | 5 +- pkg/db/db_client/pgx_types.go | 31 +- pkg/display/column.go | 11 +- pkg/display/display.go | 38 +- pkg/query/queryresult/column_def.go | 7 +- .../introspection_table_mod/output.json.json | 124 +++ .../test_data/templates/expected_1.json | 80 +- .../test_data/templates/expected_11.json | 136 ++-- .../test_data/templates/expected_12.json | 51 +- .../test_data/templates/expected_13.json | 37 +- .../test_data/templates/expected_14.json | 31 +- .../test_data/templates/expected_15.json | 15 +- .../test_data/templates/expected_2.json | 51 +- .../test_data/templates/expected_3.json | 67 +- .../test_data/templates/expected_5.json | 61 +- .../test_data/templates/expected_6.json | 119 ++- .../expected_introspection_info_control.json | 95 ++- .../expected_introspection_info_query.json | 79 +- .../test_data/templates/expected_json.json | 46 +- .../templates/expected_query_empty_json.json | 75 +- .../templates/expected_query_json.json | 19 +- .../test_files/chaos_and_query.bats | 1 + tests/acceptance/test_files/check.bats | 1 + tests/acceptance/test_files/dashboard.bats | 7 + .../acceptance/test_files/introspection.bats | 746 +++++++++--------- 25 files changed, 1223 insertions(+), 710 deletions(-) create mode 100644 tests/acceptance/test_data/mods/introspection_table_mod/output.json.json diff --git a/pkg/db/db_client/db_client_execute.go b/pkg/db/db_client/db_client_execute.go index ada9ac7c7e..56f4528969 100644 --- a/pkg/db/db_client/db_client_execute.go +++ b/pkg/db/db_client/db_client_execute.go @@ -134,7 +134,10 @@ func (c *DbClient) ExecuteInSession(ctx context.Context, session *db_common.Data return } - colDefs := fieldDescriptionsToColumns(rows.FieldDescriptions(), session.Connection.Conn()) + colDefs, err := fieldDescriptionsToColumns(rows.FieldDescriptions(), session.Connection.Conn()) + if err != nil { + return nil, err + } result := queryresult.NewResult(colDefs) diff --git a/pkg/db/db_client/pgx_types.go b/pkg/db/db_client/pgx_types.go index 4db7db7d27..dffcad528d 100644 --- a/pkg/db/db_client/pgx_types.go +++ b/pkg/db/db_client/pgx_types.go @@ -1,11 +1,13 @@ package db_client import ( + "fmt" "strconv" "strings" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgconn" + "github.com/turbot/pipe-fittings/utils" "github.com/turbot/steampipe/pkg/query/queryresult" ) @@ -18,7 +20,7 @@ func columnTypeDatabaseTypeName(field pgconn.FieldDescription, connection *pgx.C return strconv.FormatInt(int64(field.DataTypeOID), 10) } -func fieldDescriptionsToColumns(fieldDescriptions []pgconn.FieldDescription, connection *pgx.Conn) []*queryresult.ColumnDef { +func fieldDescriptionsToColumns(fieldDescriptions []pgconn.FieldDescription, connection *pgx.Conn) ([]*queryresult.ColumnDef, error) { cols := make([]*queryresult.ColumnDef, len(fieldDescriptions)) for i, f := range fieldDescriptions { @@ -29,5 +31,30 @@ func fieldDescriptionsToColumns(fieldDescriptions []pgconn.FieldDescription, con DataType: typeName, } } - return cols + + // Ensure column names are unique + if err := ensureUniqueColumnName(cols); err != nil { + return nil, err + } + + return cols, nil +} + +func ensureUniqueColumnName(cols []*queryresult.ColumnDef) error { + // create a unique name generator + nameGenerator := utils.NewUniqueNameGenerator() + + for colIdx, col := range cols { + uniqueName, err := nameGenerator.GetUniqueName(col.Name, colIdx) + if err != nil { + return fmt.Errorf("error generating unique column name: %w", err) + } + // if the column name has changed, store the original name and update the column name to be the unique name + if uniqueName != col.Name { + // set the original name first, BEFORE mutating name + col.OriginalName = col.Name + col.Name = uniqueName + } + } + return nil } diff --git a/pkg/display/column.go b/pkg/display/column.go index 516d02973b..3e87e50109 100644 --- a/pkg/display/column.go +++ b/pkg/display/column.go @@ -10,11 +10,16 @@ import ( "github.com/turbot/steampipe/pkg/query/queryresult" ) -// ColumnNames :: extract names from columns -func ColumnNames(columns []*queryresult.ColumnDef) []string { +// columnNames builds a list of name from a slice of column defs - respecting the original name if present +func columnNames(columns []*queryresult.ColumnDef) []string { var colNames = make([]string, len(columns)) for i, c := range columns { - colNames[i] = c.Name + // respect original name + if c.OriginalName != "" { + colNames[i] = c.OriginalName + } else { + colNames[i] = c.Name + } } return colNames diff --git a/pkg/display/display.go b/pkg/display/display.go index 9855973bba..56c131af45 100644 --- a/pkg/display/display.go +++ b/pkg/display/display.go @@ -21,6 +21,7 @@ import ( "github.com/karrick/gows" "github.com/spf13/viper" "github.com/turbot/go-kit/helpers" + pqueryresult "github.com/turbot/pipe-fittings/queryresult" "github.com/turbot/steampipe/pkg/cmdconfig" "github.com/turbot/steampipe/pkg/constants" "github.com/turbot/steampipe/pkg/error_helpers" @@ -184,6 +185,7 @@ func getTerminalColumnsRequiredForString(str string) int { } type jsonOutput struct { + Columns []pqueryresult.ColumnDef `json:"columns"` Rows []map[string]interface{} `json:"rows"` Metadata *queryresult.TimingResult `json:"metadata,omitempty"` } @@ -199,12 +201,27 @@ func displayJSON(ctx context.Context, result *queryresult.Result) (int, *queryre rowErrors := 0 jsonOutput := newJSONOutput() + // add column defs to the JSON output + for _, col := range result.Cols { + // create a new column def, converting the data type to lowercase + c := pqueryresult.ColumnDef{ + Name: col.Name, + OriginalName: col.OriginalName, + DataType: strings.ToLower(col.DataType), + } + // add to the column def array + jsonOutput.Columns = append(jsonOutput.Columns, c) + } + // define function to add each row to the JSON output rowFunc := func(row []interface{}, result *queryresult.Result) { record := map[string]interface{}{} for idx, col := range result.Cols { value, _ := ParseJSONOutputColumnValue(row[idx], col) - record[col.Name] = value + // get the column def + c := jsonOutput.Columns[idx] + // add the value under the unique column name + record[c.Name] = value } jsonOutput.Rows = append(jsonOutput.Rows, record) } @@ -237,7 +254,7 @@ func displayCSV(ctx context.Context, result *queryresult.Result) (int, *queryres csvWriter.Comma = []rune(cmdconfig.Viper().GetString(constants.ArgSeparator))[0] if cmdconfig.Viper().GetBool(constants.ArgHeader) { - _ = csvWriter.Write(ColumnNames(result.Cols)) + _ = csvWriter.Write(columnNames(result.Cols)) } // print the data as it comes @@ -291,16 +308,19 @@ func displayLine(ctx context.Context, result *queryresult.Result) (int, *queryre lineFormat := fmt.Sprintf("%%-%ds | %%s\n", maxColNameLength) multiLineFormat := fmt.Sprintf("%%-%ds | %%-%ds", maxColNameLength, requiredTerminalColumnsForValuesOfRecord) - fmt.Printf("-[ RECORD %-2d ]%s\n", (itemIdx + 1), strings.Repeat("-", 75)) + fmt.Printf("-[ RECORD %-2d ]%s\n", itemIdx+1, strings.Repeat("-", 75)) //nolint:forbidigo // intentional use of fmt + + // get the column names (this takes into account the original name) + columnNames := columnNames(result.Cols) for idx, column := range recordAsString { lines := strings.Split(column, "\n") if len(lines) == 1 { - fmt.Printf(lineFormat, result.Cols[idx].Name, lines[0]) + fmt.Printf(lineFormat, columnNames[idx], lines[0]) } else { for lineIdx, line := range lines { if lineIdx == 0 { // the first line - fmt.Printf(multiLineFormat, result.Cols[idx].Name, line) + fmt.Printf(multiLineFormat, columnNames[idx], line) } else { // next lines fmt.Printf(multiLineFormat, "", line) @@ -347,10 +367,12 @@ func displayTable(ctx context.Context, result *queryresult.Result) (int, *queryr var colConfigs []table.ColumnConfig headers := make(table.Row, len(result.Cols)) - for idx, column := range result.Cols { - headers[idx] = column.Name + // get the column names (this takes into account the original name) + columnNames := columnNames(result.Cols) + for idx, columnName := range columnNames { + headers[idx] = columnName colConfigs = append(colConfigs, table.ColumnConfig{ - Name: column.Name, + Name: columnName, Number: idx + 1, WidthMax: constants.MaxColumnWidth, }) diff --git a/pkg/query/queryresult/column_def.go b/pkg/query/queryresult/column_def.go index 54deb38870..05a686ebfd 100644 --- a/pkg/query/queryresult/column_def.go +++ b/pkg/query/queryresult/column_def.go @@ -4,9 +4,10 @@ import "reflect" // ColumnDef is a struct used to store column information from query results type ColumnDef struct { - Name string `json:"name"` - DataType string `json:"data_type"` - isScalar *bool + Name string `json:"name"` + DataType string `json:"data_type"` + isScalar *bool + OriginalName string `json:"original_name"` } // IsScalar checks if the given value is a scalar value diff --git a/tests/acceptance/test_data/mods/introspection_table_mod/output.json.json b/tests/acceptance/test_data/mods/introspection_table_mod/output.json.json new file mode 100644 index 0000000000..be9a9552fc --- /dev/null +++ b/tests/acceptance/test_data/mods/introspection_table_mod/output.json.json @@ -0,0 +1,124 @@ +{ + "columns": [ + { + "name": "resource_name", + "data_type": "text" + }, + { + "name": "mod_name", + "data_type": "text" + }, + { + "name": "file_name", + "data_type": "text" + }, + { + "name": "start_line_number", + "data_type": "int4" + }, + { + "name": "end_line_number", + "data_type": "int4" + }, + { + "name": "auto_generated", + "data_type": "bool" + }, + { + "name": "source_definition", + "data_type": "text" + }, + { + "name": "is_anonymous", + "data_type": "bool" + }, + { + "name": "severity", + "data_type": "text" + }, + { + "name": "width", + "data_type": "text" + }, + { + "name": "type", + "data_type": "text" + }, + { + "name": "sql", + "data_type": "text" + }, + { + "name": "args", + "data_type": "jsonb" + }, + { + "name": "params", + "data_type": "jsonb" + }, + { + "name": "query", + "data_type": "text" + }, + { + "name": "path", + "data_type": "jsonb" + }, + { + "name": "qualified_name", + "data_type": "text" + }, + { + "name": "title", + "data_type": "text" + }, + { + "name": "description", + "data_type": "text" + }, + { + "name": "documentation", + "data_type": "text" + }, + { + "name": "tags", + "data_type": "jsonb" + } + ], + "rows": [ + { + "args": { + "args_list": null, + "refs": null + }, + "auto_generated": false, + "description": "Sample control to test introspection functionality", + "documentation": null, + "end_line_number": 33, + "file_name": "/Users/pskrbasu/work/src/steampipe/tests/acceptance/test_data/mods/introspection_table_mod/resources.sp", + "is_anonymous": false, + "mod_name": "introspection_table_mod", + "params": null, + "path": [ + [ + "mod.introspection_table_mod", + "introspection_table_mod.benchmark.sample_benchmark_1", + "introspection_table_mod.control.sample_control_1" + ] + ], + "qualified_name": "introspection_table_mod.control.sample_control_1", + "query": "introspection_table_mod.query.sample_query_1", + "resource_name": "sample_control_1", + "severity": "high", + "source_definition": "control \"sample_control_1\" {\n title = \"Sample control 1\"\n description = \"Sample control to test introspection functionality\"\n query = query.sample_query_1\n severity = \"high\"\n tags = {\n \"foo\": \"bar\"\n }\n}", + "sql": null, + "start_line_number": 25, + "tags": { + "foo": "bar" + }, + "title": "Sample control 1", + "type": null, + "width": null + } + ] +} diff --git a/tests/acceptance/test_data/templates/expected_1.json b/tests/acceptance/test_data/templates/expected_1.json index de8a8b4413..2eaff04c12 100644 --- a/tests/acceptance/test_data/templates/expected_1.json +++ b/tests/acceptance/test_data/templates/expected_1.json @@ -1,4 +1,50 @@ { + "columns": [ + { + "name": "column_0", + "data_type": "text" + }, + { + "name": "column_1", + "data_type": "text" + }, + { + "name": "column_2", + "data_type": "text" + }, + { + "name": "column_3", + "data_type": "text" + }, + { + "name": "column_4", + "data_type": "text" + }, + { + "name": "column_5", + "data_type": "text" + }, + { + "name": "column_6", + "data_type": "text" + }, + { + "name": "column_7", + "data_type": "text" + }, + { + "name": "column_8", + "data_type": "text" + }, + { + "name": "column_9", + "data_type": "text" + }, + { + "name": "id", + "data_type": "int8" + } + ], "rows": [ { "column_0": "column_0-0", @@ -130,38 +176,6 @@ "column_9": "column_9-1005", "id": 1005 } - ], - "metadata": { - "Duration": 201108250, - "scans": [ - { - "connection": "chaos", - "table": "chaos_high_row_count", - "cache_hit": false, - "rows_fetched": 5000, - "hydrate_calls": 0, - "start_time": "2024-04-11T11:17:24+05:30", - "duration": 155, - "columns": [ - "column_0", - "column_1", - "column_2", - "column_3", - "column_4", - "column_5", - "column_6", - "column_7", - "column_8", - "column_9", - "id" - ], - "limit": null, - "quals": null - } - ], - "rows_returned": 10, - "rows_fetched": 5000, - "hydrate_calls": 0 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_11.json b/tests/acceptance/test_data/templates/expected_11.json index 395160fa1f..0fc2d7aa73 100644 --- a/tests/acceptance/test_data/templates/expected_11.json +++ b/tests/acceptance/test_data/templates/expected_11.json @@ -1,4 +1,90 @@ { + "columns": [ + { + "name": "column_1", + "data_type": "text" + }, + { + "name": "column_10", + "data_type": "text" + }, + { + "name": "column_11", + "data_type": "text" + }, + { + "name": "column_12", + "data_type": "text" + }, + { + "name": "column_13", + "data_type": "text" + }, + { + "name": "column_14", + "data_type": "text" + }, + { + "name": "column_15", + "data_type": "text" + }, + { + "name": "column_16", + "data_type": "text" + }, + { + "name": "column_17", + "data_type": "text" + }, + { + "name": "column_18", + "data_type": "text" + }, + { + "name": "column_19", + "data_type": "text" + }, + { + "name": "column_2", + "data_type": "text" + }, + { + "name": "column_20", + "data_type": "text" + }, + { + "name": "column_3", + "data_type": "text" + }, + { + "name": "column_4", + "data_type": "text" + }, + { + "name": "column_5", + "data_type": "text" + }, + { + "name": "column_6", + "data_type": "text" + }, + { + "name": "column_7", + "data_type": "text" + }, + { + "name": "column_8", + "data_type": "text" + }, + { + "name": "column_9", + "data_type": "text" + }, + { + "name": "id", + "data_type": "int8" + } + ], "rows": [ { "column_1": "parallelHydrate1", @@ -23,54 +109,6 @@ "column_9": "parallelHydrate9", "id": 0 } - ], - "metadata": { - "Duration": 1076604791, - "scans": [ - { - "connection": "chaos", - "table": "chaos_parallel_hydrate_columns", - "cache_hit": false, - "rows_fetched": 500, - "hydrate_calls": 10000, - "start_time": "2024-04-11T11:43:26+05:30", - "duration": 1039, - "columns": [ - "column_1", - "column_10", - "column_11", - "column_12", - "column_13", - "column_14", - "column_15", - "column_16", - "column_17", - "column_18", - "column_19", - "column_2", - "column_20", - "column_3", - "column_4", - "column_5", - "column_6", - "column_7", - "column_8", - "column_9", - "id" - ], - "limit": null, - "quals": [ - { - "column": "id", - "operator": "=", - "value": 0 - } - ] - } - ], - "rows_returned": 1, - "rows_fetched": 500, - "hydrate_calls": 10000 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_12.json b/tests/acceptance/test_data/templates/expected_12.json index 7327fb023e..eeeb6761c2 100644 --- a/tests/acceptance/test_data/templates/expected_12.json +++ b/tests/acceptance/test_data/templates/expected_12.json @@ -1,4 +1,22 @@ { + "columns": [ + { + "name": "float32_data", + "data_type": "float8" + }, + { + "name": "id", + "data_type": "int8" + }, + { + "name": "int64_data", + "data_type": "int8" + }, + { + "name": "uint16_data", + "data_type": "int8" + } + ], "rows": [ { "float32_data": 4.4285712242126465, @@ -6,37 +24,6 @@ "int64_data": 465, "uint16_data": 341 } - ], - "metadata": { - "Duration": 39542459, - "scans": [ - { - "connection": "chaos", - "table": "chaos_all_numeric_column", - "cache_hit": false, - "rows_fetched": 10, - "hydrate_calls": 30, - "start_time": "2024-04-11T11:44:55+05:30", - "duration": 2, - "columns": [ - "float32_data", - "id", - "int64_data", - "uint16_data" - ], - "limit": null, - "quals": [ - { - "column": "id", - "operator": "=", - "value": 31 - } - ] - } - ], - "rows_returned": 1, - "rows_fetched": 10, - "hydrate_calls": 30 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_13.json b/tests/acceptance/test_data/templates/expected_13.json index c6698e46c6..945ed74f9b 100644 --- a/tests/acceptance/test_data/templates/expected_13.json +++ b/tests/acceptance/test_data/templates/expected_13.json @@ -1,37 +1,14 @@ { + "columns": [ + { + "name": "from_qual_column", + "data_type": "text" + } + ], "rows": [ { "from_qual_column": "2" } - ], - "metadata": { - "Duration": 40179750, - "scans": [ - { - "connection": "chaos", - "table": "chaos_transforms", - "cache_hit": false, - "rows_fetched": 1, - "hydrate_calls": 0, - "start_time": "2024-04-11T11:49:42+05:30", - "duration": 3, - "columns": [ - "from_qual_column", - "id" - ], - "limit": null, - "quals": [ - { - "column": "id", - "operator": "=", - "value": 2 - } - ] - } - ], - "rows_returned": 1, - "rows_fetched": 1, - "hydrate_calls": 0 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_14.json b/tests/acceptance/test_data/templates/expected_14.json index 996bbd4be6..6cd240766e 100644 --- a/tests/acceptance/test_data/templates/expected_14.json +++ b/tests/acceptance/test_data/templates/expected_14.json @@ -1,4 +1,10 @@ { + "columns": [ + { + "name": "transform_method_column", + "data_type": "text" + } + ], "rows": [ { "transform_method_column": "Transform method" @@ -6,29 +12,6 @@ { "transform_method_column": "Transform method" } - ], - "metadata": { - "Duration": 40391583, - "scans": [ - { - "connection": "chaos", - "table": "chaos_transforms", - "cache_hit": false, - "rows_fetched": 2, - "hydrate_calls": 0, - "start_time": "2024-04-11T11:45:30+05:30", - "duration": 3, - "columns": [ - "transform_method_column", - "id" - ], - "limit": null, - "quals": null - } - ], - "rows_returned": 2, - "rows_fetched": 2, - "hydrate_calls": 0 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_15.json b/tests/acceptance/test_data/templates/expected_15.json index 084d79190d..97f9cd5942 100644 --- a/tests/acceptance/test_data/templates/expected_15.json +++ b/tests/acceptance/test_data/templates/expected_15.json @@ -1,15 +1,14 @@ { + "columns": [ + { + "name": "a", + "data_type": "int4" + } + ], "rows": [ { "a": 1 } - ], - "metadata": { - "Duration": 141791, - "scans": [], - "rows_returned": 1, - "rows_fetched": 0, - "hydrate_calls": 0 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_2.json b/tests/acceptance/test_data/templates/expected_2.json index def5d4dfd2..a58d0bf8df 100644 --- a/tests/acceptance/test_data/templates/expected_2.json +++ b/tests/acceptance/test_data/templates/expected_2.json @@ -1,4 +1,22 @@ { + "columns": [ + { + "name": "id", + "data_type": "int8" + }, + { + "name": "string_column", + "data_type": "text" + }, + { + "name": "json_column", + "data_type": "jsonb" + }, + { + "name": "boolean_column", + "data_type": "bool" + } + ], "rows": [ { "boolean_column": true, @@ -13,37 +31,6 @@ }, "string_column": "stringValuesomething-0" } - ], - "metadata": { - "Duration": 52987458, - "scans": [ - { - "connection": "chaos", - "table": "chaos_all_column_types", - "cache_hit": false, - "rows_fetched": 100, - "hydrate_calls": 200, - "start_time": "2024-04-11T11:39:03+05:30", - "duration": 14, - "columns": [ - "id", - "string_column", - "json_column", - "boolean_column" - ], - "limit": null, - "quals": [ - { - "column": "id", - "operator": "=", - "value": 0 - } - ] - } - ], - "rows_returned": 1, - "rows_fetched": 100, - "hydrate_calls": 200 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_3.json b/tests/acceptance/test_data/templates/expected_3.json index 28b031f17d..301ee630ef 100644 --- a/tests/acceptance/test_data/templates/expected_3.json +++ b/tests/acceptance/test_data/templates/expected_3.json @@ -1,11 +1,62 @@ { - "rows": [], - "metadata": { - "Duration": 42311542, - "scans": [], - "rows_returned": 0, - "rows_fetched": 0, - "hydrate_calls": 0 - } + "columns": [ + { + "name": "id", + "data_type": "int8" + }, + { + "name": "column_0", + "data_type": "text" + }, + { + "name": "column_1", + "data_type": "text" + }, + { + "name": "column_2", + "data_type": "text" + }, + { + "name": "column_3", + "data_type": "text" + }, + { + "name": "column_4", + "data_type": "text" + }, + { + "name": "column_5", + "data_type": "text" + }, + { + "name": "column_6", + "data_type": "text" + }, + { + "name": "column_7", + "data_type": "text" + }, + { + "name": "column_8", + "data_type": "text" + }, + { + "name": "column_9", + "data_type": "text" + }, + { + "name": "sp_connection_name", + "data_type": "text" + }, + { + "name": "sp_ctx", + "data_type": "jsonb" + }, + { + "name": "_ctx", + "data_type": "jsonb" + } + ], + "rows": [] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_5.json b/tests/acceptance/test_data/templates/expected_5.json index 64aea30b68..446ef4b3ae 100644 --- a/tests/acceptance/test_data/templates/expected_5.json +++ b/tests/acceptance/test_data/templates/expected_5.json @@ -1,4 +1,30 @@ { + "columns": [ + { + "name": "hydrate_column_1", + "data_type": "text" + }, + { + "name": "hydrate_column_2", + "data_type": "text" + }, + { + "name": "hydrate_column_3", + "data_type": "text" + }, + { + "name": "hydrate_column_4", + "data_type": "text" + }, + { + "name": "hydrate_column_5", + "data_type": "text" + }, + { + "name": "id", + "data_type": "int8" + } + ], "rows": [ { "hydrate_column_1": "hydrate1-0", @@ -8,39 +34,6 @@ "hydrate_column_5": "hydrate5-0-hydrate4-0-hydrate1-0", "id": 0 } - ], - "metadata": { - "Duration": 2085913625, - "scans": [ - { - "connection": "chaos", - "table": "chaos_hydrate_columns_dependency", - "cache_hit": false, - "rows_fetched": 2, - "hydrate_calls": 10, - "start_time": "2024-04-11T12:34:06+05:30", - "duration": 2045, - "columns": [ - "hydrate_column_1", - "hydrate_column_2", - "hydrate_column_3", - "hydrate_column_4", - "hydrate_column_5", - "id" - ], - "limit": null, - "quals": [ - { - "column": "id", - "operator": "=", - "value": 0 - } - ] - } - ], - "rows_returned": 1, - "rows_fetched": 2, - "hydrate_calls": 10 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_6.json b/tests/acceptance/test_data/templates/expected_6.json index 60c2d96829..73f8584ec5 100644 --- a/tests/acceptance/test_data/templates/expected_6.json +++ b/tests/acceptance/test_data/templates/expected_6.json @@ -1,4 +1,114 @@ { + "columns": [ + { + "name": "nullcolumn", + "data_type": "bpchar" + }, + { + "name": "booleancolumn", + "data_type": "bool" + }, + { + "name": "textcolumn1", + "data_type": "bpchar" + }, + { + "name": "textcolumn2", + "data_type": "varchar" + }, + { + "name": "textcolumn3", + "data_type": "text" + }, + { + "name": "integercolumn1", + "data_type": "int2" + }, + { + "name": "integercolumn2", + "data_type": "int4" + }, + { + "name": "integercolumn3", + "data_type": "int4" + }, + { + "name": "integercolumn4", + "data_type": "int8" + }, + { + "name": "integercolumn5", + "data_type": "int8" + }, + { + "name": "numericcolumn", + "data_type": "numeric" + }, + { + "name": "realcolumn", + "data_type": "float4" + }, + { + "name": "floatcolumn", + "data_type": "float8" + }, + { + "name": "date1", + "data_type": "date" + }, + { + "name": "time1", + "data_type": "time" + }, + { + "name": "timestamp1", + "data_type": "timestamp" + }, + { + "name": "timestamp2", + "data_type": "timestamptz" + }, + { + "name": "interval1", + "data_type": "interval" + }, + { + "name": "array1", + "data_type": "_text" + }, + { + "name": "jsondata", + "data_type": "jsonb" + }, + { + "name": "jsondata2", + "data_type": "json" + }, + { + "name": "uuidcolumn", + "data_type": "uuid" + }, + { + "name": "ipaddress", + "data_type": "inet" + }, + { + "name": "macaddress", + "data_type": "macaddr" + }, + { + "name": "cidrrange", + "data_type": "cidr" + }, + { + "name": "xmldata", + "data_type": "142" + }, + { + "name": "currency", + "data_type": "790" + } + ], "rows": [ { "array1": "(408)-589-5841", @@ -41,13 +151,6 @@ "uuidcolumn": "6948df80-14bd-4e04-8842-7668d9c001f5", "xmldata": "Manual..." } - ], - "metadata": { - "Duration": 2523750, - "scans": [], - "rows_returned": 1, - "rows_fetched": 0, - "hydrate_calls": 0 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_introspection_info_control.json b/tests/acceptance/test_data/templates/expected_introspection_info_control.json index 8bfc99b926..35b9cddf1e 100644 --- a/tests/acceptance/test_data/templates/expected_introspection_info_control.json +++ b/tests/acceptance/test_data/templates/expected_introspection_info_control.json @@ -1,4 +1,90 @@ { + "columns": [ + { + "name": "resource_name", + "data_type": "text" + }, + { + "name": "mod_name", + "data_type": "text" + }, + { + "name": "file_name", + "data_type": "text" + }, + { + "name": "start_line_number", + "data_type": "int4" + }, + { + "name": "end_line_number", + "data_type": "int4" + }, + { + "name": "auto_generated", + "data_type": "bool" + }, + { + "name": "source_definition", + "data_type": "text" + }, + { + "name": "is_anonymous", + "data_type": "bool" + }, + { + "name": "severity", + "data_type": "text" + }, + { + "name": "width", + "data_type": "text" + }, + { + "name": "type", + "data_type": "text" + }, + { + "name": "sql", + "data_type": "text" + }, + { + "name": "args", + "data_type": "jsonb" + }, + { + "name": "params", + "data_type": "jsonb" + }, + { + "name": "query", + "data_type": "text" + }, + { + "name": "path", + "data_type": "jsonb" + }, + { + "name": "qualified_name", + "data_type": "text" + }, + { + "name": "title", + "data_type": "text" + }, + { + "name": "description", + "data_type": "text" + }, + { + "name": "documentation", + "data_type": "text" + }, + { + "name": "tags", + "data_type": "jsonb" + } + ], "rows": [ { "args": { @@ -33,13 +119,6 @@ "type": null, "width": null } - ], - "metadata": { - "Duration": 280292, - "scans": [], - "rows_returned": 1, - "rows_fetched": 0, - "hydrate_calls": 0 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_introspection_info_query.json b/tests/acceptance/test_data/templates/expected_introspection_info_query.json index f680606ed7..12e9f612d3 100644 --- a/tests/acceptance/test_data/templates/expected_introspection_info_query.json +++ b/tests/acceptance/test_data/templates/expected_introspection_info_query.json @@ -1,4 +1,74 @@ { + "columns": [ + { + "name": "resource_name", + "data_type": "text" + }, + { + "name": "mod_name", + "data_type": "text" + }, + { + "name": "file_name", + "data_type": "text" + }, + { + "name": "start_line_number", + "data_type": "int4" + }, + { + "name": "end_line_number", + "data_type": "int4" + }, + { + "name": "auto_generated", + "data_type": "bool" + }, + { + "name": "source_definition", + "data_type": "text" + }, + { + "name": "is_anonymous", + "data_type": "bool" + }, + { + "name": "sql", + "data_type": "text" + }, + { + "name": "args", + "data_type": "jsonb" + }, + { + "name": "params", + "data_type": "jsonb" + }, + { + "name": "path", + "data_type": "jsonb" + }, + { + "name": "qualified_name", + "data_type": "text" + }, + { + "name": "title", + "data_type": "text" + }, + { + "name": "description", + "data_type": "text" + }, + { + "name": "documentation", + "data_type": "text" + }, + { + "name": "tags", + "data_type": "jsonb" + } + ], "rows": [ { "args": null, @@ -39,13 +109,6 @@ "tags": null, "title": "Sample query 1" } - ], - "metadata": { - "Duration": 311375, - "scans": [], - "rows_returned": 1, - "rows_fetched": 0, - "hydrate_calls": 0 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_json.json b/tests/acceptance/test_data/templates/expected_json.json index f0791702e4..7f3d3e356a 100644 --- a/tests/acceptance/test_data/templates/expected_json.json +++ b/tests/acceptance/test_data/templates/expected_json.json @@ -1,4 +1,18 @@ { + "columns": [ + { + "name": "id", + "data_type": "int8" + }, + { + "name": "string_column", + "data_type": "text" + }, + { + "name": "json_column", + "data_type": "jsonb" + } + ], "rows": [ { "id": 0, @@ -12,36 +26,6 @@ }, "string_column": "stringValuesomething-0" } - ], - "metadata": { - "Duration": 51849333, - "scans": [ - { - "connection": "chaos", - "table": "chaos_all_column_types", - "cache_hit": false, - "rows_fetched": 100, - "hydrate_calls": 100, - "start_time": "2024-04-11T11:53:34+05:30", - "duration": 13, - "columns": [ - "id", - "string_column", - "json_column" - ], - "limit": null, - "quals": [ - { - "column": "id", - "operator": "=", - "value": 0 - } - ] - } - ], - "rows_returned": 1, - "rows_fetched": 100, - "hydrate_calls": 100 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_query_empty_json.json b/tests/acceptance/test_data/templates/expected_query_empty_json.json index 550b59fcc1..64d2b28afb 100644 --- a/tests/acceptance/test_data/templates/expected_query_empty_json.json +++ b/tests/acceptance/test_data/templates/expected_query_empty_json.json @@ -1,11 +1,70 @@ { - "rows": [], - "metadata": { - "Duration": 377083, - "scans": [], - "rows_returned": 0, - "rows_fetched": 0, - "hydrate_calls": 0 - } + "columns": [ + { + "name": "name", + "data_type": "text" + }, + { + "name": "state", + "data_type": "text" + }, + { + "name": "type", + "data_type": "text" + }, + { + "name": "connections", + "data_type": "_text" + }, + { + "name": "import_schema", + "data_type": "text" + }, + { + "name": "error", + "data_type": "text" + }, + { + "name": "plugin", + "data_type": "text" + }, + { + "name": "plugin_instance", + "data_type": "text" + }, + { + "name": "schema_mode", + "data_type": "text" + }, + { + "name": "schema_hash", + "data_type": "text" + }, + { + "name": "comments_set", + "data_type": "bool" + }, + { + "name": "connection_mod_time", + "data_type": "timestamptz" + }, + { + "name": "plugin_mod_time", + "data_type": "timestamptz" + }, + { + "name": "file_name", + "data_type": "text" + }, + { + "name": "start_line_number", + "data_type": "int4" + }, + { + "name": "end_line_number", + "data_type": "int4" + } + ], + "rows": [] } \ No newline at end of file diff --git a/tests/acceptance/test_data/templates/expected_query_json.json b/tests/acceptance/test_data/templates/expected_query_json.json index b293d6b038..439619c4a7 100644 --- a/tests/acceptance/test_data/templates/expected_query_json.json +++ b/tests/acceptance/test_data/templates/expected_query_json.json @@ -1,16 +1,19 @@ { + "columns": [ + { + "name": "val", + "data_type": "int4" + }, + { + "name": "col", + "data_type": "int4" + } + ], "rows": [ { "col": 2, "val": 1 } - ], - "metadata": { - "Duration": 149041, - "scans": [], - "rows_returned": 1, - "rows_fetched": 0, - "hydrate_calls": 0 - } + ] } \ No newline at end of file diff --git a/tests/acceptance/test_files/chaos_and_query.bats b/tests/acceptance/test_files/chaos_and_query.bats index ff19deb2b5..222cf67f89 100644 --- a/tests/acceptance/test_files/chaos_and_query.bats +++ b/tests/acceptance/test_files/chaos_and_query.bats @@ -34,6 +34,7 @@ load "$LIB_BATS_SUPPORT/load.bash" } @test "select from chaos.chaos_high_column_count order by column_0" { + skip run steampipe query --output json "select * from chaos.chaos_high_column_count order by column_0 limit 10" echo $output > $TEST_DATA_DIR/actual_1.json diff --git a/tests/acceptance/test_files/check.bats b/tests/acceptance/test_files/check.bats index 7c5efade10..ed6ba02772 100644 --- a/tests/acceptance/test_files/check.bats +++ b/tests/acceptance/test_files/check.bats @@ -208,6 +208,7 @@ load "$LIB_BATS_SUPPORT/load.bash" } @test "steampipe check - export snapshot" { + skip "deprecated" cd $CONTROL_RENDERING_TEST_MOD run steampipe check control.sample_control_mixed_results_1 --export test.sps --progress=false diff --git a/tests/acceptance/test_files/dashboard.bats b/tests/acceptance/test_files/dashboard.bats index a0ce599344..23570e1050 100644 --- a/tests/acceptance/test_files/dashboard.bats +++ b/tests/acceptance/test_files/dashboard.bats @@ -2,6 +2,7 @@ load "$LIB_BATS_ASSERT/load.bash" load "$LIB_BATS_SUPPORT/load.bash" @test "simple dashboard test" { + skip "deprecated" # run a dashboard and shapshot the output run steampipe dashboard dashboard.sibling_containers_report --export test.sps --output none --mod-location "$FILE_PATH/test_data/mods/dashboard_sibling_containers" @@ -19,6 +20,7 @@ load "$LIB_BATS_SUPPORT/load.bash" } @test "dashboard with 'with' blocks" { + skip "deprecated" # run a dashboard and shapshot the output run steampipe dashboard dashboard.testing_with_blocks --export test.sps --output none --mod-location "$FILE_PATH/test_data/mods/dashboard_withs" @@ -40,6 +42,7 @@ load "$LIB_BATS_SUPPORT/load.bash" } @test "dashboard with 'text' blocks" { + skip "deprecated" # run a dashboard and shapshot the output run steampipe dashboard dashboard.testing_text_blocks --export test.sps --output none --mod-location "$FILE_PATH/test_data/mods/dashboard_texts" @@ -57,6 +60,7 @@ load "$LIB_BATS_SUPPORT/load.bash" } @test "dashboard with 'card' blocks" { + skip "deprecated" # run a dashboard and shapshot the output run steampipe dashboard dashboard.testing_card_blocks --export test.sps --output none --mod-location "$FILE_PATH/test_data/mods/dashboard_cards" @@ -75,6 +79,7 @@ load "$LIB_BATS_SUPPORT/load.bash" } @test "dashboard with node and edge blocks" { + skip "deprecated" # run a dashboard and shapshot the output run steampipe dashboard dashboard.testing_nodes_and_edges --export test.sps --output none --mod-location "$FILE_PATH/test_data/mods/dashboard_graphs" @@ -96,6 +101,7 @@ load "$LIB_BATS_SUPPORT/load.bash" } @test "dashboard with 'input' and test --dashboard-input arg" { + skip "deprecated" # run a dashboard and shapshot the output run steampipe dashboard dashboard.testing_dashboard_inputs --export test.sps --output none --mod-location "$FILE_PATH/test_data/mods/dashboard_inputs" --dashboard-input new_input=test @@ -113,6 +119,7 @@ load "$LIB_BATS_SUPPORT/load.bash" } @test "dashboard input with base" { + skip "deprecated" # run a dashboard and shapshot the output run steampipe dashboard dashboard.resource_details --export test.sps --output none --mod-location "$FILE_PATH/test_data/dashboard_inputs_with_base" diff --git a/tests/acceptance/test_files/introspection.bats b/tests/acceptance/test_files/introspection.bats index 56620e1672..e2edbee7db 100644 --- a/tests/acceptance/test_files/introspection.bats +++ b/tests/acceptance/test_files/introspection.bats @@ -15,11 +15,11 @@ load "$LIB_BATS_SUPPORT/load.bash" steampipe query "select * from steampipe_query" --output json > output.json # checking for OS type, since sed command is different for linux and OSX - # removing the 9th line, since it contains file location which would differ in github runners + # removing the 79th line, since it contains file location which would differ in github runners if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "9d" output.json + run sed -i ".json" "79d" output.json else - run sed -i "9d" output.json + run sed -i "79d" output.json fi run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_query.json" output.json @@ -39,11 +39,11 @@ load "$LIB_BATS_SUPPORT/load.bash" steampipe query "select * from steampipe_control" --output json > output.json # checking for OS type, since sed command is different for linux and OSX - # removing the 12th line, since it contains file location which would differ in github runners + # removing the 98th line, since it contains file location which would differ in github runners if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "12d" output.json + run sed -i ".json" "98d" output.json else - run sed -i "12d" output.json + run sed -i "98d" output.json fi run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_control.json" output.json @@ -57,377 +57,379 @@ load "$LIB_BATS_SUPPORT/load.bash" rm -f output.json } -@test "resource=variable | steampipe_introspection=info" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=info - steampipe query "select * from steampipe_variable" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 8th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "9d" output.json - run sed -i ".json" "34d" output.json - else - run sed -i "9d" output.json - run sed -i "34d" output.json - fi - - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_variable.json" output.json - echo $output - - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff - - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} - -@test "resource=benchmark | steampipe_introspection=info" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=info - steampipe query "select * from steampipe_benchmark" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 11th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "11d" output.json - else - run sed -i "11d" output.json - fi - - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_benchmark.json" output.json - echo $output - - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff - - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} - -@test "resource=dashboard | steampipe_introspection=info" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=info - steampipe query "select * from steampipe_dashboard" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 12th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "12d" output.json - else - run sed -i "12d" output.json - fi - - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard.json" output.json - echo $output - - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff - - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} - -@test "resource=dashboard_card | steampipe_introspection=info" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=info - steampipe query "select * from steampipe_dashboard_card" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 8th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "9d" output.json - else - run sed -i "9d" output.json - fi - - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_card.json" output.json - echo $output - - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff - - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} - -@test "resource=dashboard_image | steampipe_introspection=info" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=info - steampipe query "select * from steampipe_dashboard_image" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 10th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "10d" output.json - else - run sed -i "10d" output.json - fi - - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_image.json" output.json - echo $output - - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff - - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} - -@test "resource=dashboard_text | steampipe_introspection=info" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=info - steampipe query "select * from steampipe_dashboard_text" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 8th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "8d" output.json - else - run sed -i "8d" output.json - fi - - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_text.json" output.json - echo $output - - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff - - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} - -@test "resource=dashboard_chart | steampipe_introspection=info" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=info - steampipe query "select * from steampipe_dashboard_chart" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 10th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "10d" output.json - else - run sed -i "10d" output.json - fi - - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_chart.json" output.json - echo $output - - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff - - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} - -@test "resource=dashboard_flow | steampipe_introspection=info" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=info - steampipe query "select * from steampipe_dashboard_flow" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 14th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "14d" output.json - else - run sed -i "14d" output.json - fi - - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_flow.json" output.json - echo $output - - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff - - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} - -@test "resource=dashboard_graph | steampipe_introspection=info" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=info - steampipe query "select * from steampipe_dashboard_graph" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 15th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "15d" output.json - else - run sed -i "15d" output.json - fi - - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_graph.json" output.json - echo $output - - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff - - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} - -@test "resource=dashboard_hierarchy | steampipe_introspection=info" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=info - steampipe query "select * from steampipe_dashboard_hierarchy" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 14th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "14d" output.json - else - run sed -i "14d" output.json - fi - - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_hierarchy.json" output.json - echo $output - - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff - - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} - -@test "resource=dashboard_input | steampipe_introspection=info" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=info - steampipe query "select * from steampipe_dashboard_input" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 10th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "10d" output.json - else - run sed -i "10d" output.json - fi - - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_input.json" output.json - echo $output - - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff - - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} - -@test "resource=dashboard_table | steampipe_introspection=info" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=info - steampipe query "select * from steampipe_dashboard_table" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 10th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "10d" output.json - else - run sed -i "10d" output.json - fi +# re-enable the following tests if needed after steampipe cmd deprecations + +# @test "resource=variable | steampipe_introspection=info" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=info +# steampipe query "select * from steampipe_variable" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 8th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "9d" output.json +# run sed -i ".json" "34d" output.json +# else +# run sed -i "9d" output.json +# run sed -i "34d" output.json +# fi + +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_variable.json" output.json +# echo $output + +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff + +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } + +# @test "resource=benchmark | steampipe_introspection=info" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=info +# steampipe query "select * from steampipe_benchmark" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 11th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "11d" output.json +# else +# run sed -i "11d" output.json +# fi + +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_benchmark.json" output.json +# echo $output + +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff + +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } + +# @test "resource=dashboard | steampipe_introspection=info" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=info +# steampipe query "select * from steampipe_dashboard" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 12th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "12d" output.json +# else +# run sed -i "12d" output.json +# fi + +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard.json" output.json +# echo $output + +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff + +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } + +# @test "resource=dashboard_card | steampipe_introspection=info" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=info +# steampipe query "select * from steampipe_dashboard_card" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 8th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "9d" output.json +# else +# run sed -i "9d" output.json +# fi + +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_card.json" output.json +# echo $output + +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff + +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } + +# @test "resource=dashboard_image | steampipe_introspection=info" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=info +# steampipe query "select * from steampipe_dashboard_image" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 10th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "10d" output.json +# else +# run sed -i "10d" output.json +# fi + +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_image.json" output.json +# echo $output + +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff + +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } + +# @test "resource=dashboard_text | steampipe_introspection=info" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=info +# steampipe query "select * from steampipe_dashboard_text" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 8th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "8d" output.json +# else +# run sed -i "8d" output.json +# fi + +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_text.json" output.json +# echo $output + +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff + +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } + +# @test "resource=dashboard_chart | steampipe_introspection=info" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=info +# steampipe query "select * from steampipe_dashboard_chart" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 10th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "10d" output.json +# else +# run sed -i "10d" output.json +# fi + +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_chart.json" output.json +# echo $output + +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff + +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } + +# @test "resource=dashboard_flow | steampipe_introspection=info" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=info +# steampipe query "select * from steampipe_dashboard_flow" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 14th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "14d" output.json +# else +# run sed -i "14d" output.json +# fi + +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_flow.json" output.json +# echo $output + +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff + +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } + +# @test "resource=dashboard_graph | steampipe_introspection=info" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=info +# steampipe query "select * from steampipe_dashboard_graph" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 15th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "15d" output.json +# else +# run sed -i "15d" output.json +# fi + +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_graph.json" output.json +# echo $output + +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff + +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } + +# @test "resource=dashboard_hierarchy | steampipe_introspection=info" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=info +# steampipe query "select * from steampipe_dashboard_hierarchy" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 14th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "14d" output.json +# else +# run sed -i "14d" output.json +# fi + +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_hierarchy.json" output.json +# echo $output + +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff + +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } + +# @test "resource=dashboard_input | steampipe_introspection=info" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=info +# steampipe query "select * from steampipe_dashboard_input" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 10th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "10d" output.json +# else +# run sed -i "10d" output.json +# fi + +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_input.json" output.json +# echo $output + +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff + +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } + +# @test "resource=dashboard_table | steampipe_introspection=info" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=info +# steampipe query "select * from steampipe_dashboard_table" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 10th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "10d" output.json +# else +# run sed -i "10d" output.json +# fi - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_table.json" output.json - echo $output +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_dashboard_table.json" output.json +# echo $output - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } -@test "ensure mod name in introspection table is not mod." { - cd $SIMPLE_MOD_DIR - run steampipe query "select * from steampipe_query" --output json +# @test "ensure mod name in introspection table is not mod." { +# cd $SIMPLE_MOD_DIR +# run steampipe query "select * from steampipe_query" --output json - # extract the first mod_name from the list - mod_name=$(echo $output | jq '.rows[0].mod_name') - - # check if mod_name starts with "mod." - if [[ "$mod_name" == *"mod."* ]]; - then - flag=1 - else - flag=0 - fi - assert_equal "$flag" "0" -} - -@test "ensure query pseudo resources, i.e. sql files, have resource name not " { - cd $WORKSPACE_DIR - run steampipe query "select * from steampipe_query" --output json - - # extract the first encountered sql file's file_name from the list - sql_file_name=$(echo $output | jq '.rows[0].file_name' | grep ".sql" | head -1) - - #extract the resource_name of the above extracted file_name - resource_name=$(echo $output | jq --arg FILENAME "$sql_file_name" '.rows[0] | select(.file_name=="$FILENAME") | .resource_name') - - # check if resource_name starts with "query." - if [[ "$resource_name" == *"query."* ]]; - then - flag=1 - else - flag=0 - fi - assert_equal "$flag" "0" -} - -@test "ensure the reference_from column is populated correctly" { - skip - cd $SIMPLE_MOD_DIR - run steampipe query "select * from steampipe_reference" --output json - - # extract the refs and the referenced_by of the variable `sample_var_1` - refs=$(echo $output | jq '.rows[0] | select(.reference_to=="var.sample_var_1") | .reference_from') - echo $refs - - assert_equal "$refs" '"query.sample_query_1"' -} - -@test "introspection tables should get populated in query batch mode" { - cd $SIMPLE_MOD_DIR - run steampipe query "select * from steampipe_query" --output json - - # extracting only description from the list, which is enough to prove that there is an output - description=$(echo $output | jq '.rows[0].description') - assert_equal "$description" '"query 1 - 3 params all with defaults"' -} - -@test "steampipe_introspection=control" { - cd $SIMPLE_MOD_DIR - export STEAMPIPE_INTROSPECTION=control - steampipe query "select * from steampipe_control" --output json > output.json - - # checking for OS type, since sed command is different for linux and OSX - # removing the 12th line, since it contains file location which would differ in github runners - if [[ "$OSTYPE" == "darwin"* ]]; then - run sed -i ".json" "12d" output.json - else - run sed -i "12d" output.json - fi - - run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_control.json" output.json - echo $output - - diff=$($FILE_PATH/json_patch.sh $output) - echo $diff - - # check if there is no diff returned by the script - assert_equal "$diff" "" - rm -f output.json -} +# # extract the first mod_name from the list +# mod_name=$(echo $output | jq '.rows[0].mod_name') + +# # check if mod_name starts with "mod." +# if [[ "$mod_name" == *"mod."* ]]; +# then +# flag=1 +# else +# flag=0 +# fi +# assert_equal "$flag" "0" +# } + +# @test "ensure query pseudo resources, i.e. sql files, have resource name not " { +# cd $WORKSPACE_DIR +# run steampipe query "select * from steampipe_query" --output json + +# # extract the first encountered sql file's file_name from the list +# sql_file_name=$(echo $output | jq '.rows[0].file_name' | grep ".sql" | head -1) + +# #extract the resource_name of the above extracted file_name +# resource_name=$(echo $output | jq --arg FILENAME "$sql_file_name" '.rows[0] | select(.file_name=="$FILENAME") | .resource_name') + +# # check if resource_name starts with "query." +# if [[ "$resource_name" == *"query."* ]]; +# then +# flag=1 +# else +# flag=0 +# fi +# assert_equal "$flag" "0" +# } + +# @test "ensure the reference_from column is populated correctly" { +# skip +# cd $SIMPLE_MOD_DIR +# run steampipe query "select * from steampipe_reference" --output json + +# # extract the refs and the referenced_by of the variable `sample_var_1` +# refs=$(echo $output | jq '.rows[0] | select(.reference_to=="var.sample_var_1") | .reference_from') +# echo $refs + +# assert_equal "$refs" '"query.sample_query_1"' +# } + +# @test "introspection tables should get populated in query batch mode" { +# cd $SIMPLE_MOD_DIR +# run steampipe query "select * from steampipe_query" --output json + +# # extracting only description from the list, which is enough to prove that there is an output +# description=$(echo $output | jq '.rows[0].description') +# assert_equal "$description" '"query 1 - 3 params all with defaults"' +# } + +# @test "steampipe_introspection=control" { +# cd $SIMPLE_MOD_DIR +# export STEAMPIPE_INTROSPECTION=control +# steampipe query "select * from steampipe_control" --output json > output.json + +# # checking for OS type, since sed command is different for linux and OSX +# # removing the 12th line, since it contains file location which would differ in github runners +# if [[ "$OSTYPE" == "darwin"* ]]; then +# run sed -i ".json" "12d" output.json +# else +# run sed -i "12d" output.json +# fi + +# run jd -f patch "$TEST_DATA_DIR/expected_introspection_info_control.json" output.json +# echo $output + +# diff=$($FILE_PATH/json_patch.sh $output) +# echo $diff + +# # check if there is no diff returned by the script +# assert_equal "$diff" "" +# rm -f output.json +# } @test "steampipe check --where | steampipe_introspection=control" { cd $SIMPLE_MOD_DIR From aaa138276002c66f325a367f71f61a59a6b0ab79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:30:34 +0530 Subject: [PATCH 15/20] [dep][go](deps): Bump github.com/spf13/viper from 1.18.2 to 1.19.0 (#4369) --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 7d35506289..b8b4f6120e 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.18.2 + github.com/spf13/viper v1.19.0 github.com/stevenle/topsort v0.2.0 github.com/thediveo/enumflag/v2 v2.0.5 github.com/turbot/go-kit v0.10.0-rc.0 @@ -123,7 +123,7 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-getter v1.7.5 // indirect @@ -148,7 +148,7 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.2 // indirect github.com/klauspost/cpuid/v2 v2.2.7 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/magiconair/properties v1.8.7 // indirect @@ -208,7 +208,7 @@ require ( golang.org/x/term v0.21.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect - google.golang.org/api v0.169.0 // indirect + google.golang.org/api v0.171.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect diff --git a/go.sum b/go.sum index fdb5eec9df..4980762a77 100644 --- a/go.sum +++ b/go.sum @@ -501,8 +501,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= -github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -601,8 +601,8 @@ github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4 github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= @@ -774,8 +774,8 @@ github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= -github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/stevenle/topsort v0.2.0 h1:LLWgtp34HPX6/RBDRS0kElVxGOTzGBLI1lSAa5Lb46k= github.com/stevenle/topsort v0.2.0/go.mod h1:ck2WG2/ZrOr6dLApQ/5Xrqy5wv3T0qhKYWE7r9tkibc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -1271,8 +1271,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY= -google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= +google.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU= +google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= 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= From d642f0a29b5980624ac9dd32c28e7ab3b945070f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:30:52 +0530 Subject: [PATCH 16/20] [dep][go](deps): Bump google.golang.org/protobuf from 1.34.1 to 1.34.2 (#4368) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b8b4f6120e..714193c88d 100644 --- a/go.mod +++ b/go.mod @@ -60,7 +60,7 @@ require ( golang.org/x/sync v0.8.0 golang.org/x/text v0.17.0 google.golang.org/grpc v1.66.0 - google.golang.org/protobuf v1.34.1 + google.golang.org/protobuf v1.34.2 gopkg.in/olahol/melody.v1 v1.0.0-20170518105555-d52139073376 oras.land/oras-go/v2 v2.5.0 sigs.k8s.io/yaml v1.4.0 diff --git a/go.sum b/go.sum index 4980762a77..f4df1e1244 100644 --- a/go.sum +++ b/go.sum @@ -1440,8 +1440,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ 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/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= 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= From 8de8fd02bba7c49f5432b71894be2191d6ef958e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:31:13 +0530 Subject: [PATCH 17/20] [dep][go](deps): Bump github.com/sethvargo/go-retry from 0.2.4 to 0.3.0 (#4367) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 714193c88d..4256596663 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,7 @@ require ( github.com/opencontainers/image-spec v1.1.0 github.com/otiai10/copy v1.14.0 github.com/pkg/errors v0.9.1 - github.com/sethvargo/go-retry v0.2.4 + github.com/sethvargo/go-retry v0.3.0 github.com/shiena/ansicolor v0.0.0-20230509054315-a9deabde6e02 github.com/shirou/gopsutil v3.21.11+incompatible github.com/sirupsen/logrus v1.9.3 diff --git a/go.sum b/go.sum index f4df1e1244..7e74c1b054 100644 --- a/go.sum +++ b/go.sum @@ -746,8 +746,8 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= -github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec= -github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= +github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah2SE= +github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas= github.com/shiena/ansicolor v0.0.0-20230509054315-a9deabde6e02 h1:v9ezJDHA1XGxViAUSIoO/Id7Fl63u6d0YmsAm+/p2hs= github.com/shiena/ansicolor v0.0.0-20230509054315-a9deabde6e02/go.mod h1:RF16/A3L0xSa0oSERcnhd8Pu3IXSDZSK2gmGIMsttFE= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= From 8ca8e0ef44fa0992271c78809f11e5e1268b806b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:31:28 +0530 Subject: [PATCH 18/20] [dep][go](deps): Bump github.com/turbot/steampipe-plugin-sdk/v5 (#4366) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4256596663..0dfccd0c2b 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ require ( github.com/turbot/go-kit v0.10.0-rc.0 github.com/turbot/pipe-fittings v1.5.2 github.com/turbot/steampipe-cloud-sdk-go v0.6.0 - github.com/turbot/steampipe-plugin-sdk/v5 v5.10.3 + github.com/turbot/steampipe-plugin-sdk/v5 v5.10.4 github.com/turbot/terraform-components v0.0.0-20231213122222-1f3526cab7a7 github.com/xlab/treeprint v1.2.0 github.com/zclconf/go-cty v1.14.4 diff --git a/go.sum b/go.sum index 7e74c1b054..6dcc881aad 100644 --- a/go.sum +++ b/go.sum @@ -816,8 +816,8 @@ github.com/turbot/pipe-fittings v1.5.2 h1:0nAIJD//lyxRVGJltRg+sCq98U/N1mGxu4LNWU github.com/turbot/pipe-fittings v1.5.2/go.mod h1:IgGxXEXfG3UTJCIkDOjjErVzU1ClsK6NmxlyaapZaNc= github.com/turbot/steampipe-cloud-sdk-go v0.6.0 h1:ufAxOpKS1uq7eejuE5sfEu1+d7QAd0RBjl8Bn6+mIs8= github.com/turbot/steampipe-cloud-sdk-go v0.6.0/go.mod h1:M42TMBdMim4bV1YTMxhKyzfSGSMo4CXUkm3wt9w7t1Y= -github.com/turbot/steampipe-plugin-sdk/v5 v5.10.3 h1:3OCvnD0/u2RzNOgd0aBiWJrp/uk5Qjv6ZUt2gF2Xi9g= -github.com/turbot/steampipe-plugin-sdk/v5 v5.10.3/go.mod h1:zmq31p/5iizn78nJ3k7np4owfuZL+EsZlb7gGMZl6cY= +github.com/turbot/steampipe-plugin-sdk/v5 v5.10.4 h1:h2Ye0ksL6KN6w2wh1O3mgKthLnyl4QPsTpUj47bRbvc= +github.com/turbot/steampipe-plugin-sdk/v5 v5.10.4/go.mod h1:FzW+0aq4x1PoCkklCRx43dMrhxk7SYeWVHUb3pNFtFc= github.com/turbot/terraform-components v0.0.0-20231213122222-1f3526cab7a7 h1:qDMxFVd8Zo0rIhnEBdCIbR+T6WgjwkxpFZMN8zZmmjg= github.com/turbot/terraform-components v0.0.0-20231213122222-1f3526cab7a7/go.mod h1:5hzpfalEjfcJWp9yq75/EZoEu2Mzm34eJAPm3HOW2tw= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= From 19e8dd580af5a6c252d303277640f90c667a1d3c Mon Sep 17 00:00:00 2001 From: Puskar Basu <45908484+pskrbasu@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:21:30 +0530 Subject: [PATCH 19/20] Update CHANGELOG for v0.24.0 --- CHANGELOG.md | 42 +++++++++++++++++++++++++++++++++++++++++- pkg/version/version.go | 2 +- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f73a21f80d..f36bdb827d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,46 @@ -## v0.24.0 [tbd] +## v0.24.0 [2024-09-05] _Whats new_ - Add ability to configure plugin startup timeout. ([#4320](https://github.com/turbot/steampipe/issues/4320)) +- Install FDW and embedded postgres database from GHCR instead of GCP. ([#4344](https://github.com/turbot/steampipe/issues/4344)) +- Update query JSON output format to add a `columns` property containing the column information. This allows us to handle duplicate column names by appending a unique suffix to duplicate column name ([#4317](https://github.com/turbot/steampipe/issues/4317)) + +Existing query JSON format: +``` +$ steampipe query "select account_id, arn from aws_account" --output json +{ + "rows": [ + { + "account_id": "123456789012", + "arn": "arn:aws:::123456789012" + } + ] +} +``` +New query JSON format(with new `columns` property): +``` +$ steampipe query "select account_id, arn from aws_account" --output json +{ + "columns": [ + { + "name": "account_id", + "data_type": "text" + }, + { + "name": "arn", + "data_type": "text" + } + ], + "rows": [ + { + "account_id": "123456789012", + "arn": "arn:aws:::123456789012" + } + ] +} +``` + +_Bug fixes_ +- Fix issue where plugin manager was incorrectly reporting a shutdown. ([#4365](https://github.com/turbot/steampipe/issues/4365)) ## v0.23.5 [2024-08-21] _Bug fixes_ diff --git a/pkg/version/version.go b/pkg/version/version.go index 3ad510bd89..0e43548660 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -18,7 +18,7 @@ Also https://www.digitalocean.com/community/tutorials/using-ldflags-to-set-versi **/ // The main version number that is being run at the moment. -var steampipeVersion = "0.23.5" +var steampipeVersion = "0.24.0" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release From dec933fbc0c4825c9ba0b9a234d9acec30d5985f Mon Sep 17 00:00:00 2001 From: Puskar Basu Date: Thu, 5 Sep 2024 16:49:13 +0530 Subject: [PATCH 20/20] go mod tidy --- go.sum | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.sum b/go.sum index 6dcc881aad..46c10a2bda 100644 --- a/go.sum +++ b/go.sum @@ -1151,8 +1151,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.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.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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=