We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Presubmit failure
If you look into the test it said
```
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "/usr/local/lib/python3.6/site-packages/kfp/__init__.py", line 24, in <module>
    from ._client import Client
  File "/usr/local/lib/python3.6/site-packages/kfp/_client.py", line 31, in <module>
    from kfp.compiler import compiler
  File "/usr/local/lib/python3.6/site-packages/kfp/compiler/__init__.py", line 17, in <module>
    from ..containers._component_builder import build_python_component, build_docker_image, VersionedDependency
  File "/usr/local/lib/python3.6/site-packages/kfp/containers/_component_builder.py", line 32, in <module>
    from kfp.containers import entrypoint
  File "/usr/local/lib/python3.6/site-packages/kfp/containers/entrypoint.py", line 23, in <module>
    from kfp.containers import entrypoint_utils
  File "/usr/local/lib/python3.6/site-packages/kfp/containers/entrypoint_utils.py", line 23, in <module>
    from kfp.pipeline_spec import pipeline_spec_pb2
  File "/usr/local/lib/python3.6/site-packages/kfp/pipeline_spec/pipeline_spec_pb2.py", line 23, in <module>
    create_key=_descriptor._internal_create_key,
AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'
```

Looks like the `protobuf` version is not matching in this case. @Bobgy are you aware of this error? Thanks.

_Originally posted by @Tomcli in https://github.com/kubeflow/pipelines/pull/5059#issuecomment-777656530_

/cc @numerology @chensun @Ark-kun 
Can you take a look at this issue? I have seen multiple reports, this error seems to fail consistently.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `api/v2alpha1/python/setup.py`
Content:
```
1 # Copyright 2020 Google LLC
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 
15 import os
16 import subprocess
17 import sys
18 import setuptools
19 try:
20   from distutils.spawn import find_executable
21 except ImportError:
22   from shutil import which as find_executable
23 
24 NAME = "kfp-pipeline-spec"
25 VERSION = "0.1.5"
26 
27 PROTO_DIR = os.path.realpath(
28     os.path.join(os.path.dirname(__file__), os.pardir))
29 
30 PKG_DIR = os.path.realpath(
31     os.path.join(os.path.dirname(__file__), "kfp", "pipeline_spec"))
32 
33 # Find the Protocol Compiler. (Taken from protobuf/python/setup.py)
34 if "PROTOC" in os.environ and os.path.exists(os.environ["PROTOC"]):
35   PROTOC = os.environ["PROTOC"]
36 else:
37   PROTOC = find_executable("protoc")
38 
39 
40 def GenerateProto(source):
41   """Generate a _pb2.py from a .proto file.
42 
43   Invokes the Protocol Compiler to generate a _pb2.py from the given
44   .proto file.  Does nothing if the output already exists and is newer than
45   the input.
46 
47   Args:
48     source: The source proto file that needs to be compiled.
49   """
50 
51   output = source.replace(".proto", "_pb2.py")
52 
53   if not os.path.exists(output) or (
54       os.path.exists(source) and
55       os.path.getmtime(source) > os.path.getmtime(output)):
56     print("Generating %s..." % output)
57 
58     if not os.path.exists(source):
59       sys.stderr.write("Can't find required file: %s\n" % source)
60       sys.exit(-1)
61 
62     if PROTOC is None:
63       sys.stderr.write("protoc is not found.  Please compile it "
64                        "or install the binary package.\n")
65       sys.exit(-1)
66 
67     protoc_command = [
68         PROTOC, "-I%s" % PROTO_DIR,
69         "--python_out=%s" % PKG_DIR, source
70     ]
71     if subprocess.call(protoc_command) != 0:
72       sys.exit(-1)
73 
74 
75 # Generate the protobuf files that we depend on.
76 GenerateProto(os.path.join(PROTO_DIR, "pipeline_spec.proto"))
77 
78 setuptools.setup(
79     name=NAME,
80     version=VERSION,
81     description="Kubeflow Pipelines pipeline spec",
82     author="google",
83     author_email="kubeflow-pipelines@google.com",
84     url="https://github.com/kubeflow/pipelines",
85     packages=setuptools.find_namespace_packages(include=['kfp.*']),
86     python_requires=">=3.5.3",
87     include_package_data=True,
88     license="Apache 2.0",
89 )
90
```
--- 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/api/v2alpha1/python/setup.py b/api/v2alpha1/python/setup.py
--- a/api/v2alpha1/python/setup.py
+++ b/api/v2alpha1/python/setup.py
@@ -84,6 +84,7 @@
     url="https://github.com/kubeflow/pipelines",
     packages=setuptools.find_namespace_packages(include=['kfp.*']),
     python_requires=">=3.5.3",
+    install_requires=["protobuf>=3.13.0,<4"],
     include_package_data=True,
     license="Apache 2.0",
 )

{"golden_diff": "diff --git a/api/v2alpha1/python/setup.py b/api/v2alpha1/python/setup.py\n--- a/api/v2alpha1/python/setup.py\n+++ b/api/v2alpha1/python/setup.py\n@@ -84,6 +84,7 @@\n     url=\"https://github.com/kubeflow/pipelines\",\n     packages=setuptools.find_namespace_packages(include=['kfp.*']),\n     python_requires=\">=3.5.3\",\n+    install_requires=[\"protobuf>=3.13.0,<4\"],\n     include_package_data=True,\n     license=\"Apache 2.0\",\n )\n", "issue": "Presubmit failure\nIf you look into the test it said\r\n```\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 3, in <module>\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/__init__.py\", line 24, in <module>\r\n    from ._client import Client\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/_client.py\", line 31, in <module>\r\n    from kfp.compiler import compiler\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/compiler/__init__.py\", line 17, in <module>\r\n    from ..containers._component_builder import build_python_component, build_docker_image, VersionedDependency\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/containers/_component_builder.py\", line 32, in <module>\r\n    from kfp.containers import entrypoint\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/containers/entrypoint.py\", line 23, in <module>\r\n    from kfp.containers import entrypoint_utils\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/containers/entrypoint_utils.py\", line 23, in <module>\r\n    from kfp.pipeline_spec import pipeline_spec_pb2\r\n  File \"/usr/local/lib/python3.6/site-packages/kfp/pipeline_spec/pipeline_spec_pb2.py\", line 23, in <module>\r\n    create_key=_descriptor._internal_create_key,\r\nAttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'\r\n```\r\n\r\nLooks like the `protobuf` version is not matching in this case. @Bobgy are you aware of this error? Thanks.\n\n_Originally posted by @Tomcli in https://github.com/kubeflow/pipelines/pull/5059#issuecomment-777656530_\n\n/cc @numerology @chensun @Ark-kun \nCan you take a look at this issue? I have seen multiple reports, this error seems to fail consistently.\n", "before_files": [{"content": "# Copyright 2020 Google LLC\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.\n\nimport os\nimport subprocess\nimport sys\nimport setuptools\ntry:\n  from distutils.spawn import find_executable\nexcept ImportError:\n  from shutil import which as find_executable\n\nNAME = \"kfp-pipeline-spec\"\nVERSION = \"0.1.5\"\n\nPROTO_DIR = os.path.realpath(\n    os.path.join(os.path.dirname(__file__), os.pardir))\n\nPKG_DIR = os.path.realpath(\n    os.path.join(os.path.dirname(__file__), \"kfp\", \"pipeline_spec\"))\n\n# Find the Protocol Compiler. (Taken from protobuf/python/setup.py)\nif \"PROTOC\" in os.environ and os.path.exists(os.environ[\"PROTOC\"]):\n  PROTOC = os.environ[\"PROTOC\"]\nelse:\n  PROTOC = find_executable(\"protoc\")\n\n\ndef GenerateProto(source):\n  \"\"\"Generate a _pb2.py from a .proto file.\n\n  Invokes the Protocol Compiler to generate a _pb2.py from the given\n  .proto file.  Does nothing if the output already exists and is newer than\n  the input.\n\n  Args:\n    source: The source proto file that needs to be compiled.\n  \"\"\"\n\n  output = source.replace(\".proto\", \"_pb2.py\")\n\n  if not os.path.exists(output) or (\n      os.path.exists(source) and\n      os.path.getmtime(source) > os.path.getmtime(output)):\n    print(\"Generating %s...\" % output)\n\n    if not os.path.exists(source):\n      sys.stderr.write(\"Can't find required file: %s\\n\" % source)\n      sys.exit(-1)\n\n    if PROTOC is None:\n      sys.stderr.write(\"protoc is not found.  Please compile it \"\n                       \"or install the binary package.\\n\")\n      sys.exit(-1)\n\n    protoc_command = [\n        PROTOC, \"-I%s\" % PROTO_DIR,\n        \"--python_out=%s\" % PKG_DIR, source\n    ]\n    if subprocess.call(protoc_command) != 0:\n      sys.exit(-1)\n\n\n# Generate the protobuf files that we depend on.\nGenerateProto(os.path.join(PROTO_DIR, \"pipeline_spec.proto\"))\n\nsetuptools.setup(\n    name=NAME,\n    version=VERSION,\n    description=\"Kubeflow Pipelines pipeline spec\",\n    author=\"google\",\n    author_email=\"kubeflow-pipelines@google.com\",\n    url=\"https://github.com/kubeflow/pipelines\",\n    packages=setuptools.find_namespace_packages(include=['kfp.*']),\n    python_requires=\">=3.5.3\",\n    include_package_data=True,\n    license=\"Apache 2.0\",\n)\n", "path": "api/v2alpha1/python/setup.py"}], "after_files": [{"content": "# Copyright 2020 Google LLC\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.\n\nimport os\nimport subprocess\nimport sys\nimport setuptools\ntry:\n  from distutils.spawn import find_executable\nexcept ImportError:\n  from shutil import which as find_executable\n\nNAME = \"kfp-pipeline-spec\"\nVERSION = \"0.1.5\"\n\nPROTO_DIR = os.path.realpath(\n    os.path.join(os.path.dirname(__file__), os.pardir))\n\nPKG_DIR = os.path.realpath(\n    os.path.join(os.path.dirname(__file__), \"kfp\", \"pipeline_spec\"))\n\n# Find the Protocol Compiler. (Taken from protobuf/python/setup.py)\nif \"PROTOC\" in os.environ and os.path.exists(os.environ[\"PROTOC\"]):\n  PROTOC = os.environ[\"PROTOC\"]\nelse:\n  PROTOC = find_executable(\"protoc\")\n\n\ndef GenerateProto(source):\n  \"\"\"Generate a _pb2.py from a .proto file.\n\n  Invokes the Protocol Compiler to generate a _pb2.py from the given\n  .proto file.  Does nothing if the output already exists and is newer than\n  the input.\n\n  Args:\n    source: The source proto file that needs to be compiled.\n  \"\"\"\n\n  output = source.replace(\".proto\", \"_pb2.py\")\n\n  if not os.path.exists(output) or (\n      os.path.exists(source) and\n      os.path.getmtime(source) > os.path.getmtime(output)):\n    print(\"Generating %s...\" % output)\n\n    if not os.path.exists(source):\n      sys.stderr.write(\"Can't find required file: %s\\n\" % source)\n      sys.exit(-1)\n\n    if PROTOC is None:\n      sys.stderr.write(\"protoc is not found.  Please compile it \"\n                       \"or install the binary package.\\n\")\n      sys.exit(-1)\n\n    protoc_command = [\n        PROTOC, \"-I%s\" % PROTO_DIR,\n        \"--python_out=%s\" % PKG_DIR, source\n    ]\n    if subprocess.call(protoc_command) != 0:\n      sys.exit(-1)\n\n\n# Generate the protobuf files that we depend on.\nGenerateProto(os.path.join(PROTO_DIR, \"pipeline_spec.proto\"))\n\nsetuptools.setup(\n    name=NAME,\n    version=VERSION,\n    description=\"Kubeflow Pipelines pipeline spec\",\n    author=\"google\",\n    author_email=\"kubeflow-pipelines@google.com\",\n    url=\"https://github.com/kubeflow/pipelines\",\n    packages=setuptools.find_namespace_packages(include=['kfp.*']),\n    python_requires=\">=3.5.3\",\n    install_requires=[\"protobuf>=3.13.0,<4\"],\n    include_package_data=True,\n    license=\"Apache 2.0\",\n)\n", "path": "api/v2alpha1/python/setup.py"}]}