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

[Refactor] CollectionUtils, Iterators, and String methods to core lib #9120

Merged
merged 2 commits into from
Aug 4, 2023

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Aug 4, 2023

This commit refactors the CollectionUtils, and Iterators utility classes to the core and common libraries, respectively. Several other base Strings utility methods are also refactored to the core Strings utility class. This is done to incrementally move the remaining Strings methods in server to the core String utility.

relates #5910
relates #8110

dependency of #9103

This commit refactors the CollectionUtils, and Iterators utility classes
to the core and common libraries, respectively. Several other base
Strings utility methods are also refactored to the core Strings utility
library. This is done to incrementally move the remaining Strings
methods in server to the core String utility.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:



> Task :checkCompatibility
Incompatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer.git]
Compatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/performance-analyzer-rca.git]

BUILD SUCCESSFUL in 28m 38s

@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:



> Task :checkCompatibility
Incompatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer.git]
Compatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/performance-analyzer-rca.git]

BUILD SUCCESSFUL in 27m 58s

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #9120 (7b90fa7) into main (24595c9) will increase coverage by 0.11%.
The diff coverage is 62.12%.

@@             Coverage Diff              @@
##               main    #9120      +/-   ##
============================================
+ Coverage     70.96%   71.08%   +0.11%     
- Complexity    57204    57339     +135     
============================================
  Files          4765     4765              
  Lines        270399   270398       -1     
  Branches      39547    39546       -1     
============================================
+ Hits         191895   192213     +318     
+ Misses        62340    62063     -277     
+ Partials      16164    16122      -42     
Files Changed Coverage Δ
.../java/org/opensearch/client/RequestConverters.java 85.85% <ø> (+1.99%) ⬆️
.../java/org/opensearch/common/collect/Iterators.java 75.00% <ø> (ø)
...g/opensearch/core/common/util/CollectionUtils.java 77.06% <ø> (ø)
...org/opensearch/geo/algorithm/PolygonGenerator.java 93.93% <ø> (ø)
.../org/opensearch/ingest/common/ScriptProcessor.java 96.96% <ø> (ø)
...script/mustache/CustomReflectionObjectHandler.java 68.62% <ø> (ø)
.../org/opensearch/painless/lookup/PainlessClass.java 47.82% <ø> (ø)
...org/opensearch/painless/lookup/PainlessLookup.java 79.82% <ø> (ø)
...e/lucene/search/grouping/CollapseTopFieldDocs.java 83.33% <ø> (ø)
...n/cluster/health/TransportClusterHealthAction.java 43.34% <ø> (ø)
... and 47 more

... and 439 files with indirect coverage changes

@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:



> Task :checkCompatibility
Incompatible components: [https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/security-analytics.git]
Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.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/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git]

BUILD SUCCESSFUL in 39m 17s

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.repositories.azure.AzureBlobContainerRetriesTests.testWriteBlobWithRetries

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

@nknize
Copy link
Collaborator Author

nknize commented Aug 4, 2023

We really need to get these Remote Store tests stabilized.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

@nknize
Copy link
Collaborator Author

nknize commented Aug 4, 2023

Another remote store failure 😠

Refiring

REPRODUCE WITH: ./gradlew ':server:internalClusterTest' --tests "org.opensearch.remotestore.ReplicaToPrimaryPromotionIT.testFailoverWhileIndexing" -Dtests.seed=A1FA205B5E846428 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=en-CA -Dtests.timezone=Etc/GMT+2 -Druntime.java=20

@saratvemulapalli saratvemulapalli added the backport 2.x Backport to 2.x branch label Aug 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

@nknize
Copy link
Collaborator Author

nknize commented Aug 4, 2023

Another remote store failure:

REPRODUCE WITH: ./gradlew ':server:internalClusterTest' --tests "org.opensearch.remotestore.RemoteRestoreSnapshotIT.testRestoreShallowCopySnapshotWithDifferentRepo" -Dtests.seed=C2462D8D2A5CB1F2 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=lt -Dtests.timezone=Asia/Phnom_Penh -Druntime.java=20

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

@nknize nknize merged commit 5bb7fa3 into opensearch-project:main Aug 4, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-9120-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5bb7fa3ead94051f9fe3e8772f8f093d422a356d
# Push it to GitHub
git push --set-upstream origin backport/backport-9120-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-9120-to-2.x.

nknize added a commit to nknize/OpenSearch that referenced this pull request Aug 4, 2023
…opensearch-project#9120)

This commit refactors the CollectionUtils, and Iterators utility classes
to the core and common libraries, respectively. Several other base
Strings utility methods are also refactored to the core Strings utility
library. This is done to incrementally move the remaining Strings
methods in server to the core String utility.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
(cherry picked from commit 5bb7fa3)
andrross pushed a commit that referenced this pull request Aug 4, 2023
…ods to core lib (#9120) (#9127)

* [Refactor] CollectionUtils, Iterators, and String methods to core lib (#9120)

This commit refactors the CollectionUtils, and Iterators utility classes
to the core and common libraries, respectively. Several other base
Strings utility methods are also refactored to the core Strings utility
library. This is done to incrementally move the remaining Strings
methods in server to the core String utility.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
(cherry picked from commit 5bb7fa3)

* add suppress warning

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

---------

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
…opensearch-project#9120)

This commit refactors the CollectionUtils, and Iterators utility classes
to the core and common libraries, respectively. Several other base
Strings utility methods are also refactored to the core Strings utility
library. This is done to incrementally move the remaining Strings
methods in server to the core String utility.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
brusic pushed a commit to brusic/OpenSearch that referenced this pull request Sep 25, 2023
…opensearch-project#9120)

This commit refactors the CollectionUtils, and Iterators utility classes
to the core and common libraries, respectively. Several other base
Strings utility methods are also refactored to the core Strings utility
library. This is done to incrementally move the remaining Strings
methods in server to the core String utility.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…opensearch-project#9120)

This commit refactors the CollectionUtils, and Iterators utility classes
to the core and common libraries, respectively. Several other base
Strings utility methods are also refactored to the core Strings utility
library. This is done to incrementally move the remaining Strings
methods in server to the core String utility.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch enhancement Enhancement or improvement to existing feature or request skip-changelog v2.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants