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

Rebase on main #363

Merged
merged 61 commits into from
Jul 21, 2023
Merged

Conversation

heemin32
Copy link
Collaborator

@heemin32 heemin32 commented Jul 21, 2023

Description

Rebase on main branch to resolve commit conflict during merge

Issues Resolved

N/A

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

VijayanB and others added 30 commits April 25, 2023 18:18
Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
* Update gradle version to 7.6 (opensearch-project#265)

Signed-off-by: Vijayan Balasubramanian <[email protected]>

* Implement creation of ip2geo feature

* Implementation of ip2geo datasource creation
* Implementation of ip2geo processor creation

Signed-off-by: Heemin Kim <[email protected]>
---------

Signed-off-by: Vijayan Balasubramanian <[email protected]>
Signed-off-by: Heemin Kim <[email protected]>
Co-authored-by: Vijayan Balasubramanian <[email protected]>
* Add Unit tests
* Set cache true for search query
* Remove in memory cache implementation (Two way door decision)
 * Relying on search cache without custom cache
* Renamed datasource state from FAILED to CREATE_FAILED
* Renamed class name from *Helper to *Facade
* Changed updateIntervalInDays to updateInterval
* Changed value type of default update_interval from TimeValue to Long
* Read setting value from cluster settings directly

Signed-off-by: Heemin Kim <[email protected]>
* Update gradle version to 7.6 (opensearch-project#265)

Signed-off-by: Vijayan Balasubramanian <[email protected]>

* Exclude lombok generated code from jacoco coverage report (opensearch-project#268)

Signed-off-by: Heemin Kim <[email protected]>

* Make jacoco report to be generated faster in local (opensearch-project#267)

Signed-off-by: Heemin Kim <[email protected]>

* Update dependency org.json:json to v20230227 (opensearch-project#273)

Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>

* Baseline owners and maintainers (opensearch-project#275)

Signed-off-by: Vijayan Balasubramanian <[email protected]>

---------

Signed-off-by: Vijayan Balasubramanian <[email protected]>
Signed-off-by: Heemin Kim <[email protected]>
Co-authored-by: Vijayan Balasubramanian <[email protected]>
Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
1. Change variable name from datasourceName to name
2. Change variable name from id to name
3. Added helper methods in test code

Signed-off-by: Heemin Kim <[email protected]>
1. Make geodata index as hidden
2. Make geodata index as read only allow delete after creation is done
3. Refresh datasource index immediately after update

Signed-off-by: Heemin Kim <[email protected]>
Make buildGeoJSONFeatureProcessorConfig method to be more general

Signed-off-by: Heemin Kim <[email protected]>
…t#334)

We don't want to use restored GeoIP data indices. Therefore we
delete the indices once restoring process complete.

When GeoIP metadata index is restored, we create a new GeoIP data index instead.

Signed-off-by: Heemin Kim <[email protected]>
This is not to block transport thread

Signed-off-by: Heemin Kim <[email protected]>
Cannot query index to get data to validate IP2Geo processor.
Will add validation when we decide to store some of data in cluster state metadata.

Signed-off-by: Heemin Kim <[email protected]>
By acquiring lock asychronously, the remaining part of the code
is being run by transport thread which does not allow blocking code.
We want only single update happen in a node using single thread. However,
it cannot be acheived if I acquire lock asynchronously and pass the listener.

Signed-off-by: Heemin Kim <[email protected]>
1. Changed class name from Ip2GeoCache to Ip2GeoCachedDao
2. Moved the Ip2GeoCachedDao from cache to dao package

Signed-off-by: Heemin Kim <[email protected]>
)

1. Use _primary preference to get datasource metadata so that it can read the latest data. RefreshPolicy.IMMEDIATE won't refresh replica shards immediately according to opensearch-project#346
2. Update datasource metadata index mapping
3. Move batch size from static value to setting

Signed-off-by: Heemin Kim <[email protected]>
…project#354)

* Update packages according to a change in OpenSearch core

Signed-off-by: Heemin Kim <[email protected]>

* Update packages according to a change in OpenSearch core (opensearch-project#353)

Signed-off-by: Heemin Kim <[email protected]>

---------

Signed-off-by: Heemin Kim <[email protected]>
@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #363 (c0987cb) into feature/ip2geo (5a09ae6) will increase coverage by 3.43%.
The diff coverage is 91.05%.

@@                 Coverage Diff                  @@
##             feature/ip2geo     #363      +/-   ##
====================================================
+ Coverage             85.14%   88.57%   +3.43%     
- Complexity              379      748     +369     
====================================================
  Files                    52       91      +39     
  Lines                  1185     2697    +1512     
  Branches                 98      215     +117     
====================================================
+ Hits                   1009     2389    +1380     
- Misses                  135      230      +95     
- Partials                 41       78      +37     
Impacted Files Coverage Δ
...va/org/opensearch/geospatial/GeospatialParser.java 96.15% <ø> (ø)
...ospatial/action/upload/geojson/ContentBuilder.java 91.30% <ø> (ø)
...spatial/action/upload/geojson/PipelineManager.java 93.61% <ø> (+1.95%) ⬆️
...al/action/upload/geojson/UploadGeoJSONRequest.java 100.00% <ø> (+8.33%) ⬆️
...on/upload/geojson/UploadGeoJSONRequestContent.java 92.68% <ø> (-0.18%) ⬇️
...l/action/upload/geojson/UploadGeoJSONResponse.java 86.48% <ø> (ø)
.../opensearch/geospatial/constants/IndexSetting.java 0.00% <0.00%> (ø)
...atial/index/query/xyshape/XYShapeQueryBuilder.java 78.04% <ø> (ø)
...action/upload/geojson/RestUploadGeoJSONAction.java 12.50% <ø> (ø)
...search/aggregations/bucket/geogrid/GeoHexGrid.java 90.90% <ø> (ø)
... and 48 more

... and 8 files with indirect coverage changes

Copy link
Member

@vamshin vamshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

@heemin32 heemin32 merged commit c06565a into opensearch-project:feature/ip2geo Jul 21, 2023
39 checks passed
@heemin32 heemin32 deleted the feature/ip2geo branch July 21, 2023 23:13
@heemin32 heemin32 restored the feature/ip2geo branch July 21, 2023 23:16
@heemin32 heemin32 deleted the feature/ip2geo branch July 24, 2023 16:58
@heemin32 heemin32 restored the feature/ip2geo branch July 24, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants