Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Commit 702ca17

Browse files
authored
Merge pull request imas#452 from imas/update/upstream-v4
Update/upstream v4
2 parents 821a702 + a9d4fad commit 702ca17

File tree

1,260 files changed

+43265
-31078
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,260 files changed

+43265
-31078
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"forwardPorts": [3000, 4000],
2121

2222
// Use 'postCreateCommand' to run commands after the container is created.
23-
"postCreateCommand": "bundle install --path vendor/bundle && yarn install && ./bin/rails db:setup",
23+
"postCreateCommand": "bundle install --path vendor/bundle && yarn install && git checkout -- Gemfile.lock && ./bin/rails db:setup",
2424

2525
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
2626
"remoteUser": "vscode"

.devcontainer/docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ services:
2727
ES_ENABLED: 'true'
2828
ES_HOST: es
2929
ES_PORT: '9200'
30+
LIBRE_TRANSLATE_ENDPOINT: http://libretranslate:5000
3031
# Overrides default command so things don't shut down after the process ends.
3132
command: sleep infinity
3233
networks:
@@ -72,6 +73,12 @@ services:
7273
soft: -1
7374
hard: -1
7475

76+
libretranslate:
77+
image: libretranslate/libretranslate:v1.2.9
78+
restart: unless-stopped
79+
networks:
80+
- internal_network
81+
7582
volumes:
7683
postgres-data:
7784
redis-data:

.github/ISSUE_TEMPLATE/1.bug_report.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,26 @@ body:
3131
description: What happened?
3232
validations:
3333
required: true
34+
- type: textarea
35+
attributes:
36+
label: Detailed description
37+
validations:
38+
required: false
3439
- type: textarea
3540
attributes:
3641
label: Specifications
3742
description: |
3843
What version or commit hash of Mastodon did you find this bug in?
3944
4045
If a front-end issue, what browser and operating systems were you using?
46+
placeholder: |
47+
Mastodon 3.5.3 (or Edge)
48+
Ruby 2.7.6 (or v3.1.2)
49+
Node.js 16.18.0
50+
51+
Google Chrome 106.0.5249.119
52+
Firefox 105.0.3
53+
54+
etc...
4155
validations:
4256
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@ blank_issues_enabled: false
22
contact_links:
33
- name: GitHub Discussions
44
url: https://github.com/mastodon/mastodon/discussions
5-
about: Please ask and answer questions here.
6-
- name: Bug Bounty Program
7-
url: https://app.intigriti.com/programs/mastodon/mastodonio/detail
8-
about: Please report security vulnerabilities here.
5+
about: Please ask and answer questions here.

.github/workflows/build-image.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ jobs:
2121
latest=auto
2222
tags: |
2323
type=edge,branch=main
24-
type=match,pattern=v(.*),group=0
24+
type=pep440,pattern={{raw}}
25+
type=pep440,pattern=v{{major}}.{{minor}}
2526
type=ref,event=pr
2627
- uses: docker/build-push-action@v3
2728
with:
2829
context: .
2930
platforms: linux/amd64,linux/arm64
3031
push: ${{ github.event_name != 'pull_request' }}
3132
tags: ${{ steps.meta.outputs.tags }}
32-
cache-from: type=registry,ref=tootsuite/mastodon:latest
33+
cache-from: type=registry,ref=tootsuite/mastodon:edge
3334
cache-to: type=inline

.github/workflows/check-i18n.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
env:
1010
RAILS_ENV: test
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
check-i18n:
1417
runs-on: ubuntu-latest

.github/workflows/linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
node-version: 16.x
5757
cache: yarn
58-
- name: Intall dependencies
58+
- name: Install dependencies
5959
run: yarn install --frozen-lockfile
6060
- name: Set-up RuboCop Problem Mathcher
6161
uses: r7kamura/rubocop-problem-matchers-action@v1

.github/workflows/test-chart.yml

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# This is a GitHub workflow defining a set of jobs with a set of steps.
2+
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
3+
#
4+
name: Test chart
5+
6+
on:
7+
pull_request:
8+
paths:
9+
- "chart/**"
10+
- "!**.md"
11+
- ".github/workflows/test-chart.yml"
12+
push:
13+
paths:
14+
- "chart/**"
15+
- "!**.md"
16+
- ".github/workflows/test-chart.yml"
17+
branches-ignore:
18+
- "dependabot/**"
19+
workflow_dispatch:
20+
21+
permissions:
22+
contents: read
23+
24+
defaults:
25+
run:
26+
working-directory: chart
27+
28+
jobs:
29+
lint-templates:
30+
runs-on: ubuntu-22.04
31+
32+
steps:
33+
- uses: actions/checkout@v3
34+
- uses: actions/setup-python@v4
35+
with:
36+
python-version: "3.x"
37+
38+
- name: Install dependencies (yamllint)
39+
run: pip install yamllint
40+
41+
- run: helm dependency update
42+
43+
- name: helm lint
44+
run: |
45+
helm lint . \
46+
--values dev-values.yaml
47+
48+
- name: helm template
49+
run: |
50+
helm template . \
51+
--values dev-values.yaml \
52+
--output-dir rendered-templates
53+
54+
- name: yamllint (only on templates we manage)
55+
run: |
56+
rm -rf rendered-templates/mastodon/charts
57+
58+
yamllint rendered-templates \
59+
--config-data "{rules: {indentation: {spaces: 2}, line-length: disable}}"
60+
61+
# This job helps us validate that rendered templates are valid k8s resources
62+
# against a k8s api-server, via "helm template --validate", but also that a
63+
# basic configuration can be used to successfully startup mastodon.
64+
#
65+
test-install:
66+
runs-on: ubuntu-22.04
67+
timeout-minutes: 15
68+
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
include:
73+
# k3s-channel reference: https://update.k3s.io/v1-release/channels
74+
- k3s-channel: latest
75+
- k3s-channel: stable
76+
77+
# This represents the oldest configuration we test against.
78+
#
79+
# The k8s version chosen is based on the oldest still supported k8s
80+
# version among two managed k8s services, GKE, EKS.
81+
# - GKE: https://endoflife.date/google-kubernetes-engine
82+
# - EKS: https://endoflife.date/amazon-eks
83+
#
84+
# The helm client's version can influence what helper functions is
85+
# available for use in the templates, currently we need v3.6.0 or
86+
# higher.
87+
#
88+
- k3s-channel: v1.21
89+
helm-version: v3.6.0
90+
91+
steps:
92+
- uses: actions/checkout@v3
93+
94+
# This action starts a k8s cluster with NetworkPolicy enforcement and
95+
# installs both kubectl and helm.
96+
#
97+
# ref: https://github.com/jupyterhub/action-k3s-helm#readme
98+
#
99+
- uses: jupyterhub/action-k3s-helm@v3
100+
with:
101+
k3s-channel: ${{ matrix.k3s-channel }}
102+
helm-version: ${{ matrix.helm-version }}
103+
metrics-enabled: false
104+
traefik-enabled: false
105+
docker-enabled: false
106+
107+
- run: helm dependency update
108+
109+
# Validate rendered helm templates against the k8s api-server
110+
- name: helm template --validate
111+
run: |
112+
helm template --validate mastodon . \
113+
--values dev-values.yaml
114+
115+
- name: helm install
116+
run: |
117+
helm install mastodon . \
118+
--values dev-values.yaml \
119+
--timeout 10m
120+
121+
# This actions provides a report about the state of the k8s cluster,
122+
# providing logs etc on anything that has failed and workloads marked as
123+
# important.
124+
#
125+
# ref: https://github.com/jupyterhub/action-k8s-namespace-report#readme
126+
#
127+
- name: Kubernetes namespace report
128+
uses: jupyterhub/action-k8s-namespace-report@v1
129+
if: always()
130+
with:
131+
important-workloads: >-
132+
deploy/mastodon-sidekiq
133+
deploy/mastodon-streaming
134+
deploy/mastodon-web
135+
job/mastodon-assets-precompile
136+
job/mastodon-chewy-upgrade
137+
job/mastodon-create-admin
138+
job/mastodon-db-migrate

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
/redis
4545
/elasticsearch
4646

47+
# ignore Helm charts
48+
/chart/*.tgz
49+
4750
# ignore Helm dependency charts
4851
/chart/charts/*.tgz
4952

0 commit comments

Comments
 (0)