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] Remaining Strings utility methods to core library (#9103) #9134

Merged
merged 2 commits into from
Aug 5, 2023

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Aug 5, 2023

Backport 4c59810 from #9103.

…rch-project#9103)

This commit refactors the remaining Strings# utility methods from the
duplicate :server:Strings class to the :libs:opensearch-core:Strings
class. The CollectionUtils class (used by the Strings utility) is also
refactored to the :libs:opensearch-common library and the
unnecessary Strings.toString(XContentBuilder... static method is finally
refactored as an instance method in XContentBuilder.

The Strings class is also cleaned up for clarity.

Signed-off-by: Nicholas Walter Knize <[email protected]>
(cherry picked from commit 4c59810)
@nknize nknize added enhancement Enhancement or improvement to existing feature or request backport PRs or issues specific to backporting features or enhancments skip-changelog v2.10.0 labels Aug 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2023

Gradle Check (Jenkins) Run Completed with:

@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:



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

BUILD SUCCESSFUL in 33m 29s

Signed-off-by: Nicholas Walter Knize <[email protected]>
@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:



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

BUILD SUCCESSFUL in 23m 16s

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.SearchWeightedRoutingIT.testStrictWeightedRoutingWithCustomString

@codecov
Copy link

codecov bot commented Aug 5, 2023

Codecov Report

Merging #9134 (cf1d4a9) into 2.x (e59b21a) will increase coverage by 0.01%.
Report is 1 commits behind head on 2.x.
The diff coverage is 68.63%.

@@             Coverage Diff              @@
##                2.x    #9134      +/-   ##
============================================
+ Coverage     70.81%   70.83%   +0.01%     
- Complexity    57425    57504      +79     
============================================
  Files          4754     4753       -1     
  Lines        271688   271693       +5     
  Branches      40070    40070              
============================================
+ Hits         192408   192448      +40     
- Misses        62717    62827     +110     
+ Partials      16563    16418     -145     
Files Changed Coverage Δ
.../opensearch/client/indices/CreateIndexRequest.java 77.77% <0.00%> (ø)
...opensearch/client/slm/SnapshotLifecyclePolicy.java 0.00% <ø> (ø)
...ch/client/slm/SnapshotLifecyclePolicyMetadata.java 0.00% <ø> (ø)
.../opensearch/client/slm/SnapshotLifecycleStats.java 0.00% <ø> (ø)
...rch/client/slm/SnapshotRetentionConfiguration.java 0.00% <ø> (ø)
...h/script/mustache/MultiSearchTemplateResponse.java 56.25% <ø> (ø)
...rg/opensearch/index/rankeval/RankEvalResponse.java 91.42% <ø> (+2.85%) ⬆️
...va/org/opensearch/index/rankeval/RankEvalSpec.java 96.49% <ø> (+8.77%) ⬆️
...a/org/opensearch/index/rankeval/RatedDocument.java 81.03% <0.00%> (ø)
...va/org/opensearch/index/rankeval/RatedRequest.java 91.79% <ø> (+6.71%) ⬆️
... and 134 more

... and 443 files with indirect coverage changes

@nknize
Copy link
Collaborator Author

nknize commented Aug 5, 2023

Merging backport. This was already independently reviewed in #9103

@nknize nknize merged commit d090a7f into opensearch-project:2.x Aug 5, 2023
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 skip-changelog v2.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant