Skip to content

Commit

Permalink
Merge branch 'mastodon:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
DismalShadowX authored Jun 15, 2024
2 parents 971a005 + a777f7e commit a577b04
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 39 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test-migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ jobs:
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-interval 10ms
--health-timeout 3s
--health-retries 50
ports:
- 5432:5432

redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-interval 10ms
--health-timeout 3s
--health-retries 50
ports:
- 6379:6379

Expand Down
60 changes: 30 additions & 30 deletions .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ jobs:
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-interval 10ms
--health-timeout 3s
--health-retries 50
ports:
- 5432:5432

redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-interval 10ms
--health-timeout 3s
--health-retries 50
ports:
- 6379:6379

Expand Down Expand Up @@ -159,19 +159,19 @@ jobs:
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-interval 10ms
--health-timeout 3s
--health-retries 50
ports:
- 5432:5432

redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-interval 10ms
--health-timeout 3s
--health-retries 50
ports:
- 6379:6379

Expand Down Expand Up @@ -246,19 +246,19 @@ jobs:
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-interval 10ms
--health-timeout 3s
--health-retries 50
ports:
- 5432:5432

redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-interval 10ms
--health-timeout 3s
--health-retries 50
ports:
- 6379:6379

Expand Down Expand Up @@ -331,19 +331,19 @@ jobs:
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-interval 10ms
--health-timeout 3s
--health-retries 50
ports:
- 5432:5432

redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-interval 10ms
--health-timeout 3s
--health-retries 50
ports:
- 6379:6379

Expand All @@ -354,9 +354,9 @@ jobs:
xpack.security.enabled: false
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
--health-interval 2s
--health-timeout 3s
--health-retries 50
ports:
- 9200:9200

Expand All @@ -368,9 +368,9 @@ jobs:
DISABLE_SECURITY_PLUGIN: true
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
--health-interval 2s
--health-timeout 3s
--health-retries 50
ports:
- 9200:9200

Expand Down
34 changes: 31 additions & 3 deletions app/lib/admin/metrics/dimension/software_versions_dimension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def key
protected

def perform_query
[mastodon_version, ruby_version, postgresql_version, redis_version, elasticsearch_version, libvips_version].compact
[mastodon_version, ruby_version, postgresql_version, redis_version, elasticsearch_version, libvips_version, imagemagick_version, ffmpeg_version].compact
end

def mastodon_version
Expand All @@ -28,8 +28,8 @@ def ruby_version
{
key: 'ruby',
human_key: 'Ruby',
value: "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}",
human_value: RUBY_DESCRIPTION,
value: RUBY_DESCRIPTION,
human_value: "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}",
}
end

Expand Down Expand Up @@ -82,6 +82,34 @@ def libvips_version
}
end

def imagemagick_version
return if Rails.configuration.x.use_vips

version = `convert -version`.match(/Version: ImageMagick ([\d\.]+)/)[1]

{
key: 'imagemagick',
human_key: 'ImageMagick',
value: version,
human_value: version,
}
rescue Errno::ENOENT
nil
end

def ffmpeg_version
version = `ffmpeg -version`.match(/ffmpeg version ([\d\.]+)/)[1]

{
key: 'ffmpeg',
human_key: 'FFmpeg',
value: version,
human_value: version,
}
rescue Errno::ENOENT
nil
end

def redis_info
@redis_info ||= if redis.is_a?(Redis::Namespace)
redis.redis.info
Expand Down

0 comments on commit a577b04

Please sign in to comment.