Skip to content

Commit

Permalink
Versionwarning (#23781)
Browse files Browse the repository at this point in the history
* fix warning for preview/stable

* add fix for version less pages and add links only they exist

* pushing minor change to trigger re-build

* add warn for debugging

* Apply suggestions from code review

Co-authored-by: Dwight Hodge <[email protected]>

* Changes to force build

* adding a error

* removing the error

* adding space to wrappers

* disabling netlify-plugin-hugo-cache-resources

* re-enabling netlify-plugin-hugo-cache-resources

* removing spaces in wrappers

* creating a new shortcode to trigger full build

* creating a new shortcode to trigger full build

* text edit

* add the path correctly

* revert changes used to trigger rebuilds

* revert space add

* text edits

---------

Co-authored-by: Dwight Hodge <[email protected]>
Co-authored-by: Dwight Hodge <[email protected]>
  • Loading branch information
3 people authored Sep 5, 2024
1 parent e8f09b5 commit ee479ee
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 39 deletions.
4 changes: 2 additions & 2 deletions docs/content/preview/faq/yugabytedb-managed-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ For more information, refer to [Maintenance windows](../../yugabyte-cloud/cloud-

### What version of YugabyteDB does my cluster run on?

Dedicated clusters are provisioned with a **stable** release, from a YugabyteDB [stable release](/preview/releases/versioning/#release-versioning-convention-for-stable-releases) series. When creating a dedicated cluster, you can choose one of the following tracks:
Dedicated clusters are provisioned with a **stable** release, from a YugabyteDB [stable release](/preview/releases/versioning/#stable-releases) series. When creating a dedicated cluster, you can choose one of the following tracks:

- Production - Has less frequent updates, using select stable builds that have been tested longer in YugabyteDB Aeon.
- Innovation - Updated more frequently, providing quicker access to new features.
- Early Access - Updated more frequently, providing access to the most recent stable YugabyteDB release.

In addition to the Innovation and Early Access tracks, Sandbox clusters can be provisioned with a **preview** release, from the YugabyteDB [preview release](/preview/releases/versioning/#release-versioning-convention-for-preview-releases) series.
In addition to the Innovation and Early Access tracks, Sandbox clusters can be provisioned with a **preview** release, from the YugabyteDB [preview release](/preview/releases/versioning/#preview-releases) series.

Once a cluster is created, it is upgraded with releases from the track that was assigned at creation.

Expand Down
32 changes: 14 additions & 18 deletions docs/content/preview/releases/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ YugabyteDB and YugabyteDB Anywhere have three kinds of releases:

Additionally, individual features may also be designated as tech preview or early access, or generally available. These designations indicate the feature maturity level, and provide different levels of documentation and support as described in [Feature maturity](#feature-maturity).

## Release versioning convention for Stable releases
## Stable releases

YugabyteDB follows the below-described convention for numbering release versions.
Features in stable releases are considered to be {{<badge/ga>}} unless marked otherwise.

Release versions follow the versioning format of `YYYY.N.MAINTENANCE.PATCH` as follows:
Stable release versions use the numbering format `YYYY.N.MAINTENANCE.PATCH` as follows:

- `YYYY.N` - Includes substantial changes, such as new features and possibly incompatible API changes. `YYYY` is the year (for example, 2024). `N` is either 1 or 2 designating either the first release of the year, or the second. Such major releases occur roughly every 6 months. Generally, one of these releases (and its derivative maintenance and patch releases) per year is designated as LTS, and the other is designated as STS.

Expand All @@ -36,35 +36,31 @@ Release versions follow the versioning format of `YYYY.N.MAINTENANCE.PATCH` as f

On rare occasions, YugabyteDB may issue a hot fix release. Hot fix releases are for specific point issues, and usually offered only to specific customers. Hot fix releases append an additional number to the release versioning convention as `YYYY.N.MAINTENANCE.PATCH.HOTFIX`.

Features in stable releases are considered to be {{<badge/ga>}} unless marked otherwise.

{{< note title="Important" >}}

- Yugabyte supports *production deployments* on stable YugabyteDB releases and upgrades to newer stable releases. For a list of releases and their support timelines, see [YugabyteDB releases](../ybdb-releases/) and [YugabyteDB Anywhere releases](../yba-releases/).
- Yugabyte supports _production deployments_ on stable YugabyteDB releases and upgrades to newer stable releases. For a list of releases and their support timelines, see [YugabyteDB releases](../ybdb-releases/) and [YugabyteDB Anywhere releases](../yba-releases/).
- For recommendations on which version to use for development and testing, see [Recommended release series for projects](../../releases/#recommended-release-series-for-projects).

{{< /note >}}

## Release versioning convention for Preview releases

Preview releases, which include features under active development, are recommended for development and testing only.
## Preview releases

Preview release versions use the versioning format of `MAJOR.MINOR.PATCH.HOTFIX`, where non-negative integers are used as follows:

- `MAJOR` — Includes substantial changes.
- `MINOR` — Incremented when new features and changes are introduced. Currently, by convention for historical reasons, the MINOR integer is always odd; thus, successive MINOR releases increment this number by 2 (for example, 23, 25, 27, and so on.)
- `PATCH` - Patches in the preview release series (`MAJOR.ODD.PATCH`) focus on bug fixes that do not break backward compatibility. At the same time however, new features and changes may be are introduced that might break backward compatibility.
- `HOTFIX` - On rare occasions, a hot fix is required to address an issue without delay.
Features in preview releases are considered to be {{<badge/tp>}} unless marked otherwise.

Releases in the preview release series, denoted by `MAJOR.ODD` versioning, are under active development and incrementally (with each MINOR release) introduce new features and changes.
Preview releases, which include features under active development, are recommended for development and testing only.

Preview releases are the basis from which stable releases are derived. That is, the code base from a preview release is branched, and then hardened to become a stable release. The v2.21 preview release series, for example became the basis for the v2024.1 STS release series.

Note that while most features in a preview release series do appear in the derivative stable release, this cannot be guaranteed; some features may remain internally _disabled_ in the derivative stable release series to allow more time for the feature to be completed.

Features in preview releases are considered to be {{<badge/tp>}} unless marked otherwise.
Releases in the preview release series, denoted by `MAJOR.ODD` versioning, are under active development and incrementally (with each MINOR release) introduce new features and changes.

Patch releases in the preview release series (`MAJOR.ODD.PATCH`) introduce new features, enhancements, and fixes.
Preview releases use the numbering format `MAJOR.MINOR.PATCH.HOTFIX`, where non-negative integers indicate the following:

- `MAJOR` — Includes substantial changes.
- `MINOR` — Incremented when new features and changes are introduced. Currently, by convention for historical reasons, the MINOR integer is always odd; thus, successive MINOR releases increment this number by 2 (for example, 23, 25, 27, and so on.)
- `PATCH` - Patches in the preview release series (`MAJOR.ODD.PATCH`) focus on bug fixes that do not break backward compatibility. At the same time however, new features and changes may be introduced that might break backward compatibility.
- `HOTFIX` - On rare occasions, a hot fix is required to address an issue without delay.

{{< note title="Note" >}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ Refer to [Scaling clusters](../../cloud-clusters/configure-clusters/).

### YugabyteDB version

By default, clusters are created using a stable release, taken from the [stable release series](../../../releases/versioning/#release-versioning-convention-for-stable-releases) of YugabyteDB. You can choose to deploy your dedicated cluster using the following tracks:
By default, clusters are created using a stable release, taken from the [stable release series](../../../releases/versioning/#stable-releases) of YugabyteDB. You can choose to deploy your dedicated cluster using the following tracks:

- Production - Has less frequent updates, using select stable builds that have been tested longer in YugabyteDB Aeon.
- Innovation - Updated more frequently, providing quicker access to new features.
- Early Access - Updated more frequently, providing access to the most recent stable YugabyteDB release.

If you need a feature from the [preview release series](../../../releases/versioning/#release-versioning-convention-for-preview-releases) of YugabyteDB, contact {{% support-cloud %}} before you create your cluster. (Preview is also available for Sandbox clusters.)
If you need a feature from the [preview release series](../../../releases/versioning/#preview-releases) of YugabyteDB, contact {{% support-cloud %}} before you create your cluster. (Preview is also available for Sandbox clusters.)

Yugabyte manages upgrades for you. After you choose a track, database upgrades continue to take releases from the track you chose. For multi-node clusters, Yugabyte performs a rolling upgrade without any downtime. You can manage when Yugabyte performs maintenance and upgrades by configuring the [maintenance window](../../cloud-clusters/cloud-maintenance/) for your cluster.

Expand Down
80 changes: 63 additions & 17 deletions docs/layouts/partials/earlier-version-warning.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,73 @@
{{ if not (eq ($.Scratch.Get "docVersion") "preview") }}
{{ $docVersion := $.Scratch.Get "docVersion" }}
{{ $urlArray := split (urls.Parse .Permalink).Path "/" }}
{{ $previewUrl := path.Join "preview" (after 2 $urlArray) }}
{{ $previewUrl = add (add "/" $previewUrl) "/" }}
{{ $previewVersion := "" }}
{{ $docVersion := $.Scratch.Get "docVersion" }}
{{ $urlArray := split (urls.Parse .Permalink).Path "/" }}
{{ $previewUrl := path.Join "preview" (after 2 $urlArray) }}
{{ $previewUrl = add (add "/" $previewUrl) "/" }}
{{ $stableUrl := path.Join "stable" (after 2 $urlArray) }}
{{ $stableUrl = add (add "/" $stableUrl) "/" }}
{{ $previewVersion := "" }}
{{ $stableVersion := "" }}
{{ $previewBehindStable := false }}
{{ $fullpath := printf "%s" .Page.File.Path}}
{{ $pathsplit := after 1 (split $fullpath "/")}}
{{/** Keep track of whether preview version exists for this file **/}}
{{ $previewPath := path.Join "content/preview" $pathsplit }}
{{ $previewExists := fileExists $previewPath }}

{{- if .Site.Params.yb.preview_version -}}
{{ $previewVersion = printf "(%s)" .Site.Params.yb.preview_version }}
{{/** Keep track of whether stable version exists for this file **/}}
{{ $stablePath := path.Join "content/stable" $pathsplit }}
{{ $stableExists := fileExists $stablePath }}

{{ warnf "%s(%s) - %s(%s)" $previewPath $previewExists $stablePath $stableExists }}

{{/** Identify is preview is behind stable and which versions are preview and stable **/}}
{{ range .Site.Data.currentVersions.dbVersions }}
{{- if eq .alias "stable" -}}
{{ $stableVersion = .series -}}
{{- if in .PreviewBehindStable true -}}
{{ $previewBehindStable = true }}
{{- end -}}
{{- else if eq .alias "preview" -}}
{{- $previewVersion = .series -}}
{{- end -}}
{{- end -}}

{{/** Do nothing if this is the latest stable and preview is behind stable **/}}
{{- if not (and (eq $docVersion "stable") $previewBehindStable) -}}
{{ range .Site.Data.currentVersions.dbVersions }}
{{- if not (in .PreviewBehindStable true) -}}
{{- if or (eq $docVersion .series) (eq $docVersion .alias) -}}
<div class="admonition note">
{{/** for LTS and STS **/}}
{{- if or (eq .isLTS true) (eq .isSTS true) -}}
<!-- <p class="admonition-title">Attention</p> -->
<p>This page documents a stable (production) version. For testing and development with the latest features, use the <a href="{{ $previewUrl }}">preview {{ $previewVersion }} version.</a></p>
{{/** Do nothing if preview does not exist for this file **/}}
{{- if $previewExists -}}
<div class="admonition note">
<p>This page documents a stable (production) version. For testing and development with the latest features,
use the <a href="{{ $previewUrl }}">preview</a> version ({{ $previewVersion }}).
{{/** For older stable versions, Add link to latest stable **/}}
{{ if not (eq .alias "stable") }}
For the latest stable version, see <a href="{{ $stableUrl }}">{{ $stableVersion }}</a>.
{{- end -}}
</p>
</div>
{{- end -}}
{{- else if eq .alias "preview" -}}
{{/** If a stable page does not exist, this is an unversioned page!!!! **/}}
{{- if $stableExists -}}
<div class="admonition warning">
<p>This page documents the preview version ({{ $previewVersion }}). Preview includes features under active development and is for development and testing only.
For production, use the <a href="{{ $stableUrl }}"> stable</a> version ({{ $stableVersion }}). To learn more, see <a href="/preview/releases/versioning/">Versioning</a>.</p>
</div>
{{- end -}}
{{- else -}}
<!-- <p class="admonition-title">Attention</p> -->
<p>This page documents an earlier version. <a href="{{ $previewUrl }}">Go to the preview {{ $previewVersion }} version.</a></p>
{{- if and $previewBehindStable $stableExists }}
<div class="admonition note">
<p>This page documents an earlier version. Go to the <a href="{{ $stableUrl }}">stable</a> version ({{ $stableVersion }}).</p>
</div>
{{- else if $previewExists -}}
<div class="admonition note">
<p>This page documents an earlier version. Go to the <a href="{{ $previewUrl }}">preview</a> version ({{ $previewVersion }}).</p>
</div>
{{- end -}}
{{- end -}}
</div>
{{- end -}}
{{- end -}}
{{- end -}}
{{ end }}
{{- end -}}

0 comments on commit ee479ee

Please sign in to comment.