Skip to content

Commit

Permalink
Merge pull request misskey-dev#12564 from misskey-dev/develop
Browse files Browse the repository at this point in the history
Release: 2023.12.0
  • Loading branch information
syuilo committed Dec 23, 2023
2 parents 9784d10 + 471c8ec commit 0b5228f
Show file tree
Hide file tree
Showing 707 changed files with 50,837 additions and 13,141 deletions.
29 changes: 18 additions & 11 deletions .config/docker_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ dbReplications: false
# You can configure any number of replicas here
#dbSlaves:
# -
# host:
# port:
# db:
# user:
# pass:
# host:
# port:
# db:
# user:
# pass:
# -
# host:
# port:
# db:
# user:
# pass:
# host:
# port:
# db:
# user:
# pass:

# ┌─────────────────────┐
#───┘ Redis configuration └─────────────────────────────────────
Expand Down Expand Up @@ -106,12 +106,16 @@ redis:
# ┌───────────────────────────┐
#───┘ MeiliSearch configuration └─────────────────────────────

# You can set scope to local (default value) or global
# (include notes from remote).

#meilisearch:
# host: meilisearch
# port: 7700
# apiKey: ''
# ssl: true
# index: ''
# scope: local

# ┌───────────────┐
#───┘ ID generation └───────────────────────────────────────────
Expand Down Expand Up @@ -147,7 +151,7 @@ id: 'aidx'

# Job rate limiter
# deliverJobPerSec: 128
# inboxJobPerSec: 16
# inboxJobPerSec: 32

# Job attempts
# deliverJobMaxAttempts: 12
Expand Down Expand Up @@ -180,6 +184,9 @@ proxyRemoteFiles: true
# Sign to ActivityPub GET request (default: true)
signToActivityPubGet: true

# For security reasons, uploading attachments from the intranet is prohibited,
# but exceptions can be made from the following settings. Default value is "undefined".
# Read changelog to learn more (Improvements of 12.90.0 (2021/09/04)).
#allowedPrivateNetworks: [
# '127.0.0.1/32'
#]
Expand Down
8 changes: 7 additions & 1 deletion .config/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ redis:
# ┌───────────────────────────┐
#───┘ MeiliSearch configuration └─────────────────────────────

# You can set scope to local (default value) or global
# (include notes from remote).

#meilisearch:
# host: localhost
# port: 7700
Expand Down Expand Up @@ -163,7 +166,7 @@ id: 'aidx'

# Job rate limiter
#deliverJobPerSec: 128
#inboxJobPerSec: 16
#inboxJobPerSec: 32
#relashionshipJobPerSec: 64

# Job attempts
Expand Down Expand Up @@ -210,6 +213,9 @@ proxyRemoteFiles: true
# Sign to ActivityPub GET request (default: true)
signToActivityPubGet: true

# For security reasons, uploading attachments from the intranet is prohibited,
# but exceptions can be made from the following settings. Default value is "undefined".
# Read changelog to learn more (Improvements of 12.90.0 (2021/09/04)).
#allowedPrivateNetworks: [
# '127.0.0.1/32'
#]
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"version": "8.9.2"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "20.5.1"
"version": "20.10.0"
}
},
"forwardPorts": [3000],
Expand Down
22 changes: 11 additions & 11 deletions .devcontainer/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ dbReplications: false
# You can configure any number of replicas here
#dbSlaves:
# -
# host:
# port:
# db:
# user:
# pass:
# host:
# port:
# db:
# user:
# pass:
# -
# host:
# port:
# db:
# user:
# pass:
# host:
# port:
# db:
# user:
# pass:

# ┌─────────────────────┐
#───┘ Redis configuration └─────────────────────────────────────
Expand Down Expand Up @@ -147,7 +147,7 @@ id: 'aidx'

# Job rate limiter
# deliverJobPerSec: 128
# inboxJobPerSec: 16
# inboxJobPerSec: 32

# Job attempts
# deliverJobMaxAttempts: 12
Expand Down
29 changes: 21 additions & 8 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
'packages/backend':
- packages/backend/**/*
- any:
- changed-files:
- any-glob-to-any-file: ['packages/backend/**/*']

'packages/backend:test':
- packages/backend/test/**/*
- any:
- changed-files:
- any-glob-to-any-file: ['packages/backend/test/**/*']

'packages/frontend':
- packages/frontend/**/*
- any:
- changed-files:
- any-glob-to-any-file: ['packages/frontend/**/*']

'packages/frontend:test':
- cypress/**/*
- any:
- changed-files:
- any-glob-to-any-file: ['cypress/**/*']

'packages/sw':
- packages/sw/**/*
- any:
- changed-files:
- any-glob-to-any-file: ['packages/sw/**/*']

'packages/misskey-js':
- packages/misskey-js/**/*
- any:
- changed-files:
- any-glob-to-any-file: ['packages/misskey-js/**/*']

'packages/misskey-js:test':
- packages/misskey-js/test/**/*
- packages/misskey-js/test-d/**/*
- any:
- changed-files:
- any-glob-to-any-file: ['packages/misskey-js/test/**/*', 'packages/misskey-js/test-d/**/*']
2 changes: 1 addition & 1 deletion .github/workflows/api-misskey-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4.0.0
uses: actions/setup-node@v4.0.1
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
sudo dpkg -i dockle.deb
- run: |
cp .config/docker_example.env .config/docker.env
cp ./docker-compose.yml.example ./docker-compose.yml
cp ./docker-compose_example.yml ./docker-compose.yml
- run: |
docker compose up -d web
docker tag "$(docker compose images web | awk 'OFS=":" {print $4}' | tail -n +2)" misskey-web:latest
Expand Down
153 changes: 20 additions & 133 deletions .github/workflows/get-api-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,127 +6,38 @@ on:
branches:
- master
- develop
paths:
- packages/backend/**
- .github/workflows/get-api-diff.yml

jobs:
get-base:
get-from-misskey:
runs-on: ubuntu-latest
permissions:
contents: read

strategy:
matrix:
node-version: [20.5.1]

services:
db:
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_DB: misskey
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_USER: example-misskey-user
POSTGRESS_PASS: example-misskey-pass
redis:
image: redis:7
ports:
- 6379:6379

steps:
- uses: actions/checkout@v4.1.1
with:
repository: ${{ github.event.pull_request.base.repo.full_name }}
ref: ${{ github.base_ref }}
submodules: true
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: corepack enable
- run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
run: git diff --exit-code pnpm-lock.yaml
- name: Copy Configure
run: cp .config/example.yml .config/default.yml
- name: Build
run: pnpm build
- name : Migrate
run: pnpm migrate
- name: Launch misskey
run: |
screen -S misskey -dm pnpm run dev
sleep 30s
- name: Wait for Misskey to be ready
run: |
MAX_RETRIES=12
RETRY_DELAY=5
count=0
until $(curl --output /dev/null --silent --head --fail http://localhost:3000) || [[ $count -eq $MAX_RETRIES ]]; do
printf '.'
sleep $RETRY_DELAY
count=$((count + 1))
done
if [[ $count -eq $MAX_RETRIES ]]; then
echo "Failed to connect to Misskey after $MAX_RETRIES attempts."
exit 1
fi
- id: fetch
name: Get api.json from Misskey
run: |
RESULT=$(curl --retry 5 --retry-delay 5 --retry-max-time 60 http://localhost:3000/api.json)
echo $RESULT > api-base.json
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: api-artifact
path: api-base.json
- name: Kill Misskey Job
run: screen -S misskey -X quit

get-head:
runs-on: ubuntu-latest
permissions:
contents: read

strategy:
matrix:
node-version: [20.5.1]

services:
db:
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_DB: misskey
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_USER: example-misskey-user
POSTGRESS_PASS: example-misskey-pass
redis:
image: redis:7
ports:
- 6379:6379
node-version: [20.10.0]
api-json-name: [api-base.json, api-head.json]
include:
- api-json-name: api-base.json
ref: ${{ github.base_ref }}
- api-json-name: api-head.json
ref: refs/pull/${{ github.event.number }}/merge

steps:
- uses: actions/checkout@v4.1.1
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
ref: ${{ matrix.ref }}
submodules: true
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.0
uses: actions/setup-node@v4.0.1
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand All @@ -138,39 +49,15 @@ jobs:
run: cp .config/example.yml .config/default.yml
- name: Build
run: pnpm build
- name : Migrate
run: pnpm migrate
- name: Launch misskey
run: |
screen -S misskey -dm pnpm run dev
sleep 30s
- name: Wait for Misskey to be ready
run: |
MAX_RETRIES=12
RETRY_DELAY=5
count=0
until $(curl --output /dev/null --silent --head --fail http://localhost:3000) || [[ $count -eq $MAX_RETRIES ]]; do
printf '.'
sleep $RETRY_DELAY
count=$((count + 1))
done
if [[ $count -eq $MAX_RETRIES ]]; then
echo "Failed to connect to Misskey after $MAX_RETRIES attempts."
exit 1
fi
- id: fetch
name: Get api.json from Misskey
run: |
RESULT=$(curl --retry 5 --retry-delay 5 --retry-max-time 60 http://localhost:3000/api.json)
echo $RESULT > api-head.json
- name: Generate API JSON
run: pnpm --filter backend generate-api-json
- name: Copy API.json
run: cp packages/backend/built/api.json ${{ matrix.api-json-name }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: api-artifact
path: api-head.json
- name: Kill Misskey Job
run: screen -S misskey -X quit
path: ${{ matrix.api-json-name }}

save-pr-number:
runs-on: ubuntu-latest
Expand All @@ -180,7 +67,7 @@ jobs:
PR_NUMBER: ${{ github.event.number }}
run: |
echo "$PR_NUMBER" > ./pr_number
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: api-artifact
path: pr_number
Loading

0 comments on commit 0b5228f

Please sign in to comment.