From: Patrick Donnelly Date: Thu, 15 Jan 2026 16:35:34 +0000 (-0500) Subject: doc: fetch releases from main branch X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F66937%2Fhead;p=ceph.git doc: fetch releases from main branch So we do not need to backport actual EOL dates. Signed-off-by: Patrick Donnelly --- 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'