Skip to content

Commit

Permalink
fix #2825 upgrade tasks for 14.15
Browse files Browse the repository at this point in the history
  • Loading branch information
marevol committed Jun 30, 2024
1 parent 269449e commit 7261c53
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ public class AdminUpgradeAction extends FessAdminAction {

private static final String VERSION_14_13 = "14.13";

private static final String VERSION_14_14 = "14.14";

// ===================================================================================
// Attribute
//
Expand Down Expand Up @@ -218,6 +220,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -260,6 +263,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -301,6 +305,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -341,6 +346,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -380,6 +386,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -418,6 +425,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -455,6 +463,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -491,6 +500,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -526,6 +536,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -560,6 +571,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -593,6 +605,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -624,6 +637,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -654,6 +668,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -683,6 +698,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -711,6 +727,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -739,6 +756,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -766,6 +784,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -792,6 +811,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -817,6 +837,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -841,6 +862,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -864,6 +886,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -886,6 +909,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -907,6 +931,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -927,6 +952,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -946,6 +972,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -964,6 +991,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -981,6 +1009,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -997,6 +1026,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -1012,6 +1042,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -1026,6 +1057,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_11();
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -1039,6 +1071,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
try {
upgradeFrom14_12();
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -1051,6 +1084,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
} else if (VERSION_14_13.equals(form.targetVersion)) {
try {
upgradeFrom14_13();
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -1060,6 +1094,18 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
logger.warn("Failed to upgrade data.", e);
saveError(messages -> messages.addErrorsFailedToUpgradeFrom(GLOBAL, VERSION_14_13, e.getLocalizedMessage()));
}
} else if (VERSION_14_14.equals(form.targetVersion)) {
try {
upgradeFrom14_14();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));

systemHelper.reloadConfiguration();
} catch (final Exception e) {
logger.warn("Failed to upgrade data.", e);
saveError(messages -> messages.addErrorsFailedToUpgradeFrom(GLOBAL, VERSION_14_14, e.getLocalizedMessage()));
}
} else {
saveError(messages -> messages.addErrorsUnknownVersionForUpgrade(GLOBAL));
}
Expand Down Expand Up @@ -1287,6 +1333,10 @@ private void upgradeFrom14_13() {
// nothing
}

private void upgradeFrom14_14() {
// nothing
}

private String[] getDictionaryPaths() {
try (CurlResponse response = ComponentUtil.getCurlHelper().get("/_configsync/file").param("size", "1000").execute()) {
if (response.getHttpStatusCode() == 200) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/codelibs/fess/helper/SystemHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public void init() {
logger.debug("Initialize {}", this.getClass().getSimpleName());
}
final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
cal.set(2025, 11 - 1, 1); // EOL Date
cal.set(2026, 1 - 1, 1); // EOL Date
eolTime = cal.getTimeInMillis();
if (isEoled()) {
logger.error("Your system is out of support. See https://fess.codelibs.org/eol.html");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<la:option value="14.11">14.11</la:option>
<la:option value="14.12">14.12</la:option>
<la:option value="14.13">14.13</la:option>
<la:option value="14.14">14.14</la:option>
</la:select>
</div>
</div>
Expand Down

0 comments on commit 7261c53

Please # to comment.