prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Rename "bundle" to "distribution"?
  **Is your feature request related to a problem? Please describe.**
  We've been calling our output a bundle, but it's really a distribution.
  
  **Describe the solution you'd like**
  Rename bundle to distribution everywhere.
  
  
  --- 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/assemble_workflow/bundle_recorder.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 os
  8 from urllib.parse import urljoin
  9 
  10 from manifests.bundle_manifest import BundleManifest
  11 
  12 
  13 class BundleRecorder:
  14     def __init__(self, build, output_dir, artifacts_dir, base_url):
  15         self.output_dir = output_dir
  16         self.build_id = build.id
  17         self.base_url = base_url
  18         self.version = build.version
  19         self.package_name = self.__get_package_name(build)
  20         self.artifacts_dir = artifacts_dir
  21         self.architecture = build.architecture
  22         self.bundle_manifest = self.BundleManifestBuilder(
  23             build.id,
  24             build.name,
  25             build.version,
  26             build.platform,
  27             build.architecture,
  28             self.__get_package_location(),
  29         )
  30 
  31     def __get_package_name(self, build):
  32         parts = [
  33             build.name.lower().replace(" ", "-"),
  34             build.version,
  35             build.platform,
  36             build.architecture,
  37         ]
  38         return "-".join(parts) + (".zip" if build.platform == "windows" else ".tar.gz")
  39 
  40     def __get_public_url_path(self, folder, rel_path):
  41         path = "/".join((folder, rel_path))
  42         return urljoin(self.base_url + "/", path)
  43 
  44     def __get_location(self, folder_name, rel_path, abs_path):
  45         if self.base_url:
  46             return self.__get_public_url_path(folder_name, rel_path)
  47         return abs_path
  48 
  49     # Assembled bundles are expected to be served from a separate "bundles" folder
  50     # Example: https://artifacts.opensearch.org/bundles/1.0.0/<build-id
  51     def __get_package_location(self):
  52         return self.__get_location("dist", self.package_name, os.path.join(self.output_dir, self.package_name))
  53 
  54     # Build artifacts are expected to be served from a "builds" folder
  55     # Example: https://artifacts.opensearch.org/builds/1.0.0/<build-id>
  56     def __get_component_location(self, component_rel_path):
  57         abs_path = os.path.join(self.artifacts_dir, component_rel_path)
  58         return self.__get_location("builds", component_rel_path, abs_path)
  59 
  60     def record_component(self, component, rel_path):
  61         self.bundle_manifest.append_component(
  62             component.name,
  63             component.repository,
  64             component.ref,
  65             component.commit_id,
  66             self.__get_component_location(rel_path),
  67         )
  68 
  69     def get_manifest(self):
  70         return self.bundle_manifest.to_manifest()
  71 
  72     def write_manifest(self, folder):
  73         manifest_path = os.path.join(folder, "manifest.yml")
  74         self.get_manifest().to_file(manifest_path)
  75 
  76     class BundleManifestBuilder:
  77         def __init__(self, build_id, name, version, platform, architecture, location):
  78             self.data = {}
  79             self.data["build"] = {}
  80             self.data["build"]["id"] = build_id
  81             self.data["build"]["name"] = name
  82             self.data["build"]["version"] = str(version)
  83             self.data["build"]["platform"] = platform
  84             self.data["build"]["architecture"] = architecture
  85             self.data["build"]["location"] = location
  86             self.data["schema-version"] = "1.1"
  87             # We need to store components as a hash so that we can append artifacts by component name
  88             # When we convert to a BundleManifest this will get converted back into a list
  89             self.data["components"] = []
  90 
  91         def append_component(self, name, repository_url, ref, commit_id, location):
  92             component = {
  93                 "name": name,
  94                 "repository": repository_url,
  95                 "ref": ref,
  96                 "commit_id": commit_id,
  97                 "location": location,
  98             }
  99             self.data["components"].append(component)
  100 
  101         def to_manifest(self):
  102             return BundleManifest(self.data)
  103
  ```
  --- 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/src/assemble_workflow/bundle_recorder.py b/src/assemble_workflow/bundle_recorder.py
  --- a/src/assemble_workflow/bundle_recorder.py
  +++ b/src/assemble_workflow/bundle_recorder.py
  @@ -46,13 +46,13 @@
               return self.__get_public_url_path(folder_name, rel_path)
           return abs_path
   
  -    # Assembled bundles are expected to be served from a separate "bundles" folder
  -    # Example: https://artifacts.opensearch.org/bundles/1.0.0/<build-id
  +    # Assembled output are expected to be served from a separate "dist" folder
  +    # Example: https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/build-id/linux/x64/dist/
       def __get_package_location(self):
           return self.__get_location("dist", self.package_name, os.path.join(self.output_dir, self.package_name))
   
       # Build artifacts are expected to be served from a "builds" folder
  -    # Example: https://artifacts.opensearch.org/builds/1.0.0/<build-id>
  +    # Example: https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/build-id/linux/x64/builds/
       def __get_component_location(self, component_rel_path):
           abs_path = os.path.join(self.artifacts_dir, component_rel_path)
           return self.__get_location("builds", component_rel_path, abs_path)
  
verification_info: {"golden_diff": "diff --git a/src/assemble_workflow/bundle_recorder.py b/src/assemble_workflow/bundle_recorder.py\n--- a/src/assemble_workflow/bundle_recorder.py\n+++ b/src/assemble_workflow/bundle_recorder.py\n@@ -46,13 +46,13 @@\n             return self.__get_public_url_path(folder_name, rel_path)\n         return abs_path\n \n-    # Assembled bundles are expected to be served from a separate \"bundles\" folder\n-    # Example: https://artifacts.opensearch.org/bundles/1.0.0/<build-id\n+    # Assembled output are expected to be served from a separate \"dist\" folder\n+    # Example: https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/build-id/linux/x64/dist/\n     def __get_package_location(self):\n         return self.__get_location(\"dist\", self.package_name, os.path.join(self.output_dir, self.package_name))\n \n     # Build artifacts are expected to be served from a \"builds\" folder\n-    # Example: https://artifacts.opensearch.org/builds/1.0.0/<build-id>\n+    # Example: https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/build-id/linux/x64/builds/\n     def __get_component_location(self, component_rel_path):\n         abs_path = os.path.join(self.artifacts_dir, component_rel_path)\n         return self.__get_location(\"builds\", component_rel_path, abs_path)\n", "issue": "Rename \"bundle\" to \"distribution\"?\n**Is your feature request related to a problem? Please describe.**\r\nWe've been calling our output a bundle, but it's really a distribution.\r\n\r\n**Describe the solution you'd like**\r\nRename bundle to distribution everywhere.\r\n\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 os\nfrom urllib.parse import urljoin\n\nfrom manifests.bundle_manifest import BundleManifest\n\n\nclass BundleRecorder:\n    def __init__(self, build, output_dir, artifacts_dir, base_url):\n        self.output_dir = output_dir\n        self.build_id = build.id\n        self.base_url = base_url\n        self.version = build.version\n        self.package_name = self.__get_package_name(build)\n        self.artifacts_dir = artifacts_dir\n        self.architecture = build.architecture\n        self.bundle_manifest = self.BundleManifestBuilder(\n            build.id,\n            build.name,\n            build.version,\n            build.platform,\n            build.architecture,\n            self.__get_package_location(),\n        )\n\n    def __get_package_name(self, build):\n        parts = [\n            build.name.lower().replace(\" \", \"-\"),\n            build.version,\n            build.platform,\n            build.architecture,\n        ]\n        return \"-\".join(parts) + (\".zip\" if build.platform == \"windows\" else \".tar.gz\")\n\n    def __get_public_url_path(self, folder, rel_path):\n        path = \"/\".join((folder, rel_path))\n        return urljoin(self.base_url + \"/\", path)\n\n    def __get_location(self, folder_name, rel_path, abs_path):\n        if self.base_url:\n            return self.__get_public_url_path(folder_name, rel_path)\n        return abs_path\n\n    # Assembled bundles are expected to be served from a separate \"bundles\" folder\n    # Example: https://artifacts.opensearch.org/bundles/1.0.0/<build-id\n    def __get_package_location(self):\n        return self.__get_location(\"dist\", self.package_name, os.path.join(self.output_dir, self.package_name))\n\n    # Build artifacts are expected to be served from a \"builds\" folder\n    # Example: https://artifacts.opensearch.org/builds/1.0.0/<build-id>\n    def __get_component_location(self, component_rel_path):\n        abs_path = os.path.join(self.artifacts_dir, component_rel_path)\n        return self.__get_location(\"builds\", component_rel_path, abs_path)\n\n    def record_component(self, component, rel_path):\n        self.bundle_manifest.append_component(\n            component.name,\n            component.repository,\n            component.ref,\n            component.commit_id,\n            self.__get_component_location(rel_path),\n        )\n\n    def get_manifest(self):\n        return self.bundle_manifest.to_manifest()\n\n    def write_manifest(self, folder):\n        manifest_path = os.path.join(folder, \"manifest.yml\")\n        self.get_manifest().to_file(manifest_path)\n\n    class BundleManifestBuilder:\n        def __init__(self, build_id, name, version, platform, architecture, location):\n            self.data = {}\n            self.data[\"build\"] = {}\n            self.data[\"build\"][\"id\"] = build_id\n            self.data[\"build\"][\"name\"] = name\n            self.data[\"build\"][\"version\"] = str(version)\n            self.data[\"build\"][\"platform\"] = platform\n            self.data[\"build\"][\"architecture\"] = architecture\n            self.data[\"build\"][\"location\"] = location\n            self.data[\"schema-version\"] = \"1.1\"\n            # We need to store components as a hash so that we can append artifacts by component name\n            # When we convert to a BundleManifest this will get converted back into a list\n            self.data[\"components\"] = []\n\n        def append_component(self, name, repository_url, ref, commit_id, location):\n            component = {\n                \"name\": name,\n                \"repository\": repository_url,\n                \"ref\": ref,\n                \"commit_id\": commit_id,\n                \"location\": location,\n            }\n            self.data[\"components\"].append(component)\n\n        def to_manifest(self):\n            return BundleManifest(self.data)\n", "path": "src/assemble_workflow/bundle_recorder.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 os\nfrom urllib.parse import urljoin\n\nfrom manifests.bundle_manifest import BundleManifest\n\n\nclass BundleRecorder:\n    def __init__(self, build, output_dir, artifacts_dir, base_url):\n        self.output_dir = output_dir\n        self.build_id = build.id\n        self.base_url = base_url\n        self.version = build.version\n        self.package_name = self.__get_package_name(build)\n        self.artifacts_dir = artifacts_dir\n        self.architecture = build.architecture\n        self.bundle_manifest = self.BundleManifestBuilder(\n            build.id,\n            build.name,\n            build.version,\n            build.platform,\n            build.architecture,\n            self.__get_package_location(),\n        )\n\n    def __get_package_name(self, build):\n        parts = [\n            build.name.lower().replace(\" \", \"-\"),\n            build.version,\n            build.platform,\n            build.architecture,\n        ]\n        return \"-\".join(parts) + (\".zip\" if build.platform == \"windows\" else \".tar.gz\")\n\n    def __get_public_url_path(self, folder, rel_path):\n        path = \"/\".join((folder, rel_path))\n        return urljoin(self.base_url + \"/\", path)\n\n    def __get_location(self, folder_name, rel_path, abs_path):\n        if self.base_url:\n            return self.__get_public_url_path(folder_name, rel_path)\n        return abs_path\n\n    # Assembled output are expected to be served from a separate \"dist\" folder\n    # Example: https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/build-id/linux/x64/dist/\n    def __get_package_location(self):\n        return self.__get_location(\"dist\", self.package_name, os.path.join(self.output_dir, self.package_name))\n\n    # Build artifacts are expected to be served from a \"builds\" folder\n    # Example: https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/build-id/linux/x64/builds/\n    def __get_component_location(self, component_rel_path):\n        abs_path = os.path.join(self.artifacts_dir, component_rel_path)\n        return self.__get_location(\"builds\", component_rel_path, abs_path)\n\n    def record_component(self, component, rel_path):\n        self.bundle_manifest.append_component(\n            component.name,\n            component.repository,\n            component.ref,\n            component.commit_id,\n            self.__get_component_location(rel_path),\n        )\n\n    def get_manifest(self):\n        return self.bundle_manifest.to_manifest()\n\n    def write_manifest(self, folder):\n        manifest_path = os.path.join(folder, \"manifest.yml\")\n        self.get_manifest().to_file(manifest_path)\n\n    class BundleManifestBuilder:\n        def __init__(self, build_id, name, version, platform, architecture, location):\n            self.data = {}\n            self.data[\"build\"] = {}\n            self.data[\"build\"][\"id\"] = build_id\n            self.data[\"build\"][\"name\"] = name\n            self.data[\"build\"][\"version\"] = str(version)\n            self.data[\"build\"][\"platform\"] = platform\n            self.data[\"build\"][\"architecture\"] = architecture\n            self.data[\"build\"][\"location\"] = location\n            self.data[\"schema-version\"] = \"1.1\"\n            # We need to store components as a hash so that we can append artifacts by component name\n            # When we convert to a BundleManifest this will get converted back into a list\n            self.data[\"components\"] = []\n\n        def append_component(self, name, repository_url, ref, commit_id, location):\n            component = {\n                \"name\": name,\n                \"repository\": repository_url,\n                \"ref\": ref,\n                \"commit_id\": commit_id,\n                \"location\": location,\n            }\n            self.data[\"components\"].append(component)\n\n        def to_manifest(self):\n            return BundleManifest(self.data)\n", "path": "src/assemble_workflow/bundle_recorder.py"}]}