Skip to content

Commit f635d99

Browse files
authored
Release steampipe-postgres-fdw v1.12.7 (#557)
1 parent 7fe7a06 commit f635d99

File tree

8 files changed

+71
-35
lines changed

8 files changed

+71
-35
lines changed

.github/workflows/buildimage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ jobs:
240240

241241
build-linux:
242242
name: Build for Linux x86_64
243-
runs-on: ubuntu-20.04
243+
runs-on: ubuntu-22.04
244244
steps:
245245
- name: Checkout
246246
uses: actions/checkout@v4

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
jobs:
66
golangci_lint:
77
name: golangci-lint
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-22.04
99
steps:
1010
- name: Checkout
1111
uses: actions/checkout@v4
@@ -25,7 +25,7 @@ jobs:
2525
build_and_test:
2626
name: Build and run tests
2727
needs: golangci_lint
28-
runs-on: ubuntu-20.04
28+
runs-on: ubuntu-22.04
2929
steps:
3030
- name: Set up Go
3131
uses: actions/setup-go@v5

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## v1.12.7 [2025-06-03]
2+
_Dependencies_
3+
- Upgrade `golang.org/x/net` to remediate high vulnerabilities.
4+
5+
## v1.12.6 [2025-05-26]
6+
_Whats new_
7+
- Add support to build steampipe standalone FDW for pre-release versions of plugins.
8+
19
## v1.12.5 [2025-03-31]
210
_Dependencies_
311
- Upgrade `containerd` and `golang.org/x/net` to remediate moderate vulnerabilities.

Makefile

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ install: build
1414
fi
1515

1616
# build standalone
17-
standalone: validate_plugin prebuild.go
17+
standalone: validate_plugin validate_version prebuild.go
1818
@echo "Building standalone FDW for plugin: $(plugin)"
1919

2020
# Remove existing work dir and create a new directory for the render process
@@ -26,7 +26,11 @@ standalone: validate_plugin prebuild.go
2626

2727
# Change to the new directory to perform operations
2828
cd work && \
29-
go run generate/generator.go templates . $(plugin) $(plugin_github_url) && \
29+
go run generate/generator.go templates . $(plugin) $(plugin_version) $(plugin_github_url) && \
30+
if [ ! -z "$(plugin_version)" ]; then \
31+
echo "go get $(plugin_github_url)@$(plugin_version)" && \
32+
go get $(plugin_github_url)@$(plugin_version); \
33+
fi && \
3034
go mod tidy && \
3135
$(MAKE) -C ./fdw clean && \
3236
$(MAKE) -C ./fdw go && \
@@ -43,7 +47,7 @@ standalone: validate_plugin prebuild.go
4347
# binaries will be copied to build-${PLATFORM} folder
4448

4549
# render target
46-
render: validate_plugin prebuild.go
50+
render: validate_plugin validate_version prebuild.go
4751
@echo "Rendering code for plugin: $(plugin)"
4852

4953
# Remove existing work dir and create a new directory for the render process
@@ -55,7 +59,11 @@ render: validate_plugin prebuild.go
5559

5660
# Change to the new directory to perform operations
5761
cd work && \
58-
go run generate/generator.go templates . $(plugin) $(plugin_github_url) && \
62+
go run generate/generator.go templates . $(plugin) $(plugin_version) $(plugin_github_url) && \
63+
if [ ! -z "$(plugin_version)" ]; then \
64+
echo "go get $(plugin_github_url)@$(plugin_version)" && \
65+
go get $(plugin_github_url)@$(plugin_version); \
66+
fi && \
5967
go mod tidy
6068

6169
# Note: The work directory will contain the full code tree with rendered changes
@@ -84,9 +92,17 @@ build_from_work:
8492
# Note: This target builds from the 'work' directory and copies binaries to the build-${PLATFORM} folder
8593

8694
validate_plugin:
87-
ifndef plugin
88-
$(error "You must specify the 'plugin' variable")
89-
endif
95+
ifndef plugin
96+
$(error "The 'plugin' variable is missing. Usage: make build plugin=<plugin_name> [plugin_version=<version>] [plugin_github_url=<url>]")
97+
endif
98+
99+
# Check if plugin_github_url is provided when plugin_version is specified
100+
validate_version:
101+
ifdef plugin_version
102+
ifndef plugin_github_url
103+
$(error "The 'plugin_github_url' variable is required when 'plugin_version' is specified")
104+
endif
105+
endif
90106

91107
build: prebuild.go
92108
$(MAKE) -C ./fdw clean

generate/generator.go

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
const templateExt = ".tmpl"
1717

18-
func RenderDir(templatePath, root, plugin, pluginGithubUrl, pgVersion string) {
18+
func RenderDir(templatePath, root, plugin, pluginGithubUrl, pluginVersion, pgVersion string) {
1919
var targetFilePath string
2020
err := filepath.Walk(templatePath, func(filePath string, info os.FileInfo, err error) error {
2121
if err != nil {
@@ -64,10 +64,12 @@ func RenderDir(templatePath, root, plugin, pluginGithubUrl, pgVersion string) {
6464
data := struct {
6565
Plugin string
6666
PluginGithubUrl string
67+
PluginVersion string
6768
PgVersion string
6869
}{
6970
plugin,
7071
pluginGithubUrl,
72+
pluginVersion,
7173
pgVersion,
7274
}
7375

@@ -95,25 +97,35 @@ func RenderDir(templatePath, root, plugin, pluginGithubUrl, pgVersion string) {
9597
func main() {
9698
// Check if the correct number of command-line arguments are provided
9799
if len(os.Args) < 4 {
98-
fmt.Println("Usage: go run generator.go <templatePath> <root> <plugin> [pluginGithubUrl]")
100+
fmt.Println("Usage: go run generator.go <templatePath> <root> <plugin> [plugin_version] [pluginGithubUrl]")
99101
return
100102
}
101103

102104
templatePath := os.Args[1]
103105
root := os.Args[2]
104106
plugin := os.Args[3]
107+
var pluginVersion string
105108
var pluginGithubUrl string
106109

107-
fmt.Println(len(os.Args))
110+
// Check if pluginVersion is provided as a command-line argument
111+
if len(os.Args) >= 5 {
112+
pluginVersion = os.Args[4]
113+
}
108114

109115
// Check if PluginGithubUrl is provided as a command-line argument
110-
if len(os.Args) == 5 {
111-
pluginGithubUrl = os.Args[4]
116+
if len(os.Args) >= 6 {
117+
pluginGithubUrl = os.Args[5]
112118
} else {
113119
// If PluginGithubUrl is not provided, generate it based on PluginAlias
114120
pluginGithubUrl = "github.com/turbot/steampipe-plugin-" + plugin
115121
}
116122

123+
// If pluginVersion is provided but pluginGithubUrl is not, error out
124+
if pluginVersion != "" && pluginGithubUrl == "" {
125+
fmt.Println("Error: plugin_github_url is required when plugin_version is specified")
126+
return
127+
}
128+
117129
// Convert relative paths to absolute paths
118130
absTemplatePath, err := filepath.Abs(templatePath)
119131
if err != nil {
@@ -130,7 +142,7 @@ func main() {
130142
// get the postgres version used
131143
pgVersion := getPostgreSQLVersion()
132144

133-
RenderDir(absTemplatePath, absRoot, plugin, pluginGithubUrl, pgVersion)
145+
RenderDir(absTemplatePath, absRoot, plugin, pluginGithubUrl, pluginVersion, pgVersion)
134146
}
135147

136148
func getPostgreSQLVersion() string {

go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ require (
9494
go.uber.org/atomic v1.9.0 // indirect
9595
go.uber.org/multierr v1.9.0 // indirect
9696
golang.org/x/mod v0.19.0 // indirect
97-
golang.org/x/term v0.29.0 // indirect
97+
golang.org/x/term v0.30.0 // indirect
9898
golang.org/x/time v0.5.0 // indirect
9999
golang.org/x/tools v0.23.0 // indirect
100100
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
@@ -194,13 +194,13 @@ require (
194194
go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect
195195
go.opentelemetry.io/otel/trace v1.26.0 // indirect
196196
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
197-
golang.org/x/crypto v0.35.0 // indirect
197+
golang.org/x/crypto v0.36.0 // indirect
198198
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
199-
golang.org/x/net v0.36.0 // indirect
199+
golang.org/x/net v0.38.0 // indirect
200200
golang.org/x/oauth2 v0.21.0 // indirect
201-
golang.org/x/sync v0.11.0 // indirect
202-
golang.org/x/sys v0.30.0 // indirect
203-
golang.org/x/text v0.22.0 // indirect
201+
golang.org/x/sync v0.12.0 // indirect
202+
golang.org/x/sys v0.31.0 // indirect
203+
golang.org/x/text v0.23.0 // indirect
204204
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
205205
google.golang.org/grpc v1.66.0 // indirect
206206
gopkg.in/ini.v1 v1.67.0 // indirect

go.sum

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
764764
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
765765
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
766766
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
767-
golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
768-
golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
767+
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
768+
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
769769
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
770770
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
771771
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -853,8 +853,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
853853
golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
854854
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
855855
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
856-
golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA=
857-
golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I=
856+
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
857+
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
858858
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
859859
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
860860
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -896,8 +896,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ
896896
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
897897
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
898898
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
899-
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
900-
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
899+
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
900+
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
901901
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
902902
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
903903
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -969,13 +969,13 @@ golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBc
969969
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
970970
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
971971
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
972-
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
973-
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
972+
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
973+
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
974974
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
975975
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
976976
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
977-
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
978-
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
977+
golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y=
978+
golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g=
979979
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
980980
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
981981
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -986,8 +986,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
986986
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
987987
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
988988
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
989-
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
990-
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
989+
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
990+
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
991991
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
992992
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
993993
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=

version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
// The main version number that is being run at the moment.
14-
var fdwVersion = "1.12.5"
14+
var fdwVersion = "1.12.7"
1515

1616
// A pre-release marker for the version. If this is "" (empty string)
1717
// then it means that it is a final release. Otherwise, this is a pre-release

0 commit comments

Comments
 (0)