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] Xcontent fix #2613

Closed
wants to merge 3 commits into from

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Mar 30, 2023

Description

Reacts to refactoring done on xcontent classes from core. Many imports from org.opensearch.common.xcontent were switched to org.opensearch.core.xcontent.

I needed to change ClusterHelper L311 to

final List<NodeInfo> clusterManagerNodes = nodes.stream().filter(n->n.getNode().getRoles().stream().anyMatch(r -> r.roleName().equals("master"))).collect(Collectors.toList());

because of this change in core: opensearch-project/OpenSearch#6331

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Build fix

Issues Resolved

#2600

Check List

  • New functionality includes testing
  • New functionality has been documented
  • 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.

RyanL1997 and others added 3 commits March 28, 2023 23:43
Signed-off-by: Ryan Liang <jiallian@amazon.com>
Signed-off-by: Ryan Liang <jiallian@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@@ -308,13 +308,12 @@ public ClusterInfo waitForCluster(final ClusterHealthStatus status, final TimeVa

final List<NodeInfo> nodes = res.getNodes();

final List<NodeInfo> clusterManagerNodes = nodes.stream().filter(n->n.getNode().getRoles().contains(DiscoveryNodeRole.CLUSTER_MANAGER_ROLE)).collect(Collectors.toList());
final List<NodeInfo> clusterManagerNodes = nodes.stream().filter(n->n.getNode().getRoles().stream().anyMatch(r -> r.roleName().equals("master"))).collect(Collectors.toList());
Copy link
Member

Choose a reason for hiding this comment

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

We should not be using the term master in our code anymore, it should be cluster manager or something similar

Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

We made a pull request that transitions to cluster manager terminology. We should incorporate that backport into this change instead of using the deprecated terms.

This should be safe to merge even if OpenSearch backs out their change


Seems like this is a breaking change from OpenSearch done in opensearch-project/OpenSearch#6331 @RyanL1997 Can you figure out if that change was accidentally including in 2.x branches - doesn't seem correct.

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.

3 participants