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 to 2.x] rebase main #1180

Merged
merged 2 commits into from
Mar 27, 2024
Merged

Conversation

kaituo
Copy link
Collaborator

@kaituo kaituo commented Mar 27, 2024

Description

This PR rebases the current branch onto the latest version of main. This integration brings in all the recent refactoring changes from the main branch, making it easier to release new enhancements.

Note the PR includes f0ed43b where we renamed the plugin name from opendistro_anomaly_detector to opensearch_time_series_analytics.

This PR aligns the 2.x branch with its existing dependencies and reverts breaking changes in OpenSearch 3.0, ensuring smooth continuation of development and release processes in 2.x.

-org.apache.hc.core5.http.HttpEntity;
+org.apache.http.HttpEntity;

-org.apache.hc.core5.http.ContentType;
+org.apache.http.entity.ContentType;

-org.apache.hc.core5.http.Header;
+org.apache.http.Header;

-org.apache.hc.core5.http.HttpEntity;
+org.apache.http.HttpEntity;

-org.apache.hc.core5.http.io.entity.StringEntity;
+org.apache.http.entity.StringEntity;

-org.apache.hc.core5.http.HttpHeaders
+org.apache.http.HttpHeaders

-org.apache.hc.core5.http.message.BasicHeader
+org.apache.http.message.BasicHeader

-org.apache.hc.core5.http.HttpHost
+org.apache.http.HttpHost

-org.apache.hc.core5.http.io.entity.EntityUtils
+org.apache.http.util.EntityUtils
  • Adjusted broadcast request handling to remain with BaseNodeRequest instead of migrating to TransportRequest, maintaining 2.x consistency.
-org.opensearch.transport.TransportRequest;
+org.opensearch.action.support.nodes.BaseNodeRequest
  • In ODFERestTestCase

    • configureHttpsClient: conf.setSocketTimeout takes int instead of Timeout as a parameter.
    • configureHttpsClient:
      • use current code as there is no Apache HttpClient / Core 5.x library in 2.x.
      • MediaType.fromMediaType takes a string instead of Header as a parameter.
  • 2.x won't throw ParseException during deserialzing XContent. Thus, I removed unnecessary ParseException declarations in test cases

    • HistoricalAnalysisRestApiIT
    • HistoricalAnalysisRestTestCase
    • ADRestTestUtils
  • Maintained version 1.3 in .github/labeler.yml

Testing Summary:

  • CI passed

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.

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

Attention: Patch coverage is 81.98404% with 316 lines in your changes are missing coverage. Please review.

Project coverage is 80.69%. Comparing base (aecf6d7) to head (3a82cc6).
Report is 1 commits behind head on 2.x.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #1180      +/-   ##
============================================
+ Coverage     79.71%   80.69%   +0.98%     
- Complexity     4363     4609     +246     
============================================
  Files           309      336      +27     
  Lines         18182    19091     +909     
  Branches       1909     1987      +78     
============================================
+ Hits          14493    15406     +913     
+ Misses         2778     2743      -35     
- Partials        911      942      +31     
Flag Coverage Δ
plugin 80.69% <81.98%> (+0.98%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/main/java/org/opensearch/ad/ProfileUtil.java 93.75% <100.00%> (-0.70%) ⬇️
...in/java/org/opensearch/ad/caching/CacheBuffer.java 77.69% <100.00%> (ø)
...ain/java/org/opensearch/ad/caching/DoorKeeper.java 94.73% <ø> (ø)
.../java/org/opensearch/ad/caching/PriorityCache.java 68.54% <100.00%> (ø)
...ava/org/opensearch/ad/caching/PriorityTracker.java 98.61% <ø> (ø)
.../java/org/opensearch/ad/cluster/ADVersionUtil.java 93.33% <100.00%> (+5.83%) ⬆️
...search/ad/cluster/ClusterManagerEventListener.java 78.72% <ø> (ø)
...main/java/org/opensearch/ad/cluster/DailyCron.java 100.00% <100.00%> (ø)
...ain/java/org/opensearch/ad/cluster/HourlyCron.java 100.00% <ø> (ø)
...pensearch/ad/cluster/diskcleanup/IndexCleanup.java 90.47% <ø> (ø)
... and 237 more

@kaituo kaituo force-pushed the 2.x_rebase branch 2 times, most recently from a08c54e to a7225a8 Compare March 27, 2024 21:34
Signed-off-by: Kaituo Li <kaituo@amazon.com>
Signed-off-by: Kaituo Li <kaituo@amazon.com>
@@ -57,6 +55,7 @@ jobs:
then
echo "FROM opensearchstaging/opensearch:$docker_version" >> Dockerfile
echo "RUN if [ -d /usr/share/opensearch/plugins/opensearch-anomaly-detection ]; then /usr/share/opensearch/bin/opensearch-plugin remove opensearch-anomaly-detection; fi" >> Dockerfile
echo "RUN if [ -d /usr/share/opensearch/plugins/opensearch-time-series-analytics ]; then /usr/share/opensearch/bin/opensearch-plugin remove opensearch-time-series-analytics; fi" >> Dockerfile
Copy link
Member

Choose a reason for hiding this comment

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

This implies a plugin name change that I imagine could have lots of other impacts, like infra builds / scripts or frontend plugin builds / scripts that rely on this. We should consider this a breaking change I don't believe we want in 2.x, lmk what you think.

I also see lots of changes related to cluster settings and REST APIs. Could you confirm those are all internal facing and nothing changes from an external/naming perspective? If the latter, same concern as above.

Copy link
Collaborator Author

@kaituo kaituo Mar 27, 2024

Choose a reason for hiding this comment

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

We should consider this a breaking change I don't believe we want in 2.x, lmk what you think.

I have already synced with infra team and will work with them after 2.13 release.

Could you confirm those are all internal facing and nothing changes from an external/naming perspective?

Those are internal facing.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good. Let's call out the only change is related to the plugin name, rest of the functionality remains the same. Sounds like infra will be handled, can you handle tracking of changes on frontend plugin CIs?

Copy link
Member

@ohltyler ohltyler 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 for all of the details. This will indeed make development on main and backporting -> 2.x simpler with all of the refactoring changes now included in 2.x :)

@kaituo kaituo merged commit f0dd4e6 into opensearch-project:2.x Mar 27, 2024
23 of 24 checks passed
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.

None yet

3 participants