Skip to content

Commit 8ae4c50

Browse files
committed
Code review cleanup for dynamic migration/index
1 parent 51a3fe0 commit 8ae4c50

File tree

4 files changed

+10
-36
lines changed

4 files changed

+10
-36
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public void executeTask() throws IOException {
143143
);
144144

145145
LOGGER.info("Updating migration/index...");
146-
MigrateIndexGenerator.update(
146+
MigrationIndexGenerator.update(
147147
getMinorVersions(versions),
148148
this.migrationIndexTemplate.get().getAsFile(),
149149
this.migrationIndexFile.get().getAsFile()
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
import java.io.FileWriter;
1515
import java.io.IOException;
1616
import java.nio.file.Files;
17-
import java.util.*;
17+
import java.util.HashMap;
18+
import java.util.List;
19+
import java.util.Map;
20+
import java.util.Set;
21+
import java.util.TreeSet;
1822
import java.util.stream.Collectors;
1923

2024
import static java.util.Comparator.reverseOrder;
@@ -23,7 +27,7 @@
2327
* This class ensures that the migrate/index page has the appropriate anchors and include directives
2428
* for the current repository version.
2529
*/
26-
public class MigrateIndexGenerator {
30+
public class MigrationIndexGenerator {
2731

2832
static void update(Set<MinorVersion> versions, File indexTemplate, File indexFile) throws IOException {
2933
try (FileWriter indexFileWriter = new FileWriter(indexFile)) {
Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,4 @@
1-
[[breaking-changes]]
2-
= Migration guide
3-
4-
This section discusses the changes that you need to be aware of to migrate
5-
your application to {version}. For more information about what's new in this
6-
release, see the <<release-highlights>> and <<es-release-notes>>.
7-
8-
As {es} introduces new features and improves existing ones, the changes
9-
sometimes make older settings, APIs, and parameters obsolete. We typically
10-
deprecate obsolete functionality as part of a release. If possible, we support
11-
the deprecated functionality for several subsequent releases before removing it.
12-
This enables applications to continue working unchanged while you prepare to
13-
migrate away from the deprecated functionality.
14-
15-
To get the most out of {es} and facilitate future upgrades, we strongly
16-
encourage migrating away from using deprecated functionality as soon as
17-
possible.
18-
19-
To give you insight into what deprecated features you're using, {es}:
20-
21-
- Returns a `Warn` HTTP header whenever you
22-
submit a request that uses deprecated functionality.
23-
- <<deprecation-logging, Logs deprecation warnings>> when
24-
deprecated functionality is used.
25-
- <<migration-api-deprecation, Provides a deprecation info API>>
26-
that scans a cluster's configuration
27-
and mappings for deprecated functionality.
28-
29-
For more information about {minor-version},
30-
see the <<release-highlights>> and <<es-release-notes>>.
31-
For information about how to upgrade your cluster, see <<setup-upgrade>>.
1+
include::migration_intro.asciidoc[]
322

333
<% versions.each { print "* <<migrating-${ it },Migrating to ${ it }>>\n" } %>
34-
354
<% includeVersions.each { print "include::migrate_${ it }.asciidoc[]\n" } %>

build-tools-internal/src/test/java/org/elasticsearch/gradle/internal/release/GenerateReleaseNotesTaskTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ public void getVersions_includesCurrentVersion() {
181181
}
182182

183183
/**
184-
* Check that when deriving a lit of major.minor versions from git tags, the current unreleased version is included.
184+
* Check that when deriving a list of major.minor versions from git tags, the current unreleased version is included,
185+
* but any higher version numbers are not.
185186
*/
186187
@Test
187188
public void getMinorVersions_includesCurrentButNotFutureVersions() {

0 commit comments

Comments
 (0)