Repository: google/osv.dev

Issue:
Remove experimental V0 code
Internal clients are all migrated. We can remove and turn this down next week.


Discussion:

Resolving patch:
diff --git a/gcp/api/osv_service_pb2.py b/gcp/api/osv_service_pb2.py
deleted file mode 100644
--- a/gcp/api/osv_service_pb2.py
+++ /dev/null
@@ -1,546 +0,0 @@
-# Copyright 2021 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: osv_service.proto
-"""Generated protocol buffer code."""
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
-from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='osv_service.proto',
-  package='osv',
-  syntax='proto3',
-  serialized_options=None,
-  create_key=_descriptor._internal_create_key,
-  serialized_pb=b'\n\x11osv_service.proto\x12\x03osv\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xc6\x01\n\x03\x42ug\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07project\x18\x02 \x01(\t\x12\x12\n\nconfidence\x18\x03 \x01(\x03\x12 \n\tregressed\x18\x04 \x01(\x0b\x32\r.osv.CommitV0\x12\x1c\n\x05\x66ixed\x18\x05 \x01(\x0b\x32\r.osv.CommitV0\x12\x12\n\ncrash_type\x18\x06 \x01(\t\x12&\n\x08\x61\x66\x66\x65\x63ted\x18\x07 \x03(\x0b\x32\x14.osv.AffectedVersion\x12\x12\n\nreferences\x18\x08 \x03(\t\"&\n\x0f\x41\x66\x66\x65\x63tedVersion\x12\r\n\x03tag\x18\x01 \x01(\tH\x00\x42\x04\n\x02id\"g\n\x08\x43ommitV0\x12\x11\n\trepo_type\x18\x01 \x01(\t\x12\x10\n\x08repo_url\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x0e\n\x06\x63ommit\x18\x04 \x01(\t\x12\x0c\n\x04\x66rom\x18\x05 \x01(\t\x12\n\n\x02to\x18\x06 \x01(\t\"D\n\x05Query\x12\x10\n\x06\x63ommit\x18\x01 \x01(\tH\x00\x12\r\n\x03tag\x18\x02 \x01(\tH\x00\x12\x11\n\x07version\x18\x03 \x01(\tH\x00\x42\x07\n\x05param\"!\n\x07\x42ugList\x12\x16\n\x04\x62ugs\x18\x01 \x03(\x0b\x32\x08.osv.Bug\"&\n\x14GetBugByIdParameters\x12\x0e\n\x06\x62ug_id\x18\x01 \x01(\t\"E\n\x17QueryAffectedParameters\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x19\n\x05query\x18\x02 \x01(\x0b\x32\n.osv.Query\"<\n\x1fQueryAffectedByCommitParameters\x12\x19\n\x05query\x18\x01 \x01(\x0b\x32\n.osv.Query2\xa3\x02\n\x03OSV\x12K\n\nGetBugById\x12\x19.osv.GetBugByIdParameters\x1a\x08.osv.Bug\"\x18\x82\xd3\xe4\x93\x02\x12\x12\x10/v0/bugs/{bugId}\x12h\n\rQueryAffected\x12\x1c.osv.QueryAffectedParameters\x1a\x0c.osv.BugList\"+\x82\xd3\xe4\x93\x02%\"\x1c/v0/projects/{project}/query:\x05query\x12\x65\n\x15QueryAffectedByCommit\x12$.osv.QueryAffectedByCommitParameters\x1a\x0c.osv.BugList\"\x18\x82\xd3\xe4\x93\x02\x12\"\t/v0/query:\x05queryb\x06proto3'
-  ,
-  dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,])
-
-
-
-
-_BUG = _descriptor.Descriptor(
-  name='Bug',
-  full_name='osv.Bug',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  create_key=_descriptor._internal_create_key,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='id', full_name='osv.Bug.id', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='project', full_name='osv.Bug.project', index=1,
-      number=2, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='confidence', full_name='osv.Bug.confidence', index=2,
-      number=3, type=3, cpp_type=2, label=1,
-      has_default_value=False, default_value=0,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='regressed', full_name='osv.Bug.regressed', index=3,
-      number=4, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='fixed', full_name='osv.Bug.fixed', index=4,
-      number=5, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='crash_type', full_name='osv.Bug.crash_type', index=5,
-      number=6, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='affected', full_name='osv.Bug.affected', index=6,
-      number=7, type=11, cpp_type=10, label=3,
-      has_default_value=False, default_value=[],
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='references', full_name='osv.Bug.references', index=7,
-      number=8, type=9, cpp_type=9, label=3,
-      has_default_value=False, default_value=[],
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=86,
-  serialized_end=284,
-)
-
-
-_AFFECTEDVERSION = _descriptor.Descriptor(
-  name='AffectedVersion',
-  full_name='osv.AffectedVersion',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  create_key=_descriptor._internal_create_key,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='tag', full_name='osv.AffectedVersion.tag', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-    _descriptor.OneofDescriptor(
-      name='id', full_name='osv.AffectedVersion.id',
-      index=0, containing_type=None,
-      create_key=_descriptor._internal_create_key,
-    fields=[]),
-  ],
-  serialized_start=286,
-  serialized_end=324,
-)
-
-
-_COMMITV0 = _descriptor.Descriptor(
-  name='CommitV0',
-  full_name='osv.CommitV0',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  create_key=_descriptor._internal_create_key,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='repo_type', full_name='osv.CommitV0.repo_type', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='repo_url', full_name='osv.CommitV0.repo_url', index=1,
-      number=2, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='type', full_name='osv.CommitV0.type', index=2,
-      number=3, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='commit', full_name='osv.CommitV0.commit', index=3,
-      number=4, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='from', full_name='osv.CommitV0.from', index=4,
-      number=5, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='to', full_name='osv.CommitV0.to', index=5,
-      number=6, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=326,
-  serialized_end=429,
-)
-
-
-_QUERY = _descriptor.Descriptor(
-  name='Query',
-  full_name='osv.Query',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  create_key=_descriptor._internal_create_key,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='commit', full_name='osv.Query.commit', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='tag', full_name='osv.Query.tag', index=1,
-      number=2, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='version', full_name='osv.Query.version', index=2,
-      number=3, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-    _descriptor.OneofDescriptor(
-      name='param', full_name='osv.Query.param',
-      index=0, containing_type=None,
-      create_key=_descriptor._internal_create_key,
-    fields=[]),
-  ],
-  serialized_start=431,
-  serialized_end=499,
-)
-
-
-_BUGLIST = _descriptor.Descriptor(
-  name='BugList',
-  full_name='osv.BugList',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  create_key=_descriptor._internal_create_key,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='bugs', full_name='osv.BugList.bugs', index=0,
-      number=1, type=11, cpp_type=10, label=3,
-      has_default_value=False, default_value=[],
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=501,
-  serialized_end=534,
-)
-
-
-_GETBUGBYIDPARAMETERS = _descriptor.Descriptor(
-  name='GetBugByIdParameters',
-  full_name='osv.GetBugByIdParameters',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  create_key=_descriptor._internal_create_key,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='bug_id', full_name='osv.GetBugByIdParameters.bug_id', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=536,
-  serialized_end=574,
-)
-
-
-_QUERYAFFECTEDPARAMETERS = _descriptor.Descriptor(
-  name='QueryAffectedParameters',
-  full_name='osv.QueryAffectedParameters',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  create_key=_descriptor._internal_create_key,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='project', full_name='osv.QueryAffectedParameters.project', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-    _descriptor.FieldDescriptor(
-      name='query', full_name='osv.QueryAffectedParameters.query', index=1,
-      number=2, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=576,
-  serialized_end=645,
-)
-
-
-_QUERYAFFECTEDBYCOMMITPARAMETERS = _descriptor.Descriptor(
-  name='QueryAffectedByCommitParameters',
-  full_name='osv.QueryAffectedByCommitParameters',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  create_key=_descriptor._internal_create_key,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='query', full_name='osv.QueryAffectedByCommitParameters.query', index=0,
-      number=1, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=647,
-  serialized_end=707,
-)
-
-_BUG.fields_by_name['regressed'].message_type = _COMMITV0
-_BUG.fields_by_name['fixed'].message_type = _COMMITV0
-_BUG.fields_by_name['affected'].message_type = _AFFECTEDVERSION
-_AFFECTEDVERSION.oneofs_by_name['id'].fields.append(
-  _AFFECTEDVERSION.fields_by_name['tag'])
-_AFFECTEDVERSION.fields_by_name['tag'].containing_oneof = _AFFECTEDVERSION.oneofs_by_name['id']
-_QUERY.oneofs_by_name['param'].fields.append(
-  _QUERY.fields_by_name['commit'])
-_QUERY.fields_by_name['commit'].containing_oneof = _QUERY.oneofs_by_name['param']
-_QUERY.oneofs_by_name['param'].fields.append(
-  _QUERY.fields_by_name['tag'])
-_QUERY.fields_by_name['tag'].containing_oneof = _QUERY.oneofs_by_name['param']
-_QUERY.oneofs_by_name['param'].fields.append(
-  _QUERY.fields_by_name['version'])
-_QUERY.fields_by_name['version'].containing_oneof = _QUERY.oneofs_by_name['param']
-_BUGLIST.fields_by_name['bugs'].message_type = _BUG
-_QUERYAFFECTEDPARAMETERS.fields_by_name['query'].message_type = _QUERY
-_QUERYAFFECTEDBYCOMMITPARAMETERS.fields_by_name['query'].message_type = _QUERY
-DESCRIPTOR.message_types_by_name['Bug'] = _BUG
-DESCRIPTOR.message_types_by_name['AffectedVersion'] = _AFFECTEDVERSION
-DESCRIPTOR.message_types_by_name['CommitV0'] = _COMMITV0
-DESCRIPTOR.message_types_by_name['Query'] = _QUERY
-DESCRIPTOR.message_types_by_name['BugList'] = _BUGLIST
-DESCRIPTOR.message_types_by_name['GetBugByIdParameters'] = _GETBUGBYIDPARAMETERS
-DESCRIPTOR.message_types_by_name['QueryAffectedParameters'] = _QUERYAFFECTEDPARAMETERS
-DESCRIPTOR.message_types_by_name['QueryAffectedByCommitParameters'] = _QUERYAFFECTEDBYCOMMITPARAMETERS
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Bug = _reflection.GeneratedProtocolMessageType('Bug', (_message.Message,), {
-  'DESCRIPTOR' : _BUG,
-  '__module__' : 'osv_service_pb2'
-  # @@protoc_insertion_point(class_scope:osv.Bug)
-  })
-_sym_db.RegisterMessage(Bug)
-
-AffectedVersion = _reflection.GeneratedProtocolMessageType('AffectedVersion', (_message.Message,), {
-  'DESCRIPTOR' : _AFFECTEDVERSION,
-  '__module__' : 'osv_service_pb2'
-  # @@protoc_insertion_point(class_scope:osv.AffectedVersion)
-  })
-_sym_db.RegisterMessage(AffectedVersion)
-
-CommitV0 = _reflection.GeneratedProtocolMessageType('CommitV0', (_message.Message,), {
-  'DESCRIPTOR' : _COMMITV0,
-  '__module__' : 'osv_service_pb2'
-  # @@protoc_insertion_point(class_scope:osv.CommitV0)
-  })
-_sym_db.RegisterMessage(CommitV0)
-
-Query = _reflection.GeneratedProtocolMessageType('Query', (_message.Message,), {
-  'DESCRIPTOR' : _QUERY,
-  '__module__' : 'osv_service_pb2'
-  # @@protoc_insertion_point(class_scope:osv.Query)
-  })
-_sym_db.RegisterMessage(Query)
-
-BugList = _reflection.GeneratedProtocolMessageType('BugList', (_message.Message,), {
-  'DESCRIPTOR' : _BUGLIST,
-  '__module__' : 'osv_service_pb2'
-  # @@protoc_insertion_point(class_scope:osv.BugList)
-  })
-_sym_db.RegisterMessage(BugList)
-
-GetBugByIdParameters = _reflection.GeneratedProtocolMessageType('GetBugByIdParameters', (_message.Message,), {
-  'DESCRIPTOR' : _GETBUGBYIDPARAMETERS,
-  '__module__' : 'osv_service_pb2'
-  # @@protoc_insertion_point(class_scope:osv.GetBugByIdParameters)
-  })
-_sym_db.RegisterMessage(GetBugByIdParameters)
-
-QueryAffectedParameters = _reflection.GeneratedProtocolMessageType('QueryAffectedParameters', (_message.Message,), {
-  'DESCRIPTOR' : _QUERYAFFECTEDPARAMETERS,
-  '__module__' : 'osv_service_pb2'
-  # @@protoc_insertion_point(class_scope:osv.QueryAffectedParameters)
-  })
-_sym_db.RegisterMessage(QueryAffectedParameters)
-
-QueryAffectedByCommitParameters = _reflection.GeneratedProtocolMessageType('QueryAffectedByCommitParameters', (_message.Message,), {
-  'DESCRIPTOR' : _QUERYAFFECTEDBYCOMMITPARAMETERS,
-  '__module__' : 'osv_service_pb2'
-  # @@protoc_insertion_point(class_scope:osv.QueryAffectedByCommitParameters)
-  })
-_sym_db.RegisterMessage(QueryAffectedByCommitParameters)
-
-
-
-_OSV = _descriptor.ServiceDescriptor(
-  name='OSV',
-  full_name='osv.OSV',
-  file=DESCRIPTOR,
-  index=0,
-  serialized_options=None,
-  create_key=_descriptor._internal_create_key,
-  serialized_start=710,
-  serialized_end=1001,
-  methods=[
-  _descriptor.MethodDescriptor(
-    name='GetBugById',
-    full_name='osv.OSV.GetBugById',
-    index=0,
-    containing_service=None,
-    input_type=_GETBUGBYIDPARAMETERS,
-    output_type=_BUG,
-    serialized_options=b'\202\323\344\223\002\022\022\020/v0/bugs/{bugId}',
-    create_key=_descriptor._internal_create_key,
-  ),
-  _descriptor.MethodDescriptor(
-    name='QueryAffected',
-    full_name='osv.OSV.QueryAffected',
-    index=1,
-    containing_service=None,
-    input_type=_QUERYAFFECTEDPARAMETERS,
-    output_type=_BUGLIST,
-    serialized_options=b'\202\323\344\223\002%\"\034/v0/projects/{project}/query:\005query',
-    create_key=_descriptor._internal_create_key,
-  ),
-  _descriptor.MethodDescriptor(
-    name='QueryAffectedByCommit',
-    full_name='osv.OSV.QueryAffectedByCommit',
-    index=2,
-    containing_service=None,
-    input_type=_QUERYAFFECTEDBYCOMMITPARAMETERS,
-    output_type=_BUGLIST,
-    serialized_options=b'\202\323\344\223\002\022\"\t/v0/query:\005query',
-    create_key=_descriptor._internal_create_key,
-  ),
-])
-_sym_db.RegisterServiceDescriptor(_OSV)
-
-DESCRIPTOR.services_by_name['OSV'] = _OSV
-
-# @@protoc_insertion_point(module_scope)
diff --git a/gcp/api/osv_service_pb2_grpc.py b/gcp/api/osv_service_pb2_grpc.py
deleted file mode 100644
--- a/gcp/api/osv_service_pb2_grpc.py
+++ /dev/null
@@ -1,154 +0,0 @@
-# Copyright 2021 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
-"""Client and server classes corresponding to protobuf-defined services."""
-import grpc
-
-import osv_service_pb2 as osv__service__pb2
-
-
-class OSVStub(object):
-    """Open source vulnerability database.
-    """
-
-    def __init__(self, channel):
-        """Constructor.
-
-        Args:
-            channel: A grpc.Channel.
-        """
-        self.GetBugById = channel.unary_unary(
-                '/osv.OSV/GetBugById',
-                request_serializer=osv__service__pb2.GetBugByIdParameters.SerializeToString,
-                response_deserializer=osv__service__pb2.Bug.FromString,
-                )
-        self.QueryAffected = channel.unary_unary(
-                '/osv.OSV/QueryAffected',
-                request_serializer=osv__service__pb2.QueryAffectedParameters.SerializeToString,
-                response_deserializer=osv__service__pb2.BugList.FromString,
-                )
-        self.QueryAffectedByCommit = channel.unary_unary(
-                '/osv.OSV/QueryAffectedByCommit',
-                request_serializer=osv__service__pb2.QueryAffectedByCommitParameters.SerializeToString,
-                response_deserializer=osv__service__pb2.BugList.FromString,
-                )
-
-
-class OSVServicer(object):
-    """Open source vulnerability database.
-    """
-
-    def GetBugById(self, request, context):
-        """Return a `Bug` object for a given OSV ID.
-        """
-        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
-        context.set_details('Method not implemented!')
-        raise NotImplementedError('Method not implemented!')
-
-    def QueryAffected(self, request, context):
-        """Query bugs for a particular project at a given commit or version.
-        """
-        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
-        context.set_details('Method not implemented!')
-        raise NotImplementedError('Method not implemented!')
-
-    def QueryAffectedByCommit(self, request, context):
-        """Query bugs for across all projects at a given commit. Since git SHAs should
-        be unique, this is provided as a convenience over the project qualified
-        endpoint.
-        """
-        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
-        context.set_details('Method not implemented!')
-        raise NotImplementedError('Method not implemented!')
-
-
-def add_OSVServicer_to_server(servicer, server):
-    rpc_method_handlers = {
-            'GetBugById': grpc.unary_unary_rpc_method_handler(
-                    servicer.GetBugById,
-                    request_deserializer=osv__service__pb2.GetBugByIdParameters.FromString,
-                    response_serializer=osv__service__pb2.Bug.SerializeToString,
-            ),
-            'QueryAffected': grpc.unary_unary_rpc_method_handler(
-                    servicer.QueryAffected,
-                    request_deserializer=osv__service__pb2.QueryAffectedParameters.FromString,
-                    response_serializer=osv__service__pb2.BugList.SerializeToString,
-            ),
-            'QueryAffectedByCommit': grpc.unary_unary_rpc_method_handler(
-                    servicer.QueryAffectedByCommit,
-                    request_deserializer=osv__service__pb2.QueryAffectedByCommitParameters.FromString,
-                    response_serializer=osv__service__pb2.BugList.SerializeToString,
-            ),
-    }
-    generic_handler = grpc.method_handlers_generic_handler(
-            'osv.OSV', rpc_method_handlers)
-    server.add_generic_rpc_handlers((generic_handler,))
-
-
- # This class is part of an EXPERIMENTAL API.
-class OSV(object):
-    """Open source vulnerability database.
-    """
-
-    @staticmethod
-    def GetBugById(request,
-            target,
-            options=(),
-            channel_credentials=None,
-            call_credentials=None,
-            insecure=False,
-            compression=None,
-            wait_for_ready=None,
-            timeout=None,
-            metadata=None):
-        return grpc.experimental.unary_unary(request, target, '/osv.OSV/GetBugById',
-            osv__service__pb2.GetBugByIdParameters.SerializeToString,
-            osv__service__pb2.Bug.FromString,
-            options, channel_credentials,
-            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
-    @staticmethod
-    def QueryAffected(request,
-            target,
-            options=(),
-            channel_credentials=None,
-            call_credentials=None,
-            insecure=False,
-            compression=None,
-            wait_for_ready=None,
-            timeout=None,
-            metadata=None):
-        return grpc.experimental.unary_unary(request, target, '/osv.OSV/QueryAffected',
-            osv__service__pb2.QueryAffectedParameters.SerializeToString,
-            osv__service__pb2.BugList.FromString,
-            options, channel_credentials,
-            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
-    @staticmethod
-    def QueryAffectedByCommit(request,
-            target,
-            options=(),
-            channel_credentials=None,
-            call_credentials=None,
-            insecure=False,
-            compression=None,
-            wait_for_ready=None,
-            timeout=None,
-            metadata=None):
-        return grpc.experimental.unary_unary(request, target, '/osv.OSV/QueryAffectedByCommit',
-            osv__service__pb2.QueryAffectedByCommitParameters.SerializeToString,
-            osv__service__pb2.BugList.FromString,
-            options, channel_credentials,
-            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
diff --git a/gcp/api/server.py b/gcp/api/server.py
--- a/gcp/api/server.py
+++ b/gcp/api/server.py
@@ -25,8 +25,6 @@
 import grpc
 
 import osv
-import osv_service_pb2
-import osv_service_pb2_grpc
 import osv_service_v1_pb2
 import osv_service_v1_pb2_grpc
 
@@ -65,76 +63,6 @@ def is_privileged(self, context):
     return False
 
 
-class OSVServicerV0(osv_service_pb2_grpc.OSVServicer, BaseServicer):
-  """V0 OSV servicer."""
-
-  # Deprecated methods:
-  @ndb_context
-  def GetBugById(self, request, context):
-    """Return a `Bug` object for a given OSV ID.
-    """
-    bug = ndb.Key(osv.Bug, request.bug_id).get()
-    if not bug or bug.status != osv.BugStatus.PROCESSED:
-      context.abort(grpc.StatusCode.NOT_FOUND, 'Bug not found.')
-      return None
-
-    if not bug.public and not self.is_privileged(context):
-      context.abort(grpc.StatusCode.PERMISSION_DENIED, 'Permission denied.')
-      return None
-
-    return bug_to_response_v0(bug)
-
-  @ndb_context
-  def QueryAffected(self, request, context):
-    """Query bugs for a particular project at a given commit or version.
-    """
-    privileged = self.is_privileged(context)
-    if request.query.WhichOneof('param') == 'commit':
-      bugs = query_by_commit(
-          request.project,
-          '',
-          request.query.commit,
-          privileged,
-          to_response=bug_to_response_v0)
-    elif request.query.WhichOneof('param') == 'tag':
-      bugs = query_by_tag(
-          request.project,
-          '',
-          request.query.tag,
-          privileged,
-          to_response=bug_to_response_v0)
-    elif request.query.WhichOneof('param') == 'version':
-      bugs = query_by_version(
-          request.project,
-          '',
-          request.query.version,
-          privileged,
-          to_response=bug_to_response_v0)
-    else:
-      context.abort(grpc.StatusCode.INVALID_ARGUMENT, 'Invalid query.')
-
-    return osv_service_pb2.BugList(bugs=bugs)
-
-  @ndb_context
-  def QueryAffectedByCommit(self, request, context):
-    """Query bugs for across all projects at a given commit. Since git SHAs
-    should be unique, this is provided as a convenience over the project
-    qualified API.  """
-    if request.query.WhichOneof('param') != 'commit':
-      context.abort(grpc.StatusCode.INVALID_ARGUMENT,
-                    'Only commit can be specified.')
-      return None
-
-    privileged = self.is_privileged(context)
-    bugs = query_by_commit(
-        None,
-        '',
-        request.query.commit,
-        privileged,
-        to_response=bug_to_response_v0)
-    return osv_service_pb2.BugList(bugs=bugs)
-
-
 class OSVServicer(osv_service_v1_pb2_grpc.OSVServicer, BaseServicer):
   """V1 OSV servicer."""
 
@@ -185,54 +113,6 @@ def QueryAffected(self, request, context):
     return osv_service_v1_pb2.VulnerabilityList(vulns=bugs)
 
 
-def _to_commit_v0(bug, commit_hash):
-  """Convert a commit hash to a Commit structure."""
-  commit = osv_service_pb2.CommitV0(repo_type='git', repo_url=bug.repo_url)
-
-  if ':' in commit_hash:
-    commit.type = 'range'
-    commit_range = commit_hash.split(':')
-    setattr(commit, 'from', commit_range[0])  # from is a reserved keyword.
-    commit.to = commit_range[1]
-    return commit
-
-  commit.type = 'exact'
-  commit.commit = commit_hash
-  return commit
-
-
-def _get_affected(bug):
-  """Get affected tags."""
-  result = []
-  for affected in bug.affected:
-    result.append(osv_service_pb2.AffectedVersion(tag=affected))
-
-  return result
-
-
-def bug_to_response_v0(bug):
-  """Convert a Bug entity to a response object."""
-  fixed = None
-  fix_commit = bug.fixed
-  if fix_commit:
-    fixed = _to_commit_v0(bug, fix_commit)
-
-  result = osv_service_pb2.Bug(
-      id=bug.key.id(),
-      confidence=bug.confidence,
-      regressed=_to_commit_v0(bug, bug.regressed),
-      fixed=fixed,
-      crash_type=bug.summary,
-      affected=_get_affected(bug),
-      project=bug.project)
-
-  issue_id = bug.issue_id
-  if issue_id:
-    result.references.append(_OSS_FUZZ_TRACKER_URL + bug.issue_id)
-
-  return result
-
-
 def bug_to_response(bug):
   """Convert a Bug entity to a response object."""
   return bug.to_vulnerability()
@@ -315,7 +195,6 @@ def query_by_version(project,
 def serve(port):
   """Configures and runs the bookstore API server."""
   server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
-  osv_service_pb2_grpc.add_OSVServicer_to_server(OSVServicerV0(), server)
   osv_service_v1_pb2_grpc.add_OSVServicer_to_server(OSVServicer(), server)
   server.add_insecure_port('[::]:{}'.format(port))
   server.start()


Test patch: