You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original PR Title: Fix for GET /_migration/deprecations doesn't report node deprecations if low watermark exceeded and GET /_migration/deprecations doesn't report node-level failures properly Original PR Description: Closeselastic#137010 Closeselastic#137004 Original PR URL: elastic#137964
PR Type
Bug fix
Description
Fix node deprecation reporting when low watermark exceeded
Improve node-level failure logging with proper exception context
Refactor deprecation check logic to include watermark issues
Add comprehensive test for disk watermark deprecation warnings
Diagram Walkthrough
flowchart LR
A["Node Deprecation Checker"] -->|logs failures| B["Enhanced Logging"]
C["Transport Node Deprecation Check"] -->|refactored| D["Improved Issue Collection"]
D -->|includes| E["Disk Watermark Issues"]
F["Test Suite"] -->|validates| E
Objective: To create a detailed and reliable record of critical system actions for security analysis and compliance.
Status: Logging Context: The PR adds warn-level logs for node failures, but does not include explicit user identity or structured fields, making it unclear if audit requirements are met for these critical actions.
Referred Code
logger.atWarn().withThrowable(failure).log("node {} failed to run deprecation checks", failure.nodeId());
}
Generic: Security-First Input Validation and Data Handling
Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent vulnerabilities
Status: Input Assumptions: The change replaces stream filtering with a loop and processes deprecation checks without visible validation of external inputs (e.g., settings or cluster info), which may rely on validations outside the shown diff.
Why: The suggestion correctly proposes using instanceof pattern matching for better readability, but it's a minor style improvement in a test helper class with low impact.
Low
More
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Benchmark PR elastic#137964
Type: Clean (correct implementation)
Original PR Title: Fix for GET /_migration/deprecations doesn't report node deprecations if low watermark exceeded and GET /_migration/deprecations doesn't report node-level failures properly
Original PR Description: Closes elastic#137010
Closes elastic#137004
Original PR URL: elastic#137964
PR Type
Bug fix
Description
Fix node deprecation reporting when low watermark exceeded
Improve node-level failure logging with proper exception context
Refactor deprecation check logic to include watermark issues
Add comprehensive test for disk watermark deprecation warnings
Diagram Walkthrough
File Walkthrough
NodeDeprecationChecker.java
Enhanced failure logging with exception contextx-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecker.java
logger.atWarn().withThrowable()for better error reportingTransportNodeDeprecationCheckAction.java
Refactor deprecation issue collection logicx-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportNodeDeprecationCheckAction.java
NodeRequestparameter fromnodeOperationmethodObjectsimportTransportNodeDeprecationCheckActionTests.java
Add watermark deprecation test and update signaturesx-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/TransportNodeDeprecationCheckActionTests.java
nodeOperationsignaturetestDiskLowWatermarkIsIncludedInDeprecationWarningsdeprecations
DeprecationIssueMatcherfor flexible assertion matching137964.yaml
Add changelog entry for bug fixdocs/changelog/137964.yaml
GET /_migration/deprecationsdoesn't report node-level failures properly elastic/elasticsearch#137010 andGET /_migration/deprecationsdoesn't report node deprecations if low watermark exceeded elastic/elasticsearch#137004