Merge pull request #4498 from turbot/new-db

New steampipe database
This commit is contained in:
kaidaguerre
2025-04-14 12:08:15 +01:00
committed by GitHub
16 changed files with 1219 additions and 511 deletions

View File

@@ -11,6 +11,7 @@ builds:
- darwin
goarch:
- amd64
- arm64
id: "steampipe"
binary: "steampipe"

View File

@@ -9,12 +9,12 @@ on:
Version number for the OCI image for this release - usually the same as the
postgres version
required: true
default: 14.2.0
default: 14.17.0
postgres_version:
description: "Postgres Version to package (eg 14.2.0)"
required: true
default: 14.2.0
default: 14.17.0
env:
PROJECT_ID: steampipe
@@ -27,10 +27,12 @@ env:
PATH_BASE: https://repo1.maven.org/maven2/io/zonky/test/postgres
NAME_PREFIX: embedded-postgres-binaries
STEAMPIPE_UPDATE_CHECK: false
ORAS_VERSION: 1.1.0
jobs:
# This workflow contains a single job called "build"
build:
name: Build and Publish DB Image
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
@@ -76,28 +78,32 @@ jobs:
- name: Pull & Extract - darwin amd64
run: |-
EXTRACT_DIR=extracted-darwin-amd64
curl -L -O -J -L https://www.dropbox.com/s/4ilvb7ixmkbyhq5/darwin-amd64.txz?dl=0 --output darwin-amd64.txz
# new link (darwin-amd64.txz) - https://drive.google.com/file/d/12fxd_jZxdP4Ilwd0BnefbVCLZV957TNJ/view?usp=drive_link
curl -L -o darwin-amd64.txz "https://drive.google.com/uc?export=download&id=12fxd_jZxdP4Ilwd0BnefbVCLZV957TNJ"
mkdir $EXTRACT_DIR
tar -xf darwin-amd64.txz --directory $EXTRACT_DIR
- name: Pull & Extract - darwin arm64
run: |-
EXTRACT_DIR=extracted-darwin-arm64
curl -L -O -J -L https://www.dropbox.com/s/qztyzex9zr6pq00/darwin-arm64.txz?dl=0 --output darwin-arm64.txz
# new link (darwin-arm64.txz) - https://drive.google.com/file/d/1lG6eNYM5JaywbRxQBubzMDmbCtGVilQh/view?usp=drive_link
curl -L -o darwin-arm64.txz "https://drive.google.com/uc?export=download&id=1lG6eNYM5JaywbRxQBubzMDmbCtGVilQh"
mkdir $EXTRACT_DIR
tar -xf darwin-arm64.txz --directory $EXTRACT_DIR
- name: Pull & Extract - linux amd64
run: |-
EXTRACT_DIR=extracted-linux-amd64
curl -L -O -J -L https://www.dropbox.com/s/kqkcp6q8jts82e9/linux-amd64.txz?dl=0 --output linux-amd64.txz
# new link (linux-amd64.txz) - https://drive.google.com/file/d/11pqDcTtlD7RF5LPj-X4gRVfl4mk00fuy/view?usp=drive_link
curl -L -o linux-amd64.txz "https://drive.google.com/uc?export=download&id=11pqDcTtlD7RF5LPj-X4gRVfl4mk00fuy"
mkdir $EXTRACT_DIR
tar -xf linux-amd64.txz --directory $EXTRACT_DIR
- name: Pull & Extract - linux arm64
run: |-
EXTRACT_DIR=extracted-linux-arm64
curl -L -O -J -L https://www.dropbox.com/s/mcyi7lmx0r3x008/linux-arm64.txz?dl=0 --output linux-arm64.txz
# new link (linux-arm64.txz) - https://drive.google.com/file/d/1lpjyHegwd_8574uVWgaPB31yR7vRB8Zh/view?usp=drive_link
curl -L -o linux-arm64.txz "https://drive.google.com/uc?export=download&id=1lpjyHegwd_8574uVWgaPB31yR7vRB8Zh"
mkdir $EXTRACT_DIR
tar -xf linux-arm64.txz --directory $EXTRACT_DIR
@@ -133,8 +139,11 @@ jobs:
echo $JSON_STRING > annotations.json
- name: Verify ORAS
run: |-
# Setup ORAS
- name: Install specific version of ORAS
run: |
curl -LO https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz
sudo tar xzf oras_${ORAS_VERSION}_linux_amd64.tar.gz -C /usr/local/bin oras
oras version
# Publish to GHCR

View File

@@ -77,7 +77,7 @@ jobs:
run: |
mkdir ~/artifacts
mv $GITHUB_WORKSPACE/steampipe/dist/steampipe_linux_amd64.tar.gz ~/artifacts/linux.tar.gz
mv $GITHUB_WORKSPACE/steampipe/dist/steampipe_darwin_amd64.zip ~/artifacts/darwin.zip
mv $GITHUB_WORKSPACE/steampipe/dist/steampipe_darwin_arm64.zip ~/artifacts/darwin.zip
- name: List Build Artifacts
run: ls -l ~/artifacts
@@ -104,7 +104,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
platform: [ubuntu-latest] # add other platforms as needed
test_block:
- "migration"
- "brew"

View File

@@ -1,3 +1,10 @@
## v1.1.0 [2025-04-10]
_Whats new_
- Update database version to PostgreSQL 14.17. ([#4461](https://github.com/turbot/steampipe/issues/4461))
_Bug fixes_
- Fix issue where plugin start timeout was getting limited to 60s. ([#4477](https://github.com/turbot/steampipe/issues/4477))
## v1.0.3 [2025-02-03]
_Bug fixes_
- Update FDW to 1.12.2 to remediate critical and high vulnerabilities. ([#533](https://github.com/turbot/steampipe-postgres-fdw/issues/533))

257
go.mod
View File

@@ -1,8 +1,8 @@
module github.com/turbot/steampipe
go 1.23.1
go 1.23.2
toolchain go1.23.3
toolchain go1.24.0
replace (
github.com/c-bata/go-prompt => github.com/turbot/go-prompt v0.2.6-steampipe.0.0.20221028122246-eb118ec58d50
@@ -11,120 +11,119 @@ replace (
)
require (
github.com/Masterminds/semver/v3 v3.2.1
github.com/Masterminds/semver/v3 v3.3.1
github.com/alecthomas/chroma v0.10.0
github.com/bgentry/speakeasy v0.2.0 // indirect
github.com/briandowns/spinner v1.23.0
github.com/briandowns/spinner v1.23.2
github.com/c-bata/go-prompt v0.2.6
github.com/fatih/color v1.17.0
github.com/fsnotify/fsnotify v1.7.0
github.com/fatih/color v1.18.0
github.com/fsnotify/fsnotify v1.8.0
github.com/gertd/go-pluralize v0.2.1
github.com/go-git/go-git/v5 v5.13.0
github.com/go-git/go-git/v5 v5.14.0
github.com/google/uuid v1.6.0
github.com/hashicorp/go-hclog v1.6.3
github.com/hashicorp/go-plugin v1.6.1
github.com/hashicorp/go-plugin v1.6.3
github.com/hashicorp/go-version v1.7.0
github.com/hashicorp/hcl/v2 v2.22.0
github.com/hashicorp/hcl/v2 v2.23.0
github.com/jackc/pgconn v1.14.3
github.com/jackc/pgx/v5 v5.7.1
github.com/jedib0t/go-pretty/v6 v6.5.9
github.com/jackc/pgx/v5 v5.7.3
github.com/jedib0t/go-pretty/v6 v6.6.7
github.com/karrick/gows v0.3.0
github.com/mattn/go-isatty v0.0.20
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/olekukonko/tablewriter v0.0.5
github.com/opencontainers/image-spec v1.1.0
github.com/otiai10/copy v1.14.0
github.com/opencontainers/image-spec v1.1.1
github.com/otiai10/copy v1.14.1
github.com/pkg/errors v0.9.1
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/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.19.0
github.com/thediveo/enumflag/v2 v2.0.5
github.com/turbot/go-kit v1.1.0
github.com/turbot/pipe-fittings/v2 v2.1.1
github.com/turbot/steampipe-plugin-sdk/v5 v5.11.4
github.com/turbot/terraform-components v0.0.0-20231213122222-1f3526cab7a7
github.com/zclconf/go-cty v1.14.4 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
golang.org/x/sync v0.10.0
golang.org/x/text v0.21.0
google.golang.org/grpc v1.66.0
google.golang.org/protobuf v1.34.2
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
github.com/spf13/viper v1.20.0
github.com/thediveo/enumflag/v2 v2.0.7
github.com/turbot/go-kit v1.2.0
github.com/turbot/pipe-fittings/v2 v2.3.0-rc.3
github.com/turbot/steampipe-plugin-sdk/v5 v5.11.5
github.com/turbot/terraform-components v0.0.0-20250114051614-04b806a9cbed
github.com/zclconf/go-cty v1.16.2 // indirect
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
golang.org/x/sync v0.12.0
golang.org/x/text v0.23.0
google.golang.org/grpc v1.71.0
google.golang.org/protobuf v1.36.6
)
require (
cloud.google.com/go v0.112.1 // 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
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
cloud.google.com/go v0.120.0 // indirect
cloud.google.com/go/compute/metadata v0.6.0 // indirect
cloud.google.com/go/iam v1.4.2 // indirect
cloud.google.com/go/storage v1.51.0 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/allegro/bigcache/v3 v3.1.0 // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/aws/aws-sdk-go v1.44.183 // indirect
github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect
github.com/aws/aws-sdk-go-v2/config v1.27.11 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.11 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect
github.com/aws/smithy-go v1.20.2 // indirect
github.com/aws/aws-sdk-go v1.55.6 // indirect
github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect
github.com/aws/aws-sdk-go-v2/config v1.29.9 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.62 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.25.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 // indirect
github.com/aws/smithy-go v1.22.3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/btubbs/datetime v0.1.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/containerd/containerd v1.7.23 // indirect
github.com/containerd/errdefs v0.3.0 // indirect
github.com/containerd/containerd v1.7.27 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.5 // indirect
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
github.com/dgraph-io/ristretto v0.2.0 // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/dlclark/regexp2 v1.11.5 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/eko/gocache/lib/v4 v4.1.6 // indirect
github.com/eko/gocache/store/bigcache/v4 v4.2.1 // indirect
github.com/eko/gocache/store/ristretto/v4 v4.2.1 // indirect
github.com/eko/gocache/lib/v4 v4.2.0 // indirect
github.com/eko/gocache/store/bigcache/v4 v4.2.2 // indirect
github.com/eko/gocache/store/ristretto/v4 v4.2.2 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.6.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-git/go-billy/v5 v5.6.2 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.20.0 // indirect
github.com/goccy/go-yaml v1.11.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/go-playground/validator/v10 v10.25.0 // indirect
github.com/goccy/go-yaml v1.16.0 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
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.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.5 // indirect
github.com/hashicorp/go-getter v1.7.8 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.1 // indirect
github.com/hashicorp/terraform-registry-address v0.2.4 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
github.com/hokaccha/go-prettyjson v0.0.0-20211117102719-0474bc63780f // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
@@ -136,65 +135,59 @@ require (
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-tty v0.0.3 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mattn/go-tty v0.0.7 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rs/xid v1.5.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/pjbgf/sha1cd v0.3.2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.63.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/sagikazarmark/locafero v0.8.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/afero v1.14.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/stevenle/topsort v0.2.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tklauser/numcpus v0.3.0 // indirect
github.com/tkrajina/go-reflector v0.5.6 // indirect
github.com/turbot/pipes-sdk-go v0.12.0 // indirect
github.com/turbot/steampipe-plugin-code v1.0.1-alpha.1 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/tklauser/numcpus v0.10.0 // indirect
github.com/tkrajina/go-reflector v0.5.8 // indirect
github.com/turbot/pipes-sdk-go v0.12.1 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/zclconf/go-cty-yaml v1.0.3 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.26.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.26.0 // indirect
go.opentelemetry.io/otel/sdk v1.26.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect
go.opentelemetry.io/otel/trace v1.26.0 // indirect
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.23.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // 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
gopkg.in/ini.v1 v1.67.0 // indirect
github.com/zclconf/go-cty-yaml v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
go.opentelemetry.io/otel v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0 // indirect
go.opentelemetry.io/otel/metric v1.35.0 // indirect
go.opentelemetry.io/otel/sdk v1.35.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.35.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/oauth2 v0.28.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/time v0.11.0 // indirect
golang.org/x/tools v0.31.0 // indirect
google.golang.org/api v0.227.0 // indirect
google.golang.org/genproto v0.0.0-20250313205543-e70fdf4c4cb4 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250313205543-e70fdf4c4cb4 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
@@ -203,18 +196,34 @@ require (
)
require (
cel.dev/expr v0.19.2 // indirect
cloud.google.com/go/auth v0.15.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.7 // indirect
cloud.google.com/go/monitoring v1.24.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.51.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.51.0 // indirect
github.com/bmatcuk/doublestar v1.3.4 // indirect
github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/otiai10/mint v1.6.3 // indirect
github.com/pkg/term v1.1.0 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/tklauser/go-sysconf v0.3.9 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.33.0 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/prometheus/client_golang v1.21.1 // indirect
github.com/prometheus/procfs v0.16.0 // indirect
github.com/tklauser/go-sysconf v0.3.15 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.34.0 // indirect
go.uber.org/mock v0.4.0 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/mod v0.24.0 // indirect
golang.org/x/net v0.37.0 // indirect
)
require (

1346
go.sum

File diff suppressed because it is too large Load Diff

View File

@@ -27,12 +27,12 @@ const (
// constants for installing db and fdw images
const (
DatabaseVersion = "14.2.0"
FdwVersion = "1.12.4"
DatabaseVersion = "14.17.0"
FdwVersion = "1.12.5"
// PostgresImageRef is the OCI Image ref for the database binaries
PostgresImageRef = "ghcr.io/turbot/steampipe/db:14.2.0"
PostgresImageDigest = "sha256:1972eee02bbd3bf52f8cce30a5109ab017f310a85d45a31ddd1623f1dfe455fa"
PostgresImageRef = "ghcr.io/turbot/steampipe/db:14.17.0"
PostgresImageDigest = "sha256:4d66131a30139b2b912abe17bcd93c6b4e6a89224874960fea0f141ca51168e7"
FdwImageRef = "ghcr.io/turbot/steampipe/fdw:" + FdwVersion
FdwBinaryFileName = "steampipe_postgres_fdw.so"

View File

@@ -329,7 +329,7 @@ func runRestoreUsingList(ctx context.Context, info *RunningDBInstanceInfo, listF
// connection parameters
"--host=127.0.0.1",
fmt.Sprintf("--port=%d", info.Port),
fmt.Sprintf("--username=%s", info.User),
fmt.Sprintf("--username=%s", constants.DatabaseSuperUser),
)
log.Println("[TRACE]", cmd.String())
@@ -449,6 +449,12 @@ func pgDumpCmd(ctx context.Context, args ...string) *exec.Cmd {
)
cmd.Env = append(os.Environ(), "PGSSLMODE=disable")
// set the library path for the pg_dump command
// this is required for the pg_dump to work correctly since we build the pg_dump binary
// from source(zonkyio does not package it), they are incorrectly linked, so the correct
// library path must be set before running it
cmd.Env = append(cmd.Env, fmt.Sprintf("DYLD_LIBRARY_PATH=%s", filepaths.GetDatabaseLibPath()))
log.Println("[TRACE] pg_dump command:", cmd.String())
return cmd
}
@@ -461,6 +467,12 @@ func pgRestoreCmd(ctx context.Context, args ...string) *exec.Cmd {
)
cmd.Env = append(os.Environ(), "PGSSLMODE=disable")
// set the library path for the pg_restore command
// this is required for the pg_restore to work correctly since we build the pg_restore binary
// from source(zonkyio does not package it), they are incorrectly linked, so the correct
// library path must be set before running it
cmd.Env = append(cmd.Env, fmt.Sprintf("DYLD_LIBRARY_PATH=%s", filepaths.GetDatabaseLibPath()))
log.Println("[TRACE] pg_restore command:", cmd.String())
return cmd
}

View File

@@ -27,7 +27,7 @@ import (
var ensureMux sync.Mutex
func noBackupWarning() string {
warningMessage := `Steampipe database has been upgraded from Postgres 12 to Postgres 14.
warningMessage := `Steampipe database has been upgraded from Postgres 14.2 to Postgres 14.17.
Unfortunately the data in your public schema failed migration using the standard pg_dump and pg_restore tools. Your data has been preserved in the ~/.steampipe/db directory.
@@ -89,6 +89,7 @@ func EnsureDBInstalled(ctx context.Context) (err error) {
// NOTE: this returns the existing database name - we use this when creating the new database
dbName, err := prepareBackup(ctx)
if err != nil {
log.Printf("[ERROR] prepareBackup failed: %s", err.Error())
if errors.Is(err, errDbInstanceRunning) {
// remove the installation - otherwise, the backup won't get triggered, even if the user stops the service
os.RemoveAll(filepaths.DatabaseInstanceDir())

View File

@@ -198,6 +198,11 @@ func postServiceStart(ctx context.Context, res *StartResult) error {
return err
}
// if there is an unprocessed db backup file, restore it now
if err := restoreDBBackup(ctx); err != nil {
return sperr.WrapWithMessage(err, "failed to migrate db public schema")
}
// create the clone_foreign_schema function
if _, err := executeSqlAsRoot(ctx, cloneForeignSchemaSQL); err != nil {
return sperr.WrapWithMessage(err, "failed to create clone_foreign_schema function")
@@ -207,11 +212,6 @@ func postServiceStart(ctx context.Context, res *StartResult) error {
return sperr.WrapWithMessage(err, "failed to create clone_comments function")
}
// if there is an unprocessed db backup file, restore it now
if err := restoreDBBackup(ctx); err != nil {
return sperr.WrapWithMessage(err, "failed to migrate db public schema")
}
return nil
}

View File

@@ -46,6 +46,10 @@ func DatabaseBackupFilePath() string {
return filepath.Join(EnsureDatabaseDir(), "backup.bk")
}
func GetDatabaseLibPath() string {
return filepath.Join(GetDatabaseLocation(), "lib")
}
func GetRootCertLocation() string {
return filepath.Join(GetDataLocation(), constants.RootCert)
}

View File

@@ -48,13 +48,6 @@ func readDatabaseVersionFile(path string) (*DatabaseVersionFile, error) {
log.Println("[ERROR]", "Error while reading DB version file", err)
return nil, err
}
if data.FdwExtension == (versionfile.InstalledVersion{}) {
data.FdwExtension = versionfile.InstalledVersion{}
}
if data.EmbeddedDB == (versionfile.InstalledVersion{}) {
data.EmbeddedDB = versionfile.InstalledVersion{}
}
return &data, nil
}

View File

@@ -23,7 +23,7 @@ var steampipeVersion = "1.1.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
// such as "dev" (in development), "beta", "rc1", etc.
var prerelease = "rc.0"
var prerelease = ""
// SteampipeVersion is an instance of semver.Version. This has the secondary
// benefit of verifying during tests and init time that our version is a

View File

@@ -9,31 +9,31 @@ load "$LIB_BATS_SUPPORT/load.bash"
steampipe query "select 1" --install-dir $target_install_directory
# check postgres binary is present in correct location
run file $target_install_directory/db/14.2.0/postgres/bin/postgres
run file $target_install_directory/db/14.17.0/postgres/bin/postgres
if [[ "$arch" == "x86_64" && "$os" == "Darwin" ]]; then
assert_output --partial 'Mach-O 64-bit executable x86_64'
elif [[ "$arch" == "arm64" && "$os" == "Darwin" ]]; then
assert_output --partial 'Mach-O 64-bit executable arm64'
elif [[ "$arch" == "x86_64" && "$os" == "Linux" ]]; then
assert_output --partial 'ELF 64-bit LSB executable, x86-64'
assert_output --partial 'ELF 64-bit LSB pie executable, x86-64'
elif [[ "$arch" == "aarch64" && "$os" == "Linux" ]]; then
assert_output --partial 'ELF 64-bit LSB executable, ARM aarch64'
fi
# check initdb binary is present in the correct location
run file $target_install_directory/db/14.2.0/postgres/bin/initdb
run file $target_install_directory/db/14.17.0/postgres/bin/initdb
if [[ "$arch" == "arm64" && "$os" == "Darwin" ]]; then
assert_output --partial 'Mach-O 64-bit executable arm64'
elif [[ "$arch" == "x86_64" && "$os" == "Darwin" ]]; then
assert_output --partial 'Mach-O 64-bit executable x86_64'
elif [[ "$arch" == "x86_64" && "$os" == "Linux" ]]; then
assert_output --partial 'ELF 64-bit LSB executable, x86-64'
assert_output --partial 'ELF 64-bit LSB pie executable, x86-64'
elif [[ "$arch" == "aarch64" && "$os" == "Linux" ]]; then
assert_output --partial 'ELF 64-bit LSB executable, ARM aarch64'
fi
# check fdw binary(steampipe_postgres_fdw.so) is present in the correct location
run file $target_install_directory/db/14.2.0/postgres/lib/postgresql/steampipe_postgres_fdw.so
run file $target_install_directory/db/14.17.0/postgres/lib/postgresql/steampipe_postgres_fdw.so
if [[ "$arch" == "arm64" && "$os" == "Darwin" ]]; then
assert_output --partial 'Mach-O 64-bit bundle arm64'
elif [[ "$arch" == "x86_64" && "$os" == "Darwin" ]]; then
@@ -45,7 +45,7 @@ load "$LIB_BATS_SUPPORT/load.bash"
fi
# check fdw extension(steampipe_postgres_fdw.control) is present in the correct location
run file $target_install_directory/db/14.2.0/postgres/share/postgresql/extension/steampipe_postgres_fdw.control
run file $target_install_directory/db/14.17.0/postgres/share/postgresql/extension/steampipe_postgres_fdw.control
assert_output --partial 'ASCII text'
}

View File

@@ -3,7 +3,7 @@ load "$LIB_BATS_SUPPORT/load.bash"
## public schema migration
@test "verify data is properly migrated when upgrading from v0.13.6" {
@test "verify data is properly migrated when upgrading from v1.0.3" {
# setup sql statements
setup_sql[0]="create table sample(sample_col_1 char(10), sample_col_2 char(10))"
setup_sql[1]="insert into sample(sample_col_1,sample_col_2) values ('foo','bar')"
@@ -14,7 +14,7 @@ load "$LIB_BATS_SUPPORT/load.bash"
verify_sql[0]="select * from sample"
verify_sql[1]="select * from sample_func()"
# create a temp directory to install steampipe(0.13.6)
# create a temp directory to install steampipe(1.0.3)
tmpdir="$(mktemp -d)"
mkdir -p "${tmpdir}"
tmpdir="${tmpdir%/}"
@@ -29,7 +29,7 @@ load "$LIB_BATS_SUPPORT/load.bash"
esac
# download the zip and extract
steampipe_uri="https://github.com/turbot/steampipe/releases/download/v0.13.6/steampipe_${target}"
steampipe_uri="https://github.com/turbot/steampipe/releases/download/v1.0.3/steampipe_${target}"
case $(uname -s) in
"Darwin") zip_location="${tmpdir}/steampipe.zip" ;;
"Linux") zip_location="${tmpdir}/steampipe.tar.gz" ;;
@@ -46,7 +46,7 @@ load "$LIB_BATS_SUPPORT/load.bash"
$tmpdir/steampipe --install-dir $tmpdir query "${setup_sql[$i]}"
done
# store the result of the verification statements(0.13.6)
# store the result of the verification statements(1.0.3)
for ((i = 0; i < ${#verify_sql[@]}; i++)); do
$tmpdir/steampipe --install-dir $tmpdir query "${verify_sql[$i]}" > verify$i.txt
done

View File

@@ -5,7 +5,7 @@ load "$LIB_BATS_SUPPORT/load.bash"
current_year=$(date +"%Y")
steampipe service start
run openssl x509 -enddate -noout -in $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/root.crt
run openssl x509 -enddate -noout -in $STEAMPIPE_INSTALL_DIR/db/14.17.0/data/root.crt
echo $output
# check enddate
assert_output --partial "notAfter=Dec 31 23:59:59 9999 GMT"
@@ -13,7 +13,7 @@ load "$LIB_BATS_SUPPORT/load.bash"
server_expiry=$((current_year + 3))
echo $server_expiry
run openssl x509 -enddate -noout -in $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/server.crt
run openssl x509 -enddate -noout -in $STEAMPIPE_INSTALL_DIR/db/14.17.0/data/server.crt
echo $output
# check enddate
assert_output --partial "$server_expiry"
@@ -23,25 +23,25 @@ load "$LIB_BATS_SUPPORT/load.bash"
steampipe service start
# save file hash
run cksum $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/root.crt
run cksum $STEAMPIPE_INSTALL_DIR/db/14.17.0/data/root.crt
id_root=$(echo $output | awk '{print $1}')
echo $id_root
# save file hash
run cksum $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/server.crt
run cksum $STEAMPIPE_INSTALL_DIR/db/14.17.0/data/server.crt
id_server=$(echo $output | awk '{print $1}')
echo $id_server
steampipe service restart
# check file hash after restart
run cksum $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/root.crt
run cksum $STEAMPIPE_INSTALL_DIR/db/14.17.0/data/root.crt
id_root_new=$(echo $output | awk '{print $1}')
echo $id_root_new
assert_equal $id_root $id_root_new
# check file hash after restart
run cksum $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/server.crt
run cksum $STEAMPIPE_INSTALL_DIR/db/14.17.0/data/server.crt
id_server_new=$(echo $output | awk '{print $1}')
echo $id_server_new
@@ -52,17 +52,17 @@ load "$LIB_BATS_SUPPORT/load.bash"
@test "deleting root certificate, service start should regenerate server and root certs" {
# save file hash
run cksum $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/server.crt
run cksum $STEAMPIPE_INSTALL_DIR/db/14.17.0/data/server.crt
id_server=$(echo $output | awk '{print $1}')
echo $id_server
# delete root certificate
rm -f $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/root.crt
rm -f $STEAMPIPE_INSTALL_DIR/db/14.17.0/data/root.crt
steampipe service start
# save new file hash
run cksum $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/server.crt
run cksum $STEAMPIPE_INSTALL_DIR/db/14.17.0/data/server.crt
id_server_new=$(echo $output | awk '{print $1}')
echo $id_server_new
@@ -77,9 +77,9 @@ load "$LIB_BATS_SUPPORT/load.bash"
}
@test "adding an encrypted private key should work fine and service should start successfully" {
run openssl genrsa -aes256 -out $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/server.key -passout pass:steampipe -traditional 2048
run openssl genrsa -aes256 -out $STEAMPIPE_INSTALL_DIR/db/14.17.0/data/server.key -passout pass:steampipe -traditional 2048
run openssl req -key $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/server.key -passin pass:steampipe -new -x509 -out $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/server.crt -subj "/CN=steampipe.io"
run openssl req -key $STEAMPIPE_INSTALL_DIR/db/14.17.0/data/server.key -passin pass:steampipe -new -x509 -out $STEAMPIPE_INSTALL_DIR/db/14.17.0/data/server.crt -subj "/CN=steampipe.io"
steampipe service start --database-ssl-password steampipe
}