We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug]: Updated input manifests creates old version manifests part of `legacy-manifests/` folder
### Describe the bug

With the change to move the old input manifests to [legacy-manifests folder](url) in build repo, the [auto generate manifest workflow ](https://github.com/opensearch-project/opensearch-build/blob/main/.github/workflows/versions.yml) creates even the manifests part of the legacy-manifests folder assuming they does not exist.
Sample PR.
https://github.com/opensearch-project/opensearch-build/pull/2389/files

### To reproduce

The workflow PR
https://github.com/opensearch-project/opensearch-build/pull/2389/files

### Expected behavior

The `./manifest.sh update` logic should be modified:
1) Either it should create manifests greater than the version number from the manifests inside the [legacy manifest folder](https://github.com/opensearch-project/opensearch-build/tree/main/legacy-manifests)
2) Logic to compare both manifests and legacy-manifests folder.

### Screenshots

If applicable, add screenshots to help explain your problem.

### Host / Environment

_No response_

### Additional context

_No response_

### Relevant log output

_No response_

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/manifests_workflow/input_manifests.py`
Content:
```
1 # SPDX-License-Identifier: Apache-2.0
2 #
3 # The OpenSearch Contributors require contributions made to
4 # this file be licensed under the Apache-2.0 license or a
5 # compatible open source license.
6 
7 import glob
8 import logging
9 import os
10 import re
11 from abc import abstractmethod
12 from typing import Dict, List, Type, Union
13 
14 from manifests.input_manifest import InputComponents, InputManifest
15 from manifests.manifests import Manifests
16 from manifests_workflow.component_opensearch import ComponentOpenSearch
17 from manifests_workflow.component_opensearch_dashboards_min import ComponentOpenSearchDashboardsMin
18 from manifests_workflow.component_opensearch_min import ComponentOpenSearchMin
19 from system.temporary_directory import TemporaryDirectory
20 
21 
22 class InputManifests(Manifests):
23     def __init__(self, name: str) -> None:
24         self.name = name
25         self.prefix = name.lower().replace(" ", "-")
26         super().__init__(InputManifest, InputManifests.files(self.prefix))
27 
28     @classmethod
29     def manifests_path(self) -> str:
30         return os.path.realpath(os.path.join(os.path.dirname(__file__), "..", "..", "manifests"))
31 
32     @classmethod
33     def jenkins_path(self) -> str:
34         return os.path.realpath(os.path.join(os.path.dirname(__file__), "..", "..", "jenkins"))
35 
36     @classmethod
37     def cron_jenkinsfile(self) -> str:
38         return os.path.join(self.jenkins_path(), "check-for-build.jenkinsfile")
39 
40     @classmethod
41     def files(self, name: str) -> List:
42         results = []
43         for filename in glob.glob(os.path.join(self.manifests_path(), f"**/{name}-*.yml")):
44             # avoids the -maven manifest
45             match = re.search(rf"^{name}-([0-9.]*).yml$", os.path.basename(filename))
46             if match:
47                 results.append(filename)
48         return results
49 
50     @abstractmethod
51     def update(
52         self,
53         min_klass: Union[Type[ComponentOpenSearchMin], Type[ComponentOpenSearchDashboardsMin]],
54         component_klass: Type[ComponentOpenSearch],
55         keep: bool = False,
56     ) -> None:
57         known_versions = self.versions
58         logging.info(f"Known versions: {known_versions}")
59         main_versions: Dict = {}
60         with TemporaryDirectory(keep=keep, chdir=True) as work_dir:
61             logging.info(f"Checking out components into {work_dir.name}")
62 
63             # check out and build #main, 1.x, etc.
64             branches = min_klass.branches()
65 
66             logging.info(f"Checking {self.name} {branches} branches")
67             for branch in branches:
68                 c = min_klass.checkout(
69                     path=os.path.join(work_dir.name, self.name.replace(" ", ""), branch),
70                     branch=branch,
71                 )
72 
73                 version = c.version
74                 logging.info(f"{self.name}#{branch} is version {version}")
75                 if version not in main_versions.keys():
76                     main_versions[version] = [c]
77 
78             if component_klass is not None:
79                 # components can increment their own version first without incrementing min
80                 manifest = self.latest
81                 logging.info(f"Examining components in the latest manifest of {manifest.build.name} ({manifest.build.version})")
82                 for component in manifest.components.values():
83                     if component.name == self.name:
84                         continue
85 
86                     logging.info(f"Checking out {component.name}#main")
87                     component = component_klass.checkout(
88                         name=component.name,
89                         path=os.path.join(work_dir.name, component.name),
90                         opensearch_version=manifest.build.version,
91                         branch="main",
92                     )
93 
94                     component_version = component.version
95                     if component_version:
96                         release_version = ".".join(component_version.split(".")[:3])
97                         if release_version not in main_versions.keys():
98                             main_versions[release_version] = []
99                         main_versions[release_version].append(component)
100                         logging.info(f"{component.name}#main is version {release_version} (from {component_version})")
101 
102             # summarize
103             logging.info("Found versions on main:")
104             for main_version in main_versions.keys():
105                 for component in main_versions[main_version]:
106                     logging.info(f" {component.name}={main_version}")
107 
108             # generate new manifests
109             for release_version in sorted(main_versions.keys() - known_versions):
110                 self.write_manifest(release_version, main_versions[release_version])
111                 self.add_to_cron(release_version)
112 
113     def create_manifest(self, version: str, components: List = []) -> InputManifest:
114         templates_base_path = os.path.join(self.manifests_path(), "templates")
115         template_version_folder = version.split(".")[0] + ".x"
116         template_full_path = os.path.join(templates_base_path, self.prefix, template_version_folder, "manifest.yml")
117         if not os.path.exists(template_full_path):
118             template_full_path = os.path.join(templates_base_path, self.prefix, "default", "manifest.yml")
119 
120         manifest = InputManifest.from_file(open(template_full_path))
121 
122         manifest.build.version = version
123         manifests_components = []
124 
125         for component in components:
126             logging.info(f" Adding {component.name}")
127             manifests_components.append(component.to_dict())
128 
129         manifest.components = InputComponents(manifests_components)  # type: ignore
130         return manifest
131 
132     def write_manifest(self, version: str, components: List = []) -> None:
133         logging.info(f"Creating new version: {version}")
134         manifest = self.create_manifest(version, components)
135         manifest_dir = os.path.join(self.manifests_path(), version)
136         os.makedirs(manifest_dir, exist_ok=True)
137         manifest_path = os.path.join(manifest_dir, f"{self.prefix}-{version}.yml")
138         manifest.to_file(manifest_path)
139         logging.info(f"Wrote {manifest_path}")
140 
141     def add_to_cron(self, version: str) -> None:
142         logging.info(f"Adding new version to cron: {version}")
143         jenkinsfile = self.cron_jenkinsfile()
144         with open(jenkinsfile, "r") as f:
145             data = f.read()
146 
147         cron_entry = f"H 1 * * * %INPUT_MANIFEST={version}/{self.prefix}-{version}.yml;TARGET_JOB_NAME=distribution-build-{self.prefix}\n"
148 
149         if cron_entry in data:
150             raise ValueError(f"{jenkinsfile} already contains an entry for {self.prefix} {version}")
151 
152         data = data.replace("parameterizedCron '''\n", f"parameterizedCron '''\n{' ' * 12}{cron_entry}")
153 
154         with open(jenkinsfile, "w") as f:
155             f.write(data)
156 
157         logging.info(f"Wrote {jenkinsfile}")
158
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/manifests_workflow/input_manifests.py b/src/manifests_workflow/input_manifests.py
--- a/src/manifests_workflow/input_manifests.py
+++ b/src/manifests_workflow/input_manifests.py
@@ -29,6 +29,10 @@
     def manifests_path(self) -> str:
         return os.path.realpath(os.path.join(os.path.dirname(__file__), "..", "..", "manifests"))
 
+    @classmethod
+    def legacy_manifests_path(self) -> str:
+        return os.path.realpath(os.path.join(os.path.dirname(__file__), "..", "..", "legacy-manifests"))
+
     @classmethod
     def jenkins_path(self) -> str:
         return os.path.realpath(os.path.join(os.path.dirname(__file__), "..", "..", "jenkins"))
@@ -40,11 +44,12 @@
     @classmethod
     def files(self, name: str) -> List:
         results = []
-        for filename in glob.glob(os.path.join(self.manifests_path(), f"**/{name}-*.yml")):
-            # avoids the -maven manifest
-            match = re.search(rf"^{name}-([0-9.]*).yml$", os.path.basename(filename))
-            if match:
-                results.append(filename)
+        for path in [self.manifests_path(), self.legacy_manifests_path()]:
+            for filename in glob.glob(os.path.join(path, f"**/{name}-*.yml")):
+                # avoids the -maven manifest
+                match = re.search(rf"^{name}-([0-9.]*).yml$", os.path.basename(filename))
+                if match:
+                    results.append(filename)
         return results
 
     @abstractmethod

{"golden_diff": "diff --git a/src/manifests_workflow/input_manifests.py b/src/manifests_workflow/input_manifests.py\n--- a/src/manifests_workflow/input_manifests.py\n+++ b/src/manifests_workflow/input_manifests.py\n@@ -29,6 +29,10 @@\n     def manifests_path(self) -> str:\n         return os.path.realpath(os.path.join(os.path.dirname(__file__), \"..\", \"..\", \"manifests\"))\n \n+    @classmethod\n+    def legacy_manifests_path(self) -> str:\n+        return os.path.realpath(os.path.join(os.path.dirname(__file__), \"..\", \"..\", \"legacy-manifests\"))\n+\n     @classmethod\n     def jenkins_path(self) -> str:\n         return os.path.realpath(os.path.join(os.path.dirname(__file__), \"..\", \"..\", \"jenkins\"))\n@@ -40,11 +44,12 @@\n     @classmethod\n     def files(self, name: str) -> List:\n         results = []\n-        for filename in glob.glob(os.path.join(self.manifests_path(), f\"**/{name}-*.yml\")):\n-            # avoids the -maven manifest\n-            match = re.search(rf\"^{name}-([0-9.]*).yml$\", os.path.basename(filename))\n-            if match:\n-                results.append(filename)\n+        for path in [self.manifests_path(), self.legacy_manifests_path()]:\n+            for filename in glob.glob(os.path.join(path, f\"**/{name}-*.yml\")):\n+                # avoids the -maven manifest\n+                match = re.search(rf\"^{name}-([0-9.]*).yml$\", os.path.basename(filename))\n+                if match:\n+                    results.append(filename)\n         return results\n \n     @abstractmethod\n", "issue": "[Bug]: Updated input manifests creates old version manifests part of `legacy-manifests/` folder\n### Describe the bug\n\nWith the change to move the old input manifests to [legacy-manifests folder](url) in build repo, the [auto generate manifest workflow ](https://github.com/opensearch-project/opensearch-build/blob/main/.github/workflows/versions.yml) creates even the manifests part of the legacy-manifests folder assuming they does not exist.\r\nSample PR.\r\nhttps://github.com/opensearch-project/opensearch-build/pull/2389/files\n\n### To reproduce\n\nThe workflow PR\r\nhttps://github.com/opensearch-project/opensearch-build/pull/2389/files\n\n### Expected behavior\n\nThe `./manifest.sh update` logic should be modified:\r\n1) Either it should create manifests greater than the version number from the manifests inside the [legacy manifest folder](https://github.com/opensearch-project/opensearch-build/tree/main/legacy-manifests)\r\n2) Logic to compare both manifests and legacy-manifests folder.\n\n### Screenshots\n\nIf applicable, add screenshots to help explain your problem.\n\n### Host / Environment\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Relevant log output\n\n_No response_\n", "before_files": [{"content": "# SPDX-License-Identifier: Apache-2.0\n#\n# The OpenSearch Contributors require contributions made to\n# this file be licensed under the Apache-2.0 license or a\n# compatible open source license.\n\nimport glob\nimport logging\nimport os\nimport re\nfrom abc import abstractmethod\nfrom typing import Dict, List, Type, Union\n\nfrom manifests.input_manifest import InputComponents, InputManifest\nfrom manifests.manifests import Manifests\nfrom manifests_workflow.component_opensearch import ComponentOpenSearch\nfrom manifests_workflow.component_opensearch_dashboards_min import ComponentOpenSearchDashboardsMin\nfrom manifests_workflow.component_opensearch_min import ComponentOpenSearchMin\nfrom system.temporary_directory import TemporaryDirectory\n\n\nclass InputManifests(Manifests):\n    def __init__(self, name: str) -> None:\n        self.name = name\n        self.prefix = name.lower().replace(\" \", \"-\")\n        super().__init__(InputManifest, InputManifests.files(self.prefix))\n\n    @classmethod\n    def manifests_path(self) -> str:\n        return os.path.realpath(os.path.join(os.path.dirname(__file__), \"..\", \"..\", \"manifests\"))\n\n    @classmethod\n    def jenkins_path(self) -> str:\n        return os.path.realpath(os.path.join(os.path.dirname(__file__), \"..\", \"..\", \"jenkins\"))\n\n    @classmethod\n    def cron_jenkinsfile(self) -> str:\n        return os.path.join(self.jenkins_path(), \"check-for-build.jenkinsfile\")\n\n    @classmethod\n    def files(self, name: str) -> List:\n        results = []\n        for filename in glob.glob(os.path.join(self.manifests_path(), f\"**/{name}-*.yml\")):\n            # avoids the -maven manifest\n            match = re.search(rf\"^{name}-([0-9.]*).yml$\", os.path.basename(filename))\n            if match:\n                results.append(filename)\n        return results\n\n    @abstractmethod\n    def update(\n        self,\n        min_klass: Union[Type[ComponentOpenSearchMin], Type[ComponentOpenSearchDashboardsMin]],\n        component_klass: Type[ComponentOpenSearch],\n        keep: bool = False,\n    ) -> None:\n        known_versions = self.versions\n        logging.info(f\"Known versions: {known_versions}\")\n        main_versions: Dict = {}\n        with TemporaryDirectory(keep=keep, chdir=True) as work_dir:\n            logging.info(f\"Checking out components into {work_dir.name}\")\n\n            # check out and build #main, 1.x, etc.\n            branches = min_klass.branches()\n\n            logging.info(f\"Checking {self.name} {branches} branches\")\n            for branch in branches:\n                c = min_klass.checkout(\n                    path=os.path.join(work_dir.name, self.name.replace(\" \", \"\"), branch),\n                    branch=branch,\n                )\n\n                version = c.version\n                logging.info(f\"{self.name}#{branch} is version {version}\")\n                if version not in main_versions.keys():\n                    main_versions[version] = [c]\n\n            if component_klass is not None:\n                # components can increment their own version first without incrementing min\n                manifest = self.latest\n                logging.info(f\"Examining components in the latest manifest of {manifest.build.name} ({manifest.build.version})\")\n                for component in manifest.components.values():\n                    if component.name == self.name:\n                        continue\n\n                    logging.info(f\"Checking out {component.name}#main\")\n                    component = component_klass.checkout(\n                        name=component.name,\n                        path=os.path.join(work_dir.name, component.name),\n                        opensearch_version=manifest.build.version,\n                        branch=\"main\",\n                    )\n\n                    component_version = component.version\n                    if component_version:\n                        release_version = \".\".join(component_version.split(\".\")[:3])\n                        if release_version not in main_versions.keys():\n                            main_versions[release_version] = []\n                        main_versions[release_version].append(component)\n                        logging.info(f\"{component.name}#main is version {release_version} (from {component_version})\")\n\n            # summarize\n            logging.info(\"Found versions on main:\")\n            for main_version in main_versions.keys():\n                for component in main_versions[main_version]:\n                    logging.info(f\" {component.name}={main_version}\")\n\n            # generate new manifests\n            for release_version in sorted(main_versions.keys() - known_versions):\n                self.write_manifest(release_version, main_versions[release_version])\n                self.add_to_cron(release_version)\n\n    def create_manifest(self, version: str, components: List = []) -> InputManifest:\n        templates_base_path = os.path.join(self.manifests_path(), \"templates\")\n        template_version_folder = version.split(\".\")[0] + \".x\"\n        template_full_path = os.path.join(templates_base_path, self.prefix, template_version_folder, \"manifest.yml\")\n        if not os.path.exists(template_full_path):\n            template_full_path = os.path.join(templates_base_path, self.prefix, \"default\", \"manifest.yml\")\n\n        manifest = InputManifest.from_file(open(template_full_path))\n\n        manifest.build.version = version\n        manifests_components = []\n\n        for component in components:\n            logging.info(f\" Adding {component.name}\")\n            manifests_components.append(component.to_dict())\n\n        manifest.components = InputComponents(manifests_components)  # type: ignore\n        return manifest\n\n    def write_manifest(self, version: str, components: List = []) -> None:\n        logging.info(f\"Creating new version: {version}\")\n        manifest = self.create_manifest(version, components)\n        manifest_dir = os.path.join(self.manifests_path(), version)\n        os.makedirs(manifest_dir, exist_ok=True)\n        manifest_path = os.path.join(manifest_dir, f\"{self.prefix}-{version}.yml\")\n        manifest.to_file(manifest_path)\n        logging.info(f\"Wrote {manifest_path}\")\n\n    def add_to_cron(self, version: str) -> None:\n        logging.info(f\"Adding new version to cron: {version}\")\n        jenkinsfile = self.cron_jenkinsfile()\n        with open(jenkinsfile, \"r\") as f:\n            data = f.read()\n\n        cron_entry = f\"H 1 * * * %INPUT_MANIFEST={version}/{self.prefix}-{version}.yml;TARGET_JOB_NAME=distribution-build-{self.prefix}\\n\"\n\n        if cron_entry in data:\n            raise ValueError(f\"{jenkinsfile} already contains an entry for {self.prefix} {version}\")\n\n        data = data.replace(\"parameterizedCron '''\\n\", f\"parameterizedCron '''\\n{' ' * 12}{cron_entry}\")\n\n        with open(jenkinsfile, \"w\") as f:\n            f.write(data)\n\n        logging.info(f\"Wrote {jenkinsfile}\")\n", "path": "src/manifests_workflow/input_manifests.py"}], "after_files": [{"content": "# SPDX-License-Identifier: Apache-2.0\n#\n# The OpenSearch Contributors require contributions made to\n# this file be licensed under the Apache-2.0 license or a\n# compatible open source license.\n\nimport glob\nimport logging\nimport os\nimport re\nfrom abc import abstractmethod\nfrom typing import Dict, List, Type, Union\n\nfrom manifests.input_manifest import InputComponents, InputManifest\nfrom manifests.manifests import Manifests\nfrom manifests_workflow.component_opensearch import ComponentOpenSearch\nfrom manifests_workflow.component_opensearch_dashboards_min import ComponentOpenSearchDashboardsMin\nfrom manifests_workflow.component_opensearch_min import ComponentOpenSearchMin\nfrom system.temporary_directory import TemporaryDirectory\n\n\nclass InputManifests(Manifests):\n    def __init__(self, name: str) -> None:\n        self.name = name\n        self.prefix = name.lower().replace(\" \", \"-\")\n        super().__init__(InputManifest, InputManifests.files(self.prefix))\n\n    @classmethod\n    def manifests_path(self) -> str:\n        return os.path.realpath(os.path.join(os.path.dirname(__file__), \"..\", \"..\", \"manifests\"))\n\n    @classmethod\n    def legacy_manifests_path(self) -> str:\n        return os.path.realpath(os.path.join(os.path.dirname(__file__), \"..\", \"..\", \"legacy-manifests\"))\n\n    @classmethod\n    def jenkins_path(self) -> str:\n        return os.path.realpath(os.path.join(os.path.dirname(__file__), \"..\", \"..\", \"jenkins\"))\n\n    @classmethod\n    def cron_jenkinsfile(self) -> str:\n        return os.path.join(self.jenkins_path(), \"check-for-build.jenkinsfile\")\n\n    @classmethod\n    def files(self, name: str) -> List:\n        results = []\n        for path in [self.manifests_path(), self.legacy_manifests_path()]:\n            for filename in glob.glob(os.path.join(path, f\"**/{name}-*.yml\")):\n                # avoids the -maven manifest\n                match = re.search(rf\"^{name}-([0-9.]*).yml$\", os.path.basename(filename))\n                if match:\n                    results.append(filename)\n        return results\n\n    @abstractmethod\n    def update(\n        self,\n        min_klass: Union[Type[ComponentOpenSearchMin], Type[ComponentOpenSearchDashboardsMin]],\n        component_klass: Type[ComponentOpenSearch],\n        keep: bool = False,\n    ) -> None:\n        known_versions = self.versions\n        logging.info(f\"Known versions: {known_versions}\")\n        main_versions: Dict = {}\n        with TemporaryDirectory(keep=keep, chdir=True) as work_dir:\n            logging.info(f\"Checking out components into {work_dir.name}\")\n\n            # check out and build #main, 1.x, etc.\n            branches = min_klass.branches()\n\n            logging.info(f\"Checking {self.name} {branches} branches\")\n            for branch in branches:\n                c = min_klass.checkout(\n                    path=os.path.join(work_dir.name, self.name.replace(\" \", \"\"), branch),\n                    branch=branch,\n                )\n\n                version = c.version\n                logging.info(f\"{self.name}#{branch} is version {version}\")\n                if version not in main_versions.keys():\n                    main_versions[version] = [c]\n\n            if component_klass is not None:\n                # components can increment their own version first without incrementing min\n                manifest = self.latest\n                logging.info(f\"Examining components in the latest manifest of {manifest.build.name} ({manifest.build.version})\")\n                for component in manifest.components.values():\n                    if component.name == self.name:\n                        continue\n\n                    logging.info(f\"Checking out {component.name}#main\")\n                    component = component_klass.checkout(\n                        name=component.name,\n                        path=os.path.join(work_dir.name, component.name),\n                        opensearch_version=manifest.build.version,\n                        branch=\"main\",\n                    )\n\n                    component_version = component.version\n                    if component_version:\n                        release_version = \".\".join(component_version.split(\".\")[:3])\n                        if release_version not in main_versions.keys():\n                            main_versions[release_version] = []\n                        main_versions[release_version].append(component)\n                        logging.info(f\"{component.name}#main is version {release_version} (from {component_version})\")\n\n            # summarize\n            logging.info(\"Found versions on main:\")\n            for main_version in main_versions.keys():\n                for component in main_versions[main_version]:\n                    logging.info(f\" {component.name}={main_version}\")\n\n            # generate new manifests\n            for release_version in sorted(main_versions.keys() - known_versions):\n                self.write_manifest(release_version, main_versions[release_version])\n                self.add_to_cron(release_version)\n\n    def create_manifest(self, version: str, components: List = []) -> InputManifest:\n        templates_base_path = os.path.join(self.manifests_path(), \"templates\")\n        template_version_folder = version.split(\".\")[0] + \".x\"\n        template_full_path = os.path.join(templates_base_path, self.prefix, template_version_folder, \"manifest.yml\")\n        if not os.path.exists(template_full_path):\n            template_full_path = os.path.join(templates_base_path, self.prefix, \"default\", \"manifest.yml\")\n\n        manifest = InputManifest.from_file(open(template_full_path))\n\n        manifest.build.version = version\n        manifests_components = []\n\n        for component in components:\n            logging.info(f\" Adding {component.name}\")\n            manifests_components.append(component.to_dict())\n\n        manifest.components = InputComponents(manifests_components)  # type: ignore\n        return manifest\n\n    def write_manifest(self, version: str, components: List = []) -> None:\n        logging.info(f\"Creating new version: {version}\")\n        manifest = self.create_manifest(version, components)\n        manifest_dir = os.path.join(self.manifests_path(), version)\n        os.makedirs(manifest_dir, exist_ok=True)\n        manifest_path = os.path.join(manifest_dir, f\"{self.prefix}-{version}.yml\")\n        manifest.to_file(manifest_path)\n        logging.info(f\"Wrote {manifest_path}\")\n\n    def add_to_cron(self, version: str) -> None:\n        logging.info(f\"Adding new version to cron: {version}\")\n        jenkinsfile = self.cron_jenkinsfile()\n        with open(jenkinsfile, \"r\") as f:\n            data = f.read()\n\n        cron_entry = f\"H 1 * * * %INPUT_MANIFEST={version}/{self.prefix}-{version}.yml;TARGET_JOB_NAME=distribution-build-{self.prefix}\\n\"\n\n        if cron_entry in data:\n            raise ValueError(f\"{jenkinsfile} already contains an entry for {self.prefix} {version}\")\n\n        data = data.replace(\"parameterizedCron '''\\n\", f\"parameterizedCron '''\\n{' ' * 12}{cron_entry}\")\n\n        with open(jenkinsfile, \"w\") as f:\n            f.write(data)\n\n        logging.info(f\"Wrote {jenkinsfile}\")\n", "path": "src/manifests_workflow/input_manifests.py"}]}