Skip to content

Commit 984e054

Browse files
authored
Merge pull request #53 from flowbi/merge/upstream-sync-2026-02-27
Sync with upstream sosedoff/pgweb up to v0.17.0
2 parents 1e163fb + 7af8ca3 commit 984e054

26 files changed

+401
-183
lines changed

.github/workflows/checks.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
- "**.md"
1515

1616
env:
17-
GO_VERSION: "1.22"
17+
GO_VERSION: "1.25"
1818

1919
concurrency:
2020
group: ${{ github.workflow }}-${{ github.ref }}
@@ -49,7 +49,7 @@ jobs:
4949
sudo rm -f /etc/apt/sources.list.d/pgdg.list
5050
curl --silent https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add
5151
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
52-
sudo apt-get update && sudo apt-get install -y postgresql-client-17
52+
sudo apt-get update && sudo apt-get install -y postgresql-client-18
5353
5454
- uses: actions/checkout@v4
5555
with:
@@ -98,9 +98,9 @@ jobs:
9898
fetch-depth: 0
9999

100100
- name: golangci-lint
101-
uses: golangci/golangci-lint-action@v6
101+
uses: golangci/golangci-lint-action@v8
102102
with:
103-
version: v1.57.1
103+
version: v2.7.2
104104

105105
fmt:
106106
name: fmt

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- "v*"
77

88
env:
9-
GO_VERSION: "1.22"
9+
GO_VERSION: "1.25"
1010
CGO_ENABLED: 0
1111
DOCKER_REPOSITORY: flowbi/pgweb
1212
GHCR_REPOSITORY: flowbi/pgweb

.golangci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: "2"
2+
linters:
3+
disable:
4+
- errcheck
5+
settings:
6+
staticcheck:
7+
checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-ST1005", "-QF1004"]

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,18 @@ Current [release](https://github.com/flowbi/pgweb/releases) is `0.16.19`.
102102
- `FIX` Fix typos in documentation and code
103103
- `FIX` Add execution time display for empty queries
104104

105+
## Upstream 0.17.0 - 2025-11-22
106+
107+
- `NEW` Add PGWEB_BOOKMARKS_DIR environment variable to configure bookmarks directory
108+
- `NEW` Update Dockerfile to use Golang 1.24 image, GH-821
109+
- `NEW` Bump go crypto package to 0.44.x, GH-820, GH-823
110+
- `NEW` Add PostgreSQL 18 support to Github Actions, GH-816
111+
- `NEW` Connect backend refactor, GH-801
112+
- `NEW` Add server settings view, GH-768
113+
- `NEW` Add exec time of empty queries, GH-763
114+
- `FIX` Minor typos, GH-764, GH-786
115+
- `FIX` Shorten git revision printed in the --version output, GH-770
116+
105117
## 0.16.2 - 2024-11-02
106118

107119
- `FIX` Build a new Docker image with PostgreSQL 17 support

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# ------------------------------------------------------------------------------
22
# Builder Stage
33
# ------------------------------------------------------------------------------
4-
FROM golang:1.22-bullseye AS build
4+
FROM golang:1.25-trixie AS build
55

66
# Set default build argument for CGO_ENABLED
77
ARG CGO_ENABLED=0
8-
ENV CGO_ENABLED ${CGO_ENABLED}
8+
ENV CGO_ENABLED=${CGO_ENABLED}
99

1010
WORKDIR /build
1111

@@ -21,7 +21,7 @@ RUN make build
2121
# ------------------------------------------------------------------------------
2222
# Fetch signing key
2323
# ------------------------------------------------------------------------------
24-
FROM debian:bullseye-slim AS keyring
24+
FROM debian:trixie-slim AS keyring
2525
ADD https://www.postgresql.org/media/keys/ACCC4CF8.asc keyring.asc
2626
RUN apt-get update && \
2727
apt-get install -qq --no-install-recommends gpg
@@ -30,14 +30,14 @@ RUN gpg -o keyring.pgp --dearmor keyring.asc
3030
# ------------------------------------------------------------------------------
3131
# Release Stage
3232
# ------------------------------------------------------------------------------
33-
FROM debian:bullseye-slim
33+
FROM debian:trixie-slim
3434

3535
ARG keyring=/usr/share/keyrings/postgresql-archive-keyring.pgp
3636
COPY --from=keyring /keyring.pgp $keyring
3737
RUN . /etc/os-release && \
3838
echo "deb [signed-by=${keyring}] http://apt.postgresql.org/pub/repos/apt/ ${VERSION_CODENAME}-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
3939
apt-get update && \
40-
apt-get install -qq --no-install-recommends ca-certificates openssl netcat curl postgresql-client
40+
apt-get install -qq --no-install-recommends ca-certificates openssl netcat-openbsd curl postgresql-client
4141

4242
COPY --from=build /build/pgweb /usr/bin/pgweb
4343

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,39 @@ all supported PostgreSQL version with a single command:
114114
make test-all
115115
```
116116

117+
## CI/CD
118+
119+
### PR Checks (`checks.yml`)
120+
121+
On every pull request, the following checks run automatically:
122+
123+
- **tests** — Go tests against PostgreSQL 16 on Ubuntu
124+
- **tests-windows** — Go tests on Windows (push to main only, skipped on PRs)
125+
- **lint** — golangci-lint v1.57.1
126+
- **fmt** — Go formatting check
127+
128+
### Release Process (`release.yml`)
129+
130+
Releases are triggered by pushing a version tag. The workflow builds and publishes Docker images to both Docker Hub and GitHub Container Registry.
131+
132+
```bash
133+
# 1. Merge PR into main
134+
gh pr merge <pr-number> --repo flowbi/pgweb --merge
135+
136+
# 2. Pull latest main
137+
git checkout main && git pull origin main
138+
139+
# 3. Tag the release (match version in CHANGELOG.md)
140+
git tag v0.x.x
141+
142+
# 4. Push the tag — this triggers the release workflow
143+
git push origin v0.x.x
144+
```
145+
146+
The release workflow builds multi-platform images (`linux/amd64`, `linux/arm64`, `linux/arm/v7`) and pushes to:
147+
- `flowbi/pgweb:<version>` + `flowbi/pgweb:latest` on Docker Hub
148+
- `ghcr.io/flowbi/pgweb:<version>` + `ghcr.io/flowbi/pgweb:latest` on GHCR
149+
117150
## Contribute
118151

119152
- Fork this repository

data/bookmark_with_ssh.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
host = "localhost"
2+
port = 5432
3+
user = "postgres"
4+
database = "mydatabase"
5+
ssl = "disable"
6+
7+
[SSH]
8+
host = "ssh-host"
9+
user = "ssh-user"
10+
password = "ssh-password"
11+
key = "/path/to/key-file"
12+
keypassword = "key-file-password"

docker-compose-pg.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
---
2-
version: "3.9"
3-
42
x-base: &base
53
environment: &env
64
POSTGRES_DB: pgweb
@@ -11,6 +9,16 @@ x-base: &base
119
interval: 5s
1210

1311
services:
12+
postgres18:
13+
<<: *base
14+
image: postgres:18
15+
ports:
16+
- 5433:5432
17+
postgres17:
18+
<<: *base
19+
image: postgres:17
20+
ports:
21+
- 5433:5432
1422
postgres16:
1523
<<: *base
1624
image: postgres:16

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
---
2-
version: "3.9"
3-
42
services:
53
postgres:
64
container_name: pgweb-postgres

go.mod

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,69 @@
11
module github.com/flowbi/pgweb
22

3-
go 1.22
3+
go 1.25
4+
5+
toolchain go1.25.4
46

57
require (
68
github.com/BurntSushi/toml v1.1.0
79
github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5
8-
github.com/gin-gonic/gin v1.9.1
10+
github.com/gin-gonic/gin v1.11.0
911
github.com/jackc/pgpassfile v1.0.0
1012
github.com/jessevdk/go-flags v1.5.0
1113
github.com/jmoiron/sqlx v1.3.5
1214
github.com/lib/pq v1.10.5
1315
github.com/mitchellh/go-homedir v1.1.0
1416
github.com/mr-tron/base58 v1.2.0
15-
github.com/prometheus/client_golang v1.14.0
16-
github.com/sirupsen/logrus v1.9.0
17-
github.com/stretchr/testify v1.8.3
17+
github.com/prometheus/client_golang v1.19.1
18+
github.com/sirupsen/logrus v1.9.1
19+
github.com/stretchr/testify v1.11.1
1820
github.com/tuvistavie/securerandom v0.0.0-20140719024926-15512123a948
19-
golang.org/x/crypto v0.9.0
21+
golang.org/x/crypto v0.46.0
2022
)
2123

2224
require (
2325
github.com/beorn7/perks v1.0.1 // indirect
24-
github.com/bytedance/sonic v1.9.1 // indirect
26+
github.com/bytedance/gopkg v0.1.3 // indirect
27+
github.com/bytedance/sonic v1.14.2 // indirect
28+
github.com/bytedance/sonic/loader v0.4.0 // indirect
2529
github.com/cespare/xxhash/v2 v2.2.0 // indirect
2630
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
31+
github.com/cloudwego/base64x v0.1.6 // indirect
2732
github.com/davecgh/go-spew v1.1.1 // indirect
2833
github.com/dchest/bcrypt_pbkdf v0.0.0-20150205184540-83f37f9c154a // indirect
29-
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
30-
github.com/gin-contrib/sse v0.1.0 // indirect
34+
github.com/gabriel-vasile/mimetype v1.4.12 // indirect
35+
github.com/gin-contrib/sse v1.1.0 // indirect
3136
github.com/go-playground/locales v0.14.1 // indirect
3237
github.com/go-playground/universal-translator v0.18.1 // indirect
33-
github.com/go-playground/validator/v10 v10.14.0 // indirect
34-
github.com/goccy/go-json v0.10.2 // indirect
35-
github.com/golang/protobuf v1.5.2 // indirect
38+
github.com/go-playground/validator/v10 v10.30.1 // indirect
39+
github.com/goccy/go-json v0.10.5 // indirect
40+
github.com/goccy/go-yaml v1.19.1 // indirect
41+
github.com/golang/protobuf v1.5.3 // indirect
3642
github.com/json-iterator/go v1.1.12 // indirect
37-
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
43+
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
3844
github.com/kr/pretty v0.3.1 // indirect
39-
github.com/leodido/go-urn v1.2.4 // indirect
40-
github.com/mattn/go-isatty v0.0.19 // indirect
45+
github.com/leodido/go-urn v1.4.0 // indirect
46+
github.com/mattn/go-isatty v0.0.20 // indirect
4147
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
4248
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4349
github.com/modern-go/reflect2 v1.0.2 // indirect
44-
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
50+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
4551
github.com/pmezard/go-difflib v1.0.0 // indirect
46-
github.com/prometheus/client_model v0.3.0 // indirect
47-
github.com/prometheus/common v0.39.0 // indirect
48-
github.com/prometheus/procfs v0.8.0 // indirect
52+
github.com/prometheus/client_model v0.5.0 // indirect
53+
github.com/prometheus/common v0.48.0 // indirect
54+
github.com/prometheus/procfs v0.12.0 // indirect
55+
github.com/quic-go/qpack v0.6.0 // indirect
56+
github.com/quic-go/quic-go v0.58.0 // indirect
4957
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
50-
github.com/ugorji/go/codec v1.2.11 // indirect
51-
golang.org/x/arch v0.3.0 // indirect
52-
golang.org/x/net v0.10.0 // indirect
53-
golang.org/x/sys v0.8.0 // indirect
54-
golang.org/x/text v0.9.0 // indirect
55-
google.golang.org/protobuf v1.30.0 // indirect
58+
github.com/ugorji/go/codec v1.3.1 // indirect
59+
go.uber.org/mock v0.6.0 // indirect
60+
golang.org/x/arch v0.23.0 // indirect
61+
golang.org/x/mod v0.31.0 // indirect
62+
golang.org/x/net v0.48.0 // indirect
63+
golang.org/x/sync v0.19.0 // indirect
64+
golang.org/x/sys v0.39.0 // indirect
65+
golang.org/x/text v0.32.0 // indirect
66+
golang.org/x/tools v0.40.0 // indirect
67+
google.golang.org/protobuf v1.36.11 // indirect
5668
gopkg.in/yaml.v3 v3.0.1 // indirect
5769
)

0 commit comments

Comments
 (0)