Skip to content

Commit 92bffcc

Browse files
authored
Merge pull request #988 from lavalink-devs/dev
release 4.0.0
2 parents 7978e9d + baec7f7 commit 92bffcc

Some content is hidden

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

54 files changed

+2790
-1385
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: Build
33
on:
44
push:
55
branches: [ '**' ]
6-
paths-ignore: [ '**.md' ]
6+
paths-ignore:
7+
- '**.md'
8+
- 'docs/**'
9+
- '.github/workflows/docs.yml'
10+
- '.github/workflows/docs-pr.yml'
711
workflow_call:
812
secrets:
913
DOCKER_USERNAME:

.github/workflows/docs-pr.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Docs PR
2+
3+
on:
4+
pull_request_target:
5+
branches: [ '**' ]
6+
paths:
7+
- 'docs/**'
8+
9+
concurrency:
10+
group: pages
11+
cancel-in-progress: true
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
deployments: write
19+
steps:
20+
- uses: actions/checkout@v3
21+
with:
22+
ref: "${{ github.event.pull_request.merge_commit_sha }}"
23+
fetch-depth: 0
24+
- uses: actions/setup-python@v4
25+
with:
26+
python-version: 3.x
27+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
28+
- uses: actions/cache@v3
29+
with:
30+
key: mkdocs-material-${{ env.cache_id }}
31+
path: .cache
32+
restore-keys: |
33+
mkdocs-material-
34+
- run: pip install -r requirements.txt
35+
working-directory: docs
36+
# - run: mkdocs build --verbose --strict
37+
- run: mkdocs build --verbose
38+
working-directory: docs
39+
- uses: actions/upload-pages-artifact@v1
40+
with:
41+
path: 'site'
42+
- uses: cloudflare/pages-action@v1
43+
with:
44+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
45+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
46+
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
47+
directory: site
48+
branch: pr-${{ github.event.pull_request.number }}
49+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docs.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Docs Push
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/docs.yml'
9+
10+
concurrency:
11+
group: pages-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
deploy:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
deployments: write
20+
steps:
21+
- uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
- uses: actions/setup-python@v4
25+
with:
26+
python-version: 3.x
27+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
28+
- uses: actions/cache@v3
29+
with:
30+
key: mkdocs-material-${{ env.cache_id }}
31+
path: .cache
32+
restore-keys: |
33+
mkdocs-material-
34+
- run: pip install -r requirements.txt
35+
working-directory: docs
36+
# - run: mkdocs build --verbose --strict
37+
- run: mkdocs build --verbose
38+
working-directory: docs
39+
- uses: actions/upload-pages-artifact@v1
40+
with:
41+
path: 'site'
42+
- uses: cloudflare/pages-action@v1
43+
with:
44+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
45+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
46+
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
47+
directory: site
48+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
49+
wranglerVersion: '3'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ build/*
2020
gradle.properties
2121
application.yml
2222
LavalinkServer/plugins
23+
.cache/
24+
site/

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,34 @@
33
Each release usually includes various fixes and improvements.
44
The most noteworthy of these, as well as any features and breaking changes, are listed here.
55

6+
## 4.0.0
7+
* Lavalink now requires Java 17 or higher to run
8+
* **Removal of all websocket messages sent by the client. Everything is now done via [REST](../api/rest.md)**
9+
* Remove default 4GB max heap allocation from docker image
10+
* Removal of all `/v3` endpoints except `/version`. All other endpoints are now under `/v4`
11+
* Reworked track loading result. For more info see [here](https://lavalink.dev/api/rest.md#track-loading-result)
12+
* Update docker ubuntu base image from focal(`20`) to jammy(`22`)
13+
* Update to Koe [`2.0.0-rc2`](https://github.com/KyokoBot/koe/releases/tag/2.0.0-rc2)
14+
* Update Lavaplayer to [`2.0.4`](https://github.com/lavalink-devs/lavaplayer/releases/tag/2.0.4), which includes native support for artwork urls and ISRCs in the track info
15+
* Update to the [Protocol Module](https://github.com/lavalink-devs/Lavalink/tree/master/protocol) to support Kotlin/JS
16+
* Allow setting user data on tracks in the REST API. For more info see [here](https://lavalink.dev/api/rest.html#update-player-track)
17+
* Added default plugin repository. Plugin devs can now request their plugin to be added to the default repository. For more info see [here](https://lavalink.dev/api/plugins.md#distributing-your-plugin)
18+
* Addition of full `Track` objects in following events: `TrackStartEvent`, `TrackEndEvent`, `TrackExceptionEvent`, `TrackStuckEvent`
19+
* Resuming a session now requires the `Session-Id` header instead of `Resume-Key` header
20+
* Add JDA-NAS support for musl (`x86-64`, `aarch64`) based systems (most notably `alpine`)
21+
* Add `Omissible#isPresent` & `Omissible#isOmitted` to the `protocol` module
22+
* New config option to specify the directory to load plugins from. `lavalink.pluginsDir` (defaults to `./plugins`)
23+
* Enable request logging by default
24+
* Fixed error when seeking and player is not playing anything in
25+
* Fixed null pointer when a playlist has no selected track
26+
27+
> [!WARNING]
28+
> Lavalink previously set the `-Xmx` flag to `4G` in docker. This caused issues with some systems which had less than 4GB of RAM. We have now removed this flag and let the JVM decide the max heap allocation. The default is 1GB or 25% of total memory, whichever is lower.
29+
> On how to increase the max heap allocation, see [here](https://lavalink.dev/configuration/docker.html#docker).
30+
31+
<details>
32+
<summary>v4.0.0 - Betas</summary>
33+
634
## 4.0.0-beta.5
735
* Update lavaplayer to [`2.0.3`](https://github.com/lavalink-devs/lavaplayer/releases/tag/2.0.2) - Fixed YouTube access token errors
836
* Added default plugin repository. Plugin devs can now request their plugin to be added to the default repository. For more info see [here](https://github.com/lavalink-devs/Lavalink/blob/master/PLUGINS.md#distributing-your-plugin)
@@ -39,6 +67,23 @@ The most noteworthy of these, as well as any features and breaking changes, are
3967
Contributors:
4068
[@topi314](https://github.com/topi314), [@freyacodes](https://github.com/freyacodes), [@DRSchlaubi](https://github.com/DRSchlaubi) and [@melike2d](https://github.com/melike2d)
4169

70+
</details>
71+
72+
## v3.7.10
73+
* Update lavaplayer to [`1.5.2`](https://github.com/lavalink-devs/lavaplayer/releases/tag/1.5.2) - Fixed NPE on missing author in playlist tracks in YouTube
74+
75+
## 3.7.9
76+
* Update lavaplayer to [`1.5.1`](https://github.com/lavalink-devs/lavaplayer/releases/tag/1.5.1) - Fixed YouTube access token errors
77+
* Fixed websocket crash when seeking and nothing is playing
78+
* Fixed error when seeking and player is not playing anything
79+
80+
## 3.7.8
81+
* Fix YouTube 403 errors
82+
* Fix YouTube access token errors
83+
84+
## 3.7.7
85+
* Add JDA-NAS support for musl (`x86-64`, `aarch64`) based systems (most notably `alpine`)
86+
4287
## 3.7.6
4388
* Update Lavaplayer to [`1.4.1`](https://github.com/Walkyst/lavaplayer-fork/releases/tag/1.4.1) & [`1.4.2`](https://github.com/Walkyst/lavaplayer-fork/releases/tag/1.4.2)
4489
* New support for `MUSL` based systems (most notably `alpine`)

LavalinkServer/build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ dependencies {
5454
implementation(libs.koe.udpqueue) {
5555
exclude(module="udp-queue")
5656
}
57-
implementation(libs.bundles.udpqueue.natives)
57+
implementation(libs.bundles.udpqueue.natives) {
58+
exclude(group = "com.sedmelluq", module = "lava-common")
59+
}
5860

5961
implementation(libs.lavaplayer)
6062
implementation(libs.lavaplayer.ip.rotator)

LavalinkServer/docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eclipse-temurin:18-jre-focal
1+
FROM eclipse-temurin:18-jre-jammy
22

33
# Run as non-root user
44
RUN groupadd -g 322 lavalink && \
@@ -12,4 +12,4 @@ USER lavalink
1212

1313
COPY LavalinkServer/build/libs/Lavalink.jar Lavalink.jar
1414

15-
ENTRYPOINT ["java", "-Djdk.tls.client.protocols=TLSv1.1,TLSv1.2", "-Xmx4G", "-jar", "Lavalink.jar"]
15+
ENTRYPOINT ["java", "-Djdk.tls.client.protocols=TLSv1.1,TLSv1.2", "-jar", "Lavalink.jar"]

LavalinkServer/docker/alpine.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ USER lavalink
1414

1515
COPY LavalinkServer/build/libs/Lavalink-musl.jar Lavalink.jar
1616

17-
ENTRYPOINT ["java", "-Djdk.tls.client.protocols=TLSv1.1,TLSv1.2", "-Xmx4G", "-jar", "Lavalink.jar"]
17+
ENTRYPOINT ["java", "-Djdk.tls.client.protocols=TLSv1.1,TLSv1.2", "-jar", "Lavalink.jar"]

LavalinkServer/src/main/java/lavalink/server/bootstrap/PluginManager.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ class PluginManager(val config: PluginsConfig) {
5353

5454
var repository = declaration.repository
5555
?: if (declaration.snapshot) config.defaultPluginSnapshotRepository else config.defaultPluginRepository
56-
repository =
57-
if (declaration.repository!!.endsWith("/")) declaration.repository!! else declaration.repository!! + "/"
56+
repository = if (repository.endsWith("/")) repository else "$repository/"
5857
Declaration(fragments[0], fragments[1], fragments[2], repository)
5958
}
6059

LavalinkServer/src/main/java/lavalink/server/config/RequestLoggingConfig.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import org.springframework.context.annotation.Configuration
88

99
@Configuration
1010
@ConfigurationProperties(prefix = "logging.request")
11-
@ConditionalOnProperty("logging.request.enabled")
11+
@ConditionalOnProperty("logging.request.enabled", matchIfMissing = true)
1212
data class RequestLoggingConfig(
13-
var includeClientInfo: Boolean = true,
13+
var includeClientInfo: Boolean = false,
1414
var includeHeaders: Boolean = false,
1515
var includeQueryString: Boolean = true,
1616
var includePayload: Boolean = true,

0 commit comments

Comments
 (0)