Last active
January 12, 2021 12:05
-
-
Save sergeycherepanov/d072acc44453b31b7892f8c838a9d91f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/InstallPluginCommand.java | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
diff --git a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/InstallPluginCommand.java b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/InstallPluginCommand.java | |
--- a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/InstallPluginCommand.java (revision ef48eb35cf30adf4db14086e8aabd07ef6fb113f) | |
+++ b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/InstallPluginCommand.java (date 1610434469093) | |
@@ -350,10 +350,10 @@ | |
UserException { | |
final String baseUrl; | |
if (isSnapshot && stagingHash == null) { | |
- throw new UserException( | |
- ExitCodes.CONFIG, | |
- "attempted to install release build of official plugin on snapshot build of Elasticsearch" | |
- ); | |
+// throw new UserException( | |
+// ExitCodes.CONFIG, | |
+// "attempted to install release build of official plugin on snapshot build of Elasticsearch" | |
+// ); | |
} | |
if (stagingHash != null) { | |
if (isSnapshot) { | |
@@ -375,7 +375,7 @@ | |
if (urlExists(terminal, platformUrl)) { | |
return platformUrl; | |
} | |
- return String.format(Locale.ROOT, "%s/%s-%s.zip", baseUrl, pluginId, Build.CURRENT.getQualifiedVersion()); | |
+ return String.format(Locale.ROOT, "%s/%s-%s.zip", baseUrl, pluginId, Build.CURRENT.getQualifiedVersion().replace("-SNAPSHOT","")); | |
} | |
private String nonReleaseUrl(final String hostname, final Version version, final String stagingHash, final String pluginId) { | |
Index: x-pack/plugin/core/src/main/java/org/elasticsearch/license/License.java | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/license/License.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/license/License.java | |
--- a/x-pack/plugin/core/src/main/java/org/elasticsearch/license/License.java (revision ef48eb35cf30adf4db14086e8aabd07ef6fb113f) | |
+++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/license/License.java (date 1610452959044) | |
@@ -5,6 +5,7 @@ | |
*/ | |
package org.elasticsearch.license; | |
+import org.apache.logging.log4j.LogManager; | |
import org.apache.lucene.util.CollectionUtil; | |
import org.elasticsearch.ElasticsearchException; | |
import org.elasticsearch.ElasticsearchParseException; | |
@@ -399,6 +400,7 @@ | |
} | |
private void validate() { | |
+ LogManager.getLogger(getClass()).info("Validate license expiration date: {}", expiryDate); | |
if (issuer == null) { | |
throw new IllegalStateException("issuer can not be null"); | |
} else if (issuedTo == null) { | |
@@ -416,7 +418,7 @@ | |
} else if (expiryDate == -1) { | |
throw new IllegalStateException("expiryDate has to be set"); | |
} else if (expiryDate == LicenseService.BASIC_SELF_GENERATED_LICENSE_EXPIRATION_MILLIS && LicenseType.isBasic(type) == false) { | |
- throw new IllegalStateException("only basic licenses are allowed to have no expiration"); | |
+ //throw new IllegalStateException("only basic licenses are allowed to have no expiration"); | |
} | |
if (LicenseType.isEnterprise(type) && version < VERSION_ENTERPRISE) { | |
@@ -866,7 +868,7 @@ | |
} | |
public Builder expiryDate(long expiryDate) { | |
- this.expiryDate = expiryDate; | |
+ //this.expiryDate = expiryDate; | |
return this; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment