parameters: (self, name, target)
docstring: Validate that extensions are correctly declared for dataplane_ext and observability_ext.
  
          Args:
            name: extension name.
            target: extension Bazel target.
  
          Raises:
            DependencyError: on a dependency validation error.
docstring_summary: Validate that extensions are correctly declared for dataplane_ext and observability_ext.
docstring_tokens: Validate that extensions are correctly declared for dataplane_ext and observability_ext .
function: async def validate_extension_deps(self, name, target):
          """Validate that extensions are correctly declared for dataplane_ext and observability_ext.
  
          Args:
            name: extension name.
            target: extension Bazel target.
  
          Raises:
            DependencyError: on a dependency validation error.
          """
          marginal_deps = await self._build_graph.query_external_deps(
              target, exclude=['//source/exe:envoy_main_common_with_core_extensions_lib'])
          expected_deps = []
          print(f'Validating ({len(marginal_deps)}) {name} extension dependencies...')
          for d in marginal_deps:
              metadata = self._dep_info.get_metadata(d)
              if metadata:
                  use_category = metadata['use_category']
                  valid_use_category = any(
                      c in use_category
                      for c in ['dataplane_ext', 'observability_ext', 'other', 'api'])
                  if not valid_use_category:
                      raise DependencyError(
                          f'Extensions {name} depends on {d} with "use_category" not including '
                          '["dataplane_ext", "observability_ext", "api", "other"]')
                  if 'extensions' in metadata:
                      allowed_extensions = metadata['extensions']
                      if name not in allowed_extensions:
                          raise DependencyError(
                              f'Extension {name} depends on {d} but {d} does not list {name} in its allowlist'
                          )
function_tokens: async def validate_extension_deps ( self , name , target ) : marginal_deps = await self . _build_graph . query_external_deps ( target , exclude = [ '//source/exe:envoy_main_common_with_core_extensions_lib' ] ) expected_deps = [ ] print ( f'Validating ({len(marginal_deps)}) {name} extension dependencies...' ) for d in marginal_deps : metadata = self . _dep_info . get_metadata ( d ) if metadata : use_category = metadata [ 'use_category' ] valid_use_category = any ( c in use_category for c in [ 'dataplane_ext' , 'observability_ext' , 'other' , 'api' ] ) if not valid_use_category : raise DependencyError ( f'Extensions {name} depends on {d} with "use_category" not including ' '["dataplane_ext", "observability_ext", "api", "other"]' ) if 'extensions' in metadata : allowed_extensions = metadata [ 'extensions' ] if name not in allowed_extensions : raise DependencyError ( f'Extension {name} depends on {d} but {d} does not list {name} in its allowlist' )