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

Fix version selection logic: Prioritize lexicographically larger release name for same release date #19183

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ebembi-crdb
Copy link
Contributor

Summary:

This PR updates the version selection logic to handle cases where multiple versions have the same release date. In such cases, the version with the lexicographically larger release name is now prioritized.

Details:

  • The current version selection process was sorting by release date, but did not account for cases where multiple versions have identical release dates.
  • Added a secondary sort by release_name in reverse lexicographical order to ensure the version with the largest release name is selected when release dates are tied.

Example:

Given two versions with the same release date:

  • 23.2.15 and 23.2.1.6
  • The system will now pick 23.2.16 if both have the same release_date, ensuring the lexicographically larger release is chosen.

Copy link

Files changed:

  • src/current/_includes/version-switcher.html:
    • Warning: include not used in any version-switcher.html file or include

Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 7b5c895
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-api-docs/deploys/67460f48a7a4910008502755

Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 7b5c895
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-interactivetutorials-docs/deploys/67460f4808a2670008ffd248

Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit f2980ca
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-api-docs/deploys/67460f53ea98870008b9dfa8

Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit f2980ca
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-interactivetutorials-docs/deploys/67460f53db0c5a00087a1002

Copy link

netlify bot commented Nov 26, 2024

Netlify Preview

Name Link
🔨 Latest commit 7b5c895
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-docs/deploys/67460f486a54c40008a5f1c2
😎 Deploy Preview https://deploy-preview-19183--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 26, 2024

Netlify Preview

Name Link
🔨 Latest commit f2980ca
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-docs/deploys/67460f53a7cf080008fbf668
😎 Deploy Preview https://deploy-preview-19183--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant