prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Knative installation keeps failing in e2e tests
  /kind bug
  
  **What steps did you take and what happened:**
  [A clear and concise description of what the bug is.]
  The e2e tests are failing every now and then while running the knative installation step, more specifically while patching the configmap. A solution has to be provided so that the installation completes successfully using some kind of retry mechanism.
  
  **What did you expect to happen:**
  All e2e tests to run without any issues.
  
  
  **Environment:**
  
  e2e environment
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `python/kserve/setup.py`
  Content:
  ```
  1 # Copyright 2021 The KServe Authors.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #    http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 import pathlib
  15 
  16 import setuptools
  17 
  18 TESTS_REQUIRES = [
  19     'pytest',
  20     'pytest-xdist',
  21     'pytest-cov',
  22     'pytest-asyncio',
  23     'mypy',
  24     'portforward',
  25 ]
  26 
  27 with open('requirements.txt') as f:
  28     REQUIRES = f.readlines()
  29 
  30 with open(pathlib.Path(__file__).parent.parent / 'VERSION') as version_file:
  31     version = version_file.read().strip()
  32 
  33 setuptools.setup(
  34     name='kserve',
  35     version=version,
  36     author="The KServe Authors",
  37     author_email='ellisbigelow@google.com, hejinchi@cn.ibm.com, dsun20@bloomberg.net',
  38     license="Apache License Version 2.0",
  39     url="https://github.com/kserve/kserve/tree/master/python/kserve",
  40     description="KServe Python SDK",
  41     long_description="Python SDK for KServe Server and Client.",
  42     python_requires='>=3.7',
  43     packages=[
  44         'kserve',
  45         'kserve.api',
  46         'kserve.constants',
  47         'kserve.models',
  48         'kserve.utils',
  49         'kserve.protocol',
  50         'kserve.protocol.rest',
  51         'kserve.protocol.grpc',
  52     ],
  53     package_data={'': ['requirements.txt']},
  54     include_package_data=True,
  55     zip_safe=False,
  56     classifiers=[
  57         'Intended Audience :: Developers',
  58         'Intended Audience :: Education',
  59         'Intended Audience :: Science/Research',
  60         'Programming Language :: Python :: 3',
  61         'Programming Language :: Python :: 3.7',
  62         'Programming Language :: Python :: 3.8',
  63         'Programming Language :: Python :: 3.9',
  64         "License :: OSI Approved :: Apache Software License",
  65         "Operating System :: OS Independent",
  66         'Topic :: Scientific/Engineering',
  67         'Topic :: Scientific/Engineering :: Artificial Intelligence',
  68         'Topic :: Software Development',
  69         'Topic :: Software Development :: Libraries',
  70         'Topic :: Software Development :: Libraries :: Python Modules',
  71     ],
  72     install_requires=REQUIRES,
  73     tests_require=TESTS_REQUIRES,
  74     extras_require={'test': TESTS_REQUIRES}
  75 )
  76
  ```
  --- 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/python/kserve/setup.py b/python/kserve/setup.py
  --- a/python/kserve/setup.py
  +++ b/python/kserve/setup.py
  @@ -21,7 +21,7 @@
       'pytest-cov',
       'pytest-asyncio',
       'mypy',
  -    'portforward',
  +    'portforward==0.4.0',
   ]
   
   with open('requirements.txt') as f:
  
verification_info: {"golden_diff": "diff --git a/python/kserve/setup.py b/python/kserve/setup.py\n--- a/python/kserve/setup.py\n+++ b/python/kserve/setup.py\n@@ -21,7 +21,7 @@\n     'pytest-cov',\n     'pytest-asyncio',\n     'mypy',\n-    'portforward',\n+    'portforward==0.4.0',\n ]\n \n with open('requirements.txt') as f:\n", "issue": "Knative installation keeps failing in e2e tests\n/kind bug\r\n\r\n**What steps did you take and what happened:**\r\n[A clear and concise description of what the bug is.]\r\nThe e2e tests are failing every now and then while running the knative installation step, more specifically while patching the configmap. A solution has to be provided so that the installation completes successfully using some kind of retry mechanism.\r\n\r\n**What did you expect to happen:**\r\nAll e2e tests to run without any issues.\r\n\r\n\r\n**Environment:**\r\n\r\ne2e environment\r\n\n", "before_files": [{"content": "# Copyright 2021 The KServe Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nimport pathlib\n\nimport setuptools\n\nTESTS_REQUIRES = [\n    'pytest',\n    'pytest-xdist',\n    'pytest-cov',\n    'pytest-asyncio',\n    'mypy',\n    'portforward',\n]\n\nwith open('requirements.txt') as f:\n    REQUIRES = f.readlines()\n\nwith open(pathlib.Path(__file__).parent.parent / 'VERSION') as version_file:\n    version = version_file.read().strip()\n\nsetuptools.setup(\n    name='kserve',\n    version=version,\n    author=\"The KServe Authors\",\n    author_email='ellisbigelow@google.com, hejinchi@cn.ibm.com, dsun20@bloomberg.net',\n    license=\"Apache License Version 2.0\",\n    url=\"https://github.com/kserve/kserve/tree/master/python/kserve\",\n    description=\"KServe Python SDK\",\n    long_description=\"Python SDK for KServe Server and Client.\",\n    python_requires='>=3.7',\n    packages=[\n        'kserve',\n        'kserve.api',\n        'kserve.constants',\n        'kserve.models',\n        'kserve.utils',\n        'kserve.protocol',\n        'kserve.protocol.rest',\n        'kserve.protocol.grpc',\n    ],\n    package_data={'': ['requirements.txt']},\n    include_package_data=True,\n    zip_safe=False,\n    classifiers=[\n        'Intended Audience :: Developers',\n        'Intended Audience :: Education',\n        'Intended Audience :: Science/Research',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: 3.8',\n        'Programming Language :: Python :: 3.9',\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Operating System :: OS Independent\",\n        'Topic :: Scientific/Engineering',\n        'Topic :: Scientific/Engineering :: Artificial Intelligence',\n        'Topic :: Software Development',\n        'Topic :: Software Development :: Libraries',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n    ],\n    install_requires=REQUIRES,\n    tests_require=TESTS_REQUIRES,\n    extras_require={'test': TESTS_REQUIRES}\n)\n", "path": "python/kserve/setup.py"}], "after_files": [{"content": "# Copyright 2021 The KServe Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nimport pathlib\n\nimport setuptools\n\nTESTS_REQUIRES = [\n    'pytest',\n    'pytest-xdist',\n    'pytest-cov',\n    'pytest-asyncio',\n    'mypy',\n    'portforward==0.4.0',\n]\n\nwith open('requirements.txt') as f:\n    REQUIRES = f.readlines()\n\nwith open(pathlib.Path(__file__).parent.parent / 'VERSION') as version_file:\n    version = version_file.read().strip()\n\nsetuptools.setup(\n    name='kserve',\n    version=version,\n    author=\"The KServe Authors\",\n    author_email='ellisbigelow@google.com, hejinchi@cn.ibm.com, dsun20@bloomberg.net',\n    license=\"Apache License Version 2.0\",\n    url=\"https://github.com/kserve/kserve/tree/master/python/kserve\",\n    description=\"KServe Python SDK\",\n    long_description=\"Python SDK for KServe Server and Client.\",\n    python_requires='>=3.7',\n    packages=[\n        'kserve',\n        'kserve.api',\n        'kserve.constants',\n        'kserve.models',\n        'kserve.utils',\n        'kserve.protocol',\n        'kserve.protocol.rest',\n        'kserve.protocol.grpc',\n    ],\n    package_data={'': ['requirements.txt']},\n    include_package_data=True,\n    zip_safe=False,\n    classifiers=[\n        'Intended Audience :: Developers',\n        'Intended Audience :: Education',\n        'Intended Audience :: Science/Research',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: 3.8',\n        'Programming Language :: Python :: 3.9',\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Operating System :: OS Independent\",\n        'Topic :: Scientific/Engineering',\n        'Topic :: Scientific/Engineering :: Artificial Intelligence',\n        'Topic :: Software Development',\n        'Topic :: Software Development :: Libraries',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n    ],\n    install_requires=REQUIRES,\n    tests_require=TESTS_REQUIRES,\n    extras_require={'test': TESTS_REQUIRES}\n)\n", "path": "python/kserve/setup.py"}]}