Skip to content

Commit 336a83c

Browse files
authored
[type:release] add release note 2.7.1 & changelog.sh (#5860)
* [type:release] add release note 2.7.1 & changelog.sh * [type:release] add changelog.sh * [type:release] add release note 2.7.0
1 parent 8cfcc8d commit 336a83c

File tree

2 files changed

+340
-0
lines changed

2 files changed

+340
-0
lines changed

RELEASE-NOTES.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,136 @@
1+
## [v2.7.0]- 2024-12-23
2+
3+
### ✨ New Features
4+
5+
1. Upgrade dockerfile java runtime version 8 to 17
6+
2. Upgrade SpringBoot to 3.x
7+
3. Support ShenYu Admin Cluster
8+
4. Upgrade checkstyle plugin to 3.4.0
9+
5. Datasource support OceanBase
10+
6. Supports batch modification of selector/rule status
11+
7. Supports batch modification of PathAuth status
12+
8. Upgrade apache dubbo version
13+
9. Support `Contribute with Gitpod`
14+
10. Support Configs Export And Import
15+
11. Add shenyu client heartbeat
16+
12. Support Namespace
17+
13. Support k8s dynamically scale
18+
14. Invalidate Previous Tokens on New Login by Implementing Client ID Validation
19+
15. Support for gray release in divide-plugin
20+
16. Support Kubernetes registry
21+
17. Add shenyu-plugin-wasm
22+
23+
### ⚡Enhancement
24+
25+
1. Add rocketmq logging e2e test
26+
2. Enhance metrics-ratelimiter collect
27+
3. Enhance metrics collection for Sentinel, Resilience4j, and Hystrix
28+
4. Arrange sofa common tools dependencies
29+
5. Remove expired comments
30+
6. Add missing license
31+
7. Set up callback for send message on Kafka
32+
8. Use the loadbalance configuration from metadata for Dubbo
33+
9. Add non null validation for upstream which obtained from select
34+
10. Set timeout which from rule handle to dubbo rpc context
35+
11. Publish event when enable selector and rule
36+
12. Remove closed session from the NAMESPACE_SESSION_MAP
37+
13. Add test case for ShenyuClientURIExecutorSubscriber
38+
14. Add test case for `ShenyuClientIllegalArgumentException`
39+
15. Add test case for `ShenyuClientRegisterEventPublisher`
40+
16. Add test case for `ShenyuClientMetadataExecutorSubscriber`
41+
17. Add test case for `AbstractWasmPluginDataHandler`
42+
18. Add test case for `ShenyuClientRegisterRepositoryFactoryTest`
43+
19. Add test case for `AbstractWasmDiscoveryHandler`
44+
20. Upgrade sofa rpc version support
45+
21. Add header key of Sign plugin to CrossFilter config
46+
22. Encrypt the password
47+
23. Add AbstractShenyuWasmPluginTest
48+
24. RewritePlugin/ContextPathPlugin supports across application and plugin
49+
25. Remove duplicate path check
50+
26. Remove Alibaba Dubbo Support
51+
27. Support docker env set http path
52+
28. Add some code refactor improve
53+
29. Support get token from cookie\header\param
54+
30. Make the default value of ShenyuDubboService annotation equal to that of DubboService annotation
55+
31. Add db script into admin package
56+
32. Get rid of the dead code and add some improvements
57+
33. MotanServiceEventListenerTest case optimization
58+
34. Delete duplicate maven in shenyu-registry-eureka.xml
59+
35. Jwt dependency updated
60+
36. Print plugin execute time
61+
37. Discovery Local support upstream health check in Admin
62+
38. Close rule cache
63+
39. Less concurrency
64+
40. Optimize logic to avoid "orElse" execution,Update VersionTwoExtractor.java
65+
66+
### ♻️Refactor
67+
68+
1. Admin distributed lock by spring-integration-jdbc
69+
2. Refactor beanUtils
70+
3. Remove macos ci
71+
4. Update logging plugin DataBuffer deprecated method
72+
5. Modify e2e k8s to docker compose
73+
6. Migrate Admin swagger from springfox to springdoc
74+
7. Refactor springcloud plugin
75+
8. Refactor some code
76+
9. Delete SO_SNDBUF & SO_RCVBUF
77+
10. Refactor shenyu-sync-data-http : replace log %s -> {}.
78+
11. Optimizing the node type listener
79+
12. Refactor plugin lifecycle
80+
13. Adjust code order and remove invalid input parameters
81+
82+
### 🐛Bug Fix
83+
84+
1. Fix duplicate header for request plugin
85+
2. Fix proxy.selector and discovery not delete when delete divide selector
86+
3. Fix LoggingPlugin error log catch
87+
4. Fix logging plugin sample bug
88+
5. Fix memory overflow
89+
6. Fix rewrite integrated test
90+
7. Fix AbstractWasmPluginDataHandlerTest
91+
8. Fix missing PRIMARY KEY in sql-script/h2/schema.sql
92+
9. Fix Data dictionary page data sorting exception
93+
10. FIx doc error
94+
11. Resolve dashboard routing mismatch post context-path update
95+
12. Fix etcd sync config problem
96+
13. Fix consul sync problem
97+
14. Fix the bug of being unable to query without registration
98+
15. Fix Plugin Edit Page Issue by Correcting Plugin ID Query and Updating Data Type
99+
16. Fix class AdminConstants has word spelling error
100+
17. Fix shenyu-examples-springmvc start failed
101+
18. Fix dashboard menu children sort not working problem
102+
19. Fix ShenyuApacheDubboXmlProviderApplication config
103+
20. Fix data sync dataId for proxy selector and discovery is not unique
104+
21. Filter disable dict option
105+
22. Fix SpringCloudParser MetaData null data
106+
23. Fix client register validation
107+
24. Config dubbo serialize-check-status=DISABLE
108+
25. Fix example TestApacheDubboXmlApplication start failed
109+
26. Fix the nacos data sync model missing the contextPath configuration
110+
27. Fix SPI create non singleton objects in multi-threaded scenarios
111+
28. Fix BadSqlGrammarException
112+
29. Fix some word typo error
113+
30. Fix ListUtil->merge exception
114+
31. Fix metaData disable not filtered
115+
32. Fix divide logging request method
116+
33. Fix e2e chunk header error
117+
34. Fix cookie error and sql check
118+
35. Fixed NPE issue
119+
36. Fix Invalid path error
120+
37. Fix hot load issue
121+
38. Fix e2e test case can not run wget command
122+
39. Fix fallback issue
123+
40. Fix some ci bugs
124+
41. Resolve the sql error in rule-sqlmap.xml
125+
42. Fix readYmlBuildRepository NPE
126+
43. Fix nacos cannot be registered in the Shenyu-examples-SpringCloud project
127+
44. Fix springCloud ruleData path setting didn't used
128+
45. Fix shenyu-plugin-logging-elasticsearch : modify setIndexName of ElasticSearchLogConfig
129+
46. Fix Not first offline from the gateway when stopping service
130+
47. Fix k8s liveness probe can not run wget command error
131+
48. Fix AbstractNodeDataSyncService load discoverUpstream on startup
132+
133+
1134
## 2.6.1
2135

3136
### New Features

changelog.sh

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
#!/bin/sh
2+
# ----------------------------------------------------------------------------
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
# 配置
21+
FROM_TAG=""
22+
TO_TAG="HEAD"
23+
OUTPUT_FILE="CHANGELOG.md"
24+
IGNORE_TYPES=("sync frontend" "merge") # 使用数组更清晰地管理忽略类型
25+
DATE_FORMAT="%Y-%m-%d"
26+
27+
# 函数:处理错误并退出
28+
handle_error() {
29+
echo "Error: $1" >&2
30+
exit 1
31+
}
32+
33+
# 检查 git 是否安装
34+
command -v git >/dev/null 2>&1 || handle_error "git is not installed."
35+
36+
# 生成类型标题
37+
generate_type_header() {
38+
local type="$1"
39+
case "$type" in
40+
feat) echo "### ✨ New Features";;
41+
fix) echo "### Bug Fixes";; # 修改标题为更常见的 "Bug Fixes"
42+
improve) echo "### ⚡ Improvements";;
43+
chore) echo "### Chore";;
44+
refactor) echo "### ♻️ Refactor";;
45+
docs) echo "### Documentation";;
46+
style) echo "### Styles";;
47+
perf) echo "### ⚡ Performance";;
48+
test) echo "### ✅ Tests";;
49+
build) echo "### Build";;
50+
ci) echo "### CI";;
51+
issue) echo "### Issues";;
52+
task) echo "### Tasks";;
53+
other) echo "### Other Changes";;
54+
*) echo "### ❓ Unknown Type: $type";;
55+
esac
56+
}
57+
58+
# 初始化变更日志
59+
initialize_changelog() {
60+
local from="$1"
61+
local to="$2"
62+
local date=$(date +"$DATE_FORMAT")
63+
64+
echo "# Changelog" > "$OUTPUT_FILE"
65+
echo "" >> "$OUTPUT_FILE"
66+
echo "## [$to] - $date" >> "$OUTPUT_FILE"
67+
echo "" >> "$OUTPUT_FILE"
68+
}
69+
70+
# 规范化类型
71+
normalize_type() {
72+
local type="$1"
73+
type=$(echo "$type" | tr '[:upper:]' '[:lower:]')
74+
case "$type" in
75+
feature|feat) echo "feat";;
76+
bugfix|fix) echo "fix";; # 将 bugfix 映射到 fix
77+
improve|improvement) echo "improve";;
78+
*) echo "$type";;
79+
esac
80+
}
81+
82+
# 是否应该忽略类型
83+
should_ignore_type() {
84+
local message="$1"
85+
86+
# 精确匹配忽略的提交信息
87+
for ignore_message in "${IGNORE_TYPES[@]}"; do
88+
if [[ "$message" == "$ignore_message" ]]; then
89+
return 0
90+
fi
91+
done
92+
93+
# 忽略以 "Bump" 开头的提交(不区分大小写)
94+
if echo "$message" | grep -qi "^bump"; then
95+
return 0
96+
fi
97+
return 1
98+
}
99+
100+
# 提取类型
101+
extract_type() {
102+
local message="$1"
103+
local lower_message=$(echo "$message" | tr '[:upper:]' '[:lower:]')
104+
local type=$(echo "$lower_message" | grep -oE '^\[type:([a-zA-Z]+)\]|^type:([a-zA-Z]+)|^\[([a-zA-Z]+)\]|^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert|feature|bugfix|improve|task|issue):?' | sed -E 's/^\[type://; s/\]//g; s/^type://; s/^\[//; s/\]//; s/://')
105+
if [ -z "$type" ]; then
106+
echo "other"
107+
else
108+
normalize_type "$type"
109+
fi
110+
}
111+
112+
# 清理提交信息
113+
clean_commit_message() {
114+
local message="$1"
115+
echo "$message" | sed -E 's/^\[type:[a-zA-Z]+\]//; s/^type:[a-zA-Z]+//; s/^\[[a-zA-Z]+\]//; s/^[a-zA-Z]+://; s/^ *//'
116+
}
117+
118+
# 生成变更日志
119+
generate_changelog() {
120+
local from="$1"
121+
local to="$2"
122+
local tmp_file
123+
124+
initialize_changelog "$from" "$to"
125+
126+
git log "$from..$to" --pretty=format:'%s|%h|%an' | while IFS='|' read -r message hash author; do
127+
type=$(extract_type "$message")
128+
129+
if should_ignore_type "$message"; then # 传递完整的message给should_ignore_type
130+
continue
131+
fi
132+
133+
clean_message=$(clean_commit_message "$message")
134+
135+
tmp_file=$(mktemp) || handle_error "Failed to create temporary file."
136+
echo "- ${clean_message} (${hash}) by ${author}" > "$tmp_file"
137+
138+
if [ ! -f "tmp_${type}.txt" ]; then
139+
mv "$tmp_file" "tmp_${type}.txt"
140+
else
141+
cat "$tmp_file" >> "tmp_${type}.txt"
142+
rm "$tmp_file"
143+
fi
144+
done
145+
146+
# 合并所有类型的变更
147+
for type in feat fix improve chore refactor docs style perf test build ci issue task other; do
148+
if [ -f "tmp_${type}.txt" ]; then
149+
generate_type_header "$type" >> "$OUTPUT_FILE"
150+
echo "" >> "$OUTPUT_FILE"
151+
cat "tmp_${type}.txt" >> "$OUTPUT_FILE"
152+
echo "" >> "$OUTPUT_FILE"
153+
rm "tmp_${type}.txt"
154+
fi
155+
done
156+
}
157+
158+
# 从最近的标签生成
159+
generate_from_latest_tag() {
160+
local latest_tag
161+
latest_tag=$(git describe --tags --abbrev=0 2>/dev/null)
162+
163+
if [ -z "$latest_tag" ]; then
164+
echo "No tags found. Generating changelog for all commits."
165+
generate_changelog "" "$TO_TAG"
166+
else
167+
generate_changelog "$latest_tag" "$TO_TAG"
168+
fi
169+
}
170+
171+
# 使用方法
172+
usage() {
173+
echo "Usage: $0 [-f from_tag] [-t to_tag] [-o output_file]"
174+
echo " -f: Starting tag (default: latest tag)"
175+
echo " -t: Ending tag (default: HEAD)"
176+
echo " -o: Output file (default: $OUTPUT_FILE)"
177+
exit 1
178+
}
179+
180+
# 解析命令行参数
181+
while getopts "f:t:o:h" opt; do
182+
case "$opt" in
183+
f) FROM_TAG="$OPTARG";;
184+
t) TO_TAG="$OPTARG";;
185+
o) OUTPUT_FILE="$OPTARG";;
186+
h) usage;;
187+
\?) usage;;
188+
esac
189+
done
190+
191+
# 验证标签是否存在
192+
if [ ! -z "$FROM_TAG" ] && ! git rev-parse --verify "$FROM_TAG" > /dev/null 2>&1 ; then
193+
handle_error "Invalid from tag: $FROM_TAG"
194+
fi
195+
196+
if [ ! -z "$TO_TAG" ] && ! git rev-parse --verify "$TO_TAG" > /dev/null 2>&1 ; then
197+
handle_error "Invalid to tag: $TO_TAG"
198+
fi
199+
200+
# 执行生成
201+
if [ -z "$FROM_TAG" ]; then
202+
generate_from_latest_tag
203+
else
204+
generate_changelog "$FROM_TAG" "$TO_TAG"
205+
fi
206+
207+
echo "Changelog has been generated in $OUTPUT_FILE"

0 commit comments

Comments
 (0)