Skip to content

Commit ca352dd

Browse files
committed
More work on moving release notes automation to markdown
1 parent e570274 commit ca352dd

File tree

7 files changed

+105
-605
lines changed

7 files changed

+105
-605
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/release/GenerateReleaseNotesTask.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ public class GenerateReleaseNotesTask extends DefaultTask {
5757
private final RegularFileProperty releaseNotesTemplate;
5858
private final RegularFileProperty releaseHighlightsTemplate;
5959
private final RegularFileProperty breakingChangesTemplate;
60+
private final RegularFileProperty deprecationsTemplate;
6061
private final RegularFileProperty migrationIndexTemplate;
6162

6263
private final RegularFileProperty releaseNotesIndexFile;
6364
private final RegularFileProperty releaseNotesFile;
6465
private final RegularFileProperty releaseHighlightsFile;
6566
private final RegularFileProperty breakingChangesMigrationFile;
67+
private final RegularFileProperty deprecationsFile;
6668
private final RegularFileProperty migrationIndexFile;
6769

6870
private final GitWrapper gitWrapper;
@@ -75,12 +77,14 @@ public GenerateReleaseNotesTask(ObjectFactory objectFactory, ExecOperations exec
7577
releaseNotesTemplate = objectFactory.fileProperty();
7678
releaseHighlightsTemplate = objectFactory.fileProperty();
7779
breakingChangesTemplate = objectFactory.fileProperty();
80+
deprecationsTemplate = objectFactory.fileProperty();
7881
migrationIndexTemplate = objectFactory.fileProperty();
7982

8083
releaseNotesIndexFile = objectFactory.fileProperty();
8184
releaseNotesFile = objectFactory.fileProperty();
8285
releaseHighlightsFile = objectFactory.fileProperty();
8386
breakingChangesMigrationFile = objectFactory.fileProperty();
87+
deprecationsFile = objectFactory.fileProperty();
8488
migrationIndexFile = objectFactory.fileProperty();
8589

8690
gitWrapper = new GitWrapper(execOperations);
@@ -146,6 +150,13 @@ public void executeTask() throws IOException {
146150
changelogsByVersion.getOrDefault(qualifiedVersion, Set.of())
147151
);
148152

153+
ReleaseNotesGenerator.update(
154+
this.deprecationsTemplate.get().getAsFile(),
155+
this.deprecationsFile.get().getAsFile(),
156+
qualifiedVersion,
157+
changelogsByVersion.getOrDefault(qualifiedVersion, Set.of())
158+
);
159+
149160
LOGGER.info("Updating migration/index...");
150161
MigrationIndexGenerator.update(
151162
getMinorVersions(versions),
@@ -354,6 +365,15 @@ public void setBreakingChangesTemplate(RegularFile file) {
354365
this.breakingChangesTemplate.set(file);
355366
}
356367

368+
@InputFile
369+
public RegularFileProperty getDeprecationsTemplate() {
370+
return deprecationsTemplate;
371+
}
372+
373+
public void setDeprecationsTemplate(RegularFile file) {
374+
this.deprecationsTemplate.set(file);
375+
}
376+
357377
@InputFile
358378
public RegularFileProperty getMigrationIndexTemplate() {
359379
return migrationIndexTemplate;
@@ -399,6 +419,15 @@ public void setBreakingChangesMigrationFile(RegularFile file) {
399419
this.breakingChangesMigrationFile.set(file);
400420
}
401421

422+
@OutputFile
423+
public RegularFileProperty getDeprecationsFile() {
424+
return deprecationsFile;
425+
}
426+
427+
public void setDeprecationsFile(RegularFile file) {
428+
this.deprecationsFile.set(file);
429+
}
430+
402431
@OutputFile
403432
public RegularFileProperty getMigrationIndexFile() {
404433
return migrationIndexFile;

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/release/ReleaseToolsPlugin.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ public void apply(Project project) {
9595
task.setMigrationIndexTemplate(projectDirectory.file(RESOURCES + "templates/migration-index.asciidoc"));
9696
task.setMigrationIndexFile(projectDirectory.file("docs/reference/migration/index.asciidoc"));
9797

98+
task.setDeprecationsTemplate(projectDirectory.file(RESOURCES + "templates/deprecations.md"));
99+
task.setDeprecationsFile(
100+
projectDirectory.file("docs/release-notes/deprecations.md")
101+
);
102+
98103
task.dependsOn(validateChangelogsTask);
99104
};
100105

build-tools-internal/src/main/resources/templates/breaking-changes.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,23 @@ To learn how to upgrade, check out <uprade docs>.
1414

1515
## ${unqualifiedVersion} [elasticsearch-${versionWithoutSeparator}-breaking-changes]
1616
**Release date:** April 01, 2025
17-
<% for (team in changelogsByTypeByArea['breaking'].keySet()) {
18-
print "\n${team}:\n";
17+
<%
18+
if (!changelogsByTypeByArea['breaking']) {
19+
print "\nNo breaking changes in this version.\n"
20+
} else {
21+
for (team in (changelogsByTypeByArea['breaking'] ?: [:]).keySet()) {
22+
print "\n${team}:\n";
1923

20-
for (change in changelogsByTypeByArea['breaking'][team]) {
21-
print "* ${change.summary} [#${change.pr}](https://github.com/elastic/elasticsearch/pull/${change.pr})"
22-
if (change.issues != null && change.issues.empty == false) {
23-
print change.issues.size() == 1 ? " (issue: " : " (issues: "
24-
print change.issues.collect { "{es-issue}${it}[#${it}]" }.join(", ")
25-
print ")"
24+
for (change in changelogsByTypeByArea['breaking'][team]) {
25+
print "* ${change.summary} [#${change.pr}](https://github.com/elastic/elasticsearch/pull/${change.pr})"
26+
if (change.issues != null && change.issues.empty == false) {
27+
print change.issues.size() == 1 ? " (issue: " : " (issues: "
28+
print change.issues.collect { "{es-issue}${it}[#${it}]" }.join(", ")
29+
print ")"
30+
}
31+
print "\n"
32+
}
2633
}
27-
print "\n"
34+
35+
print "\n\n"
2836
}
29-
}
30-
print "\n\n"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
navigation_title: "Elasticsearch"
3+
---
4+
5+
# {{es}} deprecations [elasticsearch-deprecations]
6+
Review the deprecated functionality for your {{es}} version. While deprecations have no immediate impact, we strongly encourage you update your implementation after you upgrade.
7+
8+
To learn how to upgrade, check out <upgrade docs>.
9+
10+
To give you insight into what deprecated features you’re using, {{es}}:
11+
12+
* Returns a `Warn` HTTP header whenever you submit a request that uses deprecated functionality.
13+
* [Logs deprecation warnings](docs-content://deploy-manage/monitor/logging-configuration/update-elasticsearch-logging-levels.md#deprecation-logging) when deprecated functionality is used.
14+
* [Provides a deprecation info API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-migration-deprecations) that scans a cluster’s configuration and mappings for deprecated functionality.
15+
16+
% ## Next version [elasticsearch-nextversion-deprecations]
17+
% **Release date:** Month day, year
18+
19+
## ${unqualifiedVersion} [elasticsearch-${versionWithoutSeparator}-deprecations]
20+
**Release date:** April 01, 2025
21+
<%
22+
if (!changelogsByTypeByArea['deprecations']) {
23+
print "\nNo deprecations in this version.\n"
24+
} else {
25+
for (team in (changelogsByTypeByArea['deprecations'] ?: [:]).keySet()) {
26+
print "\n${team}:\n";
27+
28+
for (change in changelogsByTypeByArea['deprecations'][team]) {
29+
print "* ${change.summary} [#${change.pr}](https://github.com/elastic/elasticsearch/pull/${change.pr})"
30+
if (change.issues != null && change.issues.empty == false) {
31+
print change.issues.size() == 1 ? " (issue: " : " (issues: "
32+
print change.issues.collect { "{es-issue}${it}[#${it}]" }.join(", ")
33+
print ")"
34+
}
35+
print "\n"
36+
}
37+
}
38+
print "\n\n"
39+
}

docs/release-notes/breaking-changes.md

Lines changed: 1 addition & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -15,89 +15,7 @@ To learn how to upgrade, check out <uprade docs>.
1515
## 9.1.0 [elasticsearch-910-breaking-changes]
1616
**Release date:** April 01, 2025
1717

18-
Aggregations:
19-
* Remove date histogram boolean support [#118484](https://github.com/elastic/elasticsearch/pull/118484)
20-
21-
Allocation:
22-
* Increase minimum threshold in shard balancer [#115831](https://github.com/elastic/elasticsearch/pull/115831)
23-
* Remove `cluster.routing.allocation.disk.watermark.enable_for_single_data_node` setting [#114207](https://github.com/elastic/elasticsearch/pull/114207)
24-
* Remove cluster state from `/_cluster/reroute` response [#114231](https://github.com/elastic/elasticsearch/pull/114231) (issue: {es-issue}88978[#88978])
25-
26-
Analysis:
27-
* Snowball stemmers have been upgraded [#114146](https://github.com/elastic/elasticsearch/pull/114146)
28-
* The 'german2' stemmer is now an alias for the 'german' snowball stemmer [#113614](https://github.com/elastic/elasticsearch/pull/113614)
29-
* The 'persian' analyzer has stemmer by default [#113482](https://github.com/elastic/elasticsearch/pull/113482) (issue: {es-issue}113050[#113050])
30-
* The Korean dictionary for Nori has been updated [#114124](https://github.com/elastic/elasticsearch/pull/114124)
31-
32-
Authentication:
33-
* Configuring a bind DN in an LDAP or Active Directory (AD) realm without a corresponding bind password
34-
will prevent node from starting [#118366](https://github.com/elastic/elasticsearch/pull/118366)
35-
36-
Cluster Coordination:
37-
* Remove unsupported legacy value for `discovery.type` [#112903](https://github.com/elastic/elasticsearch/pull/112903)
38-
39-
EQL:
40-
* Set allow_partial_search_results=true by default [#120267](https://github.com/elastic/elasticsearch/pull/120267)
41-
42-
Extract&Transform:
43-
* Restrict Connector APIs to manage/monitor_connector privileges [#119863](https://github.com/elastic/elasticsearch/pull/119863)
44-
45-
Highlighting:
46-
* Remove support for deprecated `force_source` highlighting parameter [#116943](https://github.com/elastic/elasticsearch/pull/116943)
47-
48-
Indices APIs:
49-
* Apply more strict parsing of actions in bulk API [#115923](https://github.com/elastic/elasticsearch/pull/115923)
50-
* Remove deprecated local attribute from alias APIs [#115393](https://github.com/elastic/elasticsearch/pull/115393)
51-
* Remove the ability to read frozen indices [#120108](https://github.com/elastic/elasticsearch/pull/120108)
52-
* Remove unfreeze REST endpoint [#119227](https://github.com/elastic/elasticsearch/pull/119227)
53-
54-
Infra/Core:
55-
* Change Elasticsearch timeouts to 429 response instead of 5xx [#116026](https://github.com/elastic/elasticsearch/pull/116026)
56-
* Limit `ByteSizeUnit` to 2 decimals [#120142](https://github.com/elastic/elasticsearch/pull/120142)
57-
* Remove `client.type` setting [#118192](https://github.com/elastic/elasticsearch/pull/118192) (issue: {es-issue}104574[#104574])
58-
* Remove any references to org.elasticsearch.core.RestApiVersion#V_7 [#118103](https://github.com/elastic/elasticsearch/pull/118103)
59-
60-
Infra/Logging:
61-
* Change `deprecation.elasticsearch` keyword to `elasticsearch.deprecation` [#117933](https://github.com/elastic/elasticsearch/pull/117933) (issue: {es-issue}83251[#83251])
62-
63-
Infra/Metrics:
64-
* Deprecated tracing.apm.* settings got removed. [#119926](https://github.com/elastic/elasticsearch/pull/119926)
65-
66-
Infra/REST API:
67-
* Output a consistent format when generating error json [#90529](https://github.com/elastic/elasticsearch/pull/90529) (issue: {es-issue}89387[#89387])
68-
69-
Ingest Node:
70-
* Remove `ecs` option on `user_agent` processor [#116077](https://github.com/elastic/elasticsearch/pull/116077)
71-
* Remove ignored fallback option on GeoIP processor [#116112](https://github.com/elastic/elasticsearch/pull/116112)
72-
73-
Logs:
74-
* Conditionally enable logsdb by default for data streams matching with logs-*-* pattern. [#121049](https://github.com/elastic/elasticsearch/pull/121049) (issue: {es-issue}106489[#106489])
75-
76-
Machine Learning:
77-
* Disable machine learning on macOS x86_64 [#104125](https://github.com/elastic/elasticsearch/pull/104125)
78-
79-
Mapping:
80-
* Remove support for type, fields, `copy_to` and boost in metadata field definition [#118825](https://github.com/elastic/elasticsearch/pull/118825)
81-
* Turn `_source` meta fieldmapper's mode attribute into a no-op [#119072](https://github.com/elastic/elasticsearch/pull/119072) (issue: {es-issue}118596[#118596])
82-
83-
Search:
84-
* Adjust `random_score` default field to `_seq_no` field [#118671](https://github.com/elastic/elasticsearch/pull/118671)
85-
* Change Semantic Text To Act Like A Normal Text Field [#120813](https://github.com/elastic/elasticsearch/pull/120813)
86-
* Remove legacy params from range query [#116970](https://github.com/elastic/elasticsearch/pull/116970)
87-
88-
Snapshot/Restore:
89-
* Remove deprecated `xpack.searchable.snapshot.allocate_on_rolling_restart` setting [#114202](https://github.com/elastic/elasticsearch/pull/114202)
90-
9118
TLS:
92-
* Remove TLSv1.1 from default protocols [#121731](https://github.com/elastic/elasticsearch/pull/121731)
93-
94-
Transform:
95-
* Remove `data_frame_transforms` roles [#117519](https://github.com/elastic/elasticsearch/pull/117519)
96-
97-
Vector Search:
98-
* Remove old `_knn_search` tech preview API in v9 [#118104](https://github.com/elastic/elasticsearch/pull/118104)
99-
100-
Watcher:
101-
* Removing support for types field in watcher search [#120748](https://github.com/elastic/elasticsearch/pull/120748)
19+
* Drop `TLS_RSA` cipher support for JDK 24 [#123600](https://github.com/elastic/elasticsearch/pull/123600)
10220

10321

docs/release-notes/deprecations.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,20 @@ navigation_title: "Elasticsearch"
55
# {{es}} deprecations [elasticsearch-deprecations]
66
Review the deprecated functionality for your {{es}} version. While deprecations have no immediate impact, we strongly encourage you update your implementation after you upgrade.
77

8-
To learn how to upgrade, check out <uprade docs>.
8+
To learn how to upgrade, check out <upgrade docs>.
99

1010
To give you insight into what deprecated features you’re using, {{es}}:
1111

1212
* Returns a `Warn` HTTP header whenever you submit a request that uses deprecated functionality.
1313
* [Logs deprecation warnings](docs-content://deploy-manage/monitor/logging-configuration/update-elasticsearch-logging-levels.md#deprecation-logging) when deprecated functionality is used.
1414
* [Provides a deprecation info API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-migration-deprecations) that scans a cluster’s configuration and mappings for deprecated functionality.
1515

16-
% ## Next version
16+
% ## Next version [elasticsearch-nextversion-deprecations]
1717
% **Release date:** Month day, year
1818

19-
## 9.0.0 [elasticsearch-900-deprecations]
20-
**Release date:** March 25, 2025
19+
## 9.1.0 [elasticsearch-910-deprecations]
20+
**Release date:** April 01, 2025
2121

22-
Ingest Node
23-
: * Fix `_type` deprecation on simulate pipeline API [#116259](https://github.com/elastic/elasticsearch/pull/116259)
22+
No deprecations in this version.
2423

2524

26-
Machine Learning
27-
: * [Inference API] Deprecate elser service [#113216](https://github.com/elastic/elasticsearch/pull/113216)
28-
29-
30-
Mapping
31-
: * Deprecate `_source.mode` in mappings [#116689](https://github.com/elastic/elasticsearch/pull/116689)

0 commit comments

Comments
 (0)