-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
[INFRA-2615] [INFRA-1021] More flexible tiering #376
Conversation
@@ -259,7 +272,7 @@ private String updateCenterPostMessageHtml(String updateCenterJson) { | |||
|
|||
private static void writeToFile(String string, final File file) throws IOException { | |||
File parentFile = file.getParentFile(); | |||
if (!parentFile.isDirectory() && !parentFile.mkdirs()) { | |||
if (parentFile != null && !parentFile.isDirectory() && !parentFile.mkdirs()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes an NPE when there's no parent file.
for (VersionNumber dependencyVersion : coreDependencyVersions) { | ||
final JenkinsWar war = allJenkinsWarsByVersionNumber.get(dependencyVersion); | ||
if (war == null) { | ||
LOGGER.log(Level.INFO, "Did not find declared core dependency version among all core releases: " + dependencyVersion.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone released a plugin based on an incremental.
OK, this makes more sense than what you wrote on the dev list
Given the new policy, in your opinion should https://github.com/jenkinsci/bom/#lts-lines be updated accordingly and |
FTR https://groups.google.com/d/msg/jenkinsci-dev/aNWx61URGdk/qgT8wxojDAAJ Yes, in hindsight that was misleading; there is a cutoff based on core release age (but could be any criteria). |
Note that nothing changes in terms of "longevity" of older releases. You can see on https://updates.jenkins-ci.org/ that we currently serve the latest five LTS baselines, which is roughly the same as this does. In fact, my email to the dev list explains that this is in no way intended to add support for older releases beyond what already existed for years – it's just getting rid of the fixed tiering that could cause problems even for users on recent releases. |
On-holding this as merging it would break the Docker image because of jenkinsci/docker#954 😭 |
Updated this PR to keep generating the fixed tiered update sites in addition to the new dynamic tiers.
|
Mostly INFRA-2615, but fixed INFRA-1021 in the process.
Announcement/discussion: https://groups.google.com/d/msg/jenkinsci-dev/aNWx61URGdk/qgT8wxojDAAJ
How this works:
We add a mode to
update-center2
that inspects all plugin releases for their core dependency, and every core release used as any plugin's core dependency that's newer than ~13 months (400 days) will be added to this mode's output file. Then, the wrapper bash scripts use that as input to generate.htaccess
redirect rules and the arguments file for the "real" invocation ofupdate-center2
.Output file example from today, mid May 2020 ("
tiers.json
"):Both 2.172 and 2.164.2 were released April 10, 2019. This is the newest release that is both used as a baseline and is older than 400 days, ensuring we support whatever release was current 400 days ago.
This file is not part of actual output, but just an intermediate step. Since
.htaccess
generation happens outsideupdate-center2
, we cannot do everything in one invocation ofupdate-center2
, unless we integrate.htaccess
into it.This is intended to replace querying the Artifactory API for the 5 newest "LTS.1" releases. For now, we do both. Version redirects will only redirect to the dynamic tiers though, while the fixed tiers from before only exist if they're hardcoded in clients.