Skip to content
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

Rename support fields to align with eol fields #4931

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 41 additions & 35 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,25 +124,21 @@ releaseLabel: "MoM Timeturner __RELEASE_CYCLE__ (__CODENAME__)"
# Prefer using an HTML abbr tag, if possible.
LTSLabel: "<abbr title='Extra Long Support'>ELS</abbr>"

# Whether the "End of Life" column should be displayed (optional, default = true).
# Whether the "End Of Life" column should be displayed (optional, default = true).
# The value of this property can be set to any string to override the default column label.
eolColumn: Security Support

# Threshold at which the background color of the cycle's "eol" cell changes to indicate
# that the EOL date is approaching (optional, default = 121 days).
# If a fixed EOL calculation is taken the rule of thumb one third of the time can be applied.
# e.g. eol = releaseDate + 6w -> 2w eolWarnThreshold: 14
eolWarnThreshold: 121

# Whether the "Active Support" column should be displayed (optional, default = false).
# Whether the "End Of Active Support" column should be displayed (optional, default = false).
# The value of this property can be set to any string to override the default column label.
activeSupportColumn: Active Support
eoasColumn: Active Support

# Threshold at which the background color of the cycle's "activeSupport" cell changes to indicate
# Threshold at which the background color of the cycle's "eoas" cell changes to indicate
# that the end of active support date is approaching (optional, default = 121 days).
# If a fixed support calculation is taken the rule of thumb one third of the time can be applied.
# e.g. activeSupport = releaseDate + 3w -> 1w activeSupportWarnThreshold: 7
activeSupportWarnThreshold: 121
eoasWarnThreshold: 121

# Whether the "Latest" column should be displayed (optional, default = true).
# The value of this property can be set to any string to override the default column label.
Expand All @@ -162,13 +158,13 @@ discontinuedColumn: Discontinued
# that the discontinued date is approaching (optional, default = 121 days).
discontinuedWarnThreshold: 121

# Whether the "Extended Support" column should be displayed (optional, default = false).
# Whether the "End Of Extended Support" column should be displayed (optional, default = false).
# The value of this property can be set to any string to override the default column label.
extendedSupportColumn: Extended Support
eoesColumn: Extended Support

# Threshold at which the background color of the cycle's "extendedSupport" cell changes to indicate
# Threshold at which the background color of the cycle's "eoes" cell changes to indicate
# that the extended support date is approaching (optional, default = 121 days).
extendedSupportWarnThreshold: 121
eoesWarnThreshold: 121

# Custom columns configuration (optional).
# Custom columns are columns that will be added to the releases table and populated based on a
Expand Down Expand Up @@ -332,30 +328,40 @@ releases:
# promoted LTS after their release (ex. Jenkins).
lts: true

# End of active support date (optional if activeSupportColumn is false, else mandatory).
# This is where bug fixes usually stop coming in.
# Use valid dates, and do not add quotes around dates.
# Alternatively, set to true|false if the date has not been decided yet.
support: 2018-01-31

# EOL date (mandatory).
# This is where all support stops (including security support).
# In case there is extended/commercial support available, pick the date that would apply to the
# majority of users (and use the extendedSupport field if necessary).
# Use valid dates, and do not add quotes around dates.
# Alternatively, set to true|false the date has not been decided yet.
# End Of Active Support date (mandatory if eoasColumn is true, else MUST NOT be set).
# This can be either a date (must be valid and not quoted) or a boolean value (when
# the date is not known or has not been decided yet).
# - When a date is used, this is the date where bug fixes stop coming in.
# - When a boolean is used, it must be set to true if the release cycle is not supported
# anymore, and false otherwise.
eoas: 2018-01-31

# End Of Life date (mandatory).
# This can be either a date (must be valid and not quoted) or a boolean value (when
# the date is not known or has not been decided yet).
# - When a date is used, this is where all support stops, including security support.
# Note that this date reflects what is true for the majority of users (you may use the
# eoes field if possible/necessary).
# - When a boolean is used, it must be set to true if the release cycle is End Of Life,
# and false otherwise.
eol: 2019-01-01

# End of extended/commercial support date (optional if extendedSupportColumn is false, else mandatory).
# Note that extended/commercial support is different from Long-Term Support. Extended/commercial
# support must be used only when additional support is available after EOL, usually against payment.
# Use valid dates, and do not add quotes around dates.
# Alternatively, set to true|false if the date has not been decided yet.
extendedSupport: 2020-01-01

# Whether this is a "discontinued" release (optional).
# Can be set to true/false.
# Only use if discontinuedColumn is set to true.
# End Of Extended/commercial Support date (optional if eoesColumn is true, else SHOULD NOT be set).
# This can be either a date (must be valid and not quoted), a boolean value (when
# the date is not known or has not been decided yet), or null.
# - When a date is used, this is where the extended support period stops.
# - When a boolean is used, it must be set to true if the extended support period is over,
# and false otherwise.
# - When null is used, it means that there is no extended/commercial support for the given
# release cycle.
eoes: 2020-01-01

# Discontinuation date (mandatory if discontinuedColumn is true, else MUST NOT be set).
# This can be either a date (must be valid and not quoted) or a boolean value (when
# the date is not known or has not been decided yet).
# - When a date is used, this is the date where the release cycle is discontinued.
# - When a boolean is used, it must be set to true if the release cycle is discontinued,
# and false otherwise.
discontinued: true

# Latest release for the release cycle (optional if releaseColumn is false, else mandatory).
Expand Down
12 changes: 6 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ defaults:
discontinuedColumn: false
discontinuedColumnLabel: 'Discontinued'
discontinuedWarnThreshold: 121
activeSupportColumn: false
activeSupportColumnLabel: 'Active Support'
activeSupportWarnThreshold: 121
eoasColumn: false
eoasColumnLabel: 'Active Support'
eoasWarnThreshold: 121
eolColumn: true
eolColumnLabel: 'Security Support'
eolWarnThreshold: 121
extendedSupportColumn: false
extendedSupportColumnLabel: 'Extended Support'
extendedSupportWarnThreshold: 121
eoesColumn: false
eoesColumnLabel: 'Extended Support'
eoesWarnThreshold: 121
customColumns: []
LTSLabel: '<abbr title="Long Term Support">LTS</abbr>'

Expand Down
34 changes: 17 additions & 17 deletions _layouts/product.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ <h1>{{ page.title }}</h1>
{% for column in customColumnsAfterRelease %}{% include custom-column-th.html column=column %}{% assign colCount = colCount | plus:1 %}{% endfor %}
{% if page.releaseDateColumn %}<th>{{ page.releaseDateColumnLabel }}</th>{% assign colCount = colCount | plus:1 %}{% endif %}
{% if page.discontinuedColumn %}<th>{{ page.discontinuedColumnLabel }}</th>{% assign colCount = colCount | plus:1 %}{% endif %}
{% if page.activeSupportColumn %}<th>{{ page.activeSupportColumnLabel }}</th>{% assign colCount = colCount | plus:1 %}{% endif %}
{% if page.eoasColumn %}<th>{{ page.eoasColumnLabel }}</th>{% assign colCount = colCount | plus:1 %}{% endif %}
{% if page.eolColumn %}<th>{{ page.eolColumnLabel }}</th>{% assign colCount = colCount | plus:1 %}{% endif %}
{% if page.extendedSupportColumn %}<th>{{ page.extendedSupportColumnLabel }}</th>{% assign colCount = colCount | plus:1 %}{% endif %}
{% if page.eoesColumn %}<th>{{ page.eoesColumnLabel }}</th>{% assign colCount = colCount | plus:1 %}{% endif %}
{% for column in customColumnsBeforeLatest %}{% include custom-column-th.html column=column %}{% assign colCount = colCount | plus:1 %}{% endfor %}
{% if page.releaseColumn %}<th>{{ page.releaseColumnLabel }}</th>{% assign colCount = colCount | plus:1 %}{% endif %}
{% for column in customColumnsAfterLatest %}{% include custom-column-th.html column=column %}{% assign colCount = colCount | plus:1 %}{% endfor %}
Expand Down Expand Up @@ -86,16 +86,16 @@ <h1>{{ page.title }}</h1>
</td>
{% endif %}

{% if page.activeSupportColumn %}
{% if page.eoasColumn %}
{%- assign colorClass = 'bg-green-000' %}
{%- if r.days_toward_support < page.activeSupportWarnThreshold %}{% assign colorClass = 'bg-yellow-200' %}{% endif %}
{%- if r.days_toward_support < 0 %}{% assign colorClass = 'bg-red-000' %}{% endif %}
{%- if r.days_toward_eoas < page.eoasWarnThreshold %}{% assign colorClass = 'bg-yellow-200' %}{% endif %}
{%- if r.days_toward_eoas < 0 %}{% assign colorClass = 'bg-red-000' %}{% endif %}
<td class="{{ colorClass }}">
{% if r.active_support_until %}
{% if r.is_active_support_over %}Ended{% else %}Ends{% endif %}
{{ r.active_support_until | timeago }} <div>({{ r.active_support_until | date_to_string }})</div>
{% if r.eoas_from %}
{% if r.is_eoas %}Ended{% else %}Ends{% endif %}
{{ r.eoas_from | timeago }} <div>({{ r.eoas_from | date_to_string }})</div>
{% else %}
{% if r.is_active_support_over %}No{% else %}Yes{% endif %}
{% if r.is_eoas %}No{% else %}Yes{% endif %}
{% endif %}
</td>
{% endif %}
Expand All @@ -114,17 +114,17 @@ <h1>{{ page.title }}</h1>
</td>
{% endif %}

{% if page.extendedSupportColumn %}
{% if page.eoesColumn %}
{%- assign colorClass = 'bg-green-000' %}
{%- if r.days_toward_extendedSupport < page.extendedSupportWarnThreshold %}{% assign colorClass = 'bg-yellow-200' %}{% endif %}
{%- if r.days_toward_extendedSupport < 0 %}{% assign colorClass = 'bg-red-000' %}{% endif %}
{%- if r.extendedSupport == false %}{% assign colorClass = 'bg-grey-lt-100' %}{% endif %}
{%- if r.days_toward_eoes < page.eoesWarnThreshold %}{% assign colorClass = 'bg-yellow-200' %}{% endif %}
{%- if r.days_toward_eoes < 0 or r.eoes == true %}{% assign colorClass = 'bg-red-000' %}{% endif %}
{%- if r.eoes == null %}{% assign colorClass = 'bg-grey-lt-100' %}{% endif %}
<td class="{{ colorClass }}">
{% if r.extended_support_until %}
{% if r.is_extended_support_over %}Ended{% else %}Ends{% endif %}
{{ r.extended_support_until | timeago }} <div>({{ r.extended_support_until | date_to_string }})</div>
{% if r.eoes_from %}
{% if r.is_eoes %}Ended{% else %}Ends{% endif %}
{{ r.eoes_from | timeago }} <div>({{ r.eoes_from | date_to_string }})</div>
{% else %}
{% if r.is_extended_support_over %}Unavailable{% else %}Yes{% endif %}
{% if r.is_eoes == null %}Unavailable{% else %}{% if r.is_eoes %}No{% else %}Yes{% endif %}{% endif %}
{% endif %}
</td>
{% endif %}
Expand Down
6 changes: 3 additions & 3 deletions _plugins/create-icalendar-files.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ def notification_message(product, cycle, type)
case type
when 'eol' then
message += ' will become End-of-life.'
when 'support' then
when 'eoas' then
message += ' will end active development.'
when 'release' then
message += ' will be released.'
when 'extendedSupport' then
when 'eoes' then
message += ' will end extended support.'
end
end
Expand All @@ -71,7 +71,7 @@ def process_product(product)
cal = Icalendar::Calendar.new
product.release_cycles.each do |cycle|
cycle.fetch('data').each do |key, item|
next if !['release', 'support', 'eol', 'extendedSupport'].include?(key) || !item.instance_of?(Date)
next if !['release', 'eoas', 'eol', 'eoes'].include?(key) || !item.instance_of?(Date)
event = cal.event
event.dtstart = Icalendar::Values::Date.new(item)
event.dtend = Icalendar::Values::Date.new(item + 1)
Expand Down
16 changes: 16 additions & 0 deletions _plugins/create-json-files.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@ def release_cycles
hash.fetch('releases').map do |release|
name = release.delete('releaseCycle')
release['lts'] = release['lts'] || false

# To keep backward compatibility following the renaming of support and extendedSupport fields.
# See https://github.com/endoflife-date/endoflife.date/issues/4923.
if release.has_key?('eoas')
eoas = release.delete('eoas')
release['support'] = eoas.respond_to?(:strftime) ? eoas : !eoas
end
if hash.has_key?('eoesColumn')
if release.has_key?('eoes')
eoes = release.delete('eoes')
release['extendedSupport'] = eoes.respond_to?(:strftime) ? eoes : !eoes
else
release['extendedSupport'] = false
end
end

{ 'name' => name, 'data' => release }
end
end
Expand Down
Loading