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

Remove references to LegacyESVersion.V_7x constants #2151

Merged
merged 3 commits into from
Oct 12, 2022

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Oct 10, 2022

Signed-off-by: Craig Perkins cwperx@amazon.com

Description

Removes all 7.x constants and logic that is no longer supported in 3.0.

See: opensearch-project/OpenSearch#2747

Related distribution build failure due to removal of these constants in core:

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

Maintenance

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.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks cwperks requested a review from a team October 10, 2022 16:27
@cwperks cwperks marked this pull request as draft October 10, 2022 16:31
@@ -72,7 +72,7 @@ public TransportConfigUpdateAction(final Settings settings,
this.dynamicConfigFactory = dynamicConfigFactory;
}

public static class NodeConfigUpdateRequest extends BaseNodeRequest {
public static class NodeConfigUpdateRequest extends TransportRequest {
Copy link
Member

Choose a reason for hiding this comment

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

What would this change achieve and does it break anything?

Copy link
Member Author

Choose a reason for hiding this comment

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

This class was removed in 3.0.0. I followed the docstring

/**
 * Base class for node transport requests
 *
 * @opensearch.internal
 *
 * @deprecated this class is deprecated and classes will extend TransportRequest directly
 */
// TODO: this class can be removed in main once 7.x is bumped to 7.4.0
@Deprecated
public abstract class BaseNodeRequest extends TransportRequest {

See: https://github.com/opensearch-project/OpenSearch/pull/4702/files#diff-a8affa0470501c9cb284bfbd66f00d493fc72bf05d12e4e2c89bfda6fe814371L47

@@ -100,11 +100,6 @@ protected void handlePost(RestChannel channel, RestRequest request, Client clien

final Version oldestNodeVersion = cs.state().getNodes().getMinNodeVersion();

if(oldestNodeVersion.before(LegacyESVersion.V_7_0_0)) {
Copy link
Member

Choose a reason for hiding this comment

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

Instead of removing this, should we be replacing it with oldest that we currently support?

@cwperks
Copy link
Member Author

cwperks commented Oct 10, 2022

The build will fail until there's a new distribution build available for 3.0.0.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
log.trace("has6xIndices: {}", has6xIndices);
}
}

if(nodes == null || event.nodesChanged()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We only need to track when nodes change now not also when indices are created & deleted?

Copy link
Member Author

Choose a reason for hiding this comment

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

The purpose of this code is to log if there are 6.X nodes or indices in the cluster upon change (node was added/removed from the cluster or an index was created or deleted). If its not possible to run es 6.X nodes with os 3.X then this code will never be used.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@peternied peternied marked this pull request as ready for review October 11, 2022 22:09
@peternied
Copy link
Member

After this is merged it will fix the build break on main and for the distrobution

@cwperks cwperks merged commit 16b1676 into opensearch-project:main Oct 12, 2022
stephen-crawford pushed a commit to stephen-crawford/security that referenced this pull request Nov 10, 2022
…ct#2151)

* Remove references to LegacyESVersion.V_7x constants

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
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.

[AUTOCUT] OS Distribution Build Failed for security-3.0.0
5 participants