Skip to content

Conversation

@cotti
Copy link
Contributor

@cotti cotti commented Dec 8, 2025

This PR provides a set of adjustments to the inner workings of versioning in the context of applies_to. This draft will be further updated with front-end changes, but badge-related changes can be checked independently.

It is part of #2135.

Problem description

Describing versions within applicability contains several quirks and limitations, such as:

  • Lack of version range support: Authors can only specify single versions, making it difficult to document features that span multiple versions
  • Patch-level badge overload: Showing full Major.Minor.Patch versions creates visual clutter, specially for more complex applicability scenarios
  • Missing base version context: When no version is specified for versioned products, readers don't know they're viewing version-specific documentation (e.g., "Stack 9.0+")

Proposed changes

Version Specification (VersionSpec)

A new VersionSpec class has been created. It builds on SemVersion, and supports the following versioning types:

  • Greater than or equal to: x.x+ or x.x (default)
  • Range (inclusive): x.x-y.y
  • Exact version: =x.x
// Examples:
stack: ga 9.1          // 9.1+ (default behavior)
stack: ga 9.1+         // 9.1+ (explicit)
stack: preview 9.0-9.2 // Range
stack: beta =9.1       // Exact version only

Simplified Badge Display

  • Badges now display Major.Minor versions only, regardless of patch specification:
    9.5.0, 9.5.1, 9.5.6 -> all display as 9.5 or 9.5+

Base Version Display

When no version is specified for versioned products, the base version is now shown:

Before: stack: ga -> Badge shows just "Stack"
After: stack: ga -> Badge shows "Stack│8.0+" (assuming base = 8.0)

Unversioned products continue to show no version.

Validation Rules

Implemented validation in ApplicableToYamlConverter:

  • One version declaration per lifecycle
  • Only one "greater than or equal" per entry is allowed
  • Ranges must not have a minimum version larger than the maximum version
  • Overlapping version ranges are not allowed
# Valid:
stack: ga 9.2+, beta 9.0-9.1
stack: ga 9.2, beta =9.1

# Invalid - throws a warning:
stack: ga 9.2+, beta 9.0+     # Multiple >=
stack: ga 9.2+, beta 9.0-9.2  # Overlapping ranges

Tooltip -> Popover overhaul

The badge tooltip was replaced by a popover component.

image

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

🔍 Preview links for changed docs

Copy link
Member

@reakaleek reakaleek left a comment

Choose a reason for hiding this comment

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

There are two test cases that made me curious.

Otherwise, LGTM.

Nice work.

"sub_type": "stack",
"lifecycle": "ga",
"version": "9999.9999.9999"
"version": "all"
Copy link
Member

Choose a reason for hiding this comment

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

➕ thanks for fixing this and making it properly.

@reakaleek
Copy link
Member

I'm wondering a bit why there are so many warnings. What's the reason we can't do this backwards compatible?

{
// Stack
[VersioningSystemId.Stack] = new ProductInfo(
Description: "The <strong>Elastic Stack</strong> includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.",
Copy link
Contributor

@leemthompo leemthompo Jan 5, 2026

Choose a reason for hiding this comment

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

[Maybe this isn't the right place to discuss this, so feel free to ignore...]

IMO the goal here is to display/explain the stack-versioning scheme, which applies to more products than this, so not sure if this is a helpful spot for this particular definition.

In the rendered part, I'd vote for removing "Stack" entirely and simply displaying the version.

For the Description, I'd say something like "Stack-versioned products and features follow the same semantic versioning scheme as Elasticsearch and Kibana."

Copy link
Contributor

Choose a reason for hiding this comment

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

Long debate on this one, we want to change this term soon. For now we'll stick with this, with the goal of explaining what "Stack" means to address some direct feedback. For the versioning model, we'll now always show a version in those badges, which should clarify a lot the intent of these badges wrt versioning

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough, I'd insist, at least, that the current Description isn't super helpful in this context but 🤷

@benironside
Copy link

benironside commented Jan 5, 2026

I love this update. Very excited to see version ranges coming to fruition, and I like the validation layer and the popover updates. Thank you!

@cotti cotti merged commit 8ba7375 into main Jan 8, 2026
30 checks passed
@cotti cotti deleted the feat/versionspec branch January 8, 2026 16:07
florent-leborgne added a commit to elastic/docs-content that referenced this pull request Jan 8, 2026
## Summary
This PR:
- adjusts applies-switch occurrences in this repo while planning for
upcoming syntax changes.
- adjusts the order of items to have them ordered from latest to oldest
when relevant

This PR should only be merged after
elastic/docs-builder#2322 is merged.

CI should fail until then.

Contributes to: #4361

## Generative AI disclosure
<!--
To help us ensure compliance with the Elastic open source and
documentation guidelines, please answer the following:
-->
1. Did you use a generative AI (GenAI) tool to assist in creating this
contribution?
- [ ] Yes  
- [x] No  
<!--
2. If you answered "Yes" to the previous question, please specify the
tool(s) and model(s) used (e.g., Google Gemini, OpenAI ChatGPT-4, etc.).

Tool(s) and model(s) used:
-->

---------

Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com>
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
florent-leborgne added a commit to elastic/docs-content that referenced this pull request Jan 8, 2026
## Summary
This PR:
- checks multi-value applies_to keys wrt the upcoming syntax changes
- checks list items with applies_to to make sure they convey the right
information (i.e. were they alternative versions or independently
announcing product availability) - and puts latest first in such lists
when this wasn't the case
- checks that patch-level information that is different than `.0` can
stay as is, or make necessary adjustments if not.

Note: the `+` notation is a best practice but isn't mandatory, so this
PR does not update every single occurrence of applies_to that we have,
and instead focuses on cases with ambiguity or that could have led to
issues with the updates

This PR should only be merged after
elastic/docs-builder#2322 is merged.

CI should fail until then.

Contributes to: #4361

## Generative AI disclosure
<!--
To help us ensure compliance with the Elastic open source and
documentation guidelines, please answer the following:
-->
1. Did you use a generative AI (GenAI) tool to assist in creating this
contribution?
- [ ] Yes  
- [x] No  
<!--
2. If you answered "Yes" to the previous question, please specify the
tool(s) and model(s) used (e.g., Google Gemini, OpenAI ChatGPT-4, etc.).

Tool(s) and model(s) used:
-->

---------

Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
Co-authored-by: Nastasha Solomon <nastasha.solomon@elastic.co>
florent-leborgne added a commit to elastic/docs-content that referenced this pull request Jan 9, 2026
## Summary
This PR converts tabs that should now be applies-switch thanks to the
recent and upcoming updates to the metadata system.

This PR should only be merged after
elastic/docs-builder#2322 is merged.

CI should fail until then.

Contributes to: #4361

## Generative AI disclosure
<!--
To help us ensure compliance with the Elastic open source and
documentation guidelines, please answer the following:
-->
1. Did you use a generative AI (GenAI) tool to assist in creating this
contribution?
- [ ] Yes  
- [x] No  
<!--
2. If you answered "Yes" to the previous question, please specify the
tool(s) and model(s) used (e.g., Google Gemini, OpenAI ChatGPT-4, etc.).

Tool(s) and model(s) used:
-->

---------

Co-authored-by: Visha Angelova <91186315+vishaangelova@users.noreply.github.com>
colleenmcginnis added a commit to elastic/docs-content that referenced this pull request Jan 9, 2026
Related to elastic/docs-builder#2135 and
elastic/docs-builder#2322 and

<!--
Thank you for contributing to the Elastic Docs! 🎉
Use this template to help us efficiently review your contribution.
-->

## Summary

- [x] Update existing cumulative docs contributing guidelines
- [x] Add examples that include ranges
- [x] Update get started content as needed

## Generative AI disclosure
<!--
To help us ensure compliance with the Elastic open source and
documentation guidelines, please answer the following:
-->
1. Did you use a generative AI (GenAI) tool to assist in creating this
contribution?
- [ ] Yes  
- [x] No  

 cc @florent-leborgne @vishaangelova @shainaraskas

---------

Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
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.

Applies_to updates: allow version ranges and limit versions to Major.Minor

10 participants