You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use GitHub issues to track bugs and enhancements.
15
-
If you have a general usage question please ask on https://stackoverflow.com[Stack Overflow].
17
+
If you have a general usage question, please ask on https://stackoverflow.com[Stack Overflow].
16
18
The Spring Data team and the broader community monitor the https://stackoverflow.com/tags/spring-data[`spring-data`] tag.
17
19
18
20
If you are reporting a bug, please help to speed up problem diagnosis by providing as much information as possible.
19
21
Ideally, that would include a small sample project that reproduces the problem.
20
22
21
23
== Reporting Security Vulnerabilities
22
-
If you think you have found a security vulnerability in Spring Data please *DO NOT* disclose it publicly until we've had a chance to fix it.
24
+
25
+
If you think you have found a security vulnerability in Spring Data, please *DO NOT* disclose it publicly until we've had a chance to fix it.
23
26
Please don't report security vulnerabilities using GitHub issues, instead head over to https://spring.io/security-policy and learn how to disclose them responsibly.
24
27
25
28
[[how-to-contribute]]
@@ -28,7 +31,7 @@ Please don't report security vulnerabilities using GitHub issues, instead head o
28
31
[[security-vulnerabilities]]
29
32
=== Reporting Security Vulnerabilities
30
33
31
-
If you think you have found a security vulnerability in Spring Data please **DO NOT** disclose it publicly until we’ve had a chance to fix it.
34
+
If you think you have found a security vulnerability in Spring Data, please **DO NOT** disclose it publicly until we’ve had a chance to fix it.
32
35
Please don’t report security vulnerabilities using GitHub issues, instead head over to https://pivotal.io/security and learn how to disclose them responsibly.
33
36
34
37
[[discuss]]
@@ -47,10 +50,10 @@ For the impatient, if you want to submit a quick pull request (polishing, trivia
47
50
48
51
1. API changes require discussion, use cases, etc.
49
52
Code comes later.
50
-
Create a issue in the GitHub issue tracker and stop here.
53
+
Create an issue in the GitHub issue tracker and stop here.
51
54
In every other case continue with step 2.
52
55
2. Make sure you use the code formatters provided https://github.com/spring-projects/spring-data-build/tree/main/etc/ide[here] and have them applied to your changes.
53
-
Don't submit any formattingrelated changes.
56
+
Don't submit any formatting-related changes.
54
57
3. Make sure you submit test cases (unit or integration tests) that back your changes.
55
58
4. Try to reuse existing test sample code (domain classes).
56
59
Try not to amend existing test cases but create new ones dedicated to the changes you're making to the codebase.
@@ -64,7 +67,7 @@ void yourTestMethod() { … }
64
67
----
65
68
+
66
69
6. Make sure you added yourself as author in the headers of the classes you touched.
67
-
Amend the date range in the Apache license header if needed.
70
+
Amend the date range in the Apache License header if needed.
68
71
For new types, add the license header (copy from another file and set the current year only).
69
72
7. Make sure you follow the <<commit-messages>> guidelines.
70
73
8. Make sure you provide your full name and an email address registered with your GitHub account.
@@ -95,8 +98,8 @@ For more details read https://asciidoctor.org/docs/editing-asciidoc-with-live-pr
95
98
96
99
The commit message should follow the following style:
97
100
98
-
* First line contains the summary starting with a capital letter.
99
-
* Finish summary with a dot.
101
+
* The first line contains the summary starting with a capital letter.
102
+
* Finish the summary with a dot.
100
103
* In the description, don't use single line breaks.
101
104
No manual wrapping.
102
105
Separate paragraphs by a blank line.
@@ -115,6 +118,20 @@ Closes #?? (optionally close tickets)
115
118
Related tickets #??? (optionally refer to related tickets)
116
119
----
117
120
121
+
=== Use of AI
122
+
123
+
It is ok to use AI to help you shape your contribution.
124
+
We (hopefully) can't tell the difference anyway.
125
+
You are still responsible for everything you commit, push, submit, or otherwise contribute to this project.
126
+
127
+
Unfortunately, we lately encountered an increased amount of contribution where we could tell the difference.
128
+
These suffered from extreme cases of "AI slop".
129
+
Descriptions that could have been a handful sentences stretched for pages and pages.
130
+
Sifting through such documents to find the relevant information is extremely tiring and frustrating.
131
+
132
+
We will close and reject such contributions with a simple comment and will not engage in further discussion.
133
+
You may, however, create a new PR or issue in a terser format.
134
+
118
135
[[advanced]]
119
136
== Advanced
120
137
@@ -123,17 +140,18 @@ This section contains some advanced information, mainly targeted at developers o
123
140
[[advanced.general]]
124
141
=== General
125
142
126
-
* Fix bugs in main first, if it's reasonable to port the fix back into a bugfix branch, try to do so with cherrypicking.
143
+
* Fix bugs in `main` first, if it's reasonable to port the fix back into a bugfix branch, try to do so with cherry-picking.
127
144
* Try to keep the lifespan of a feature branch as short as possible.
128
145
For simple bug fixes they should only be used for code review in pull requests.
129
-
* On longer running feature branches, don't pull changes that were made to main in the meantime.
130
-
Instead, rebase the feature branch onto current main, sorting out issues and making sure the branch will fast-forward merge eventually.
146
+
* On longer running feature branches, don't pull changes that were made to `main` in the meantime.
147
+
Instead, rebase the feature branch onto the current `main`, sorting out issues and making sure the branch will fast-forward merge eventually.
131
148
132
149
[[advanced.dependency-management]]
133
150
=== Dependency management
134
151
135
152
* When upgrading dependencies of a project, make sure you apply the following rules:
136
-
** For service releases of a release train only upgrades to bugfix versions are allowed. I.e. if a GA release of a release train included a dependency in version 2.6.2, you must only upgrade to 2.6.x versions.
153
+
** For service releases of a release train, only upgrades to bugfix versions are allowed.
154
+
I.e., if a GA release of a release train included a dependency in version 2.6.2, you must only upgrade to 2.6.x versions.
137
155
Upgrading to 2.7 is *not allowed*.
138
156
** During the milestone phase of a new release train, upgrade to the latest version of a dependency unless compatibility with a former version is required.
139
157
Upgrades to new major versions are allowed, too, but consider ways to support multiple major versions for one release train to allow a smoother transition.
@@ -143,12 +161,13 @@ Upgrades to new major versions are allowed, too, but consider ways to support mu
143
161
144
162
We use JMH for micro-benchmarks.
145
163
146
-
Our benchmarks are located in the `src/jmh/java` directory so that we compile these as part of our main build. To run benchmarks during development we leverage JUnit 5 and the https://github.com/mp911de/microbenchmark-runner[Microbenchmark Runner].
164
+
Our benchmarks are located in the `src/jmh/java` directory so that we compile these as part of our main build.
165
+
To run benchmarks during development, we leverage JUnit 6 and the https://github.com/mp911de/microbenchmark-runner[Microbenchmark Runner].
147
166
Enable the `jmh` Maven Profile, add `@Testable` to the benchmark you want to run (of the benchmark class) and run it as it was a JUnit test right from your IDE.
148
167
149
168
NOTE: Microbenchmark Runner is not a tool for running final benchmarks, rather it helps to quickly run benchmarks during development to reduce turnaround time.
150
169
151
-
Benchmarks aren't ran during the build.
170
+
Benchmarks aren't run during the build.
152
171
153
172
JMH's Benchmark Generator (Annotation Processor) must be enabled in each module with the Maven Compiler, see the following example:
154
173
@@ -178,18 +197,19 @@ Once the issue has been reviewed, the team may ask for further information if ne
178
197
When a fix is ready, the issue is closed and may still be re-opened until the fix is released.
179
198
After that the issue will typically no longer be reopened.
180
199
In rare cases if the issue was not at all fixed, the issue may be re-opened.
181
-
In most cases however any follow-up reports will need to be created as new issues with a fresh description.
200
+
In most cases, however, any follow-up reports will need to be created as new issues with a fresh description.
182
201
* Make sure you don't commit without referring to a GitHub issue.
183
202
If we have a rather general task to work on, create a GitHub issue for it and commit against that one.
184
-
* Try to resolve a GitHub issue in a single commit. I.e. don't have separate commits for the fix and the test cases.
203
+
* Try to resolve a GitHub issue in a single commit.
204
+
I.e., don't have separate commits for the fix and the test cases.
185
205
When polishing pull requests requires some more effort, have a separate commit to clearly document the polishing (and attribute the efforts to you).
186
206
* We usually use feature branches to work on GitHub issues and potentially let multiple people work on a feature.
187
-
There's a https://github.com/spring-projects/spring-data-build/tree/main/etc/scripts[new-issue-branch script] available that sets up a feature branch for you, and adds a commit changing the Maven version numbers so that the branch builds can still publish snapshot artifacts but don't interfere with each other.
207
+
There's a https://github.com/spring-projects/spring-data-build/tree/main/etc/scripts[new-issue-branch script] available that sets up a feature branch for you and adds a commit changing the Maven version numbers so that the branch builds can still publish snapshot artifacts but don't interfere with each other.
188
208
* Follow the commit message style described in <<quickstart>>.
189
209
Especially the summary line should adhere to the style documented there.
190
210
* After pushing fixes to the remote repository, mark the GitHub issues as resolved in and set the earliest milestone that ships the fix according to which branches you pushed to.
191
211
* Avoid merge commits as they just tend to make it hard to understand what comes from where.
192
-
Using the GitHub issue number in the commit message will allow us to keep track for commits belonging together.
212
+
Using the GitHub issue number in the commit message will allow us to keep track of commits belonging together.
193
213
194
214
[[advanced.code-style]]
195
215
=== Source Code style
@@ -206,14 +226,14 @@ For methods consisting of more than one line of code, have a blank line after th
206
226
=== Handling pull requests
207
227
208
228
* Be polite.
209
-
It might be the first time someone contributes to an OpenSource project so we should forgive violations to the contribution guidelines.
229
+
It might be the first time someone contributes to an OpenSource project, so we should forgive violations to the contribution guidelines.
210
230
Use some gut feeling to find out in how far it makes sense to ask the reporter to fix stuff or just go ahead and add a polishing commit yourself.
211
231
* All commits must include a __Signed-off-by__ trailer at the end of each commit message to indicate that the contributor agrees to the Developer Certificate of Origin.
212
232
For additional details, please refer to the blog post https://spring.io/blog/2025/01/06/hello-dco-goodbye-cla-simplifying-contributions-to-spring[Hello DCO, Goodbye CLA: Simplifying Contributions to Spring].
213
233
Signing the contributor’s agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do.
214
234
If you forget to do so, you'll be reminded when you submit a pull request.
215
235
* Before merging stuff back into `main`, make sure you rebase the branch.
216
-
We generally do not allow merge commits, so a merge should always be fast-forward.
236
+
We generally do not allow merge commits, so a merge should always be fast-forwarded.
217
237
The GitHub issue number and the timestamps give enough tracking information already.
218
238
* The simplest way to merge back a pull request submitted by someone external is ``curl``ing the patch into `git am`.
219
239
You can then polish it by either adding a commit or amending the provided commit.
@@ -224,10 +244,10 @@ Make sure you keep the original author when amending.
224
244
curl $PULL_REQUEST_URL.patch | git am --ignore-whitespace
225
245
----
226
246
227
-
* If you merge back a feature branch and multiple developers contributed to that, try to rearrange to commits and squash the into a single commit per developer.
247
+
* If you merge back a feature branch and multiple developers contributed to that, try to rearrange to commits and squash them into a single commit per developer.
228
248
Combine the commit messages and edit them to make sense.
229
249
* Before pushing the changes to the remote repository, amend the commit(s) to be pushed and add a reference to the pull request to them.
230
-
This will cause the pull request UI in GitHub show and link those commits.
250
+
This will cause the pull request UI in GitHub to show and link those commits.
0 commit comments