Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM-12154 pull upstream changes #153

Merged
merged 180 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from 179 commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
9003ac8
Dashboard linting improvements for mixin
rgeyer May 25, 2022
713461d
WIP: Add prelim multi-target support
sysadmind Feb 25, 2022
cc751b7
Add config module
sysadmind Mar 4, 2022
8f8d220
cleanup and README
sysadmind Jun 29, 2022
72430f8
Update cmd/postgres_exporter/main.go
sysadmind Jul 28, 2022
e552a37
Merge pull request #618 from sysadmind/multi-target
SuperQ Jul 29, 2022
a627e7f
fix for exporter issue 633
bravosierrasierra Jul 29, 2022
6e778e7
Merge pull request #666 from bravosierrasierra/bravosierrasierra-patch-2
SuperQ Jul 29, 2022
8855b7a
Fix checkpoint_sync_time value type
n-rodriguez Jul 29, 2022
6bace28
Merge pull request #667 from n-rodriguez/wip/fix_cast
sysadmind Jul 31, 2022
926b865
Bump github.com/prometheus/common from 0.35.0 to 0.37.0
dependabot[bot] Aug 1, 2022
591c019
Merge pull request #670 from prometheus-community/dependabot/go_modul…
SuperQ Aug 2, 2022
adf8fc1
Correct minor typos in README.md
Luckz Aug 10, 2022
e4b3cb5
Release 0.11.1
SuperQ Aug 18, 2022
c84fc4a
Merge pull request #675 from prometheus-community/superq/release-0.11.1
SuperQ Aug 18, 2022
de9d21d
Add dsn type for handling datasources
sysadmind Aug 25, 2022
f72680b
Merge pull request #678 from sysadmind/dsn-logging
sysadmind Aug 25, 2022
d86dd06
Release 0.12.0-rc.0
SuperQ Aug 26, 2022
ce947b1
Merge pull request #679 from prometheus-community/superq/0.12.0
sysadmind Aug 29, 2022
9ae3475
fix: typo
greut Aug 30, 2022
ac9fa13
Merge pull request #680 from greut/patch-1
SuperQ Aug 30, 2022
7ffba68
Update multi-target handler to use new DSN type
sysadmind Sep 2, 2022
69a8024
Add missing license header
sysadmind Sep 2, 2022
cb70292
Merge pull request #684 from sysadmind/probe-dsn
sysadmind Sep 2, 2022
73b0b42
Convert pg_stat_database to new collector model
sysadmind Sep 2, 2022
ad8b560
extended /probe path metrics
preved911 Sep 1, 2022
8268b7e
Bump github.com/lib/pq from 1.10.6 to 1.10.7
dependabot[bot] Oct 1, 2022
6eac432
Merge pull request #695 from prometheus-community/dependabot/go_modul…
sysadmind Oct 4, 2022
6937685
Capture usename and application_name for pg_stat_activity
cezmunsta Aug 15, 2022
d9ac4be
Fixed formatting
cezmunsta Aug 19, 2022
fc2e8f0
Update common Prometheus files
prombot Oct 4, 2022
0adab05
Merge pull request #698 from prometheus-community/repo_sync
SuperQ Oct 4, 2022
14c9d03
4kB size added for postgres with 4kB block_size
ken3122 Oct 8, 2022
20a0133
Merge pull request #699 from ken3122/master
sysadmind Oct 17, 2022
34d3605
Merge pull request #683 from preved911/fix/extend_probe_path_metrics
sysadmind Nov 1, 2022
b10a942
Correct additional typo in README.md
Luckz Nov 6, 2022
02aff21
Merge pull request #672 from Luckz/patch-2
sysadmind Nov 8, 2022
5fcceb4
Set gauge to 1 when collector is successful
roidelapluie Nov 24, 2022
9bd9d83
Merge pull request #724 from roidelapluie/gauge1
sysadmind Nov 27, 2022
c8991de
Update common Prometheus files
prombot Dec 13, 2022
76223cd
probe: clean-up database connection after probe to prevent connection…
kjbass Dec 14, 2022
dc1c19e
Set gauge to 1 when collector is successful
roidelapluie Nov 24, 2022
3b45347
Add postgres 15 for CI test
khiemdoan Dec 27, 2022
045f24f
Add postgres 15 for CI test
khiemdoan Dec 27, 2022
8ff0e5a
New unit value 64kB
Jan 4, 2023
e6ac9ca
Merge branch 'master' of github.com:khiemdoan/postgres_exporter into …
khiemdoan Jan 5, 2023
b92161c
Merge branch 'circleci' of github.com:khiemdoan/postgres_exporter int…
khiemdoan Jan 5, 2023
d23b0b2
Merge pull request #647 from grafana/rgeyer/mixin-dashboard-linting
sysadmind Jan 21, 2023
8b8466f
Merge pull request #740 from revverse/master
sysadmind Jan 21, 2023
ab8f272
Merge pull request #736 from khiemdoan/circleci
sysadmind Jan 22, 2023
169bb0c
Merge pull request #733 from prometheus-community/repo_sync
sysadmind Jan 22, 2023
29cf7eb
Update common Prometheus files
prombot Jan 23, 2023
d4af942
Merge pull request #745 from prometheus-community/repo_sync
SuperQ Jan 24, 2023
fc264d0
Update exporter-toolkit
SuperQ Jan 24, 2023
b1e72a9
go fmt
SuperQ Jan 24, 2023
3007500
adding codified functionality for logical replication metrics
Jan 24, 2023
0e4506e
Merge pull request #746 from prometheus-community/bjk/exporter-toolki…
SuperQ Jan 25, 2023
e198f6f
Bump github.com/prometheus/client_golang from 1.13.0 to 1.14.0
dependabot[bot] Jan 25, 2023
e578176
Merge pull request #730 from prometheus-community/dependabot/go_modul…
SuperQ Jan 25, 2023
61492f6
Bump github.com/prometheus/common from 0.37.0 to 0.39.0
dependabot[bot] Jan 25, 2023
732e74d
Merge pull request #738 from prometheus-community/dependabot/go_modul…
SuperQ Jan 25, 2023
9b13780
addressing comments
Jan 25, 2023
600ad18
more comments
sheldor14 Jan 28, 2023
1ec69c9
fmt
sheldor14 Jan 28, 2023
f3952f9
typing
sheldor14 Jan 28, 2023
076eb2c
fmt
sheldor14 Jan 28, 2023
7259eec
Merge pull request #747 from sheldor14/replication_slot
sysadmind Feb 7, 2023
e589183
send stdout/stderr to syslog
gavrik Feb 7, 2023
94a89b0
Merge pull request #734 from kjbass/master
sysadmind Feb 12, 2023
36773e0
Merge pull request #673 from cezmunsta/pg_stat_activity-enhancements
sysadmind Feb 12, 2023
44aab36
Merge pull request #755 from gavrik/patch-1
sysadmind Feb 12, 2023
9cd4890
Update common Prometheus files
prombot Feb 21, 2023
2197e73
Merge pull request #760 from prometheus-community/repo_sync
sysadmind Mar 5, 2023
799f3e1
Fix exclude-databases for collector package
sysadmind Oct 4, 2022
8d6ce05
Remove commented code
sysadmind Oct 17, 2022
5526386
Remove more dead code
sysadmind Mar 5, 2023
c86f549
Merge pull request #697 from sysadmind/exclude-database-fix
SuperQ Mar 5, 2023
0e654d8
Update build
SuperQ Mar 5, 2023
d273f97
Merge pull request #764 from prometheus-community/superq/update_build
sysadmind Mar 5, 2023
e7f58a4
Reduce cardinality of pg_stat_statements
SuperQ Mar 6, 2023
7e7366c
Update changelog and version for v0.12.0 release
sysadmind Mar 21, 2023
de1c3cc
Update exporter-toolkit
SuperQ Mar 21, 2023
4976a65
Merge pull request #775 from prometheus-community/superq/toolkit
SuperQ Mar 21, 2023
d8617df
Update common Prometheus files
prombot Mar 21, 2023
f9a1edb
Merge pull request #774 from sysadmind/prep-release-v0.12
sysadmind Mar 21, 2023
3fe5d25
Merge pull request #776 from prometheus-community/repo_sync
sysadmind Mar 23, 2023
1e3b177
Fix column type for pg_replication_slots
sysadmind Mar 23, 2023
dde6e6e
Merge pull request #777 from sysadmind/fix-replication-column-type
SuperQ Mar 23, 2023
6e2f8c3
Update versions listed in the README
SuperQ Mar 28, 2023
5f57b78
Merge pull request #781 from prometheus-community/superq/readme_versions
sysadmind Mar 29, 2023
a32ef40
Update README cli flags
sysadmind Mar 30, 2023
ac05e0b
Adjust log level for collector startup
sysadmind Mar 30, 2023
285462b
Merge pull request #784 from sysadmind/log-startup
sysadmind Mar 30, 2023
2391ad1
Merge pull request #783 from sysadmind/update-readme
sysadmind Mar 30, 2023
994e5cc
Merge pull request #765 from prometheus-community/superq/stat_statements
SuperQ Apr 13, 2023
20b1b75
Fix pg_setting different help values
khkhalifa Apr 16, 2023
8b661c9
Merge pull request #771 from khkhalifa/master
sysadmind Apr 23, 2023
0c04fc1
Supports alternate postgres:// prefix in URLs
mothershipper Apr 12, 2023
fb316ad
Merge pull request #787 from mothership/fix/mothershipper/support-alt…
sysadmind Apr 24, 2023
ef2bf61
Bump github.com/lib/pq from 1.10.7 to 1.10.9
dependabot[bot] May 1, 2023
425c493
Refactor collector descriptors
SuperQ Jun 1, 2023
2297ff8
Merge pull request #802 from prometheus-community/superq/descmap
SuperQ Jun 1, 2023
6e671f2
Merge pull request #792 from prometheus-community/dependabot/go_modul…
SuperQ Jun 1, 2023
4da97f7
Bump github.com/prometheus/common from 0.42.0 to 0.44.0
dependabot[bot] Jun 1, 2023
fab8e62
Update linting
SuperQ Jun 3, 2023
214d76f
Merge pull request #805 from prometheus-community/dependabot/go_modul…
SuperQ Jun 3, 2023
1eb4c99
Bump github.com/prometheus/exporter-toolkit from 0.9.1 to 0.10.0
dependabot[bot] Jun 3, 2023
5d5fae1
Merge pull request #807 from prometheus-community/superq/linting
sysadmind Jun 4, 2023
16430fc
Merge pull request #806 from prometheus-community/dependabot/go_modul…
SuperQ Jun 4, 2023
fe960c6
Move queries from queries.yaml to collectors (#801)
Sticksman Jun 8, 2023
4d41f89
Merge pull request #685 from sysadmind/pg-stat-database
sysadmind Jun 12, 2023
fe48601
Fix pg_stat_database collector
sysadmind Jun 12, 2023
3e585c4
Merge pull request #809 from sysadmind/stat_database_refactor
sysadmind Jun 13, 2023
99828de
Fix up collector registration (#812)
SuperQ Jun 13, 2023
3fc8b3a
Update release info for v0.12.1
sysadmind Jun 12, 2023
7dcf1dc
Deprecate extend queries feature (#811)
SuperQ Jun 13, 2023
1fb04e1
Merge pull request #810 from sysadmind/meta-v0.12.1
sysadmind Jun 13, 2023
3dd0aa6
Update common Prometheus files
prombot Jun 18, 2023
afbdb9b
Merge pull request #814 from prometheus-community/repo_sync
SuperQ Jun 19, 2023
c71d395
Deprecate additional database features
SuperQ Jun 19, 2023
5db7cfb
Merge pull request #815 from prometheus-community/superq/deprecate_da…
sysadmind Jun 21, 2023
db08eee
Release v0.13.0
SuperQ Jun 21, 2023
ab33346
Add the instance struct to handle connections
sysadmind Mar 30, 2023
d983d32
Merge pull request #785 from sysadmind/collector-instance
SuperQ Jun 22, 2023
f550f8f
Merge pull request #816 from prometheus-community/superq/0.13.0
SuperQ Jun 22, 2023
b070e45
chore: fix a few typos
Jun 23, 2023
6290786
Merge pull request #820 from atymchuk/fix-a-few-syntax-errors
SuperQ Jun 23, 2023
8d087f2
Bug fix: Make collector not fail on null values (#823)
Sticksman Jun 27, 2023
bf4e4fb
Release 0.13.1 (#824)
SuperQ Jun 27, 2023
6a1bb59
Fixed replication pgReplicationSlotQuery - now it's working correctly…
wwoytenko Jun 27, 2023
1a4e899
Migrate pg_locks to collector package (#817)
SuperQ Jun 27, 2023
030a2a9
Cleanup collectors (#826)
SuperQ Jun 27, 2023
e6ce2ec
Bug Fix: Fix lingering type issues (#828)
Sticksman Jun 27, 2023
dcf498e
Update common Prometheus files (#829)
prombot Jun 27, 2023
d920553
Fix replication collector
tomhughes Jul 3, 2023
d01184f
Merge pull request #854 from tomhughes/replication
sysadmind Jul 3, 2023
099d3dd
Add some more escapes to the query sanitizer
tomhughes Jul 4, 2023
2ca1798
Add a collector to gather metrics on WAL size
tomhughes Jul 4, 2023
cf67a47
Merge pull request #858 from tomhughes/wal
sysadmind Jul 5, 2023
a6012e0
Bump github.com/prometheus/client_golang from 1.15.1 to 1.16.0 (#853)
dependabot[bot] Jul 5, 2023
2477aba
Fix untyped integer overflows on 32-bit archs (#857)
dswarbrick Jul 5, 2023
401711b
Bump github.com/smartystreets/goconvey from 1.8.0 to 1.8.1 (#852)
dependabot[bot] Jul 6, 2023
6b56e2f
Unpack postgres arrays for process idle times correctly (#855)
tomhughes Jul 6, 2023
a8b86cf
Include all idle processes in the process idle metrics
tomhughes Jul 4, 2023
5f917cc
Improve linting (#861)
SuperQ Jul 6, 2023
d776680
Update common Prometheus files (#860)
prombot Jul 6, 2023
c514fca
Update common Prometheus files
prombot Jul 6, 2023
9a9a429
Merge pull request #863 from prometheus-community/repo_sync
sysadmind Jul 6, 2023
4ac5481
Merge pull request #862 from tomhughes/idle-state
sysadmind Jul 6, 2023
4aa8cd4
Gitlab collector: Database wraparound collector and test (#834)
Sticksman Jul 14, 2023
12c12cf
Add a logger to stat_database collector to get better handle on error
Sticksman Jul 19, 2023
c3eec62
Merge pull request #871 from Sticksman/bugfix/add-logger-stat-database
sysadmind Jul 20, 2023
24a45f2
Update changelog for release 0.13.2 (#872)
sysadmind Jul 21, 2023
dc3e813
Gitlab Collector: Autovacuum collector and test (#840)
Sticksman Jul 21, 2023
2d7e152
Gitlab Collector: Wal Receiver Collector and Test (#844)
Sticksman Jul 21, 2023
74800f4
Gitlab collector: Xlog location collector and test (#849)
Sticksman Jul 21, 2023
f9277b0
Handle new pg_stat_statements column names (#874)
SuperQ Jul 25, 2023
716ac23
Fixup new pg_stats_statements query (#876)
SuperQ Jul 25, 2023
04bb60c
Add a multi-target example config (#890)
SuperQ Aug 15, 2023
b74852a
Delay database connection until scrape (#882)
sysadmind Aug 23, 2023
2402783
Bugfix: Make statsreset nullable (#877)
Sticksman Aug 24, 2023
ce74dae
Gitlab Collector: User Index io stats collector and test (#845)
Sticksman Aug 24, 2023
ce4ee05
Update README to reflect changes made in #828 (#894)
Sayrus Aug 24, 2023
5890879
Gitlab Collector: Long running transactions collector and test (#836)
Sticksman Aug 25, 2023
a181fba
Update common Prometheus files (#900)
prombot Sep 3, 2023
68ea167
Fix a connection leak (#902)
albix Sep 6, 2023
dbc7b0b
Fix cross-compilation command in README.md (#903)
divergentdave Sep 8, 2023
0b6d986
fix pg_replication_lag_seconds (#895)
IamLuksha Sep 8, 2023
31ef4ed
stat_user_tables: Add total size metric (#904)
divergentdave Sep 12, 2023
4e521d4
Fix bugs mentioned in #908 (#910)
sysadmind Sep 13, 2023
add5b86
Update common Prometheus files (#913)
prombot Sep 17, 2023
c06e57d
Add changelog for v0.14 (#906)
sysadmind Sep 20, 2023
a3cbe38
PMM-12154 pull upstream changes.
BupycHuk Oct 2, 2023
e5ee252
PMM-12154 pull upstream changes.
BupycHuk Oct 2, 2023
c9ceee9
PMM-12154 Fix go mod.
BupycHuk Oct 2, 2023
67642eb
PMM-12154 Remove some built-in queries, they were moved to collectors.
BupycHuk Oct 3, 2023
47295e8
PMM-12154 compatibility improvements.
BupycHuk Oct 5, 2023
a66513f
PMM-12154 compatibility improvements.
BupycHuk Oct 5, 2023
3e125ad
PMM-12154 performance improvement.
BupycHuk Oct 5, 2023
032b2ea
revert pg_lock_conflicts
BupycHuk Oct 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
version: 2.1

orbs:
prometheus: prometheus/prometheus@0.16.0
prometheus: prometheus/prometheus@0.17.1

executors:
# This must match .promu.yml.
golang:
docker:
- image: cimg/go:1.18
- image: cimg/go:1.20

jobs:
test:
Expand All @@ -22,7 +22,7 @@ jobs:

integration:
docker:
- image: cimg/go:1.18
- image: cimg/go:1.20
- image: << parameters.postgres_image >>
environment:
POSTGRES_DB: circle_test
Expand Down Expand Up @@ -61,6 +61,7 @@ workflows:
- circleci/postgres:12
- circleci/postgres:13
- cimg/postgres:14.1
- cimg/postgres:15.1
- prometheus/build:
name: build
parallelism: 3
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
# This action is synced from https://github.com/prometheus/prometheus
name: golangci-lint
on:
push:
Expand All @@ -16,10 +18,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: install Go
uses: actions/setup-go@v4
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version-file: ${{ github.workspace }}/go.mod

Expand All @@ -28,6 +29,6 @@ jobs:
if: github.repository == 'prometheus/snmp_exporter'

- name: Lint
uses: golangci/golangci-lint-action@v3.6.0
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
version: v1.45.2
version: v1.54.2
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,4 @@
/vendor
/percona_tests/assets/postgres_exporter
/percona_tests/assets/postgres_exporter_percona
/percona_tests/assets/metrics.new.txt
/percona_tests/assets/metrics.old.txt
/percona_tests/assets/metrics.names.new.txt
/percona_tests/assets/metrics.names.old.txt
/percona_tests/assets/metrics.*
15 changes: 14 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
linters:
enable:
- misspell
- revive

issues:
exclude-rules:
- path: _test.go
Expand All @@ -7,4 +12,12 @@ issues:

linters-settings:
errcheck:
exclude: scripts/errcheck_excludes.txt
exclude-functions:
# Never check for logger errors.
- (github.com/go-kit/log.Logger).Log
revive:
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
- name: unused-parameter
severity: warning
disabled: true
2 changes: 1 addition & 1 deletion .promu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
go:
# This must match .circle/config.yml.
version: 1.18
version: 1.20
repository:
path: github.com/prometheus-community/postgres_exporter
build:
Expand Down
7 changes: 1 addition & 6 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,4 @@ rules:
config/testdata/section_key_dup.bad.yml
line-length: disable
truthy:
ignore: |
.github/workflows/codeql-analysis.yml
.github/workflows/funcbench.yml
.github/workflows/fuzzing.yml
.github/workflows/prombench.yml
.github/workflows/golangci-lint.yml
check-keys: false
76 changes: 75 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,78 @@
## master / unreleased
## 0.14.0 / 2023-09-11

* [CHANGE] Add `state` label to pg_process_idle_seconds #862
* [CHANGE] Change database connections to one per scrape #882 #902
* [ENHANCEMENT] Add wal collector #858
* [ENHANCEMENT] Add database_wraparound collector #834
* [ENHANCEMENT] Add stat_activity_autovacuum collector #840
* [ENHANCEMENT] Add stat_wal_receiver collector #844
* [ENHANCEMENT] Add xlog_location collector #849
* [ENHANCEMENT] Add statio_user_indexes collector #845
* [ENHANCEMENT] Add long_running_transactions collector #836
* [ENHANCEMENT] Add pg_stat_user_tables_size_bytes metric #904
* [BUGFIX] Fix tests on 32-bit systems #857
* [BUGFIX] Fix pg_stat_statements metrics on Postgres 13+ #874 #876
* [BUGFIX] Fix pg_stat_database metrics for NULL stats_reset #877
* [BUGFIX] Fix pg_replication_lag_seconds on Postgres 10+ when master is idle #895

## 0.13.2 / 2023-07-21

* [BUGFIX] Fix type issues on pg_postmaster metrics #828
* [BUGFIX] Fix pg_replication collector instantiation #854
* [BUGFIX] Fix pg_process_idle metrics #855

## 0.13.1 / 2023-06-27

* [BUGFIX] Make collectors not fail on null values #823

## 0.13.0 / 2023-06-21

BREAKING CHANGES:

Please note, the following features are deprecated and may be removed in a future release:
- `auto-discover-databases`
- `extend.query-path`
- `constantLabels`
- `exclude-databases`
- `include-databases`

This exporter is meant to monitor PostgresSQL servers, not the user data/databases. If
you need a generic SQL report exporter https://github.com/burningalchemist/sql_exporter
is recommended.

* [CHANGE] Adjust log level for collector startup #784
* [CHANGE] Move queries from queries.yaml to collectors #801
* [CHANGE] Deprecate extend queries feature #811
* [CHANGE] Deprecate additional database features #815
* [CHANGE] Convert pg_stat_database to new collector #685
* [ENHANCEMENT] Supports alternate postgres:// prefix in URLs #787
* [BUGFIX] Fix pg_setting different help values #771
* [BUGFIX] Fix column type for pg_replication_slots #777
* [BUGFIX] Fix pg_stat_database collector #809

## 0.12.1 / 2023-06-12
* [BUGFIX] Fix column type for pg_replication_slots #777

## 0.12.0 / 2023-03-21

BREAKING CHANGES:

This release changes support for multiple postgres servers to use the
multi-target exporter pattern. This makes it much easier to monitor multiple
PostgreSQL servers from a single exporter by passing the target via URL
params. See the Multi-Target Support section of the README.

* [CHANGE] Add multi-target support #618
* [CHANGE] Add usename and application_name to pg_stat_activity metrics #673
* [FEATURE] Add replication metrics from pg_replication_slots #747
* [BUGFIX] Add dsn type for handling datasources #678
* [BUGFIX] Add 64kB unit for postgres 15 #740
* [BUGFIX] Add 4kB unit for postgres compiled with small blocks #699

## 0.11.1 / 2022-08-01

* [BUGFIX] Fix checkpoint_write_time value type #666
* [BUGFIX] Fix checkpoint_sync_time value type #667

## 0.11.1 / 2022-08-01

Expand Down
22 changes: 12 additions & 10 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ endif
GOTEST := $(GO) test
GOTEST_DIR :=
ifneq ($(CIRCLE_JOB),)
ifneq ($(shell which gotestsum),)
ifneq ($(shell command -v gotestsum > /dev/null),)
GOTEST_DIR := test-results
GOTEST := gotestsum --junitfile $(GOTEST_DIR)/unit-tests.xml --
endif
endif

PROMU_VERSION ?= 0.13.0
PROMU_VERSION ?= 0.15.0
PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz

SKIP_GOLANGCI_LINT ?= $(CI)
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_VERSION ?= v1.45.2
GOLANGCI_LINT_VERSION ?= v1.54.2
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
# windows isn't included here because of the path separator being different.
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
Expand Down Expand Up @@ -91,6 +91,8 @@ BUILD_DOCKER_ARCHS = $(addprefix common-docker-,$(DOCKER_ARCHS))
PUBLISH_DOCKER_ARCHS = $(addprefix common-docker-publish-,$(DOCKER_ARCHS))
TAG_DOCKER_ARCHS = $(addprefix common-docker-tag-latest-,$(DOCKER_ARCHS))

SANITIZED_DOCKER_IMAGE_TAG := $(subst +,-,$(DOCKER_IMAGE_TAG))

ifeq ($(GOHOSTARCH),amd64)
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux freebsd darwin windows))
# Only supported on amd64
Expand Down Expand Up @@ -165,7 +167,7 @@ endif
.PHONY: common-yamllint
common-yamllint:
@echo ">> running yamllint on all YAML files in the repository"
ifeq (, $(shell which yamllint))
ifeq (, $(shell command -v yamllint > /dev/null))
@echo "yamllint not installed so skipping"
else
yamllint .
Expand Down Expand Up @@ -194,7 +196,7 @@ common-tarball: promu
.PHONY: common-docker $(BUILD_DOCKER_ARCHS)
common-docker: $(BUILD_DOCKER_ARCHS)
$(BUILD_DOCKER_ARCHS): common-docker-%:
docker build -t "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" \
docker build -t "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" \
-f $(DOCKERFILE_PATH) \
--build-arg ARCH="$*" \
--build-arg OS="linux" \
Expand All @@ -203,19 +205,19 @@ $(BUILD_DOCKER_ARCHS): common-docker-%:
.PHONY: common-docker-publish $(PUBLISH_DOCKER_ARCHS)
common-docker-publish: $(PUBLISH_DOCKER_ARCHS)
$(PUBLISH_DOCKER_ARCHS): common-docker-publish-%:
docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)"
docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)"

DOCKER_MAJOR_VERSION_TAG = $(firstword $(subst ., ,$(shell cat VERSION)))
.PHONY: common-docker-tag-latest $(TAG_DOCKER_ARCHS)
common-docker-tag-latest: $(TAG_DOCKER_ARCHS)
$(TAG_DOCKER_ARCHS): common-docker-tag-latest-%:
docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest"
docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)"
docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest"
docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)"

.PHONY: common-docker-manifest
common-docker-manifest:
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" $(foreach ARCH,$(DOCKER_ARCHS),$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$(ARCH):$(DOCKER_IMAGE_TAG))
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)"
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)" $(foreach ARCH,$(DOCKER_ARCHS),$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$(ARCH):$(SANITIZED_DOCKER_IMAGE_TAG))
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)"

.PHONY: promu
promu: $(PROMU)
Expand Down
Loading