From ceb3b19b22d970dacb9b6881a8d7e4f95210e3a4 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Sun, 29 Oct 2023 21:19:30 -0600 Subject: [PATCH] Show Java version admin monitor at 12 months and 3 months Daniel Beck described his recommendation to alert users at 12 months and at 3 months prior to the end of support of a Java version. He wrote: > The second warning in particular needs to strike a balance between > being shown late enough so it's actually relevant for whoever hasn't > acted yet, while being shown early enough that slightly more elaborate > environments (difficult to schedule maintenance windows) are informed > in time. 3 months aligns rather nicely with the LTS schedule where > we kinda expect folks to do that anyway. > > 18/9, or even 12/6 errs too far on the side of those for whom this is > extreme effort (and who dismissed the first message more appropriate for > their environment!), while showing everyone else completely irrelevant > notices they won't care about for many months to come. https://github.com/jenkinsci/jep/pull/400#discussion_r1371510566 provides more details. The Java 8 to Java 11 transition saw a significant change in adoption of Java 11 once the admin monitor was visible to users. That was shown slightly over 12 months before the release that required Java 11. This change continues that pattern of 12 months warning before end of support. https://github.com/jenkinsci/jep/pull/400#discussion_r1375623888 has a graph that shows the adoption curves for Java 8, Java 11, and Java 17. --- .../monitor/JavaVersionRecommendationAdminMonitor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/jenkins/monitor/JavaVersionRecommendationAdminMonitor.java b/core/src/main/java/jenkins/monitor/JavaVersionRecommendationAdminMonitor.java index 830f36c47297..86093a634617 100644 --- a/core/src/main/java/jenkins/monitor/JavaVersionRecommendationAdminMonitor.java +++ b/core/src/main/java/jenkins/monitor/JavaVersionRecommendationAdminMonitor.java @@ -115,7 +115,7 @@ private static String getId() { @Override public boolean isActivated() { - return !disabled && getDeprecationPeriod().toTotalMonths() < 18; + return !disabled && getDeprecationPeriod().toTotalMonths() < 12; } @Override @@ -156,7 +156,7 @@ private static Period getDeprecationPeriod() { @NonNull private static Severity getSeverity() { - return getDeprecationPeriod().toTotalMonths() < 9 ? Severity.DANGER : Severity.WARNING; + return getDeprecationPeriod().toTotalMonths() < 3 ? Severity.DANGER : Severity.WARNING; } /**