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

[enrich/demographics] Fix fetching authors with min and max dates #1059

Merged
merged 1 commit into from
Jun 3, 2022

Conversation

zhquan
Copy link
Member

@zhquan zhquan commented May 30, 2022

This code fixes fetching all authors with min and max dates.
Currently, ElasticSearch and OpenSearch use composite aggregation
to paginate all buckets.

The old query only returns 10000 items and also returns the
following warning message:

Deprecation: This aggregation creates too many buckets (10001) and
will throw an error in future versions. You should update the
[search.max_buckets] cluster setting or use the [composite]
aggregation to paginate all buckets in multiple requests.

Tests added acconrdingly.

Signed-off-by: Quan Zhou [email protected]

@zhquan zhquan force-pushed the fix_demographics branch from 1f36a1e to 998d1c9 Compare May 30, 2022 14:45
@coveralls
Copy link

coveralls commented May 30, 2022

Pull Request Test Coverage Report for Build 2434201959

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 46 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 82.387%

Files with Coverage Reduction New Missed Lines %
/home/runner/work/grimoirelab-elk/grimoirelab-elk/grimoire_elk/enriched/enrich.py 46 73.16%
Totals Coverage Status
Change from base Build 2434131458: 0.04%
Covered Lines: 8841
Relevant Lines: 10731

💛 - Coveralls

grimoire_elk/enriched/enrich.py Outdated Show resolved Hide resolved
@zhquan zhquan force-pushed the fix_demographics branch 4 times, most recently from 2f833e8 to 59f31fc Compare June 1, 2022 11:22
This code fixes fetching all authors with min and max dates.
Currently, ElasticSearch and OpenSearch use `composite` aggregation
to paginate all buckets.

The old query only returns 10000 items and also returns the
following warning message:

```
Deprecation: This aggregation creates too many buckets (10001) and
will throw an error in future versions. You should update the
[search.max_buckets] cluster setting or use the [composite]
aggregation to paginate all buckets in multiple requests.
```

Tests added acconrdingly.

Signed-off-by: Quan Zhou <[email protected]>
@zhquan zhquan force-pushed the fix_demographics branch from 59f31fc to d6db745 Compare June 3, 2022 11:05
@jjmerchante
Copy link
Contributor

LGTM

@sduenas sduenas closed this in 7be9add Jun 3, 2022
@sduenas sduenas merged commit 7be9add into chaoss:master Jun 3, 2022
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.

4 participants