Bug 878013 - [RFE]Allow Component.get return partial results
Summary: [RFE]Allow Component.get return partial results
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 4.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 4.2-8
Assignee: Simon Green
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 822007
TreeView+ depends on / blocked
 
Reported: 2012-11-19 12:59 UTC by Tomas Hoger
Modified: 2018-12-09 06:29 UTC (History)
3 users (show)

Fixed In Version: 4.2.5-8
Clone Of:
Environment:
Last Closed: 2013-03-14 22:13:41 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 917436 0 unspecified CLOSED Component description does not update on the enter bug page 2021-02-22 00:41:40 UTC

Internal Links: 917436

Description Tomas Hoger 2012-11-19 12:59:20 UTC
Description of problem:
Component.get API is recommended as a replacement for Red Hat specific bugzilla.getCompInfo API.  The new API does not replace the old one for a use case when component ownership info is needed for several products (such as various RHEL versions).  getCompInfo can be called with a component name as an argument, and it returns one entry per product that includes the component.  Such response can be filtered to pick up information for products you are interested in.  E.g. response for openssl098e looks as:

{
  'initialowner' => 'tmraz',
  'name' => 'openssl098e',
  'product' => 'Red Hat Enterprise Linux 6',
  'description' => 'A compatibility version of a general cryptography and TLS library',
  'initialqacontact' => 'qe-baseos-security',
  'initialcclist' => []
},
{
  'initialowner' => 'qe-baseos-security',
  'name' => 'openssl098e',
  'product' => 'RHEL Tests',
  'description' => 'A compatibility version of a general cryptography and TLS library',
  'initialqacontact' => '',
  'initialcclist' => []
},
{
  'initialowner' => 'tmraz',
  'name' => 'openssl098e',
  'product' => 'Red Hat Enterprise Linux 7',
  'description' => 'A compatibility version of a general cryptography and TLS library',
  'initialqacontact' => 'qe-baseos-security',
  'initialcclist' => []
}

If I'm interested in current RHEL versions (3 to 7), I can use the above to know the info for 6 and 7, and know the component is not in 3 to 5.


Component.get requires product name with the component.  Hence one can do query as:

'names' => [
  {
    'component' => 'openssl098e',
    'product' => 'Red Hat Enterprise Linux 7'
  },
  {
    'component' => 'openssl098e',
    'product' => 'Red Hat Enterprise Linux 6'
  },
  {
    'component' => 'openssl098e',
    'product' => 'Red Hat Enterprise Linux 5'
  },
  {
    'component' => 'openssl098e',
    'product' => 'Red Hat Enterprise Linux 4'
  },
  {
    'component' => 'openssl098e',
    'product' => 'Red Hat Enterprise Linux 3'
  }
]

which fails with:

There is no component named 'openssl098e' in the 'Red Hat Enterprise Linux 5' product.

whenever the component does not exist in at least one of the specified products.  To avoid having to do a separate call for every product, it would be good to have another Component.get argument that would make it return information for products that include the component without hard failing the call.  I do not have a preference regarding the exact format of the reply - whether response array should skip products that do not include the component (and hence be shorter than request array), or include some explicit indicator that the component was not found in the product (empty or null hash).


Note that Product.get was discussed as a workaround.  It allows to get information (including component list) for multiple products in a single call.  The drawback of this approach is that even minimal response (include_fields: name, components) can be fairly large for certain products.


Another possible workaround is additional client code complexity using multicall.

Comment 1 Tomas Hoger 2012-11-19 14:31:29 UTC
Another option is to have a special product value that will simply return info for every product that has the component, such as:

  {
    'component' => 'openssl098e',
    'product' => '*'
  }

It does not need to be real wild card matching to allow things like 'Red Hat Enterprise Linux *', so other magic value can work.

Comment 23 Simon Green 2013-03-14 22:13:41 UTC
This change is now live.

  -- simon


Note You need to log in before you can comment on or make changes to this bug.