]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/_ext: unbreak releases timeline if other than 3 active releases 66903/head
authorVille Ojamo <14869000+bluikko@users.noreply.github.com>
Tue, 13 Jan 2026 09:52:50 +0000 (16:52 +0700)
committerVille Ojamo <14869000+bluikko@users.noreply.github.com>
Wed, 14 Jan 2026 09:32:12 +0000 (16:32 +0700)
The Timeline custom Sphinx directive expected exactly three active
releases listed as arguments. While this is fine for the usual situation
of three active releases, improving the directive to support any number
of active releases may benefit e.g. testing.

Previously, using anything other than 3 release names in the
releases/index.rst ceph_timeline directive caused the release dates
table to not be rendered.

Use the same pattern as the TimelineGantt custom directive by requiring
two arguments, with the second argument being a space-separated string
of release names.

Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
doc/_ext/ceph_releases.py

index 481c2a1b6194414538def5552ca18c1ea27dfb3b..abc1f88c1c7c6553fa412aae9a111f72d907d5ac 100644 (file)
@@ -191,9 +191,10 @@ class ReleasesGantt(Directive):
 
 class CephTimeline(Directive):
     has_content = False
-    required_arguments = 4
+    required_arguments = 2
     optional_arguments = 0
     option_spec = {}
+    final_argument_whitespace = True
 
     def run(self):
         filename = self.arguments[0]
@@ -209,7 +210,7 @@ class CephTimeline(Directive):
                 "Failed to open Ceph releases file {}: {}".format(filename, e),
                 line=self.lineno)]
 
-        display_releases = self.arguments[1:]
+        display_releases = self.arguments[1].split()
 
         timeline = []
         for code_name, info in releases["releases"].items():