Remove escape hatch permitting incompatible builds#76513
Remove escape hatch permitting incompatible builds#76513masseyke merged 9 commits intoelastic:7.xfrom
Conversation
|
Pinging @elastic/es-core-features (Team:Core/Features) |
...gin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecks.java
Outdated
Show resolved
Hide resolved
...gin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecks.java
Outdated
Show resolved
Hide resolved
...eprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java
Outdated
Show resolved
Hide resolved
|
Looking good, just a few comments to fix up first. Hopefully we can keep the security manager happy. |
|
@elasticmachine update branch |
jbaiera
left a comment
There was a problem hiding this comment.
I think this is pretty good. I left a suggestion on another way to handle the getProperty call, but otherwise LGTM
| static String permitsHandshakesFromIncompatibleBuildsSupplier = | ||
| System.getProperty(TransportService.PERMIT_HANDSHAKES_FROM_INCOMPATIBLE_BUILDS_KEY); |
There was a problem hiding this comment.
If anything happens to cause this to line throw it would lead to NoClassDefFoundError issues.
| static String permitsHandshakesFromIncompatibleBuildsSupplier = | ||
| System.getProperty(TransportService.PERMIT_HANDSHAKES_FROM_INCOMPATIBLE_BUILDS_KEY); | ||
|
|
||
| static DeprecationIssue checkNoPermitHandshakeFromIncompatibleBuilds(final Settings settings, |
There was a problem hiding this comment.
I was thinking that we pass in the System::getProperty method reference or () -> System.getProperty("......") to this function, and call the function to obtain the setting value
| ClusterState.EMPTY_STATE, | ||
| new XPackLicenseState(Settings.EMPTY, () -> 0)); | ||
| assertEquals(null, expectedNullIssue); | ||
| NodeDeprecationChecks.permitsHandshakesFromIncompatibleBuildsSupplier = randomAlphaOfLengthBetween(1, 10); |
There was a problem hiding this comment.
Then here we could just pass in a () -> randomAlphaOfLengthBetween(1, 10) to the checkNoPermitHandshakeFromeIncompatibleBuilds function and not worry about static variables
|
@elasticmachine run elasticsearch-ci/part-1 |
The system property "es.unsafely_permit_handshake_from_incompatible_builds" was deprecated and has been removed in 8.0. This adds a deprecation check for that property.
Relates to #42404 and #65753.