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

Skip on any node capability being present #111585

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

thecoop
Copy link
Member

@thecoop thecoop commented Aug 5, 2024

Counterpart to #111268, skip on any capability being present

@thecoop thecoop added >test Issues or PRs that are addressing/adding tests :Core/Infra/Core Core issues without another label labels Aug 5, 2024
@thecoop thecoop requested review from a team and mosche August 5, 2024 10:25
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine elasticsearchmachine added Team:Core/Infra Meta label for core/infra team v8.16.0 labels Aug 5, 2024
Get the check working properly
Copy link
Contributor

@mosche mosche left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@@ -291,8 +299,46 @@ public Optional<Boolean> clusterHasCapabilities(String method, String path, Stri
params.put("capabilities", capabilitiesString);
}
params.put("error_trace", "false"); // disable error trace

if (clusterHasFeature(RestNodesCapabilitiesAction.LOCAL_ONLY_CAPABILITIES.id()) == false) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (clusterHasFeature(RestNodesCapabilitiesAction.LOCAL_ONLY_CAPABILITIES.id()) == false) {
if (any == false || clusterHasFeature(RestNodesCapabilitiesAction.LOCAL_ONLY_CAPABILITIES.id()) == false) {

Isn't this case also what we'd like to use by default if any is false? Obviously below works as well, but this one is easier to understand I think.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm on the fence with this one, I think it's helpful to have all the logic used by tests in the same place, so we're not depending on cluster implementation for one and not the other. Could easily be swayed the other way though.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have a strong preference to be honest. Consistently doing things a certain way seems beneficial, but I also see value of exercising the default path in tests as much as possible. Leaving it up to you ;)

@thecoop thecoop merged commit 5da4f31 into elastic:main Aug 7, 2024
15 checks passed
thecoop added a commit that referenced this pull request Aug 7, 2024
#111585 and #111268 change the behavior to skip on any node having the feature/capability, not all nodes
@thecoop thecoop deleted the skip-any-capabilities branch August 7, 2024 09:38
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Aug 7, 2024
* upstream/main: (132 commits)
  Fix compile after several merges
  Update docs with new behavior on skip conditions (elastic#111640)
  Skip on any instance of node or version features being present (elastic#111268)
  Skip on any node capability being present (elastic#111585)
  [DOCS] Publishes Anthropic inference service docs. (elastic#111619)
  Introduce `ChunkedZipResponse` (elastic#109820)
  [Gradle] fix esql compile cacheability (elastic#111651)
  Mute org.elasticsearch.datastreams.logsdb.qa.StandardVersusLogsIndexModeChallengeRestIT testTermsQuery elastic#111666
  Mute org.elasticsearch.datastreams.logsdb.qa.StandardVersusLogsIndexModeChallengeRestIT testMatchAllQuery elastic#111664
  Mute org.elasticsearch.xpack.esql.analysis.VerifierTests testMatchCommand elastic#111661
  Mute org.elasticsearch.xpack.esql.optimizer.LocalPhysicalPlanOptimizerTests testMatchCommandWithMultipleMatches {default} elastic#111660
  Mute org.elasticsearch.xpack.esql.optimizer.LocalPhysicalPlanOptimizerTests testMatchCommand {default} elastic#111659
  Mute org.elasticsearch.xpack.esql.optimizer.LocalPhysicalPlanOptimizerTests testMatchCommandWithWhereClause {default} elastic#111658
  LogsDB qa tests - add specific matcher for source (elastic#111568)
  ESQL: Move `randomLiteral` (elastic#111647)
  [ESQL] Clean up UNSUPPORTED type blocks (elastic#111648)
  ESQL: Remove the `NESTED` DataType (elastic#111495)
  ESQL: Move more out of esql-core (elastic#111604)
  Improve MvPSeriesWeightedSum edge case and add more tests (elastic#111552)
  Add link to flood-stage watermark exception message (elastic#111315)
  ...

# Conflicts:
#	server/src/main/java/org/elasticsearch/TransportVersions.java
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Aug 7, 2024
Update capabilities skip behavior to skip on any node having the capability, not all nodes
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Aug 7, 2024
elastic#111585 and elastic#111268 change the behavior to skip on any node having the feature/capability, not all nodes
mhl-b pushed a commit that referenced this pull request Aug 8, 2024
Update capabilities skip behavior to skip on any node having the capability, not all nodes
mhl-b pushed a commit that referenced this pull request Aug 8, 2024
#111585 and #111268 change the behavior to skip on any node having the feature/capability, not all nodes
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this pull request Sep 4, 2024
Update capabilities skip behavior to skip on any node having the capability, not all nodes
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this pull request Sep 4, 2024
elastic#111585 and elastic#111268 change the behavior to skip on any node having the feature/capability, not all nodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team >test Issues or PRs that are addressing/adding tests v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants