Skip to content

Commit

Permalink
Merge branch 'upstream/master' into github/master
Browse files Browse the repository at this point in the history
* upstream/master: (214 commits)
  feat: set constants.apisix_lua_home for used by plugins (apache#7893)
  fix: response-rewrite plugin might cause Apache AIPSIX hanging (apache#7836)
  test: sleep 1 second in t/cli/test_upstream_mtls.sh (apache#7889)
  fix: reload once when log rotate (apache#7869)
  change: move etcd conf under deployment (apache#7860)
  fix: plugin metadata missing v3 adapter call (apache#7877)
  docs: add ClickHouse and Elasticsearch loggers. (apache#7848)
  docs(plugin): refactor limit-conn.md (apache#7857)
  feat: call `destroy` method when Nginx exits (apache#7866)
  feat: Add ability to inject headers via prefix to otel traces (apache#7822)
  docs(plugin): refactor proxy-cache.md (apache#7858)
  fix: don't enable passive healthcheck by default (apache#7850)
  feat: add openfunction plugin (apache#7634)
  fix(zipkin): send trace IDs with a reject sampling decision (apache#7833)
  fix: Change opentelemetry's span kind to server (apache#7830)
  docs(hmac-auth): additional details for generating signing_string (apache#7816)
  docs: correct the test-nginx description (apache#7818)
  docs: add docs of workflow plugin (apache#7813)
  docs(FAQ): add how to detect APISIX alive status (apache#7812)
  feat: add elasticsearch-logger (apache#7643)
  ...
  • Loading branch information
Boolean committed Sep 10, 2022
2 parents 4ed81b5 + 047f629 commit e36ec4f
Show file tree
Hide file tree
Showing 538 changed files with 23,744 additions and 8,562 deletions.
9 changes: 8 additions & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ github:
- api-gateway
- cloud-native
- nginx
- lua
- luajit
- apigateway
- microservices
- api
- apis
- loadbalancing
- reverse-proxy
- api-management
Expand All @@ -36,6 +36,9 @@ github:
- devops
- kubernetes
- docker
- kubernetes-ingress
- kubernetes-ingress-controller
- service-mesh

enabled_merge_buttons:
squash: true
Expand All @@ -50,6 +53,10 @@ github:
dismiss_stale_reviews: true
require_code_owner_reviews: true
required_approving_review_count: 2
release/2.15:
required_pull_request_reviews:
require_code_owner_reviews: true
required_approving_review_count: 2
release/2.14:
required_pull_request_reviews:
require_code_owner_reviews: true
Expand Down
1 change: 1 addition & 0 deletions .github/actions/action-semantic-pull-request
15 changes: 0 additions & 15 deletions .github/semantic.yml

This file was deleted.

69 changes: 49 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
fail-fast: false
matrix:
platform:
- ubuntu-18.04
- ubuntu-20.04
os_name:
- linux_openresty
- linux_openresty_1_17
- linux_openresty_1_19
test_dir:
- t/plugin
- t/admin t/cli t/config-center-yaml t/control t/core t/debug t/discovery t/error_page t/misc
- t/admin t/cli t/config-center-yaml t/control t/core t/debug t/deployment t/discovery t/error_page t/misc
- t/node t/pubsub t/router t/script t/stream-node t/utils t/wasm t/xds-library t/xrpc

runs-on: ${{ matrix.platform }}
Expand Down Expand Up @@ -67,6 +67,21 @@ jobs:
echo "##[set-output name=version;]$(echo ${GITHUB_REF##*/})"
echo "##[set-output name=fullname;]$(echo apache-apisix-${GITHUB_REF##*/}-src.tgz)"
- name: Extract test type
shell: bash
id: test_env
run: |
test_dir="${{ matrix.test_dir }}"
if [[ $test_dir =~ 't/plugin' ]]; then
echo "##[set-output name=type;]$(echo 'plugin')"
fi
if [[ $test_dir =~ 't/admin ' ]]; then
echo "##[set-output name=type;]$(echo 'first')"
fi
if [[ $test_dir =~ ' t/xrpc' ]]; then
echo "##[set-output name=type;]$(echo 'last')"
fi
- name: Linux launch common services
run: |
make ci-env-up project_compose_ci=ci/pod/docker-compose.common.yml
Expand All @@ -82,39 +97,53 @@ jobs:
rm -rf $(ls -1 --ignore=*.tgz --ignore=ci --ignore=t --ignore=utils --ignore=.github)
tar zxvf ${{ steps.branch_env.outputs.fullname }}
- name: Build wasm code
if: matrix.os_name == 'linux_openresty'
- name: Start CI env (FIRST_TEST)
if: steps.test_env.outputs.type == 'first'
run: |
export TINYGO_VER=0.20.0
wget https://github.com/tinygo-org/tinygo/releases/download/v${TINYGO_VER}/tinygo_${TINYGO_VER}_amd64.deb 2>/dev/null
sudo dpkg -i tinygo_${TINYGO_VER}_amd64.deb
cd t/wasm && find . -type f -name "*.go" | xargs -Ip tinygo build -o p.wasm -scheduler=none -target=wasi p
# launch deps env
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
- name: Build xDS library
- name: Start CI env (PLUGIN_TEST)
if: steps.test_env.outputs.type == 'plugin'
run: |
cd t/xds-library
go build -o libxds.so -buildmode=c-shared main.go export.go
sh ci/pod/openfunction/build-function-image.sh
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh
- name: Linux Before install
run: sudo ./ci/${{ matrix.os_name }}_runner.sh before_install

- name: Start CI env
- name: Start CI env (LAST_TEST)
if: steps.test_env.outputs.type == 'last'
run: |
# generating SSL certificates for Kafka
sudo keytool -genkeypair -keyalg RSA -dname "CN=127.0.0.1" -alias 127.0.0.1 -keystore ./ci/pod/kafka/kafka-server/selfsigned.jks -validity 365 -keysize 2048 -storepass changeit
# launch deps env
make ci-env-up
sudo ./ci/linux-ci-init-service.sh
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh
- name: Start Dubbo Backend
if: matrix.os_name == 'linux_openresty'
if: matrix.os_name == 'linux_openresty' && steps.test_env.outputs.type == 'plugin'
run: |
sudo apt install -y maven
cd t/lib/dubbo-backend
mvn package
cd dubbo-backend-provider/target
java -Djava.net.preferIPv4Stack=true -jar dubbo-demo-provider.one-jar.jar > /tmp/java.log &
- name: Build xDS library
if: steps.test_env.outputs.type == 'last'
run: |
cd t/xds-library
go build -o libxds.so -buildmode=c-shared main.go export.go
- name: Build wasm code
if: matrix.os_name == 'linux_openresty' && steps.test_env.outputs.type == 'last'
run: |
export TINYGO_VER=0.20.0
wget https://github.com/tinygo-org/tinygo/releases/download/v${TINYGO_VER}/tinygo_${TINYGO_VER}_amd64.deb 2>/dev/null
sudo dpkg -i tinygo_${TINYGO_VER}_amd64.deb
cd t/wasm && find . -type f -name "*.go" | xargs -Ip tinygo build -o p.wasm -scheduler=none -target=wasi p
- name: Linux Before install
run: sudo ./ci/${{ matrix.os_name }}_runner.sh before_install

- name: Linux Install
run: |
sudo --preserve-env=OPENRESTY_VERSION \
Expand Down
37 changes: 33 additions & 4 deletions .github/workflows/centos7-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
matrix:
test_dir:
- t/plugin
- t/admin t/cli t/config-center-yaml t/control t/core t/debug t/discovery t/error_page t/misc
- t/admin t/cli t/config-center-yaml t/control t/core t/debug t/deployment t/discovery t/error_page t/misc
- t/node t/pubsub t/router t/script t/stream-node t/utils t/wasm t/xds-library

steps:
Expand All @@ -45,6 +45,21 @@ jobs:
run: |
echo "##[set-output name=version;]$(echo ${GITHUB_REF##*/})"
- name: Extract test type
shell: bash
id: test_env
run: |
test_dir="${{ matrix.test_dir }}"
if [[ $test_dir =~ 't/plugin' ]]; then
echo "##[set-output name=type;]$(echo 'plugin')"
fi
if [[ $test_dir =~ 't/admin ' ]]; then
echo "##[set-output name=type;]$(echo 'first')"
fi
if [[ $test_dir =~ ' t/xds-library' ]]; then
echo "##[set-output name=type;]$(echo 'last')"
fi
- name: Linux launch common services
run: |
make ci-env-up project_compose_ci=ci/pod/docker-compose.common.yml
Expand All @@ -66,6 +81,7 @@ jobs:
rm -rf $(ls -1 --ignore=apisix-build-tools --ignore=t --ignore=utils --ignore=ci --ignore=Makefile --ignore=rockspec)
- name: Build xDS library
if: steps.test_env.outputs.type == 'last'
run: |
cd t/xds-library
go build -o libxds.so -buildmode=c-shared main.go export.go
Expand All @@ -77,12 +93,25 @@ jobs:
docker run -itd -v /home/runner/work/apisix/apisix:/apisix --env TEST_FILE_SUB_DIR="$TEST_FILE_SUB_DIR" --name centos7Instance --net="host" --dns 8.8.8.8 --dns-search apache.org docker.io/centos:7 /bin/bash
# docker exec centos7Instance bash -c "cp -r /tmp/apisix ./"
- name: Run other docker containers for test
- name: Start CI env (FIRST_TEST)
if: steps.test_env.outputs.type == 'first'
run: |
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
- name: Start CI env (PLUGIN_TEST)
if: steps.test_env.outputs.type == 'plugin'
run: |
sh ci/pod/openfunction/build-function-image.sh
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh
- name: Start CI env (LAST_TEST)
if: steps.test_env.outputs.type == 'last'
run: |
# generating SSL certificates for Kafka
keytool -genkeypair -keyalg RSA -dname "CN=127.0.0.1" -alias 127.0.0.1 -keystore ./ci/pod/kafka/kafka-server/selfsigned.jks -validity 365 -keysize 2048 -storepass changeit
make ci-env-up
./ci/linux-ci-init-service.sh
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh
- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cli-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
matrix:
job_name:
- linux_apisix_master_luarocks
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
timeout-minutes: 15
env:
OPENRESTY_VERSION: default
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
fail-fast: false
matrix:
platform:
- ubuntu-18.04
- ubuntu-20.04
job_name:
- linux_apisix_current_luarocks
- linux_apisix_current_luarocks_in_customed_nginx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: 🚀 Use Node.js
uses: actions/setup-node@v3.3.0
uses: actions/setup-node@v3.4.1
with:
node-version: '12.x'
- run: npm install -g markdownlint-cli@0.25.0
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/fuzzing-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,15 @@ jobs:
- name: install boofuzz
run: |
# Avoid "ERROR: flask has requirement click>=8.0, but you'll have click 7.0 which is incompatible"
sudo apt remove python3-click
pip install -r $PWD/t/fuzzing/requirements.txt
- name: run simpleroute test
- name: run tests
run: |
python $PWD/t/fuzzing/simpleroute_test.py
- name: run serverless route test
run: |
python $PWD/t/fuzzing/serverless_route_test.py
- name: run vars route test
run: |
python $PWD/t/fuzzing/vars_route_test.py
- name: run check leak test
run: |
python $PWD/t/fuzzing/client_abort.py
python $PWD/t/fuzzing/simple_http.py
python $PWD/t/fuzzing/http_upstream.py
4 changes: 2 additions & 2 deletions .github/workflows/kubernetes-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
fail-fast: false
matrix:
platform:
- ubuntu-18.04
- ubuntu-20.04
os_name:
- linux_openresty
- linux_openresty_1_17
- linux_openresty_1_19

runs-on: ${{ matrix.platform }}
timeout-minutes: 15
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Check License Header
uses: apache/skywalking-eyes@v0.3.0
uses: apache/skywalking-eyes@v0.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Nodejs env
uses: actions/setup-node@v3.3.0
uses: actions/setup-node@v3.4.1
with:
node-version: '12'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
jobs:
performance:
if: github.event_name == 'pull_request' && github.event.label.name == 'performance'
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
timeout-minutes: 45

steps:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "PR Lint"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
submodules: recursive
- uses: ./.github/actions/action-semantic-pull-request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
change
4 changes: 2 additions & 2 deletions .github/workflows/tars-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
fail-fast: false
matrix:
platform:
- ubuntu-18.04
- ubuntu-20.04
os_name:
- linux_openresty
- linux_openresty_1_17
- linux_openresty_1_19

runs-on: ${{ matrix.platform }}
timeout-minutes: 15
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ t/fuzzing/__pycache__/
boofuzz-results/
*.pyc
*.wasm
t/grpc_server_example/grpc_server_example
t/plugin/grpc-web/grpc-web-server
t/plugin/grpc-web/node_modules/

# release tar package
*.tgz
release/*
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "t/toolkit"]
path = t/toolkit
url = https://github.com/api7/test-toolkit.git
[submodule ".github/actions/action-semantic-pull-request"]
path = .github/actions/action-semantic-pull-request
url = https://github.com/amannn/action-semantic-pull-request.git
2 changes: 1 addition & 1 deletion .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ header:
spdx-id: Apache-2.0
copyright-owner: Apache Software Foundation

license-location-threshold: 250
license-location-threshold: 360

paths-ignore:
- '.gitignore'
Expand Down
Loading

0 comments on commit e36ec4f

Please sign in to comment.