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] [Refactor] Task foundation classes to core library - pt 1 (#9082) #9352

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Aug 15, 2023

Backport de2b6b7 from #9082.

@nknize nknize added enhancement Enhancement or improvement to existing feature or request backport PRs or issues specific to backporting features or enhancments v2.10.0 labels Aug 15, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@nknize nknize force-pushed the backport/backport-9082-to-2.x branch from 6b3f874 to 47f0ec9 Compare August 15, 2023 16:44
@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:

> Task :checkCompatibility
Checking compatibility for: https://github.com/opensearch-project/opensearch-oci-object-storage.git with ref: 2.x
Skipping compatibility check for https://github.com/opensearch-project/opensearch-oci-object-storage.git
Incompatible components: [https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/performance-analyzer.git]
Components skipped due to git failures: [https://github.com/opensearch-project/opensearch-oci-object-storage.git]
Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/security-analytics.git]

BUILD SUCCESSFUL in 25m 6s

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

…-project#9082)

This is the first round refactor of the foundation Task classes from the
server module to core and common library. This is split into separate
commits due to control the surface area impacted by the change. This
commit refactors the following classes:

* o.o.action.ActionFuture -> :libs:opensearch-common

* o.o.action.ActionListener -> :libs:opensearch-core
* o.o.action.ActionResponse -> :libs:opensearch-core
* o.o.action.NotifyOnceListener -> :libs:opensearch-core
* o.o.common.compress.Compressor -> :libs:opensearch-core
* o.o.node.ReportingService -> o.o.core.service in :libs:opensearch-core
* o.o.tasks.TaskCancelledExceptoin -> :libs:opensearch-core
* o.o.tasks.TaskId -> :libs:opensearch-core
* o.o.common.xcontent.ObjectParserHelper -> :libs:opensearch-core

The following task resource tracking classes are refactored into a new
resourcetracker namespace under the o.o.core.tasks packed in
:libs:opensearch-core

* o.o.tasks.ResourceStats
* o.o.tasks.ResourceStatsType
* o.o.tasks.ResourceUsageMetric
* o.o.tasks.TaskResourceStats
* o.o.tasks.TaskResourceUsage
* o.o.tasks.TaskThreadUsage
* o.o.tasks.ThreadResourceInfo

These refactors are part of the effort to split foundation classes into
core libraries in support of modularity for serverless and cloud native
implementations.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
(cherry picked from commit de2b6b7)
@nknize nknize force-pushed the backport/backport-9082-to-2.x branch from 47f0ec9 to a86635c Compare August 15, 2023 17:01
@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:

> Task :checkCompatibility
Checking compatibility for: https://github.com/opensearch-project/opensearch-oci-object-storage.git with ref: 2.x
Skipping compatibility check for https://github.com/opensearch-project/opensearch-oci-object-storage.git
Incompatible components: [https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/performance-analyzer.git]
Components skipped due to git failures: [https://github.com/opensearch-project/opensearch-oci-object-storage.git]
Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/ml-commons.git]

BUILD SUCCESSFUL in 25m 27s

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@nknize nknize merged commit f6caf4f into opensearch-project:2.x Aug 15, 2023
8 of 9 checks passed
@peternied
Copy link
Member

@reta @nknize This source of this change required ~15 PRs [1] to be merged across the OpenSearch product, how are we helping consumers of OpenSearch core handle this?

@reta
Copy link
Collaborator

reta commented Aug 15, 2023

how are we helping consumers of OpenSearch core handle this?

Fair point, we (as maintainers) should be helping out if the downstream projects are out of capacity

@CEHENKLE
Copy link
Member

@nknize Are you able to pitch in and help the plugins adapt to these changes?

cwperks pushed a commit to opensearch-project/security that referenced this pull request Aug 15, 2023
### Description
Manual backport for #3153 of React to changes in ActionListener in core
Also includes a fix for a call to XContentHelper.toXContent in response
to opensearch-project/OpenSearch#9156
### Issues Resolved
* Relate opensearch-project/OpenSearch#9352
* Relate #3153 

### Check List
- [ ] ~New functionality includes testing~
- [ ] ~New functionality has been documented~
- [X] 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

---------

Signed-off-by: Ryan Liang <jiallian@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
Co-authored-by: Peter Nied <petern@amazon.com>
@nknize
Copy link
Collaborator Author

nknize commented Aug 16, 2023

@nknize Are you able to pitch in and help the plugins adapt to these changes?

Sure thing. It looks like a lot of the pain stems from some downstream repos not just having a dependency on core but also a dependency on other repos (e.g., job-scheduler, common-util) thus the change has to land in certain repos first before they can be useable in others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments enhancement Enhancement or improvement to existing feature or request v2.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants