Skip to content

Conversation

@daniel-beck
Copy link
Contributor

Fixes #5316.

I couldn't quite reuse the existing resource we downloaded (only .1) and was too lazy to adapt https://www.jenkins.io/doc/developer/javadoc/ , so this adds a resource download.

@jglick
Copy link
Contributor

jglick commented Jul 28, 2022

@jglick
Copy link
Contributor

jglick commented Jul 28, 2022

jenkinsci/bom#1217 (comment) I guess?

@daniel-beck
Copy link
Contributor Author

https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ and https://deploy-preview-5320--jenkins-io-site-pr.netlify.app/doc/developer/plugin-development/choosing-jenkins-baseline/ look the same. What is the practical impact?

The only time this will show a difference is around the release of a new LTS line. If no plugin depends on it yet, it will not be part of supported_lts, only in all_lts.

jenkinsci/bom#1217 (comment) I guess?

Yes, I missed your comment there until now.

Copy link
Contributor

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least does not currently seem to break anything.

oldest_lts = lts[0]
supported_lts = site._generated[:core_tiers].stableCores
oldest_supported_lts = supported_lts[0]
all_lts = site._generated[:lts_releases].results.map { |v| v.version }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC use of this all_lts in next_lts_1 and previous_lts_highs rather than lts is the fix.

next_lts_1 = all_lts.select { |v| v =~ /[.]1$/ }[0]
# We assume that supported_lts will contain at least one release of the previous LTS line, which is reasonable.
# Surely there's going to be at least one plugin depending on the old .1 by the time the next .1 is available.
previous_lts_highs = supported_lts.map { |v| v[0...-1] }.uniq[0...-1].map { |l| all_lts.select { |v| v.start_with?(l) }[0] }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(also here selecting first match from all_lts rather than last match from lts as before)

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MarkEWaite MarkEWaite merged commit 9abd276 into jenkins-infra:master Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'Choosing a Jenkins version to build against page' does not necessarily list latest LTS releases

3 participants