Skip to content

Commit

Permalink
Merge pull request #290 from trydofor/develop
Browse files Browse the repository at this point in the history
3.2.130
  • Loading branch information
trydofor authored Aug 31, 2024
2 parents 08057f7 + a5144e3 commit 73b6147
Show file tree
Hide file tree
Showing 362 changed files with 14,118 additions and 3,249 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ jobs:
labels: [ "feature" ]
- title: "🐞 Bug Fixes"
labels: [ "bug" ]
- title: "💥 Breaking Change"
labels: [ "break" ]
- title: "💎 Enhancements"
labels: [ "better", "devops", "quality" ]
- title: "📝 Documentation"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ jobs:
</settings>
EOF
- name: Qodana Scan
uses: JetBrains/qodana-action@v2023.3
uses: JetBrains/qodana-action@v2024.1
if: steps.settings.outputs.QODANA_SCAN == 'true'
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
## report if not release
- name: Test Coverage ${{ steps.settings.outputs.WINGS_VERSION }} ${{ steps.settings.outputs.GIT_BRANCH }}
if: steps.settings.outputs.MVN_COVERAGE == 'true'
run: |
mvn -P '!module-example,!module-devs' -Dmaven.test.skip=true clean install
mvn -P 'repo-snapshot,!module-example,!module-devs' -Dmaven.test.skip=true clean install
mvn -pl ':devs-codegen' -Ddevs-initdb=true clean test
mvn -P 'report-coverage,!module-example,!module-devs' -Dmaven.test.failure.ignore=$TESTFAILS_IGNORE test
mvn -P 'report-coverage' -pl ':devs-coverage' -am jacoco:report-aggregate
Expand All @@ -181,7 +181,7 @@ jobs:
if: steps.settings.outputs.MVN_DEPLOY_OSSRH == 'true'
run: >
mvn
-P 'deploy,deploy-oss,!module-example,!module-devs'
-P 'repo-snapshot,deploy,deploy-oss,!module-example,!module-devs'
${{ steps.settings.outputs.MVN_REVISION }}
-Dgpg.passphrase=${MVN_GPG_PASS}
-Dorg.slf4j.simpleLogger.log.lombok=WARN
Expand All @@ -200,7 +200,7 @@ jobs:
continue-on-error: ${{ inputs.deployAltrh != 'true' }}
run: >
mvn
-P 'deploy,deploy-alt,deploy-old,!module-example,!module-devs'
-P 'repo-snapshot,deploy,deploy-alt,deploy-old,!module-example,!module-devs'
${{ steps.settings.outputs.MVN_REVISION }}
-Dgpg.passphrase=${MVN_GPG_PASS}
-Dorg.slf4j.simpleLogger.log.lombok=WARN
Expand Down
10 changes: 10 additions & 0 deletions WingsBoot.t.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Use `t.md` as local [Test Management](https://www.jetbrains.com/help/idea/test-m
* 11033 ThisLazyCglibTest: thisLazy with cglib
* 11034 ThisLazyProxyTest: thisLazy with default jdk proxy
* 11035 TypedClassTest: ResolvableType sugar
* 11036 CommonPropHelperTest: comma delimited string
* 11037 CommonPropHelperTest: resource string

## 12 Faceless

Expand Down Expand Up @@ -323,6 +325,7 @@ Use `t.md` as local [Test Management](https://www.jetbrains.com/help/idea/test-m
* 13125 JsonHelperCompatibleTest: jackson basic type compatible
* 13126 FastJsonTest: fastjson helper json path
* 13127 TypeReferenceTest: TypeReference, TypeDescriptor, ResolvableType
* 13128 LogViewerTest: only match header line

## 14 Warlock

Expand Down Expand Up @@ -411,6 +414,7 @@ Use `t.md` as local [Test Management](https://www.jetbrains.com/help/idea/test-m
* 14083 DatabaseShard0Test: clean and init shard_0 schema
* 14084 DatabaseShard1Test: clean and init shard_1 schema
* 14085 ExceptionStackTest: MessageException is stackless by default
* 14086 JournalControllerTest: ttl/plain context check

## 15 Tiny

Expand All @@ -430,3 +434,9 @@ Use `t.md` as local [Test Management](https://www.jetbrains.com/help/idea/test-m
* 15014 TinyTaskExecServiceTest: sleep 70s and check task
* 15015 MailNoticeTest: title dryrun mailNotice
* 15016 MailSenderManagerTest: title dryrun batch mail
* 15017 TinyMailServiceDbTest: mock fail and check database
* 15018 TinyTrackServiceTest: tiny track AOP service
* 15019 TinyTrackServiceTest: tiny track Mvc controller
* 15020 TinyTaskBeatServiceImplTest: beat mills cron/rate/idle
* 15021 TinyTaskExecServiceImplTest: calculate next schedule

4 changes: 2 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Help Yourself [Commits] and [History]

Notable [Changes] in [WingsDoc]

[History]: https://github.com/trydofor/pro.fessional.wings/tags
[Commits]: https://github.com/trydofor/pro.fessional.wings/commits/develop
[History]: https://github.com/trydofor/professional-wings/tags
[Commits]: https://github.com/trydofor/professional-wings/commits/develop
[Changes]: https://wings.fessional.pro/9-example/9a.wings-change/
[WingsDoc]: https://wings.fessional.pro/
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
DROP TABLE IF EXISTS `winx_user_detail`; -- 210/User Detail;

-- CALL FLYWAVE('2022-0222u01-demo-init.sql');
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
-- CREATE DATABASE `wings_example` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;

CREATE TABLE `winx_user_detail` (
`id` BIGINT(20) NOT NULL COMMENT 'primary key',
`id` BIGINT NOT NULL COMMENT 'primary key',
`create_dt` DATETIME(3) NOT NULL DEFAULT NOW(3) COMMENT 'created datetime(sys)',
`modify_dt` DATETIME(3) NOT NULL DEFAULT '1000-01-01' ON UPDATE NOW(3) COMMENT 'modified datetime(sys)',
`delete_dt` DATETIME(3) NOT NULL DEFAULT '1000-01-01' COMMENT 'logic deleted datetime',
`commit_id` BIGINT(20) NOT NULL COMMENT 'commit id',
`user_id` BIGINT(20) NOT NULL COMMENT 'win_user_basis.id',
`user_type` INT(11) NOT NULL DEFAULT '0' COMMENT 'user type/21001##:customer|operator|helpdesk',
`commit_id` BIGINT NOT NULL COMMENT 'commit id',
`user_id` BIGINT NOT NULL COMMENT 'win_user_basis.id',
`user_type` INT NOT NULL DEFAULT '0' COMMENT 'user type/21001##:customer|operator|helpdesk',
`email` VARCHAR(100) NOT NULL DEFAULT '' COMMENT 'user email',
PRIMARY KEY (`id`),
UNIQUE INDEX uq_user_id (`user_id`),
Expand All @@ -26,3 +26,5 @@ VALUES (2100100, 'user_type', 'user_type', 'User Type', 'classpath:/wings-tmpl/C
(2100101, 'user_type', 'customer', 'customer', 'customer'),
(2100102, 'user_type', 'operator', 'operator', 'operator'),
(2100103, 'user_type', 'helpdesk', 'helpdesk', 'helpdesk');

-- CALL FLYWAVE('2022-0222v01-demo-init.sql');
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
"spring.datasource.url=" + Devops0ProjectConstant.JDBC_URL,
"spring.datasource.username=" + Devops0ProjectConstant.JDBC_USER,
"spring.datasource.password=" + Devops0ProjectConstant.JDBC_PASS,
// "wings.silencer.i18n.zoneid=UTC",
"wings.enabled.faceless.flywave=true",
"wings.faceless.flywave.auto-init=true",
"wings.faceless.flywave.checker=true",
"java.awt.headless=false",
"debug=true"
})
class Devops1SchemaManagerTest {

Expand All @@ -37,6 +43,15 @@ void initSchema() {
);
}

@Test
void bumpSchema() {
final Warlock1SchemaManager manager = new Warlock1SchemaManager(schemaRevisionManager);
manager.mergeBumping(2022_0222_01L,
includeWarlockPath(),
Helper::master
);
}

@Test
void resetSchema() {
long revi = 2022_0222_01L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.io.ResourceLoader;
import pro.fessional.mirana.data.CodeEnum;
import pro.fessional.wings.silencer.spring.help.SubclassSpringLoader;
import pro.fessional.wings.silencer.support.SubclassGather;

import java.util.Map;

Expand All @@ -27,7 +27,7 @@ public class Devops7EnumsDumperTest {

@Test
public void dumpCodeEnum() {
SubclassSpringLoader loader = new SubclassSpringLoader(resourceLoader);
SubclassGather loader = new SubclassGather(resourceLoader);
Class<CodeEnum> superEnum = CodeEnum.class;

Map<Class<?>, Enum<?>[]> enums = loader.loadSubEnums("pro.fessional", superEnum);
Expand Down
2 changes: 1 addition & 1 deletion observe/docs
Submodule docs updated 68 files
+1 −1 .tool-versions
+1 −0 README.md
+966 −716 package-lock.json
+5 −5 package.json
+5 −5 src/0-wings/0a-code-style.md
+74 −0 src/0-wings/0d-qa-devops.md
+32 −14 src/0-wings/0e-qa-config.md
+414 −228 src/0-wings/0h-prop-index.md
+41 −1 src/2-faceless/2a-flywave.md
+2 −2 src/2-faceless/2e-qa-flywave.md
+15 −1 src/2-faceless/2i-prop-faceless.md
+3 −3 src/2-faceless/2j-prop-flywave.md
+6 −2 src/3-slardar/3i-prop-slardar.md
+20 −3 src/3-slardar/3k-prop-function.md
+1 −5 src/4-warlock/4d-prop-warlock.md
+15 −1 src/4-warlock/4f-api-oauth.md
+2 −0 src/4-warlock/4g-watching.md
+17 −10 src/8-radiant/8b-prop-tinytask.md
+31 −3 src/8-radiant/8c-tinymail.md
+13 −1 src/8-radiant/8d-prop-tinymail.md
+85 −0 src/8-radiant/8e-tinygrow.md
+46 −0 src/8-radiant/8f-prop-tinygrow.md
+2 −0 src/8-radiant/README.md
+18 −2 src/9-example/9a.wings-change/9a0.notable.md
+30 −2 src/9-example/9a.wings-change/9a6.320-100.md
+1 −1 src/9-example/9a.wings-change/README.md
+1 −1 src/9-example/9b.spring-boot/9b2.actuator-admin.md
+1 −1 src/a-mirana/README.md
+1 −1 src/a-mirana/a1.mirana.md
+9 −5 src/a-mirana/a2.utilities.md
+1 −1 src/b-meepo/README.md
+1 −1 src/b-meepo/b1.meepo.md
+1 −1 src/b-meepo/b2.example.md
+1 −1 src/b-meepo/b3.syntax.md
+1 −1 src/b-meepo/b4.engine.md
+13 −13 src/b-meepo/b5.function.md
+1 −1 src/b-meepo/b6.question.md
+5 −5 src/zh/0-wings/0a-code-style.md
+72 −0 src/zh/0-wings/0d-qa-devops.md
+33 −15 src/zh/0-wings/0e-qa-config.md
+40 −1 src/zh/2-faceless/2a-flywave.md
+2 −2 src/zh/2-faceless/2e-qa-flywave.md
+15 −1 src/zh/2-faceless/2i-prop-faceless.md
+3 −3 src/zh/2-faceless/2j-prop-flywave.md
+6 −2 src/zh/3-slardar/3i-prop-slardar.md
+21 −4 src/zh/3-slardar/3k-prop-function.md
+1 −5 src/zh/4-warlock/4d-prop-warlock.md
+15 −1 src/zh/4-warlock/4f-api-oauth.md
+2 −0 src/zh/4-warlock/4g-watching.md
+40 −13 src/zh/8-radiant/8b-prop-tinytask.md
+28 −2 src/zh/8-radiant/8c-tinymail.md
+13 −1 src/zh/8-radiant/8d-prop-tinymail.md
+84 −0 src/zh/8-radiant/8e-tinygrow.md
+46 −0 src/zh/8-radiant/8f-prop-tinygrow.md
+4 −2 src/zh/8-radiant/README.md
+31 −4 src/zh/9-example/9a.wings-change/9a6.320-100.md
+1 −1 src/zh/9-example/9a.wings-change/README.md
+1 −1 src/zh/9-example/9b.spring-boot/9b2.actuator-admin.md
+1 −1 src/zh/a-mirana/README.md
+1 −1 src/zh/a-mirana/a1.mirana.md
+9 −5 src/zh/a-mirana/a2.utilities.md
+1 −1 src/zh/b-meepo/README.md
+1 −1 src/zh/b-meepo/b1.meepo.md
+1 −1 src/zh/b-meepo/b2.example.md
+1 −1 src/zh/b-meepo/b3.syntax.md
+1 −1 src/zh/b-meepo/b4.engine.md
+8 −8 src/zh/b-meepo/b5.function.md
+1 −1 src/zh/b-meepo/b6.question.md
2 changes: 1 addition & 1 deletion observe/mirana
Submodule mirana updated 25 files
+84 −0 .github/workflows/release-notes.yml
+1 −1 pom.xml
+139 −0 src/main/java/pro/fessional/mirana/cast/MethodConvertor.java
+115 −0 src/main/java/pro/fessional/mirana/cond/IfSetter.java
+105 −10 src/main/java/pro/fessional/mirana/cond/StaticFlag.java
+26 −0 src/main/java/pro/fessional/mirana/data/Null.java
+1 −2 src/main/java/pro/fessional/mirana/evil/ThreadLocalSoft.java
+3 −12 src/main/java/pro/fessional/mirana/flow/ReturnOrException.java
+12 −7 src/main/java/pro/fessional/mirana/func/Lam.java
+1 −9 src/main/java/pro/fessional/mirana/pain/IORuntimeException.java
+35 −44 src/main/java/pro/fessional/mirana/pain/ThrowableUtil.java
+22 −0 src/main/java/pro/fessional/mirana/pain/UncheckedException.java
+98 −33 src/main/java/pro/fessional/mirana/stat/LogStat.java
+1 −2 src/main/java/pro/fessional/mirana/time/StopWatch.java
+11 −11 src/main/java/pro/fessional/mirana/tk/AnyTicket.java
+34 −13 src/main/java/pro/fessional/mirana/tk/Ticket.java
+15 −1 src/main/java/pro/fessional/mirana/tk/TicketHelp.java
+87 −0 src/test/java/pro/fessional/mirana/cast/MethodConvertorTest.java
+87 −0 src/test/java/pro/fessional/mirana/cond/StaticFlagTest.java
+4 −0 src/test/java/pro/fessional/mirana/func/LamTest.java
+13 −37 src/test/java/pro/fessional/mirana/jmh/SetterMain.java
+14 −4 src/test/java/pro/fessional/mirana/pain/ThrowableUtilTest.java
+66 −0 src/test/java/pro/fessional/mirana/stat/LogStatTest.java
+2 −2 src/test/java/pro/fessional/mirana/tk/AnyTicketTest.java
+33 −0 src/test/resources/log-stat.txt
16 changes: 8 additions & 8 deletions observe/scripts/wings-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ $IMAGE_ENV_JAVA_ADD \

#######
function show_help() {
echo -e '\033[32m clean <dep|app|all> <boot-jar> \033[m clean docker-<dep|app|all> build dir of boot-jar'
echo -e '\033[32m print <dep|app|all> <boot-jar> \033[m print docker-<dep|app|all> Dockerfile of boot-jar'
echo -e '\033[32m unzip <dep|app|all> <boot-jar> \033[m unzip docker-<dep|app|all> files of boot-jar'
echo -e '\033[32m build <dep|app|all> <boot-jar> \033[m build docker-<dep|app|all> image of boot-jar'
echo -e '\033[32m help \033[m show this'
echo -e '\033[32m <dep> \033[m only dependencies + spring-boot-loader'
echo -e '\033[32m <app> \033[m <dep> + napshot-dependencies + application'
echo -e '\033[32m <all> \033[m <dep> + <app>'
echo -e '\033[32m clean <dep|app|all> <boot-jar> \033[0m clean docker-<dep|app|all> build dir of boot-jar'
echo -e '\033[32m print <dep|app|all> <boot-jar> \033[0m print docker-<dep|app|all> Dockerfile of boot-jar'
echo -e '\033[32m unzip <dep|app|all> <boot-jar> \033[0m unzip docker-<dep|app|all> files of boot-jar'
echo -e '\033[32m build <dep|app|all> <boot-jar> \033[0m build docker-<dep|app|all> image of boot-jar'
echo -e '\033[32m help \033[0m show this'
echo -e '\033[32m <dep> \033[0m only dependencies + spring-boot-loader'
echo -e '\033[32m <app> \033[0m <dep> + napshot-dependencies + application'
echo -e '\033[32m <all> \033[0m <dep> + <app>'
}

function docker_file() {
Expand Down
18 changes: 9 additions & 9 deletions observe/scripts/wings-mysql-dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ dumpopts=${*:3}
logxopts="--no-data"
confopts=--defaults-extra-file=$extracnf
if [[ -f "$extracnf" ]]; then
echo -e "\033[0;33mNOTE: defaults-extra-file \033[m"
echo -e "\033[0;33mNOTE: defaults-extra-file \033[0m"
grep -E "^(host|port|user)" "$extracnf"
else
echo -e "\033[0;31mERROR: should specific mysql config(at param-1), eg. ~/my.cnf\033[m"
echo -e "\033[0;31mERROR: should specific mysql config(at param-1), eg. ~/my.cnf\033[0m"
cat << 'EOF'
[client]
protocol=tcp
Expand All @@ -52,9 +52,9 @@ unalias mysql >/dev/null 2>&1
unalias mysqldump >/dev/null 2>&1

if [[ "$database" == "" ]]; then
echo -e "\033[0;31mWARN: need database(at param-2) to dump, eg.\033[m"
echo -e "\033[0;31mWARN: need database(at param-2) to dump, eg.\033[0m"
echo "./wings-mysql-dump.sh wings-mysql-client.cnf database --no-data"
echo -e "\033[0;33mNOTE:current databases \033[m"
echo -e "\033[0;33mNOTE:current databases \033[0m"
# shellcheck disable=SC2086
mysql $confopts -N -e "show databases;"
exit
Expand All @@ -81,7 +81,7 @@ if [[ $logs_cnt == 0 ]]; then
echo "no logs tables to dump"
echo "-- no logs tables to dump" > "$dump_logs_file"
else
echo -e "\033[0;33mNOTE: dump logs tables without data, count=$logs_cnt\033[m"
echo -e "\033[0;33mNOTE: dump logs tables without data, count=$logs_cnt\033[0m"

# shellcheck disable=SC2046,SC2086
if mysqldump $confopts $dumpopts $logxopts \
Expand All @@ -98,7 +98,7 @@ if [[ $main_cnt == 0 ]]; then
echo "no main tables to dump"
echo "-- no main tables to dump" > "$dump_main_file"
else
echo -e "\033[0;33mNOTE: dump main tables with data, count=$main_cnt\033[m"
echo -e "\033[0;33mNOTE: dump main tables with data, count=$main_cnt\033[0m"
# shellcheck disable=SC2046,SC2086
if mysqldump $confopts $dumpopts \
"$database" $(grep -vE '\$|__' "$dump_tbl_file") > "$dump_main_file"; then
Expand All @@ -109,13 +109,13 @@ else
fi
fi

echo -e "\033[0;33mNOTE: dump file $dump_head\033[m"
echo -e "\033[0;33mNOTE: dump file $dump_head\033[0m"
echo >> "$dump_tbl_file"

# shellcheck disable=SC2010
ls -lsh |grep "$dump_head" | tee -a "$dump_tbl_file"

echo -e "\033[0;33mNOTE: tips for zip, scp, restore \033[m"
echo -e "\033[0;33mNOTE: tips for zip, scp, restore \033[0m"
tee -a "$dump_tip_file" << EOF
## checksum
md5sum -c $dump_md5_file # checksum
Expand Down Expand Up @@ -153,7 +153,7 @@ cat $dump_logs_file $dump_main_file \\
./reset-password.sh \$mycnf \$newdb;
EOF

echo -e "\033[0;33mNOTE: tar files into $dump_tar_file \033[m"
echo -e "\033[0;33mNOTE: tar files into $dump_tar_file \033[0m"
tar -czf "$dump_tar_file" "$dump_tip_file" "$dump_tbl_file" "$dump_logs_file" "$dump_main_file" \
&& md5sum "$dump_tar_file" | tee "$dump_md5_file" \
&& rm -f "$dump_tbl_file" "$dump_logs_file" "$dump_main_file"
10 changes: 5 additions & 5 deletions observe/scripts/wings-mysql-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ command="$2"
option="$3"

if [[ "$command" == "" || "$command" == "help" || ! -f "$userenv" ]]; then
echo -e '\033[37;42;1mNOTE: users env file\033[m'
echo -e '\033[37;42;1mNOTE: users env file\033[0m'
# https://dev.mysql.com/doc/refman/8.0/en/account-management-statements.html
cat <<'EOF'
execute=false
Expand All @@ -54,7 +54,7 @@ host_app=10.11.%
host_dev=%
host_dba=%
EOF
echo -e '\033[37;42;1mNOTE: user manage\033[m'
echo -e '\033[37;42;1mNOTE: user manage\033[0m'
cat <<'EOF'
RENAME USER 'trydofor'@'%' TO 'trydofor'@'127.0.%';
DROP USER IF EXISTS 'trydofor'@'%';
Expand Down Expand Up @@ -91,7 +91,7 @@ fi
[[ "$host_dev" == "" ]] && host_dev=%
[[ "$host_dba" == "" ]] && host_dba=%

echo -e '\033[37;42;1mNOTE: users and passwd\033[m'
echo -e '\033[37;42;1mNOTE: users and passwd\033[0m'
grep -v '^#' <<EOF
${user_raw}${user_pre}${name_pre}raw $pass_raw
${user_app}${user_pre}${name_pre}app $pass_app
Expand All @@ -100,7 +100,7 @@ ${user_dba}${user_pre}${name_pre}dba $pass_dba
EOF

temp_sql="$userenv.sql"
echo -e "\033[37;42;1mNOTE: sql script $temp_sql\033[m"
echo -e "\033[37;42;1mNOTE: sql script $temp_sql\033[0m"
rm "$temp_sql" >/dev/null 2>&1

if [[ "$command" == "create" ]]; then
Expand Down Expand Up @@ -148,7 +148,7 @@ if [[ "$execute" == "true" ]]; then
unalias mysql >/dev/null 2>&1

if [[ -f "$option" ]]; then
echo -e "\033[0;33mNOTE: current option file \033[m"
echo -e "\033[0;33mNOTE: current option file \033[0m"
cat "$option"
mysql --defaults-extra-file="$option" -vvv --force < "$temp_sql"
else
Expand Down
Loading

0 comments on commit 73b6147

Please sign in to comment.