Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add DATA_TYPE back to GET_AGGREGATES/AGGREGATE (backport #2236) #2307

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 10, 2024

What

Add element DATA_TYPE back to element AGGREGATE in GMP GET_AGGREGATES.

Why

Element was accidentally removed.

References

This element was removed in d73fba8 (SVN r23003) in 2015. In omp.c line 16809 was removed from omp_xml_handle_end_element but was missing from the addition buffer_aggregate_xml at line 11416.

It looks like this was an accident because the element is still in the GMP doc, and the removal would likely have been mentioned in the commit log. Let me know if this was intentional though, I'll adjust the doc instead.

Note that the original had a type NULL check before the g_string_append_printf, but type is already checked at the top of handle_get_aggregates.

Quick test

Before PR:

$ o m m '<get_aggregates type="cve" group_column="severity"/>'
<get_aggregates_response status_text="OK" status="200">
  <aggregate>
    <group_column>severity</group_column>

$ o m m '<get_aggregates type="result" group_column="description" mode="word_counts" max_groups="10"/>'
<get_aggregates_response status_text="OK" status="200">
  <aggregate>
    <group_column>description</group_column>

After PR, element data_type is back:

$ o m m '<get_aggregates type="cve" group_column="severity"/>'
<get_aggregates_response status_text="OK" status="200">
  <aggregate>
    <data_type>cve</data_type>
    <group_column>severity</group_column>

$ o m m '<get_aggregates type="result" group_column="description" mode="word_counts" max_groups="10"/>'
<get_aggregates_response status_text="OK" status="200">
  <aggregate>
    <data_type>result</data_type>
    <group_column>description</group_column>
```<hr>This is an automatic backport of pull request #2236 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner October 10, 2024 06:54
Copy link

Conventional Commits Report

Type Number
Bug Fixes 1

🚀 Conventional commits found.

@timopollmeier timopollmeier enabled auto-merge (rebase) October 10, 2024 06:57
@timopollmeier timopollmeier merged commit 32b5bca into oldstable Oct 10, 2024
9 of 10 checks passed
@timopollmeier timopollmeier deleted the mergify/bp/oldstable/pr-2236 branch October 10, 2024 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants