Skip to content

Add reminder to add BWC codecs on major version upgrade #86844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

package org.elasticsearch.xpack.lucene.bwc.codecs;

import org.elasticsearch.Version;
import org.elasticsearch.test.ESTestCase;

public class OldCodecsAvailableTests extends ESTestCase {

/**
* Reminder to add Lucene BWC codecs under {@link org.elasticsearch.xpack.lucene.bwc.codecs} whenever Elasticsearch is upgraded
* to the next major Lucene version.
*/
public void testLuceneBWCCodecsAvailable() {
assertEquals("Add Lucene BWC codecs for Elasticsearch version 7", 8, Version.CURRENT.major);
}

}
2 changes: 2 additions & 0 deletions x-pack/qa/repository-old-versions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
transformSpec.getTo().attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, ArtifactTypeDefinition.DIRECTORY_TYPE);
});

int currentMajorVersion = org.elasticsearch.gradle.VersionProperties.elasticsearchVersion.major
assert (currentMajorVersion - 2) == 6 : "add archive BWC tests for major version " + (currentMajorVersion - 2)
for (String versionString : ['5.0.0', '5.6.16', '6.0.0', '6.8.20']) {
Version version = Version.fromString(versionString)
String packageName = 'org.elasticsearch.distribution.zip'
Expand Down