test(integ-test): gate optional integration environments - #5731
Conversation
PR Reviewer Guide 🔍(Review updated until commit d99219b)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to d99219b Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 0179dc6
Suggestions up to commit 4192322
Suggestions up to commit 5b565cf
|
|
Persistent review updated to latest commit 4192322 |
|
Persistent review updated to latest commit 0179dc6 |
| * The required set is declared by the task via the {@link #REQUIRED_PLUGINS_PROPERTY} system | ||
| * property; tasks leave it unset to keep the optional (skip-on-absence) behaviour. | ||
| */ | ||
| public final class ClusterPlugins { |
There was a problem hiding this comment.
Just thinking is it possible to make this like our capability annotation, like `@RequiresEnv("xxx-plugin") I see currently CapabilityRule is initialized in base class and may access to the client?
There was a problem hiding this comment.
Good idea. A rule can access the static client(), but CapabilityRule runs before @Before initializes it on the first method; these probes are at the start of init() so they can skip before index and security setup. The remote-cluster path also resolves static-final values at class load, so I would keep this PR scoped and handle an annotation refactor separately.
Detect Security, geospatial, telemetry, and remote-cluster capabilities at runtime so plain external-cluster runs skip unavailable environments while dedicated test tasks continue to execute them. Signed-off-by: Eric Wei <menwe@amazon.com>
Signed-off-by: Eric Wei <menwe@amazon.com>
Signed-off-by: Eric Wei <menwe@amazon.com>
0179dc6 to
d99219b
Compare
|
Persistent review updated to latest commit d99219b |
Summary
Plain external-cluster integration runs do not always include the Security, geospatial, telemetry, or remote-cluster environments required by their dedicated test suites. Those suites currently fail during setup instead of reporting that the dependency is unavailable.
This change detects optional plugins through
_cat/pluginsand skips only when the required component is absent. Cross-cluster tests similarly skip when no remote cluster is configured. Dedicated environments continue to run the tests unchanged.No production behavior is modified.
Validation
spotlessCheck,compileTestJava, andgit diff --checkpass