prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Add Core plugins zips to published artifacts.
  The plugins built with the core repo should be bundled as zips and hosted at artifacts.opensearch.org.
  
  This task involves updating Opensearch's build.sh script to build and include these artifacts with the component's artifact list.
  
  Right now we also have brittle logic that assumes any component with "plugins" in their artifacts list is a plugin repository.  This should be updated to identify the min bundle component in another way.  Perhaps with a separate artifact folder for "min-bundle"
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `bundle-workflow/python/build_workflow/builder.py`
  Content:
  ```
  1 # Copyright OpenSearch Contributors.
  2 # SPDX-License-Identifier: Apache-2.0
  3 
  4 import os
  5 
  6 '''
  7 This class is responsible for executing the build for a component and passing the results to a build recorder.
  8 It will notify the build recorder of build information such as repository and git ref, and any artifacts generated by the build.
  9 Artifacts found in "<build root>/artifacts/<maven|plugins|libs|bundle>" will be recognized and recorded.
  10 '''
  11 class Builder:
  12     def __init__(self, component_name, git_repo, script_finder, build_recorder):
  13         '''
  14         Construct a new Builder instance.
  15         :param component_name: The name of the component to build.
  16         :param git_repo: A GitRepository instance containing the checked-out code.
  17         :param script_finder: The ScriptFinder to use for finding build.sh scripts.
  18         :param build_recorder: The build recorder that will capture build information and artifacts.
  19         '''
  20 
  21         self.component_name = component_name
  22         self.git_repo = git_repo
  23         self.script_finder = script_finder
  24         self.build_recorder = build_recorder
  25         self.output_path = 'artifacts'
  26 
  27     def build(self, version, arch, snapshot):
  28         build_script = self.script_finder.find_build_script(self.component_name, self.git_repo.dir)
  29         build_command = f'{build_script} -v {version} -a {arch} -s {str(snapshot).lower()} -o {self.output_path}'
  30         self.git_repo.execute(build_command)
  31         self.build_recorder.record_component(self.component_name, self.git_repo)
  32 
  33     def export_artifacts(self):
  34         artifacts_dir = os.path.realpath(os.path.join(self.git_repo.dir, self.output_path))
  35         for artifact_type in ["maven", "bundle", "plugins", "libs"]:
  36             for dir, dirs, files in os.walk(os.path.join(artifacts_dir, artifact_type)):
  37                 for file_name in files:
  38                     absolute_path = os.path.join(dir, file_name)
  39                     relative_path = os.path.relpath(absolute_path, artifacts_dir)
  40                     self.build_recorder.record_artifact(self.component_name, artifact_type, relative_path, absolute_path)
  41
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/bundle-workflow/python/build_workflow/builder.py b/bundle-workflow/python/build_workflow/builder.py
  --- a/bundle-workflow/python/build_workflow/builder.py
  +++ b/bundle-workflow/python/build_workflow/builder.py
  @@ -32,7 +32,7 @@
   
       def export_artifacts(self):
           artifacts_dir = os.path.realpath(os.path.join(self.git_repo.dir, self.output_path))
  -        for artifact_type in ["maven", "bundle", "plugins", "libs"]:
  +        for artifact_type in ["maven", "bundle", "plugins", "libs", "core-plugins"]:
               for dir, dirs, files in os.walk(os.path.join(artifacts_dir, artifact_type)):
                   for file_name in files:
                       absolute_path = os.path.join(dir, file_name)
  
verification_info: {"golden_diff": "diff --git a/bundle-workflow/python/build_workflow/builder.py b/bundle-workflow/python/build_workflow/builder.py\n--- a/bundle-workflow/python/build_workflow/builder.py\n+++ b/bundle-workflow/python/build_workflow/builder.py\n@@ -32,7 +32,7 @@\n \n     def export_artifacts(self):\n         artifacts_dir = os.path.realpath(os.path.join(self.git_repo.dir, self.output_path))\n-        for artifact_type in [\"maven\", \"bundle\", \"plugins\", \"libs\"]:\n+        for artifact_type in [\"maven\", \"bundle\", \"plugins\", \"libs\", \"core-plugins\"]:\n             for dir, dirs, files in os.walk(os.path.join(artifacts_dir, artifact_type)):\n                 for file_name in files:\n                     absolute_path = os.path.join(dir, file_name)\n", "issue": "Add Core plugins zips to published artifacts.\nThe plugins built with the core repo should be bundled as zips and hosted at artifacts.opensearch.org.\r\n\r\nThis task involves updating Opensearch's build.sh script to build and include these artifacts with the component's artifact list.\r\n\r\nRight now we also have brittle logic that assumes any component with \"plugins\" in their artifacts list is a plugin repository.  This should be updated to identify the min bundle component in another way.  Perhaps with a separate artifact folder for \"min-bundle\"\n", "before_files": [{"content": "# Copyright OpenSearch Contributors.\n# SPDX-License-Identifier: Apache-2.0\n\nimport os\n\n'''\nThis class is responsible for executing the build for a component and passing the results to a build recorder.\nIt will notify the build recorder of build information such as repository and git ref, and any artifacts generated by the build.\nArtifacts found in \"<build root>/artifacts/<maven|plugins|libs|bundle>\" will be recognized and recorded.\n'''\nclass Builder:\n    def __init__(self, component_name, git_repo, script_finder, build_recorder):\n        '''\n        Construct a new Builder instance.\n        :param component_name: The name of the component to build.\n        :param git_repo: A GitRepository instance containing the checked-out code.\n        :param script_finder: The ScriptFinder to use for finding build.sh scripts.\n        :param build_recorder: The build recorder that will capture build information and artifacts.\n        '''\n\n        self.component_name = component_name\n        self.git_repo = git_repo\n        self.script_finder = script_finder\n        self.build_recorder = build_recorder\n        self.output_path = 'artifacts'\n\n    def build(self, version, arch, snapshot):\n        build_script = self.script_finder.find_build_script(self.component_name, self.git_repo.dir)\n        build_command = f'{build_script} -v {version} -a {arch} -s {str(snapshot).lower()} -o {self.output_path}'\n        self.git_repo.execute(build_command)\n        self.build_recorder.record_component(self.component_name, self.git_repo)\n\n    def export_artifacts(self):\n        artifacts_dir = os.path.realpath(os.path.join(self.git_repo.dir, self.output_path))\n        for artifact_type in [\"maven\", \"bundle\", \"plugins\", \"libs\"]:\n            for dir, dirs, files in os.walk(os.path.join(artifacts_dir, artifact_type)):\n                for file_name in files:\n                    absolute_path = os.path.join(dir, file_name)\n                    relative_path = os.path.relpath(absolute_path, artifacts_dir)\n                    self.build_recorder.record_artifact(self.component_name, artifact_type, relative_path, absolute_path)\n", "path": "bundle-workflow/python/build_workflow/builder.py"}], "after_files": [{"content": "# Copyright OpenSearch Contributors.\n# SPDX-License-Identifier: Apache-2.0\n\nimport os\n\n'''\nThis class is responsible for executing the build for a component and passing the results to a build recorder.\nIt will notify the build recorder of build information such as repository and git ref, and any artifacts generated by the build.\nArtifacts found in \"<build root>/artifacts/<maven|plugins|libs|bundle>\" will be recognized and recorded.\n'''\nclass Builder:\n    def __init__(self, component_name, git_repo, script_finder, build_recorder):\n        '''\n        Construct a new Builder instance.\n        :param component_name: The name of the component to build.\n        :param git_repo: A GitRepository instance containing the checked-out code.\n        :param script_finder: The ScriptFinder to use for finding build.sh scripts.\n        :param build_recorder: The build recorder that will capture build information and artifacts.\n        '''\n\n        self.component_name = component_name\n        self.git_repo = git_repo\n        self.script_finder = script_finder\n        self.build_recorder = build_recorder\n        self.output_path = 'artifacts'\n\n    def build(self, version, arch, snapshot):\n        build_script = self.script_finder.find_build_script(self.component_name, self.git_repo.dir)\n        build_command = f'{build_script} -v {version} -a {arch} -s {str(snapshot).lower()} -o {self.output_path}'\n        self.git_repo.execute(build_command)\n        self.build_recorder.record_component(self.component_name, self.git_repo)\n\n    def export_artifacts(self):\n        artifacts_dir = os.path.realpath(os.path.join(self.git_repo.dir, self.output_path))\n        for artifact_type in [\"maven\", \"bundle\", \"plugins\", \"libs\", \"core-plugins\"]:\n            for dir, dirs, files in os.walk(os.path.join(artifacts_dir, artifact_type)):\n                for file_name in files:\n                    absolute_path = os.path.join(dir, file_name)\n                    relative_path = os.path.relpath(absolute_path, artifacts_dir)\n                    self.build_recorder.record_artifact(self.component_name, artifact_type, relative_path, absolute_path)\n", "path": "bundle-workflow/python/build_workflow/builder.py"}]}