Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/line/armeria into add-tlsEn…
Browse files Browse the repository at this point in the history
…gineType-enum
  • Loading branch information
seonWKim committed Dec 1, 2023
2 parents 9a87460 + a8a9ca2 commit 42a8ab6
Show file tree
Hide file tree
Showing 399 changed files with 14,636 additions and 4,176 deletions.
26 changes: 14 additions & 12 deletions .github/actions/post-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,20 @@ async function main(): Promise<void> {
});
console.log(`📝 https://github.com/line/armeria/releases/tag/${tag} has been updated.`)

// Trigger Central Dogma workflow to upgrade Armeria version
console.log(`⛓️ Triggering 'update-armeria-version' workflow in Central Dogma repository...`);
await octokit.rest.actions.createWorkflowDispatch({
owner: owner,
repo: 'centraldogma',
workflow_id: 'update-armeria-version.yml',
ref: 'main',
inputs: {
armeria_version: releaseVersion
},
})
console.log("⛓️ https://github.com/line/centraldogma/actions/workflows/update-armeria-version.yml has been triggered.")
if (!releaseVersion.endsWith(".0")) {
// Trigger Central Dogma workflow to upgrade Armeria version
console.log(`⛓️ Triggering 'update-armeria-version' workflow in Central Dogma repository...`);
await octokit.rest.actions.createWorkflowDispatch({
owner: owner,
repo: 'centraldogma',
workflow_id: 'update-armeria-version.yml',
ref: 'main',
inputs: {
armeria_version: releaseVersion
},
})
console.log("⛓️ https://github.com/line/centraldogma/actions/workflows/update-armeria-version.yml has been triggered.")
}
}

/**
Expand Down
31 changes: 31 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: 2
registries:
gradle-plugin-portal:
type: maven-repository
url: https://plugins.gradle.org/m2
username: dummy # Required by dependabot
password: dummy # Required by dependabot
updates:
- package-ecosystem: "gradle"
directory: "/"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
time: "10:00"
# Use Korea Standard Time (UTC +09:00)
timezone: "Asia/Seoul"
open-pull-requests-limit: 10
allow:
- dependency-name: "com.gradle.enterprise"
dependency-type: "production"
- dependency-name: "com.gradle.common-custom-user-data-gradle-plugin"
dependency-type: "production"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "10:00"
# Use Korea Standard Time (UTC +09:00)
timezone: "Asia/Seoul"
8 changes: 4 additions & 4 deletions .github/workflows/actions_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
echo "JOB_NAME=$JOB_NAME" >> $GITHUB_ENV
shell: bash

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- id: setup-jdk
if: ${{ matrix.java != env.BUILD_JDK_VERSION }}
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
runs-on: self-hosted
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- id: setup-build-jdk
name: Set up JDK ${{ env.BUILD_JDK_VERSION }}
Expand All @@ -236,7 +236,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install svgbob_cli
run: |
Expand All @@ -263,7 +263,7 @@ jobs:
runs-on: self-hosted
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- id: setup-build-jdk
name: Set up JDK ${{ env.BUILD_JDK_VERSION }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/gradle-enterprise-postjob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
if: github.repository == 'line/armeria'
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- id: setup-jdk-19
name: Set up JDK 19
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
shell: bash

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18

Expand All @@ -108,14 +108,15 @@ jobs:
PR_NUMBER: ${{ steps.get-pr-number.outputs.PR_NUMBER }}

upload-build-cache:
if: github.repository == 'line/armeria'
runs-on: ${{ matrix.on }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
on: [ self-hosted, macos-12, windows-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ env.COMMIT_SHA }}

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/public-suffixes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
if: github.repository == 'line/armeria'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- id: setup-jdk-19
name: Set up JDK 19
Expand All @@ -29,15 +29,15 @@ jobs:
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSWORD }}
git-user-signingkey: true
git-commit-gpgsign: true
git_user_signingkey: true
git_commit_gpgsign: true

- name: Create pull request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
# The title of the pull request.
title: Update public suffix list
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: github.repository == 'line/armeria'
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- id: setup-jdk-19
name: Set up JDK 19
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
shell: bash

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
if: github.repository == 'line/armeria'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install svgbob_cli
run: |
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/tag-new-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Release a new Armeria version
on:
workflow_dispatch:
inputs:
release_version:
description: 'Release Version'
required: true
type: string
next_version:
description: 'Next Version'
required: true
type: string

env:
LC_ALL: "en_US.UTF-8"

jobs:
tag-new-version:
if: github.repository == 'line/armeria'
runs-on: self-hosted

steps:
- name: Validate inputs
run: |
if [[ ! "${{ inputs.release_version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: 'release_version' should be in SemVer format."
exit 1
fi
if [[ ! "${{ inputs.next_version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: 'next_version' should be in SemVer format."
exit 1
fi
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}

- name: Set up Git remote
run: |
git remote set-url origin https://github.com/line/armeria.git
shell: bash

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSWORD }}
git_user_signingkey: true
git_commit_gpgsign: true

- id: setup-jdk-19
name: Set up JDK 19
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '19'

- name: Set up Gradle
uses: gradle/gradle-build-action@v2

- name: Bump up version
run: |
./gradlew --no-daemon --stacktrace --max-workers=1 release \
-PreleaseVersion=${{ inputs.release_version }} \
-PnextVersion=${{ inputs.next_version }}
shell: bash
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Visit [the official web site](https://armeria.dev/) for more information.
<a href="https://github.com/line/armeria/pulse"><img src="https://img.shields.io/github/commit-activity/m/line/armeria.svg?label=commits" /></a>
<a href="https://search.maven.org/search?q=g:com.linecorp.armeria%20AND%20a:armeria"><img src="https://img.shields.io/maven-central/v/com.linecorp.armeria/armeria.svg?label=version" /></a>
<a href="https://github.com/line/armeria/commits"><img src="https://img.shields.io/github/release-date/line/armeria.svg?label=release" /></a>
[![Revved up by Gradle Enterprise](https://img.shields.io/badge/Revved%20up%20by-Gradle%20Enterprise-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.armeria.dev/scans)
[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.armeria.dev/scans)


> Build a reactive microservice **at your pace**, not theirs.
Expand Down
59 changes: 26 additions & 33 deletions benchmarks/jmh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

A collection of JMH benchmarks which may be useful for measuring Armeria performance.

## Always prepend `--no-daemon` and `clean`

You must prepend `--no-daemon` and `clean` to your benchmark command due to
[a known bug in jmh-gradle-plugin](https://github.com/melix/jmh-gradle-plugin/issues/132):

```
$ ./gradlew --no-daemon :benchmarks:jmh:clean :benchmarks:jmh:jmh ...
```

## Options

- `-Pjmh.includes=<pattern>`
Expand All @@ -29,7 +20,7 @@ $ ./gradlew --no-daemon :benchmarks:jmh:clean :benchmarks:jmh:jmh ...
- The number of iterations. Uses the value of `jmh.iterations` if unspecified.
- `-Pjmh.profilers=<spec>`
- The profiler settings. Profiler disabled if unspecified.
- `jmh.extras.Async:asyncProfilerDir=...;flameGraphDir=...`
- `async:libPath=...;output=flamegraph`
- `-Pjmh.threads=<integer>`
- The number of threads. JMH default if unspecified.
- `-Pjmh.verbose`
Expand All @@ -42,33 +33,35 @@ $ ./gradlew --no-daemon :benchmarks:jmh:clean :benchmarks:jmh:jmh ...

## Retrieving flame graph using async-profiler

Allow running `perf` as a normal user:

```
# echo 1 > /proc/sys/kernel/perf_event_paranoid
# echo 0 > /proc/sys/kernel/kptr_restrict
```

Install [async-profiler](https://github.com/jvm-profiling-tools/async-profiler) and
[FlameGraph](https://github.com/brendangregg/FlameGraph):

```
$ cd "$HOME"
$ git clone https://github.com/jvm-profiling-tools/async-profiler.git
$ git clone https://github.com/brendangregg/FlameGraph.git
$ cd async-profiler
$ make
```
- Allow running `perf` as a normal user on Linux:
```
# echo 1 > /proc/sys/kernel/perf_event_paranoid
# echo 0 > /proc/sys/kernel/kptr_restrict
```
- MacOS profiling is limited to user space code only, thus this does not work with MacOS.

When running a benchmark, specify `-Pjmh.profilers` option:
- Install [async-profiler](https://github.com/async-profiler/async-profiler):
```
$ cd "$HOME"
$ git clone https://github.com/async-profiler/async-profiler.git
$ cd async-profiler
$ make
```

```
$ ./gradlew --no-daemon :benchmarks:jmh:clean :benchmarks:jmh:jmh \
"-Pjmh.profilers=jmh.extras.Async:asyncProfilerDir=$HOME/async-profiler;flameGraphDir=$HOME/FlameGraph"
```
- When running a benchmark, specify `-Pjmh.profilers` option:
- On Linux
```
$ ./gradlew :benchmarks:jmh:jmh \
"-Pjmh.profilers=async:libPath=$HOME/async-profiler/build/lib/libasyncProfiler.so;output=flamegraph;dir=$HOME/result"
```
- On MacOS
```
$ ./gradlew :benchmarks:jmh:jmh \
"-Pjmh.profilers=async:libPath=$HOME/async-profiler/build/lib/libasyncProfiler.dylib;output=flamegraph;dir=$HOME/result"
```

## Notes

- Do not forget to wrap `-Pjmh.params` and `-Pjmh.profilers` option with double quotes, because otherwise your
shell will interpret `;` as the end of the command.
- See [sbt-jmh documentation](https://github.com/ktoso/sbt-jmh#using-async-profiler) for more profiler options.
- Run `$ ./gradlew :benchmarks:jmh:jmh "-Pjmh.profilers=async:help"` for more profiler options.
2 changes: 0 additions & 2 deletions benchmarks/jmh/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ dependencies {
implementation libs.awaitility
implementation libs.kotlin.coroutines.core

jmh libs.jmh.extras

implementation project(':testing-internal')
}

Expand Down

0 comments on commit 42a8ab6

Please sign in to comment.