From 4e57701c59d43d8b2e51b99664ba529cbf9445a8 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 15 Jan 2026 11:35:34 -0500 Subject: [PATCH] doc: fetch releases from main branch So we do not need to backport actual EOL dates. Signed-off-by: Patrick Donnelly --- doc/conf.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 1bf69eeb15394..3c2e214a8aca0 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -6,7 +6,9 @@ import shutil import sys import yaml import sphinx.util +import urllib.request +logger = sphinx.util.logging.getLogger(__name__) top_level = \ os.path.dirname( @@ -38,10 +40,18 @@ def latest_stable_release(): def is_release_eol(codename): - with open(os.path.join(top_level, 'doc/releases/releases.yml')) as input: - releases = yaml.safe_load(input)['releases'] - return 'actual_eol' in releases.get(codename, {}) - + # Try fetching the latest status from the main branch first + try: + url = "https://raw.githubusercontent.com/ceph/ceph/main/doc/releases/releases.yml" + with urllib.request.urlopen(url, timeout=5) as response: + releases = yaml.safe_load(response)['releases'] + return 'actual_eol' in releases.get(codename, {}) + except Exception as e: + logger.warn(f"Failed to fetch releases.yml from main, falling back to local: {e}") + # Fallback to the local file if the network request fails + with open(os.path.join(top_level, 'doc/releases/releases.yml')) as input: + releases = yaml.safe_load(input)['releases'] + return 'actual_eol' in releases.get(codename, {}) # project information project = 'Ceph' -- 2.47.3