From 770fd993ecaf2f35ea08fc7ad7a22711417fe3e5 Mon Sep 17 00:00:00 2001 From: Jakob Gillich Date: Tue, 3 Oct 2023 10:47:50 +0200 Subject: [PATCH 1/5] Fix importer returning negative row estimates (#27258) --- app/lib/importer/base_importer.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/lib/importer/base_importer.rb b/app/lib/importer/base_importer.rb index a21557d30..7688426b4 100644 --- a/app/lib/importer/base_importer.rb +++ b/app/lib/importer/base_importer.rb @@ -34,7 +34,9 @@ class Importer::BaseImporter # Estimate the amount of documents that would be indexed. Not exact! # @returns [Integer] def estimate! - ActiveRecord::Base.connection_pool.with_connection { |connection| connection.select_one("SELECT reltuples AS estimate FROM pg_class WHERE relname = '#{index.adapter.target.table_name}'")['estimate'].to_i } + reltuples = ActiveRecord::Base.connection_pool.with_connection { |connection| connection.select_one("SELECT reltuples FROM pg_class WHERE relname = '#{index.adapter.target.table_name}'")['reltuples'].to_i } + # If the table has never yet been vacuumed or analyzed, reltuples contains -1 + [reltuples, 0].max end # Import data from the database into the index From e836d078bba90f2ba70ad385756d98745331ad47 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 10:48:05 +0200 Subject: [PATCH 2/5] Update dependency haml_lint to v0.51.0 (#27250) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0535d4ee4..33dc8cb9b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -324,7 +324,7 @@ GEM ruby-progressbar (~> 1.4) globalid (1.1.0) activesupport (>= 5.0) - haml (6.1.2) + haml (6.2.0) temple (>= 0.8.2) thor tilt @@ -333,8 +333,8 @@ GEM activesupport (>= 5.1) haml (>= 4.0.6) railties (>= 5.1) - haml_lint (0.50.0) - haml (>= 4.0, < 6.2) + haml_lint (0.51.0) + haml (>= 4.0) parallel (~> 1.10) rainbow rubocop (>= 1.0) @@ -747,7 +747,7 @@ GEM climate_control (>= 0.0.3, < 1.0) test-prof (1.2.3) thor (1.2.2) - tilt (2.2.0) + tilt (2.3.0) timeout (0.4.0) tpm-key_attestation (0.12.0) bindata (~> 2.4) @@ -773,7 +773,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.8.2) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) uri (0.12.2) validate_email (0.1.6) activemodel (>= 3.0) From ad637eacd1155c37e78615bdab6deb7c520dba56 Mon Sep 17 00:00:00 2001 From: jsgoldstein Date: Tue, 3 Oct 2023 04:48:32 -0400 Subject: [PATCH 3/5] Add a test case for ES8 (#27248) --- .github/workflows/test-ruby.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-ruby.yml b/.github/workflows/test-ruby.yml index 343dc36ca..0d0215bc0 100644 --- a/.github/workflows/test-ruby.yml +++ b/.github/workflows/test-ruby.yml @@ -282,8 +282,8 @@ jobs: ports: - 6379:6379 - elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:7.17.13 + search: + image: ${{ matrix.search-image }} env: discovery.type: single-node xpack.security.enabled: false @@ -313,6 +313,11 @@ jobs: - '3.0' - '3.1' - '.ruby-version' + search-image: + - docker.elastic.co/elasticsearch/elasticsearch:7.17.13 + include: + - ruby-version: '.ruby-version' + search-image: docker.elastic.co/elasticsearch/elasticsearch:8.10.2 steps: - uses: actions/checkout@v4 From 6320c52630cb0e669f25b860c514b745a0b0bdf8 Mon Sep 17 00:00:00 2001 From: David Aaron <1858430+suddjian@users.noreply.github.com> Date: Tue, 3 Oct 2023 02:48:57 -0700 Subject: [PATCH 4/5] Change min age of backup policy from 1 week to 6 days (#27200) --- app/policies/backup_policy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/policies/backup_policy.rb b/app/policies/backup_policy.rb index 0ef89a8d0..86b8efbe9 100644 --- a/app/policies/backup_policy.rb +++ b/app/policies/backup_policy.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class BackupPolicy < ApplicationPolicy - MIN_AGE = 1.week + MIN_AGE = 6.days def create? user_signed_in? && current_user.backups.where('created_at >= ?', MIN_AGE.ago).count.zero? From 5a437edc7f22d5797e5af29d9b450a03eccec304 Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Tue, 3 Oct 2023 04:52:21 -0500 Subject: [PATCH 5/5] Keep version string displayed without breakpoints in UI (#26986) --- .../mastodon/features/ui/components/link_footer.jsx | 2 +- app/javascript/styles/mastodon/components.scss | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/ui/components/link_footer.jsx b/app/javascript/mastodon/features/ui/components/link_footer.jsx index 7aaa887ac..9585df2ec 100644 --- a/app/javascript/mastodon/features/ui/components/link_footer.jsx +++ b/app/javascript/mastodon/features/ui/components/link_footer.jsx @@ -100,7 +100,7 @@ class LinkFooter extends PureComponent { {DividingCircle} {DividingCircle} - v{version} + v{version}

); diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index aac49a389..2e305ed75 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -9009,6 +9009,10 @@ noscript { color: $dark-text-color; margin-bottom: 20px; + .version { + white-space: nowrap; + } + strong { font-weight: 500; }