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 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) 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 b468a7986..b3258a547 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; } 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 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?