Skip to content

Commit 9f7f043

Browse files
committed
Merge remote-tracking branch 'origin/master' into feat/mcp-request-isolation-independent
# Conflicts: # shenyu-plugin/shenyu-plugin-mcp-server/src/main/java/org/apache/shenyu/plugin/mcp/server/transport/ShenyuStreamableHttpServerTransportProvider.java
2 parents feea66b + 474e88c commit 9f7f043

278 files changed

Lines changed: 8256 additions & 709 deletions

File tree

Some content is hidden

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

‎.asf.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ github:
3333
protected_branches:
3434
master:
3535
required_status_checks:
36-
strict: true
36+
strict: false
3737
contexts:
3838
- check-license-header
3939
- build

‎.github/scripts/resolve-ci-modules.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ is_ignored_change() {
8282
local file="$1"
8383

8484
case "${file}" in
85+
*.png|*.jpg|*.jpeg|*.gif|*.svg|*.ico|*.pdf|*.doc|*.docx|DISCLAIMER|*/resources/static/*)
86+
return 0
87+
;;
8588
.github/*|shenyu-e2e/*|shenyu-integrated-test/*|*.md|*.txt|resources/static/*|.asf.yaml|.gitignore|.licenserc.yaml|LICENSE|NOTICE|*/LICENSE|*/NOTICE)
8689
return 0
8790
;;

‎.github/scripts/resolve-test-case-matrix-test.sh‎

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,24 +62,29 @@ assert_file_output() {
6262
assert_output "${mode}" "${changed_files_json}" "${output_name}" "${expected}"
6363
}
6464

65-
assert_ci_ignored() {
66-
local changed_file="$1"
65+
assert_ci_output() {
66+
local changed_files_json="$1"
67+
local expected="$2"
6768
local output_file
6869
local actual
6970

7071
output_file="$(mktemp)"
71-
CHANGED_FILES_JSON="$(jq -cn --arg file "${changed_file}" '[ $file ]')" \
72+
CHANGED_FILES_JSON="${changed_files_json}" \
7273
GITHUB_OUTPUT="${output_file}" \
7374
bash "${SCRIPT_DIR}/resolve-ci-modules.sh" >/dev/null
7475
actual="$(read_output "${output_file}" "has_code_changes")"
7576
rm -f "${output_file}"
7677

77-
if [[ "${actual}" != "false" ]]; then
78-
echo "Expected main CI to ignore ${changed_file}, got has_code_changes=${actual}" >&2
78+
if [[ "${actual}" != "${expected}" ]]; then
79+
echo "Expected has_code_changes=${expected} for ${changed_files_json}, got ${actual}" >&2
7980
return 1
8081
fi
8182
}
8283

84+
assert_ci_ignored() {
85+
assert_ci_output "$(jq -cn --arg file "$1" '[ $file ]')" "false"
86+
}
87+
8388
assert_file_output "k8s-ingress" \
8489
"shenyu-client/shenyu-client-mcp/shenyu-client-mcp-common/pom.xml" \
8590
"run_k8s_ingress" "false"
@@ -120,6 +125,24 @@ readonly ALL_K8S_INGRESS_MATRIX='{"include":[{"case":"shenyu-integrated-test-k8s
120125
readonly ADMIN_REGISTER_E2E_MATRIX='{"include":[{"script":"e2e-http-sync-compose","case":"shenyu-e2e-case-http","example_projects":":shenyu-examples-http"},{"script":"e2e-springcloud-sync-compose","case":"shenyu-e2e-case-spring-cloud","example_projects":":shenyu-examples-eureka,:shenyu-examples-springcloud"},{"script":"e2e-apache-dubbo-sync-compose","case":"shenyu-e2e-case-apache-dubbo","example_projects":":shenyu-examples-apache-dubbo-service"},{"script":"e2e-grpc-sync-compose","case":"shenyu-e2e-case-grpc","example_projects":":shenyu-examples-grpc"},{"script":"e2e-websocket-sync-compose","case":"shenyu-e2e-case-websocket","example_projects":":shenyu-example-spring-native-websocket"}]}'
121126
readonly ADMIN_REGISTER_IT_MATRIX='{"include":[{"case":"shenyu-integrated-test-apache-dubbo"},{"case":"shenyu-integrated-test-grpc"},{"case":"shenyu-integrated-test-http"},{"case":"shenyu-integrated-test-https"},{"case":"shenyu-integrated-test-spring-cloud"},{"case":"shenyu-integrated-test-websocket"},{"case":"shenyu-integrated-test-sdk-apache-dubbo"},{"case":"shenyu-integrated-test-sdk-http"}]}'
122127

128+
# Non-code PRs still run required workflows, but must not schedule builds or E2E.
129+
for ignored_file in .asf.yaml README.md DISCLAIMER \
130+
shenyu-admin/src/main/resources/static/app.js \
131+
shenyu-common/docs/guide.txt; do
132+
assert_ci_ignored "${ignored_file}"
133+
assert_file_output "e2e" "${ignored_file}" "run_e2e" "false"
134+
done
135+
for extension in png jpg jpeg gif svg ico pdf doc docx; do
136+
assert_ci_ignored "shenyu-common/docs/example.${extension}"
137+
assert_file_output "e2e" "shenyu-common/docs/example.${extension}" "run_e2e" "false"
138+
done
139+
assert_output "e2e" '[".asf.yaml", "shenyu-common/docs/example.png", "pom.xml"]' "run_e2e" "true"
140+
assert_ci_output '["pom.xml"]' "true"
141+
assert_ci_output '[".asf.yaml", "shenyu-common/docs/example.png", "pom.xml"]' "true"
142+
assert_ci_output "$(jq -cn --arg file "${ADMIN_SERVICE}" '[ $file ]')" "true"
143+
assert_ci_output "$(jq -cn --arg file "${ADMIN_SERVICE}" '["README.md", $file]')" "true"
144+
assert_output "e2e" "$(jq -cn --arg file "${ADMIN_SERVICE}" '["README.md", $file]')" "run_e2e" "true"
145+
123146
assert_ci_ignored "${E2E_GRPC}"
124147
assert_file_output "e2e" "${E2E_GRPC}" "e2e_matrix" \
125148
'{"include":[{"script":"e2e-grpc-sync-compose","case":"shenyu-e2e-case-grpc","example_projects":":shenyu-examples-grpc"}]}'

‎.github/scripts/resolve-test-case-matrix.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ is_ignored_change() {
106106
local file="$1"
107107

108108
case "${file}" in
109+
*.png|*.jpg|*.jpeg|*.gif|*.svg|*.ico|*.pdf|*.doc|*.docx|DISCLAIMER|*/resources/static/*)
110+
return 0
111+
;;
109112
.github/*|*.md|*.txt|resources/static/*|.asf.yaml|.gitignore|.licenserc.yaml|LICENSE|NOTICE)
110113
return 0
111114
;;

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,8 @@
1616
name: ci
1717

1818
on:
19+
# Required checks must report a result even for documentation-only PRs.
1920
pull_request:
20-
paths-ignore:
21-
- '**.md'
22-
- '**.txt'
23-
- '**.png'
24-
- '**.jpg'
25-
- '**.jpeg'
26-
- '**.gif'
27-
- '**.svg'
28-
- '**.ico'
29-
- '**.pdf'
30-
- '**.doc'
31-
- '**.docx'
32-
- 'LICENSE'
33-
- 'NOTICE'
34-
- 'DISCLAIMER'
35-
- '.asf.yaml'
36-
- '.gitignore'
37-
- '.licenserc.yaml'
38-
- '.github/ISSUE_TEMPLATE/**'
39-
- '.github/PULL_REQUEST_TEMPLATE'
40-
- '**/resources/static/**'
4121
push:
4222
branches:
4323
- master

‎.github/workflows/e2e-k8s.yml‎

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,8 @@
1616
name: e2e
1717

1818
on:
19+
# Required checks must report a result even for documentation-only PRs.
1920
pull_request:
20-
paths-ignore:
21-
- '**.md'
22-
- '**.txt'
23-
- '**.png'
24-
- '**.jpg'
25-
- '**.jpeg'
26-
- '**.gif'
27-
- '**.svg'
28-
- '**.ico'
29-
- '**.pdf'
30-
- '**.doc'
31-
- '**.docx'
32-
- 'LICENSE'
33-
- 'NOTICE'
34-
- 'DISCLAIMER'
35-
- '.asf.yaml'
36-
- '.gitignore'
37-
- '.licenserc.yaml'
38-
- '.github/ISSUE_TEMPLATE/**'
39-
- '.github/PULL_REQUEST_TEMPLATE'
40-
- '**/resources/static/**'
4121
push:
4222
branches:
4323
- master
@@ -398,15 +378,20 @@ jobs:
398378

399379
requirement:
400380
name: e2e
401-
if: ${{ always() && needs.changes.outputs.run_e2e == 'true' }}
381+
if: ${{ always() }}
402382
needs:
403383
- changes
384+
- build-docker-images
404385
- e2e-storage
405386
- e2e-case
406387
runs-on: ubuntu-latest
407388
steps:
408389
- name: checking job status
409390
run: |
391+
[[ "${{ needs.changes.result }}" == "success" ]] || exit 1
392+
if [[ "${{ needs.changes.outputs.run_e2e }}" == "true" ]]; then
393+
[[ "${{ needs.build-docker-images.result }}" == "success" ]] || exit 1
394+
fi
410395
if [[ "${{ needs.changes.outputs.run_storage }}" == "true" ]]; then
411396
[[ "${{ needs.e2e-storage.result }}" == "success" ]] || exit -1
412397
fi

‎.github/workflows/integrated-test.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ jobs:
165165
pull_with_retry amazoncorretto:17.0.11-alpine3.19
166166
pull_with_retry centos:7
167167
pull_with_retry eclipse-temurin:17-centos7
168+
pull_with_retry elasticsearch:8.2.3
168169
- name: Build with Maven
169170
shell: bash
170171
run: |

‎RELEASE-NOTES.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## Unreleased
2+
3+
### Behavior Changes
4+
5+
1. The HTTP client now defaults to a fixed connection pool. Connection acquisition waits up to 3 seconds, and Reactor Netty bounds pending acquisitions to twice the configured maximum connection count. Set `shenyu.httpclient.pool.type=ELASTIC` to retain the previous unbounded behavior.
6+
17
## [v2.7.0]- 2024-12-23
28

39
### ✨ New Features

‎db/init/mysql/schema.sql‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2824,3 +2824,37 @@ INSERT INTO `permission` (`id`, `object_id`, `resource_id`, `date_created`, `dat
28242824
INSERT INTO `permission` (`id`, `object_id`, `resource_id`, `date_created`, `date_updated`) VALUES ('1953049887387303973', '1346358560427216896', '1953048313980116913', '2026-09-21 00:00:00', '2026-09-21 00:00:00');
28252825
INSERT INTO `permission` (`id`, `object_id`, `resource_id`, `date_created`, `date_updated`) VALUES ('1953049887387303974', '1346358560427216896', '1953048313980116914', '2026-09-21 00:00:00', '2026-09-21 00:00:00');
28262826
INSERT INTO `namespace_plugin_rel` (`id`,`namespace_id`,`plugin_id`, `config`, `sort`, `enabled`, `date_created`, `date_updated`) VALUES ('1907261515594055681', '649330b6-c2d7-4edc-be8e-8a54df9eb385', '67', null, 197, 0, '2026-09-21 00:00:00', '2026-09-21 00:00:00');
2827+
2828+
-- Secondary indexes for namespace filtering, relation lookups and ordered listings.
2829+
CREATE INDEX idx_selector_ns_plugin_name ON `selector` (namespace_id, plugin_id, selector_name);
2830+
CREATE INDEX idx_rule_ns_selector_name ON `rule` (namespace_id, selector_id, rule_name);
2831+
CREATE INDEX idx_metadata_path_ns ON `meta_data` (path, namespace_id);
2832+
CREATE INDEX idx_metadata_ns_service ON `meta_data` (namespace_id, service_name);
2833+
CREATE INDEX idx_metadata_ns_app ON `meta_data` (namespace_id, app_name);
2834+
CREATE INDEX idx_app_auth_ns_key ON `app_auth` (namespace_id, app_key);
2835+
CREATE INDEX idx_auth_path_auth ON `auth_path` (auth_id);
2836+
CREATE INDEX idx_auth_param_auth ON `auth_param` (auth_id);
2837+
CREATE INDEX idx_permission_object_resource ON `permission` (object_id, resource_id);
2838+
CREATE INDEX idx_data_permission_user_type ON `data_permission` (user_id, data_type, data_id);
2839+
CREATE INDEX idx_tag_relation_api_tag ON `tag_relation` (api_id, tag_id);
2840+
CREATE INDEX idx_tag_relation_tag_api ON `tag_relation` (tag_id, api_id);
2841+
CREATE INDEX idx_api_path_method_rpc ON `api` (api_path, http_method, rpc_type);
2842+
CREATE INDEX idx_api_context ON `api` (context_path);
2843+
CREATE INDEX idx_api_state_created ON `api` (state, date_created);
2844+
CREATE INDEX idx_api_created ON `api` (date_created);
2845+
CREATE INDEX idx_api_rule_api_rule ON `api_rule_relation` (api_id, rule_id);
2846+
CREATE INDEX idx_ns_plugin_ns_plugin ON `namespace_plugin_rel` (namespace_id, plugin_id, enabled);
2847+
CREATE INDEX idx_discovery_rel_proxy ON `discovery_rel` (proxy_selector_id);
2848+
CREATE INDEX idx_discovery_rel_selector ON `discovery_rel` (selector_id);
2849+
CREATE INDEX idx_discovery_rel_handler ON `discovery_rel` (discovery_handler_id);
2850+
CREATE INDEX idx_discovery_handler_discovery ON `discovery_handler` (discovery_id);
2851+
CREATE INDEX idx_discovery_ns_plugin ON `discovery` (namespace_id, plugin_name);
2852+
CREATE INDEX idx_proxy_selector_ns ON `proxy_selector` (namespace_id);
2853+
CREATE INDEX idx_operation_log_time ON `operation_record_log` (operation_time);
2854+
CREATE INDEX idx_operation_log_operator_time ON `operation_record_log` (operator, operation_time);
2855+
CREATE INDEX idx_instance_ns_ip ON `instance_info` (namespace_id, instance_ip);
2856+
CREATE INDEX idx_mock_record_api ON `mock_request_record` (api_id);
2857+
CREATE INDEX idx_namespace_user_ns_user ON `namespace_user_rel` (namespace_id, user_id);
2858+
CREATE INDEX idx_namespace_user_user_ns ON `namespace_user_rel` (user_id, namespace_id);
2859+
CREATE INDEX idx_user_role_user_role ON `user_role` (user_id, role_id);
2860+
CREATE INDEX idx_resource_parent ON `resource` (parent_id);

‎db/upgrade/2.7.1-upgrade-2.7.2-mysql.sql‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,37 @@ INSERT INTO `permission` (`id`, `object_id`, `resource_id`, `date_created`, `dat
5353
INSERT INTO `permission` (`id`, `object_id`, `resource_id`, `date_created`, `date_updated`) VALUES ('1953049887387303973', '1346358560427216896', '1953048313980116913', '2026-09-21 00:00:00', '2026-09-21 00:00:00');
5454
INSERT INTO `permission` (`id`, `object_id`, `resource_id`, `date_created`, `date_updated`) VALUES ('1953049887387303974', '1346358560427216896', '1953048313980116914', '2026-09-21 00:00:00', '2026-09-21 00:00:00');
5555
INSERT INTO `namespace_plugin_rel` (`id`,`namespace_id`,`plugin_id`, `config`, `sort`, `enabled`, `date_created`, `date_updated`) VALUES ('1907261515594055681', '649330b6-c2d7-4edc-be8e-8a54df9eb385', '67', null, 197, 0, '2026-09-21 00:00:00', '2026-09-21 00:00:00');
56+
57+
-- Secondary indexes for namespace filtering, relation lookups and ordered listings.
58+
CREATE INDEX idx_selector_ns_plugin_name ON `selector` (namespace_id, plugin_id, selector_name);
59+
CREATE INDEX idx_rule_ns_selector_name ON `rule` (namespace_id, selector_id, rule_name);
60+
CREATE INDEX idx_metadata_path_ns ON `meta_data` (path, namespace_id);
61+
CREATE INDEX idx_metadata_ns_service ON `meta_data` (namespace_id, service_name);
62+
CREATE INDEX idx_metadata_ns_app ON `meta_data` (namespace_id, app_name);
63+
CREATE INDEX idx_app_auth_ns_key ON `app_auth` (namespace_id, app_key);
64+
CREATE INDEX idx_auth_path_auth ON `auth_path` (auth_id);
65+
CREATE INDEX idx_auth_param_auth ON `auth_param` (auth_id);
66+
CREATE INDEX idx_permission_object_resource ON `permission` (object_id, resource_id);
67+
CREATE INDEX idx_data_permission_user_type ON `data_permission` (user_id, data_type, data_id);
68+
CREATE INDEX idx_tag_relation_api_tag ON `tag_relation` (api_id, tag_id);
69+
CREATE INDEX idx_tag_relation_tag_api ON `tag_relation` (tag_id, api_id);
70+
CREATE INDEX idx_api_path_method_rpc ON `api` (api_path, http_method, rpc_type);
71+
CREATE INDEX idx_api_context ON `api` (context_path);
72+
CREATE INDEX idx_api_state_created ON `api` (state, date_created);
73+
CREATE INDEX idx_api_created ON `api` (date_created);
74+
CREATE INDEX idx_api_rule_api_rule ON `api_rule_relation` (api_id, rule_id);
75+
CREATE INDEX idx_ns_plugin_ns_plugin ON `namespace_plugin_rel` (namespace_id, plugin_id, enabled);
76+
CREATE INDEX idx_discovery_rel_proxy ON `discovery_rel` (proxy_selector_id);
77+
CREATE INDEX idx_discovery_rel_selector ON `discovery_rel` (selector_id);
78+
CREATE INDEX idx_discovery_rel_handler ON `discovery_rel` (discovery_handler_id);
79+
CREATE INDEX idx_discovery_handler_discovery ON `discovery_handler` (discovery_id);
80+
CREATE INDEX idx_discovery_ns_plugin ON `discovery` (namespace_id, plugin_name);
81+
CREATE INDEX idx_proxy_selector_ns ON `proxy_selector` (namespace_id);
82+
CREATE INDEX idx_operation_log_time ON `operation_record_log` (operation_time);
83+
CREATE INDEX idx_operation_log_operator_time ON `operation_record_log` (operator, operation_time);
84+
CREATE INDEX idx_instance_ns_ip ON `instance_info` (namespace_id, instance_ip);
85+
CREATE INDEX idx_mock_record_api ON `mock_request_record` (api_id);
86+
CREATE INDEX idx_namespace_user_ns_user ON `namespace_user_rel` (namespace_id, user_id);
87+
CREATE INDEX idx_namespace_user_user_ns ON `namespace_user_rel` (user_id, namespace_id);
88+
CREATE INDEX idx_user_role_user_role ON `user_role` (user_id, role_id);
89+
CREATE INDEX idx_resource_parent ON `resource` (parent_id);

0 commit comments

Comments
 (0)