postgres-vacuum-monitor 0.12.0 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 051751c519eaf2a606c61100ba6916430f0d6a92d3384cbad4cbfe8613102dfb
4
- data.tar.gz: db7156a7e59e39301473d9484a10a2d8a36ec91e3e137335c33eb5ed60677a72
3
+ metadata.gz: '082c2f8346ce9818ec9d1d1ba966a555c9a0a9704bba9feb8741edeb607c4c07'
4
+ data.tar.gz: 4440a8332d14afbf101a9a60f952c675b0b33d9a05aecea5032dcb9239452312
5
5
  SHA512:
6
- metadata.gz: 7fca74a9c6b9a9a25548cd9d4b88c1488af26fb497cb2e9abed173f237fe96842334f35fb9b94d00f8cefc7e774a4b8affa0cdc2f4232247c55d3b88bb624acc
7
- data.tar.gz: 0fc2ee2b4a0698d77cbc502d4f0c33b59e8c01755d0d64bd59b6f5e2693cbf3b9a25fac41f403db53398e72297b4a679918671c221e3bb52f775b4254c577c75
6
+ metadata.gz: 9995a564229b3ab86783208f918d6fc8e81f549fb6a4a48101badf6d2910c56166de583582ce527683dde9c936b5da731ac4ec5687beb6d7055fe52d958f1383
7
+ data.tar.gz: 2b3b73d7f5958d7f1309cb8b0e0ff1318538b7ac94fc3df8bc1c2d4e9006e70291f45db36f2e39f7151603ab803694fe0ca286a8a7c1dfc6f5fd7b9b056c3990
data/.circleci/config.yml CHANGED
@@ -2,14 +2,14 @@ version: 2.1
2
2
  jobs:
3
3
  lint:
4
4
  docker:
5
- - image: salsify/ruby_ci:2.7.2
5
+ - image: salsify/ruby_ci:2.7.7
6
6
  working_directory: ~/postgres-vacuum-monitor
7
7
  steps:
8
8
  - checkout
9
9
  - restore_cache:
10
10
  keys:
11
- - v1-gems-ruby-2.7.2-{{ checksum "postgres-vacuum-monitor.gemspec" }}-{{ checksum "Gemfile" }}
12
- - v1-gems-ruby-2.7.2-
11
+ - v1-gems-ruby-2.7.7-{{ checksum "postgres-vacuum-monitor.gemspec" }}-{{ checksum "Gemfile" }}
12
+ - v1-gems-ruby-2.7.7-
13
13
  - run:
14
14
  name: Install Gems
15
15
  command: |
@@ -18,7 +18,7 @@ jobs:
18
18
  bundle clean
19
19
  fi
20
20
  - save_cache:
21
- key: v1-gems-ruby-2.7.2-{{ checksum "postgres-vacuum-monitor.gemspec" }}-{{ checksum "Gemfile" }}
21
+ key: v1-gems-ruby-2.7.7-{{ checksum "postgres-vacuum-monitor.gemspec" }}-{{ checksum "Gemfile" }}
22
22
  paths:
23
23
  - "vendor/bundle"
24
24
  - "gemfiles/vendor/bundle"
@@ -31,19 +31,19 @@ jobs:
31
31
  type: string
32
32
  ruby_version:
33
33
  type: string
34
+ postgres_version:
35
+ type: string
34
36
  docker:
35
37
  - image: salsify/ruby_ci:<< parameters.ruby_version >>
38
+ - image: cimg/postgres:<< parameters.postgres_version >>
36
39
  environment:
37
- TEST_DATABASE_URL: postgresql://circleci@localhost/circle_test
38
- - image: circleci/postgres:9.6
39
- environment:
40
- POSTGRES_USER: "ubuntu"
41
- POSTGRES_DB: "postgres_vacuum_monitor_test"
40
+ POSTGRES_USER: "circleci"
41
+ POSTGRES_DB: "circle_test"
42
42
  POSTGRES_HOST_AUTH_METHOD: "trust"
43
43
  environment:
44
+ DB_USER: "circleci"
45
+ ADMIN_DB_NAME: "circle_test"
44
46
  RACK_ENV: "test"
45
- DB_HOST: 'localhost'
46
- DB_USER: 'ubuntu'
47
47
  RAILS_ENV: "test"
48
48
  CIRCLE_TEST_REPORTS: "test-results"
49
49
  BUNDLE_GEMFILE: << parameters.gemfile >>
@@ -71,7 +71,7 @@ jobs:
71
71
  command: dockerize -wait tcp://localhost:5432 -timeout 60s
72
72
  - run:
73
73
  name: Wait for Database User
74
- command: t=30; for i in `seq $t`; do psql -h localhost -p 5432 -U ubuntu -d postgres_vacuum_monitor_test -c '\q' && break; [ $i -eq $t ] && return 2; sleep 1; done;
74
+ command: t=30; for i in `seq $t`; do psql -h localhost -p 5432 -U circleci -d circle_test -c '\q' && break; [ $i -eq $t ] && return 2; sleep 1; done;
75
75
  - run:
76
76
  name: Run Tests
77
77
  command: |
@@ -86,13 +86,14 @@ workflows:
86
86
  matrix:
87
87
  parameters:
88
88
  gemfile:
89
- - "gemfiles/activerecord_5_2.gemfile"
90
89
  - "gemfiles/activerecord_6_0.gemfile"
91
90
  - "gemfiles/activerecord_6_1.gemfile"
91
+ - "gemfiles/activerecord_7_0.gemfile"
92
92
  ruby_version:
93
- - "2.6.6"
94
- - "2.7.2"
95
- - "3.0.0"
96
- exclude:
97
- - gemfile: "gemfiles/activerecord_5_2.gemfile"
98
- ruby_version: "3.0.0"
93
+ - "2.7.7"
94
+ - "3.0.5"
95
+ - "3.1.3"
96
+ - "3.2.0"
97
+ postgres_version:
98
+ - "12.9"
99
+ - "14.7"
@@ -0,0 +1 @@
1
+ * @fgarces @will89
data/.rubocop.yml CHANGED
@@ -2,7 +2,7 @@ inherit_gem:
2
2
  salsify_rubocop: conf/rubocop_rails.yml
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 2.6
5
+ TargetRubyVersion: 2.7
6
6
  Exclude:
7
7
  - 'vendor/**/*'
8
8
  - 'gemfiles/**/*'
data/Appraisals CHANGED
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise 'activerecord_5_2' do
4
- gem 'activerecord', '~> 5.2.0'
5
- end
6
-
7
3
  appraise 'activerecord_6_0' do
8
4
  gem 'activerecord', '~> 6.0.0'
9
5
  end
@@ -11,3 +7,7 @@ end
11
7
  appraise 'activerecord_6_1' do
12
8
  gem 'activerecord', '~> 6.1.0'
13
9
  end
10
+
11
+ appraise 'activerecord_7_0' do
12
+ gem 'activerecord', '~> 7.0.0'
13
+ end
data/CHANGELOG.md CHANGED
@@ -1,15 +1,23 @@
1
1
  # postgres-vacuum-monitor
2
- ## v.12.0
3
- - Add support for ruby 3
2
+
3
+ ## v0.13.1
4
+ - Fix epoch reporting in Postgres 14
5
+
6
+ ## v0.13.0
7
+ - Add support for ruby 3.2 and Rails 7.0
8
+ - Drop support for ruby < 2.7 and Rails < 6.0.
9
+
10
+ ## v0.12.0
11
+ - Add support for ruby 3.0
4
12
  - Drop support for ruby < 2.6
5
13
 
6
- ## v.11.0
14
+ ## v0.11.0
7
15
  - Add support for rails 6.1
8
16
 
9
- ## v.10.1
17
+ ## v0.10.1
10
18
  - Query bug fix.
11
19
 
12
- ## v.10.0
20
+ ## v0.10.0
13
21
  - Add events for connection idle time and state.
14
22
 
15
23
  ## v.0.9.0
@@ -26,7 +34,7 @@
26
34
  - Add `wait_event_type`, `transaction_id` and `min_transaction_id` to `LongTransactions` events.
27
35
 
28
36
  ## v.0.5.0
29
- - Renamed `LongQueries` event to `LongTransactions`.
37
+ - Renamed `LongQueries` event to `LongTransactions`.
30
38
  - Renamed `LongTransactions.query` to `LongTransactions.most_recent_query` and added a
31
39
  transaction `state` attribute.
32
40
 
@@ -38,4 +46,3 @@
38
46
 
39
47
  ## v.0.3.1
40
48
  - Relax pg requirements
41
-
@@ -1,10 +1,7 @@
1
- # frozen_string_literal: true
2
-
3
1
  # This file was generated by Appraisal
4
2
 
5
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
6
4
 
7
- # ActiveRecord is used to connect to DBs
8
- gem 'activerecord', '~> 6.0.0'
5
+ gem "activerecord", "~> 6.0.0"
9
6
 
10
- gemspec path: '../'
7
+ gemspec path: "../"
@@ -1,10 +1,7 @@
1
- # frozen_string_literal: true
2
-
3
1
  # This file was generated by Appraisal
4
2
 
5
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
6
4
 
7
- # ActiveRecord is used to connect to DBs
8
- gem 'activerecord', '~> 6.1.0'
5
+ gem "activerecord", "~> 6.1.0"
9
6
 
10
- gemspec path: '../'
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 7.0.0"
6
+
7
+ gemspec path: "../"
@@ -18,7 +18,7 @@ module Postgres
18
18
  LONG_TRANSACTIONS,
19
19
  database_name: name,
20
20
  start_time: row['xact_start'],
21
- running_time: row['seconds'],
21
+ running_time: row['seconds'].to_i,
22
22
  application_name: row['application_name'],
23
23
  most_recent_query: row['query'],
24
24
  state: row['state'],
@@ -65,9 +65,9 @@ module Postgres
65
65
  reporter_class.report_event(
66
66
  CONNECTION_IDLE_TIME,
67
67
  database_name: name,
68
- max: row['max'],
69
- median: row['median'],
70
- percentile_90: row['percentile_90']
68
+ max: row['max'].to_i,
69
+ median: row['median'].to_i,
70
+ percentile_90: row['percentile_90'].to_i
71
71
  )
72
72
  end
73
73
  end
@@ -3,7 +3,7 @@
3
3
  module Postgres
4
4
  module Vacuum
5
5
  module Monitor
6
- VERSION = '0.12.0'
6
+ VERSION = '0.13.1'
7
7
  end
8
8
  end
9
9
  end
@@ -13,6 +13,14 @@ Gem::Specification.new do |spec|
13
13
  spec.summary = 'Simple stats collector for postgres auto vacuumer.'
14
14
  spec.description = 'Queries ActiveRecord DBs for info regarding auto vacuum processes and long running queries.'
15
15
  spec.homepage = 'https://github.com/salsify/postgres-vacuum-monitor'
16
+ spec.license = 'MIT'
17
+
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
20
+ spec.metadata['rubygems_mfa_required'] = 'true'
21
+ else
22
+ raise 'RubyGems 2.0 or newer is required to set allowed_push_host.'
23
+ end
16
24
 
17
25
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
26
  f.match(%r{^(test|spec|features)/})
@@ -21,7 +29,7 @@ Gem::Specification.new do |spec|
21
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
30
  spec.require_paths = ['lib']
23
31
 
24
- spec.required_ruby_version = '>= 2.6.0'
32
+ spec.required_ruby_version = '>= 2.7'
25
33
 
26
34
  spec.add_development_dependency 'appraisal'
27
35
  spec.add_development_dependency 'bundler'
@@ -30,8 +38,8 @@ Gem::Specification.new do |spec|
30
38
  spec.add_development_dependency 'rake'
31
39
  spec.add_development_dependency 'rspec', '~> 3.2'
32
40
  spec.add_development_dependency 'rspec_junit_formatter'
33
- spec.add_development_dependency 'salsify_rubocop'
41
+ spec.add_development_dependency 'salsify_rubocop', '~> 1.42.1'
34
42
 
35
- spec.add_dependency 'activerecord', '< 6.2.0'
43
+ spec.add_dependency 'activerecord', '>= 6.0', '< 7.1'
36
44
  spec.add_dependency 'pg', '>= 0.18', '< 2.0'
37
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postgres-vacuum-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Garces
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-16 00:00:00.000000000 Z
11
+ date: 2023-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal
@@ -112,30 +112,36 @@ dependencies:
112
112
  name: salsify_rubocop
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: 1.42.1
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: 1.42.1
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: activerecord
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '6.0'
129
132
  - - "<"
130
133
  - !ruby/object:Gem::Version
131
- version: 6.2.0
134
+ version: '7.1'
132
135
  type: :runtime
133
136
  prerelease: false
134
137
  version_requirements: !ruby/object:Gem::Requirement
135
138
  requirements:
139
+ - - ">="
140
+ - !ruby/object:Gem::Version
141
+ version: '6.0'
136
142
  - - "<"
137
143
  - !ruby/object:Gem::Version
138
- version: 6.2.0
144
+ version: '7.1'
139
145
  - !ruby/object:Gem::Dependency
140
146
  name: pg
141
147
  requirement: !ruby/object:Gem::Requirement
@@ -165,6 +171,7 @@ extensions: []
165
171
  extra_rdoc_files: []
166
172
  files:
167
173
  - ".circleci/config.yml"
174
+ - ".github/CODEOWNERS"
168
175
  - ".gitignore"
169
176
  - ".rspec"
170
177
  - ".rubocop.yml"
@@ -177,9 +184,9 @@ files:
177
184
  - Rakefile
178
185
  - bin/console
179
186
  - bin/setup
180
- - gemfiles/activerecord_5_2.gemfile
181
187
  - gemfiles/activerecord_6_0.gemfile
182
188
  - gemfiles/activerecord_6_1.gemfile
189
+ - gemfiles/activerecord_7_0.gemfile
183
190
  - lib/postgres/vacuum/compatibility.rb
184
191
  - lib/postgres/vacuum/configuration.rb
185
192
  - lib/postgres/vacuum/jobs/monitor_job.rb
@@ -188,9 +195,12 @@ files:
188
195
  - lib/postgres/vacuum/monitor/version.rb
189
196
  - postgres-vacuum-monitor.gemspec
190
197
  homepage: https://github.com/salsify/postgres-vacuum-monitor
191
- licenses: []
192
- metadata: {}
193
- post_install_message:
198
+ licenses:
199
+ - MIT
200
+ metadata:
201
+ allowed_push_host: https://rubygems.org
202
+ rubygems_mfa_required: 'true'
203
+ post_install_message:
194
204
  rdoc_options: []
195
205
  require_paths:
196
206
  - lib
@@ -198,15 +208,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
198
208
  requirements:
199
209
  - - ">="
200
210
  - !ruby/object:Gem::Version
201
- version: 2.6.0
211
+ version: '2.7'
202
212
  required_rubygems_version: !ruby/object:Gem::Requirement
203
213
  requirements:
204
214
  - - ">="
205
215
  - !ruby/object:Gem::Version
206
216
  version: '0'
207
217
  requirements: []
208
- rubygems_version: 3.1.4
209
- signing_key:
218
+ rubygems_version: 3.3.26
219
+ signing_key:
210
220
  specification_version: 4
211
221
  summary: Simple stats collector for postgres auto vacuumer.
212
222
  test_files: []
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # This file was generated by Appraisal
4
-
5
- source 'https://rubygems.org'
6
-
7
- # ActiveRecord is used to connect to DBs
8
- gem 'activerecord', '~> 5.2.0'
9
-
10
- gemspec path: '../'