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

[Backport 2.x] Update CI to use jdk-21 #603

Closed
wants to merge 74 commits into from

Conversation

ryanbogan
Copy link
Member

Description

This updates the CI system to use jdk-21, which is latest LTS supported version.
Coming from opensearch-project/OpenSearch#10334

Backport of #599

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.

opensearch-trigger-bot bot and others added 30 commits August 1, 2022 17:11
…#107)

Signed-off-by: Junqiu Lei <[email protected]>
(cherry picked from commit 7995142)

Co-authored-by: Junqiu Lei <[email protected]>
…nsearch-project#106)

* Version increment automation

Signed-off-by: Prudhvi Godithi <[email protected]>
(cherry picked from commit 38e663e)

Co-authored-by: Prudhvi Godithi <[email protected]>
… (opensearch-project#112)

Prudhvi Godithi <[email protected]>
(cherry picked from commit 2e994e0)

Co-authored-by: Prudhvi Godithi <[email protected]>
)

Signed-off-by: Naveen Tatikonda <[email protected]>

Signed-off-by: Naveen Tatikonda <[email protected]>
…tesian points (opensearch-project#132)

(cherry picked from commit 3288818)
Signed-off-by: Naveen Tatikonda <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>

Signed-off-by: opensearch-ci-bot <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
…nsearch-project#144)

Signed-off-by: Navneet Verma <[email protected]>
(cherry picked from commit 2026f51)

Co-authored-by: Navneet Verma <[email protected]>
…notes for 2.3.0 version. (opensearch-project#149) (opensearch-project#150)

Signed-off-by: Navneet Verma <[email protected]>

Signed-off-by: Navneet Verma <[email protected]>
(cherry picked from commit 7cdaf8d)

Co-authored-by: Navneet Verma <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>

Signed-off-by: opensearch-ci-bot <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
…arch-project#156) (opensearch-project#157)

Signed-off-by: Naveen Tatikonda <[email protected]>
(cherry picked from commit 1eebc3f)

Co-authored-by: Naveen Tatikonda <[email protected]>
…t#143)

This is already incorporated at organization level for all repositories.

Signed-off-by: Vijayan Balasubramanian <[email protected]>
(cherry picked from commit 7e9561e)

Co-authored-by: Vijayan Balasubramanian <[email protected]>
…h-project#169)

Signed-off-by: prudhvigodithi <[email protected]>
(cherry picked from commit 13d9248)

Co-authored-by: Prudhvi Godithi <[email protected]>
Signed-off-by: Andriy Redko <[email protected]>
(cherry picked from commit 9b4e9a6)

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Heemin Kim <[email protected]>

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

* Add geojson support for XYPoint

Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit 63c97b0)
…project#178)

Optional is not required since api returns list instead of object.

Signed-off-by: Vijayan Balasubramanian <[email protected]>
…ch-project#179) (opensearch-project#180)

* Import h3 library (opensearch-project#154)

Made following changes to make it compatible:
1. Rename package from elasticsearch to opensearch.geospatial
2. Update License headers
3. Update build file
4. Update settings to include sub projects

* Use Transport Request (opensearch-project#164)

Remove usage of deprecated BaseNodeRequest

* Update http client package to resolve build failure (opensearch-project#168) (opensearch-project#171)

* Introduce H3 min resolution constant (opensearch-project#165)

H3 version 1 has 16 resolutions, numbered 0 through 15.
Introduced a constant to represent min value, similar
to max value.

* Add geohex aggregation (opensearch-project#160)

This aggregation will use uber's h3 to group coordinates into H3 cell.
Created new aggregation type geohex_grid. The precision will be between
0 and 15. This aggreation has default precision as 5,
similar to geohash and geotile.

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

* Add integration test (opensearch-project#176)

Included integration test for geohex_grid.

Signed-off-by: Vijayan Balasubramanian <[email protected]>
…ct#186)

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

Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit 65907c2)

Co-authored-by: Heemin Kim <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>

Signed-off-by: opensearch-ci-bot <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
…#203) (opensearch-project#204)

Fixing failure at Task ':libs:h3:validateNebulaPom'

Signed-off-by: Vijayan Balasubramanian <[email protected]>
Signed-off-by: John Mazanec <[email protected]>
(cherry picked from commit d9f0c12)
Signed-off-by: John Mazanec <[email protected]>
Maps will support add import GeoJSON into an index. This
will be used by more layers like document, cluster. The restriction
was previously added since it was mainly used as Custom Vector map.
This change is already incorporated by front end.

Signed-off-by: Vijayan Balasubramanian <[email protected]>
(cherry picked from commit dc6b7e4)
Following same standard as OpenSearch

Signed-off-by: Vijayan Balasubramanian <[email protected]>
(cherry picked from commit 03ec5c9)
Signed-off-by: Vijayan Balasubramanian <[email protected]>
(cherry picked from commit a06d39b)

Co-authored-by: Vijayan Balasubramanian <[email protected]>
Will limit upto 10_000 features to upload.

Signed-off-by: Vijayan Balasubramanian <[email protected]>
(cherry picked from commit 0d5763f)
opensearch-trigger-bot bot and others added 28 commits June 6, 2023 10:30
Signed-off-by: opensearch-ci-bot <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
Build failure due to upstream refactoring.

Signed-off-by: Vijayan Balasubramanian <[email protected]>
(cherry picked from commit b63c063)

Co-authored-by: Vijayan Balasubramanian <[email protected]>
…ch-project#315)

Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit 55e7798)

Co-authored-by: Heemin Kim <[email protected]>
)

Signed-off-by: Junqiu Lei <[email protected]>
(cherry picked from commit ee06307)

Co-authored-by: Junqiu Lei <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
…project#364)

* Implement creation of ip2geo feature (opensearch-project#257)

* 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]>

* Added unit tests with some refactoring of codes (opensearch-project#271)

* 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]>

* Sync from main (opensearch-project#280)

* 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>

* Add datasource name validation (opensearch-project#281)

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

* Refactoring of code (opensearch-project#282)

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]>

* Change field name from md5 to sha256 (opensearch-project#285)

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

* Implement get datasource api (opensearch-project#279)

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

* Update index option (opensearch-project#284)

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 some fields in manifest file as mandatory (opensearch-project#289)

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

* Create datasource index explicitly (opensearch-project#283)

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

* Add wrapper class of job scheduler lock service (opensearch-project#290)

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

* Remove all unused client attributes (opensearch-project#293)

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

* Update copyright header (opensearch-project#298)

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

* Run system index handling code with stashed thread context (opensearch-project#297)

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

* Reduce lock duration and renew the lock during update (opensearch-project#299)

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

* Implements delete datasource API (opensearch-project#291)

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

* Set User-Agent in http request (opensearch-project#300)

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

* Implement datasource update API (opensearch-project#292)

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

* Refactoring test code (opensearch-project#302)

Make buildGeoJSONFeatureProcessorConfig method to be more general

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

* Add ip2geo processor integ test for failure case (opensearch-project#303)

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

* Bug fix and refactoring of code (opensearch-project#305)

1. Bugfix: Ingest metadata can be null if there is no processor created
2. Refactoring: Moved private method to another class for better testing support
3. Refactoring: Set some private static final variable as public so that unit test can use it
4. Refactoring: Changed string value to static variable

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

* Add integration test for Ip2GeoProcessor (opensearch-project#306)

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

* Add ConcurrentModificationException (opensearch-project#308)

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

* Add integration test for UpdateDatasource API (opensearch-project#307)

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

* Bug fix on lock management and few performance improvements (opensearch-project#310)

* Release lock before response back to caller for update/delete API
* Release lock in background task for creation API
* Change index settings to improve indexing performance

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

* Change index setting from read_only_allow_delete to write (opensearch-project#311)

read_only_allow_delete does not block write to an index.
The disk-based shard allocator may add and remove this block automatically.
Therefore, use index.blocks.write instead.

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

* Fix bug in get datasource API and improve memory usage (opensearch-project#313)

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

* Change package for Strings.hasText (opensearch-project#314) (opensearch-project#317)

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

* Remove jitter and move index setting from DatasourceFacade to DatasourceExtension (opensearch-project#319)

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

* Do not index blank value and do not enrich null property (opensearch-project#320)

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

* Move index setting keys to constants (opensearch-project#321)

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

* Return null index name for expired data (opensearch-project#322)

Return null index name for expired data so that it can be deleted
by clean up process. Clean up process exclude current index from deleting.
Signed-off-by: Heemin Kim <[email protected]>

* Add new fields in datasource (opensearch-project#325)

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

* Delete index once it is expired (opensearch-project#326)

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

* Add restoring event listener (opensearch-project#328)

In the listener, we trigger a geoip data update

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

* Reverse forcemerge and refresh order (opensearch-project#331)

Otherwise, opensearch does not clear old segment files

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

* Removed parameter and settings (opensearch-project#332)

* Removed first_only parameter
* Removed max_concurrency and batch_size setting

first_only parameter was added as current geoip processor has it.
However, the parameter have no benefit for ip2geo processor as we don't do a sequantial search for array data but use multi search.

max_concurrency and batch_size setting is removed as these are only reveal internal implementation and could be a future blocker to improve performance later.

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

* Add a field in datasource for current index name (opensearch-project#333)

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

* Delete GeoIP data indices after restoring complete (opensearch-project#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]>

* Use bool query for array form of IPs (opensearch-project#335)

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

* Run update/delete request in a new thread (opensearch-project#337)

This is not to block transport thread

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

* Remove IP2Geo processor validation (opensearch-project#336)

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]>

* Acquire lock sychronously (opensearch-project#339)

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]>

* Added a cache to store datasource metadata (opensearch-project#338)

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

* Changed class name and package (opensearch-project#341)

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

* Refactoring of code (opensearch-project#342)

1. Changed class name from Ip2GeoCache to Ip2GeoCachedDao
2. Moved the Ip2GeoCachedDao from cache to dao package

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

* Add geo data cache (opensearch-project#340)

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

* Add cache layer to reduce GeoIp data retrieval latency (opensearch-project#343)

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

* Use _primary in query preference and few changes (opensearch-project#347)

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]>

* Wait until GeoIP data to be replicated to all data nodes (opensearch-project#348)

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

* Update packages according to a change in OpenSearch core (opensearch-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]>

---------

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>
(cherry picked from commit 0cd9153)

Co-authored-by: Heemin Kim <[email protected]>
…roject#371) (opensearch-project#372)

1. Added datasource name validation in delete/update api
2. Added datasource name validation in processor creation method
3. Changed index name delimiter from `.` to `-` to be consistent with others

Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit 0cfddbf)

Co-authored-by: Heemin Kim <[email protected]>
…h-project#375)

1. Switch exception type from OpenSearchException to IllegalArgumentException for invalid endpoint
2. Add cluster state validation for update API

Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit e1f41bb)

Co-authored-by: Heemin Kim <[email protected]>
…pensearch-project#387)

* Switch from XContentType to MediaType to fix compilation errors (opensearch-project#366)

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

* Refactor XContentFactory to MediaTypeRegistry (opensearch-project#374)

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

* Refactor LifecycleComponent package path (opensearch-project#377)

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

* [Refactor] Strings utility methods to core library (opensearch-project#379)

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

* Fixed compilation errors after refactoring in core foundation classes (opensearch-project#380)

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

---------

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

Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit 446fb23)

Co-authored-by: Heemin Kim <[email protected]>
…pensearch-project#401)

Spotless fails in 2.x branch with old version with following error
`Caused by: java.lang.NoSuchMethodError: 'long com.sun.tools.javac.tree.DCTree$DCReference.getSourcePosition(com.sun.tools.javac.tree.DCTree$DCDocComment)'`

Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit cd3e211)

Co-authored-by: Heemin Kim <[email protected]>
…search-project#403)

Signed-off-by: Navneet Verma <[email protected]>
(cherry picked from commit 8d2a327)

Co-authored-by: Navneet Verma <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit 059b10d)

Co-authored-by: Heemin Kim <[email protected]>
… (opensearch-project#575)

Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit 35edec1)

Co-authored-by: Heemin Kim <[email protected]>
…opensearch-project#580)

Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
(cherry picked from commit 96d2dab)

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

Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit e91b47c)

Co-authored-by: Heemin Kim <[email protected]>
…ect#587)

Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit 85c5f84)

Co-authored-by: Heemin Kim <[email protected]>
…ect#590)

Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit 3305da1)

Co-authored-by: Heemin Kim <[email protected]>
* Upgrade gradle to 8.4

Signed-off-by: Ryan Bogan <[email protected]>

* Add Changelog entry

Signed-off-by: Ryan Bogan <[email protected]>

* Add required explicit dependency

Signed-off-by: Ryan Bogan <[email protected]>

* Add second required explicit dependency

Signed-off-by: Ryan Bogan <[email protected]>

---------

Signed-off-by: Ryan Bogan <[email protected]>
(cherry picked from commit 70f6751)

Co-authored-by: Ryan Bogan <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
@ryanbogan ryanbogan closed this Dec 27, 2023
@ryanbogan ryanbogan deleted the backport_jdk_21 branch December 27, 2023 18:45
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.

6 participants