-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Early January we'll release syntax updates for applies_to metadata.
The full specification can be found here: https://docs.google.com/document/d/1dnBxUnSTXh8bDfAownJAO8dXwze0IYNVJDmBmjBEk2I/edit?tab=t.0#heading=h.9f0izvvt3ns3
The PR that implements the changes can be found here: elastic/docs-builder#2322
One thing to note is that we implemented some logic to "guess" ranges as often as possible to avoid breaking changes, so most of today's notations are still technically valid.
Summary of the changes
🎯 New syntax options
Specify versions in three ways:
stack: ga 9.1 # 9.1+ (default - greater than or equal)
stack: ga 9.1+ # 9.1+ (explicit)
stack: preview 9.0-9.2 # Version range
stack: beta =9.1 # Exact version only
✨ Key Improvements
- Version ranges supported: Document features across multiple versions (for example,
preview 9.0-9.2) - Update to patch information handling: All badges now show Major.Minor only (
ga 9.5.0→ displays as "9.5+")
We'll now consider that the documentation corresponds to the latest patch of each minor that we document (as historically in the docs). To call out important patch-specific changes, we'll use plain text. - Automatic base versions: When no version is specified in the applies_to for a versioned product, the badge will show the base version (for example,
stack: ga→ displays "Stack│9.0+") - Popover replaces tooltip: Better readability for availability information
The following cases will throw warnings:
# ❌ Multiple unbound values in one entry
stack: ga 9.2+, beta 9.0+
# ❌ Overlapping ranges
stack: ga 9.2+, beta 9.0-9.2
# ✅ Correct way
stack: ga 9.2+, beta 9.0-9.1
:questionblock: Does this mean my current content is going to break with the current definition of applies_to?
With the newly implemented logic, there should be no major breaking changes. We've made adjustments so that things currently missing a range like preview 9.0, ga 9.3 are correctly interpreted as the newly expected preview 9.0-9.2, ga 9.3 syntax.
However, there are still cases where we'll need to tidy things up to get the badges to communicate the correct information, as detailed in the following next steps.