Skip to content

Commit bb2b244

Browse files
authored
Merge branch 'dev' into fix-18074-sql-parameter-type-passing
2 parents 4dbaac0 + 3ec7429 commit bb2b244

70 files changed

Lines changed: 1897 additions & 3653 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.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ ds_schema_check_test
5959
# Agent
6060
docs/superpowers/
6161
.claude/worktrees
62+
CLAUDE.local.md

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ A **user** hits the UI, which calls the API server. The API server writes to the
146146

147147
## Project-wide conventions
148148

149-
- **Formatting**: `./mvnw spotless:apply`. CI will fail PRs that aren't formatted. Java imports are ordered; license headers are enforced.
150-
- **Commit style**: `[Type-ISSUE_ID] [Scope] Subject`, e.g. `[Fix-18168] [Worker] ...`. Scopes match module names.
149+
- **Formatting**: Run `./mvnw spotless:apply` before every commit/push. Spotless covers Java sources, `pom.xml`, and Markdown files (yes, including the docs); CI runs `./mvnw spotless:check` and will fail PRs that aren't formatted. Java imports are ordered; license headers are enforced.
150+
- **Commit style**: `[Type-ISSUE_ID][Scope] Subject`, e.g. `[Fix-18168][Worker] ...`. All types except `Chore` require an issue ID. See [commit-message.md](docs/docs/en/contribute/join/commit-message.md) for the full convention.
151151
- **Branching**: `dev` is the main integration branch (not `main`/`master`).
152152
- **PRs must link a GitHub issue** and keep their scope tight — one module / one concern.
153153
- **Do not break wire / DB compatibility** silently. Changes to `extract-*` RPC interfaces, `dao` entities, enum values, and `spi.DbType` ripple to deployed clusters mid-upgrade.
Lines changed: 57 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,91 @@
11
# Commit Message Notice
22

3-
### Preface
3+
A good commit message states **what changed and why** at a glance. The full story belongs in the linked Issue / Pull Request — keep the commit message itself concise.
44

5-
A good commit message can help other developers (or future developers) quickly understand the context of related changes, and can also help project managers determine whether the commit is suitable for inclusion in the release. But when we checked the commit logs of many open source projects, we found an interesting problem. Some developers have very good code quality, but the commit message record is rather confusing. When other contributors or learners are viewing the code, it can’t be intuitively understood through commit log.
6-
The purpose of the changes before and after the submission, as Peter Hutterer said:Re-establishing the context of a piece of code is wasteful. We can’t avoid it completely, so our efforts should go to reducing it as much as possible. Commit messages can do exactly that and as a result, a commit message shows whether a developer is a good collaborator. Therefore, DolphinScheduler developed the protocol in conjunction with other communities and official Apache documents.
5+
## Format
76

8-
### Commit Message RIP
9-
10-
#### 1:Clearly modify the content
11-
12-
A commit message should clearly state what issues (bug fixes, function enhancements, etc.) the submission solves, so that other developers can better track the issues and clarify the optimization during the version iteration process.
13-
14-
#### 2:Associate the corresponding Pull Request or Issue
15-
16-
When our changes are large, the commit message should best be associated with the relevant Issue or Pull Request on GitHub, so that our developers can quickly understand the context of the code submission through the associated information when reviewing the code. If the current commit is for an issue, then the issue can be closed in the Footer section.
17-
18-
#### 3:Unified format
19-
20-
The formatted CommitMessage can help provide more historical information for quick browsing, and it can also generate a Change Log directly from commit.
21-
22-
Commit message should include three parts: Header, Body and Footer. Among them, Header is required, Body and Footer can be omitted.
23-
24-
##### Header
25-
26-
The header part has only one line, including three fields: type (required), scope (optional), and subject (required).
7+
```
8+
[Type-ISSUE_ID][Scope] Subject
279
28-
[DS-ISSUE number][type] subject
10+
(optional body — bullet list of the main changes)
2911
30-
(1) Type is used to indicate the category of commit, and only the following 7 types are allowed.
12+
(optional footer — BREAKING CHANGE / Closes #xxx)
13+
```
3114

32-
- feat:features
33-
- fix:Bug fixes
34-
- docs:Documentation
35-
- style: Format (does not affect changes in code operation)
36-
- refactor:Refactoring (It is not a new feature or a code change to fix a bug)
37-
- test:Add test
38-
- chore:Changes in the build process or auxiliary tools
15+
Header is required; body and footer are optional. Aim for a Subject under 72 characters so it does not get truncated on GitHub.
3916

40-
If the type is feat and fix, the commit will definitely appear in the change log. Other types (docs, chore, style, refactor, test) are not recommended.
17+
### Type (required)
4118

42-
(2) Scope
19+
| Type | When to use | Issue ID required? |
20+
|---------------|-----------------------------------------------------------------------------------------------------------|----------------------|
21+
| `Feature` | A new user-visible feature | Yes |
22+
| `Improvement` | Enhancement to an existing feature (refactor, perf, UX polish) | Yes |
23+
| `Fix` | Bug fix | Yes |
24+
| `Doc` | Documentation only | Yes |
25+
| `DSIP` | A change implementing a [DSIP](https://github.com/apache/dolphinscheduler/issues?q=label%3ADSIP) proposal | Yes (the DSIP issue) |
26+
| `Chore` | Build, CI, test scaffolding, dependency bumps, trivial cleanup | No |
4327

44-
Scope is used to indicate the scope of commit impact, such as server, remote, etc. If there is no suitable scope, you can use \*.
28+
Every type **except `Chore`** must carry an Issue ID. If no Issue exists for the change, file one first or reclassify it as `Chore`.
4529

46-
(3) subject
30+
### Scope (optional)
4731

48-
Subject is a short description of the purpose of the commit, no more than 50 characters.
32+
The module the change touches: `Master`, `Worker`, `API`, `UI`, `TaskPlugin`, `Dao`, etc. Match a real module name. Omit `[Scope]` when the change is genuinely cross-cutting (most `Chore` commits).
4933

50-
##### Body
34+
### Subject (required)
5135

52-
The body part is a detailed description of this commit, which can be divided into multiple lines, and the line break will wrap with 72 characters to avoid automatic line wrapping affecting the appearance.
36+
A short imperative sentence describing the change.
5337

54-
Note the following points in the Body section:
38+
- Use the imperative mood: *Add*, *Fix*, *Remove* — not *Added* / *Adds*.
39+
- State the **purpose**, not the implementation detail. The diff already shows the *how*.
40+
- No trailing period.
5541

56-
- Use the verb-object structure, note the use of present tense. For example, use change instead of changed or changes
42+
### Body (optional, recommended for non-trivial changes)
5743

58-
- Don't capitalize the first letter
44+
When the change is not self-evident from the Subject, add a bullet list of the main changes. Keep it tight — one line per change point. Lengthy rationale, design notes, or testing plans go in the **Pull Request description** (see [PULL_REQUEST_TEMPLATE.md](https://github.com/apache/dolphinscheduler/blob/dev/.github/PULL_REQUEST_TEMPLATE.md)), not in the commit message.
5945

60-
- The end of the sentence does not need a ‘.’ (period)
46+
### Footer (optional)
6147

62-
##### Footer
48+
- `BREAKING CHANGE: <description>` — for incompatible changes. Required if the change breaks RPC, DB schema, or public API compatibility. Also add an entry to `docs/docs/en/guide/upgrade/incompatible.md`.
49+
- `Closes #1234` — to auto-close the linked issue on merge.
6350

64-
Footer only works in two situations
51+
## Examples
6552

66-
(1) Incompatible changes
53+
Good:
6754

68-
If the current code is not compatible with the previous version, the Footer part starts with BREAKING CHANGE, followed by a description of the change, the reason for the change, and the migration method.
55+
```
56+
[Fix-18201][TaskPlugin] Fix RemoteShell task NullPointerException on empty stdout
57+
```
6958

70-
(2) Close Issue
59+
```
60+
[Improvement-18224][API] Migrate EnvironmentService to typed return values
7161
72-
If the current commit is for a certain issue, you can close the issue in the Footer section, or close multiple issues at once.
62+
- Replace Map<String, Object> returns with dedicated DTOs
63+
- Update controller and unit tests accordingly
64+
```
7365

74-
##### For Example
66+
```
67+
[Chore][API] Remove deprecated ProjectService#checkProjectAndAuth
68+
```
7569

7670
```
77-
[DS-001][docs-en] add commit message
71+
[Feature-17900][Master] Support task-group priority override at runtime
7872
79-
- commit message RIP
80-
- build some conventions
81-
- help the commit messages become clean and tidy
82-
- help developers and release managers better track issues
83-
and clarify the optimization in the version iteration
73+
- Add priority field to TaskGroupQueue
74+
- Honor override when dispatching ready tasks
8475
85-
This closes #001
76+
Closes #17900
8677
```
8778

88-
### Reference documents
79+
Avoid:
80+
81+
- `fix bug` — no type prefix, no scope, no information.
82+
- `[fix] update master` — wrong casing, missing issue ID, vague subject.
83+
- `[Improvement][Master] refactor scheduler to use new state machine and also fix a NPE in worker dispatch and adjust some logs` — multiple unrelated changes; split into separate commits.
8984

90-
[Commit message format](https://cwiki.apache.org/confluence/display/GEODE/Commit+Message+Format)
85+
## References
9186

92-
[On commit messages-Peter Hutterer](http://who-t.blogspot.com/2009/12/on-commit-messages.html)
87+
- [PULL_REQUEST_TEMPLATE.md](https://github.com/apache/dolphinscheduler/blob/dev/.github/PULL_REQUEST_TEMPLATE.md)
88+
- [Pull Request Notice](./pull-request.md)
89+
- [Apache Geode commit message format](https://cwiki.apache.org/confluence/display/GEODE/Commit+Message+Format)
90+
- [On commit messages — Peter Hutterer](http://who-t.blogspot.com/2009/12/on-commit-messages.html)
9391

94-
[RocketMQ Community Operation Conventions](https://mp.weixin.qq.com/s/LKM4IXAY-7dKhTzGu5-oug)

docs/docs/en/contribute/join/pull-request.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,11 @@ Please refer to the commit message section.
8282
[//]: # (DolphinScheduler uses `Spotless` to automatically fix code style and formatting errors,)
8383
[//]: # (see [Development Environment Setup]&#40;../development-environment-setup.md#code-style&#41; `Code Style` section for details.)
8484

85-
DolphinScheduler uses `Spotless` to automatically fix code style and formatting errors,
86-
see [Development Environment Setup](../development-environment-setup.md) `Code Style` section for details.
85+
DolphinScheduler uses `Spotless` to enforce code style and formatting. It covers Java sources, `pom.xml`, and Markdown files (including the docs in this directory).
86+
87+
**Before opening a Pull Request, you must run `./mvnw spotless:apply` locally and commit the result.** CI runs `./mvnw spotless:check` and will fail the PR if any file is not formatted.
88+
89+
See [Development Environment Setup](../development-environment-setup.md) `Code Style` section for details.
8790

8891
### Question
8992

docs/docs/en/contribute/join/submit-code.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ git checkout -b xxx origin/dev
4242
```
4343

4444
Make sure that the branch `xxx` is building successfully on the latest code of the official dev branch
45-
* After modifying the code locally in the new branch, submit it to your own repository:
45+
* After modifying the code locally in the new branch, run `./mvnw spotless:apply` to apply project formatting before committing. CI runs `./mvnw spotless:check` and will fail the PR if any file is not formatted (see [Pull Request Code Style](./pull-request.md#pull-request-code-style)).
46+
47+
* Submit it to your own repository:
4648

4749
`git commit -m 'commit content'`
4850

0 commit comments

Comments
 (0)