Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8d50059
feat(rust): differ poc (#542)
bzp2010 Aug 1, 2026
6573d00
test: rust differ (#543)
bzp2010 Aug 1, 2026
c8153f8
feat: rust resource type (#544)
bzp2010 Aug 1, 2026
e62ba61
feat: rust diff event type (#547)
bzp2010 Aug 1, 2026
949e88b
feat: rust backend type (#548)
bzp2010 Aug 1, 2026
bf48d78
feat: rust backend core (#549)
bzp2010 Aug 1, 2026
690bba8
feat: rust backend apisix (#550)
bzp2010 Aug 2, 2026
d3bf181
feat: rust cli (#551)
bzp2010 Aug 4, 2026
b110bfa
feat: rust backend api7 (#555)
bzp2010 Aug 5, 2026
4302449
feat: rust backend apisix standalone (#559)
bzp2010 Aug 6, 2026
a789222
feat: oas converter (#562)
bzp2010 Aug 16, 2026
775ba63
chore: clean benchmark crates (#563)
bzp2010 Aug 16, 2026
689faa5
fix comments
bzp2010 Aug 16, 2026
385ff90
clean code comments
bzp2010 Aug 16, 2026
b8c6163
fix comments
bzp2010 Aug 18, 2026
569d322
feat: rust lint (#564)
bzp2010 Aug 18, 2026
bd24d73
feat: rust ingress server (#565)
bzp2010 Aug 19, 2026
ae03053
fix: api7 format fp numbers for timeout correctly (#566)
bzp2010 Aug 20, 2026
baf5e24
test: rust add api7 timeout real float point number (#567)
bzp2010 Aug 22, 2026
500d63b
fix: rust clippy result err size lint (#568)
bzp2010 Aug 22, 2026
d38baad
fix: review 260822-1 (#569)
bzp2010 Aug 22, 2026
987ee15
fix: rust standalone race conditon between dump and sync (#570)
bzp2010 Aug 22, 2026
2b330cd
fix: rust standalone dump race condition (#572)
bzp2010 Aug 23, 2026
ef1603c
feat: rust internalize only sub event type (#573)
bzp2010 Aug 23, 2026
d60f5b2
feat: rust manually review 260823 (#574)
bzp2010 Aug 23, 2026
f9ccab2
fix comments
bzp2010 Aug 23, 2026
40b5d78
fix: rust revert api7 multiple certs support
bzp2010 Aug 23, 2026
75bb727
fix e2e
bzp2010 Aug 24, 2026
10a4e97
ci: add release jobs
bzp2010 Aug 24, 2026
4749d44
fix comments
bzp2010 Aug 24, 2026
1bef584
test api7 ssl multiple certificates
bzp2010 Aug 26, 2026
cc51608
test rust on api7 3.10.6
bzp2010 Aug 26, 2026
d0540ca
remove useless comments
bzp2010 Aug 26, 2026
d17f45f
remove inlined rust build job
bzp2010 Aug 26, 2026
d1d3679
clean
bzp2010 Aug 26, 2026
28fcc26
feat: support env vars in yaml
bzp2010 Aug 26, 2026
a6994d3
fix test gap
bzp2010 Aug 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 126 additions & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
apisix:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- 3.2.2
Expand All @@ -49,6 +50,7 @@ jobs:
- 3.15.0
- 3.16.0
- 3.17.0
- 3.18.0
- dev
steps:
- name: Determine APISIX image tag
Expand Down Expand Up @@ -79,17 +81,30 @@ jobs:
# Run E2E tests
- name: Run E2E tests
run: npx nx run backend-apisix:test

# Run the Rust port's E2E tests against the same live apisix instance
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: rust -> target
- name: Run Rust E2E tests
working-directory: ./rust
run: |
rustup update stable
rustup default stable
cargo test -p adc-backend-apisix -- --ignored --test-threads=1
apisix-standalone:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'test/apisix-standalone') || github.event_name == 'push'
strategy:
fail-fast: false
matrix:
version:
- 3.13.0
- 3.14.1
- 3.15.0
- 3.16.0
- 3.17.0
- 3.18.0
- dev
steps:
- name: Determine APISIX image tag
Expand Down Expand Up @@ -120,6 +135,28 @@ jobs:
# Run E2E tests
- name: Run E2E tests
run: npx nx run backend-apisix-standalone:test

# Run the Rust port's E2E tests against the same live cluster. Each
# test function restarts every instance itself before it starts
# (see adc-backend-apisix-standalone's tests/common/mod.rs), so
# running after the TS suite here is safe — nothing from the TS
# suite's own state survives into the Rust tests.
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: rust -> target
- name: Run Rust E2E tests
working-directory: ./rust
run: |
rustup update stable
rustup default stable
cargo test -p adc-backend-apisix-standalone -- --ignored --test-threads=1
# Only useful when the step above fails: a bare 404 from an admin API
# request gives no clue why on its own — the container's own error
# log does.
- name: Dump APISIX standalone container logs
if: failure()
working-directory: ./libs/backend-apisix-standalone/e2e/assets
run: docker compose logs --no-color
api7:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'test/api7') || github.event_name == 'push'
Expand All @@ -129,7 +166,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [3.5.5, 3.6.1, 3.7.8, 3.8.23, 3.9.14, 3.10.1, dev]
version: [3.5.5, 3.6.1, 3.7.8, 3.8.23, 3.9.18, 3.10.6, dev]
steps:
- name: Determine API7 image and license
run: |
Expand Down Expand Up @@ -174,3 +211,91 @@ jobs:
# Run API7 E2E tests
- name: Run E2E tests
run: npx nx run backend-api7:test
api7-rust:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'test/api7') || github.event_name == 'push'
permissions:
contents: read
packages: read
strategy:
fail-fast: false
matrix:
version: [3.5.5, 3.6.1, 3.7.8, 3.8.23, 3.9.18, 3.10.6, dev]
steps:
- name: Determine API7 image and license
run: |
if [ "${{ matrix.version }}" = "dev" ]; then
echo "BACKEND_API7_VERSION=999.999.999" >> $GITHUB_ENV
echo "API7_DASHBOARD_IMAGE=ghcr.io/api7/api7-ee-3-integrated" >> $GITHUB_ENV
echo "API7_IMAGE_TAG=dev" >> $GITHUB_ENV
{
echo "BACKEND_API7_LICENSE<<EOLICENSE"
echo "${{ secrets.BACKEND_API7_DEV_LICENSE }}"
echo "EOLICENSE"
} >> $GITHUB_ENV
else
echo "BACKEND_API7_VERSION=${{ matrix.version }}" >> $GITHUB_ENV
echo "API7_DASHBOARD_IMAGE=api7/api7-ee-3-integrated" >> $GITHUB_ENV
echo "API7_IMAGE_TAG=v${{ matrix.version }}" >> $GITHUB_ENV
{
echo "BACKEND_API7_LICENSE<<EOLICENSE"
echo "${{ secrets.BACKEND_API7_LICENSE }}"
echo "EOLICENSE"
} >> $GITHUB_ENV
fi

- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Login to GHCR
if: matrix.version == 'dev'
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Runs on its own dashboard instance, independent of the `api7` job's
# (rather than reusing that job's live instance after the TS suite runs)
# — the Rust e2e suite's `common::client()` performs its own admin
# login / password rotation / license activation / token minting on
# first use (see adc-backend-api7's tests/common/mod.rs), which would
# collide with the TS suite doing the same dance against a shared
# instance.
- name: Setup API7 Instance via Docker Compose
working-directory: ./libs/backend-api7/e2e/assets
run: |
if [ "${{ matrix.version }}" = "dev" ]; then docker compose pull; fi
docker compose up -d

# Run the Rust port's E2E tests
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: rust -> target
# Each test file below is its own process with no state shared
# between them, but they all talk to the one dashboard instance
# started above — so the admin login / password rotation / license
# activation / token minting dance runs here exactly once, and its
# result is shared with every other test file as `TOKEN` (see
# tests/e2e_init.rs), instead of each independently repeating it
# against a dashboard the first one to run already mutated.
- name: Bootstrap a shared API7 token
working-directory: ./rust
run: |
rustup update stable
rustup default stable
cargo test -p adc-backend-api7 --test e2e_init -- --ignored
- name: Run Rust E2E tests
working-directory: ./rust
run: |
rustup update stable
rustup default stable
cargo test -p adc-backend-api7 -- --ignored --test-threads=1
# Only useful when the step above fails: `BackendError::Api`'s
# message is empty for a 500 with no response body, which the
# dashboard's own logs can actually explain.
- name: Dump API7 dashboard logs
if: failure()
working-directory: ./libs/backend-api7/e2e/assets
run: docker compose logs --no-color
154 changes: 154 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,157 @@ jobs:
files: |
release/adc_${{ env.RELEASE_VERSION }}_darwin_arm64.tar.gz
release/adc_${{ env.RELEASE_VERSION }}_darwin_amd64.tar.gz

adc-rust-linux:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
arch: amd64
- os: ubuntu-24.04-arm
arch: arm64
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
persist-credentials: false
- name: Setup release flow
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV

- name: Setup Rust toolchain
run: |
rustup update stable
rustup default stable
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: rust -> target
key: ${{ matrix.arch }}
- name: Build adc-cli
working-directory: ./rust
run: cargo build --release -p adc-cli

- name: Split debug info
run: |
BIN_DIR=rust/target/release
objcopy --only-keep-debug "$BIN_DIR/adc" "$BIN_DIR/adc.debug"
objcopy --strip-debug --strip-unneeded "$BIN_DIR/adc"
objcopy --add-gnu-debuglink="$BIN_DIR/adc.debug" "$BIN_DIR/adc"

- name: Compress adc
run: |
mkdir -p release
BIN_DIR=rust/target/release
tar -czf release/adc_rust_${{ env.RELEASE_VERSION }}_linux_${{ matrix.arch }}.tar.gz -C "$BIN_DIR" adc
tar -czf release/adc_rust_${{ env.RELEASE_VERSION }}_linux_${{ matrix.arch }}_debuginfo.tar.gz -C "$BIN_DIR" adc.debug

- name: Upload adc to GitHub release
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release/adc_rust_${{ env.RELEASE_VERSION }}_linux_${{ matrix.arch }}.tar.gz
release/adc_rust_${{ env.RELEASE_VERSION }}_linux_${{ matrix.arch }}_debuginfo.tar.gz

adc-rust-windows:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
arch: amd64
- os: windows-11-arm
arch: arm64
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup release flow
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV

- name: Setup Rust toolchain
shell: bash
run: |
rustup update stable
rustup default stable
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: rust -> target
key: ${{ matrix.arch }}
- name: Build adc-cli
working-directory: ./rust
run: cargo build --release -p adc-cli

- name: Compress adc
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path release | Out-Null
$binDir = "rust/target/release"
Compress-Archive -Path "$binDir/adc.exe" -DestinationPath "release/adc_rust_${{ env.RELEASE_VERSION }}_windows_${{ matrix.arch }}.zip"
Compress-Archive -Path "$binDir/adc.pdb" -DestinationPath "release/adc_rust_${{ env.RELEASE_VERSION }}_windows_${{ matrix.arch }}_debuginfo.zip"

- name: Upload adc to GitHub release
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release/adc_rust_${{ env.RELEASE_VERSION }}_windows_${{ matrix.arch }}.zip
release/adc_rust_${{ env.RELEASE_VERSION }}_windows_${{ matrix.arch }}_debuginfo.zip

adc-rust-macos:
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
arch: arm64
- target: x86_64-apple-darwin
arch: amd64
runs-on: macos-26
permissions:
contents: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup release flow
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV

- name: Setup Rust toolchain
run: |
rustup update stable
rustup default stable
rustup target add ${{ matrix.target }}
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: rust -> target
- name: Build adc-cli
working-directory: ./rust
run: cargo build --release -p adc-cli --target ${{ matrix.target }}

- name: Split debug info
run: |
BIN_DIR=rust/target/${{ matrix.target }}/release
dsymutil "$BIN_DIR/adc" -o "$BIN_DIR/adc.dSYM"
strip -S "$BIN_DIR/adc"

- name: Compress adc
run: |
mkdir -p release
BIN_DIR=rust/target/${{ matrix.target }}/release
tar -czf release/adc_rust_${{ env.RELEASE_VERSION }}_darwin_${{ matrix.arch }}.tar.gz -C "$BIN_DIR" adc
tar -czf release/adc_rust_${{ env.RELEASE_VERSION }}_darwin_${{ matrix.arch }}_debuginfo.tar.gz -C "$BIN_DIR" adc.dSYM

- name: Upload adc to GitHub release
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release/adc_rust_${{ env.RELEASE_VERSION }}_darwin_${{ matrix.arch }}.tar.gz
release/adc_rust_${{ env.RELEASE_VERSION }}_darwin_${{ matrix.arch }}_debuginfo.tar.gz
25 changes: 25 additions & 0 deletions .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,28 @@ jobs:
run: npx nx run backend-api7:test
- name: Run OpenAPI Converter unit tests
run: npx nx run converter-openapi:test
rust:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Rust toolchain
run: |
rustup update stable
rustup default stable
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: rust -> target

- name: Build
working-directory: ./rust
run: cargo build --workspace
- name: Clippy
working-directory: ./rust
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Run unit tests
working-directory: ./rust
run: cargo test --workspace
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ vitest.config.*.timestamp*

.nx/polygraph
.nx/self-healing
.nx/migrate-runs
.nx/migrate-runs

rust/target/
5 changes: 5 additions & 0 deletions fixtures/differ/basic.adapts_to_default_core_values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"local": { "consumers": [{ "username": "alice", "plugins": {} }] },
"remote": { "consumers": [{ "username": "alice", "description": "", "plugins": {} }] },
"defaultValue": { "core": { "consumer": { "description": "" } }, "plugins": {} }
}
5 changes: 5 additions & 0 deletions fixtures/differ/basic.adapts_to_default_plugin_values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"local": { "consumers": [{ "username": "alice", "plugins": { "key-auth": { "key": "key" } } }] },
"remote": { "consumers": [{ "username": "alice", "plugins": { "key-auth": { "key": "key", "added": "added" } } }] },
"defaultValue": { "core": {}, "plugins": { "key-auth": { "added": "added" } } }
}
12 changes: 12 additions & 0 deletions fixtures/differ/basic.boolean_defaults_merged_correctly.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"local": { "services": [{ "name": "HTTP", "path_prefix": "/test", "strip_path_prefix": false }] },
"remote": {
"services": [{
"id": "f40b27d6b8b9a4fc3827264c1da16a04ecf4d094",
"name": "HTTP",
"path_prefix": "/test",
"strip_path_prefix": true
}]
},
"defaultValue": { "core": { "service": { "strip_path_prefix": true } }, "plugins": {} }
}
Loading
Loading