Skip to content

Migrate x-pack-enrich legacy rest tests to new test framework #131743

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

Merged
merged 7 commits into from
Jul 24, 2025

Conversation

mosche
Copy link
Contributor

@mosche mosche commented Jul 23, 2025

Migrate x-pack-enrich legacy rest tests to new test framework

@mosche mosche requested a review from a team July 23, 2025 08:35
@mosche mosche added >test Issues or PRs that are addressing/adding tests :Core/Infra/Core Core issues without another label >refactoring labels Jul 23, 2025
@elasticsearchmachine elasticsearchmachine added Team:Core/Infra Meta label for core/infra team v9.2.0 labels Jul 23, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@mosche
Copy link
Contributor Author

mosche commented Jul 23, 2025

YAML tests are failing in cleanUpCluster. Not sure how to solve, if preserving the data I get conflicts later.

method [DELETE], host [http://[::1]:53400], URI [*,-.ds-ilm-history-*,-.ds-.slm-history-*,-.ds-.watcher-history-*,-.ds-.triggered_watches-*?expand_wildcards=open%2Cclosed%2Chidden], status line [HTTP/1.1 400 Bad Request]
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"index [.ds-my-ds-2025.07.23-000001] is the write index for data stream [my-ds] and cannot be deleted"}],"type":"illegal_argument_exception","reason":"index [.ds-my-ds-2025.07.23-000001] is the write index for data stream [my-ds] and cannot be deleted"},"status":400}
org.elasticsearch.client.ResponseException: method [DELETE], host [http://[::1]:53400], URI [*,-.ds-ilm-history-*,-.ds-.slm-history-*,-.ds-.watcher-history-*,-.ds-.triggered_watches-*?expand_wildcards=open%2Cclosed%2Chidden], status line [HTTP/1.1 400 Bad Request]
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"index [.ds-my-ds-2025.07.23-000001] is the write index for data stream [my-ds] and cannot be deleted"}],"type":"illegal_argument_exception","reason":"index [.ds-my-ds-2025.07.23-000001] is the write index for data stream [my-ds] and cannot be deleted"},"status":400}
	at __randomizedtesting.SeedInfo.seed([2D63C9B58475A573:A537F66F2A89C88B]:0)
	at org.elasticsearch.client.RestClient.convertResponse(RestClient.java:351)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:317)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:292)
	at org.elasticsearch.test.rest.ESRestTestCase.wipeAllIndices(ESRestTestCase.java:1246)
	at org.elasticsearch.test.rest.ESRestTestCase.wipeCluster(ESRestTestCase.java:958)
	at org.elasticsearch.test.rest.ESRestTestCase.cleanUpCluster(ESRestTestCase.java:622)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)

@mosche mosche requested a review from a team as a code owner July 23, 2025 08:46
@mosche mosche added auto-backport Automatically create backport pull requests when merged v9.1.1 v8.19.1 v9.0.5 v8.18.5 labels Jul 23, 2025

clusterModules project(xpackModule('monitoring'))
clusterModules project(xpackModule('ilm'))
clusterModules project(xpackModule('wildcard'))
}

addQaCheckDependencies(project)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove this since we've gotten rid of the QA projects.

@mark-vieira
Copy link
Contributor

YAML tests are failing in cleanUpCluster. Not sure how to solve, if preserving the data I get conflicts later.

Hmm, I don't see why it would be different. The only change we've really made here behaviorally is switching away from the default distribution which certainly could matter. Might be worth trying to see if using the default distro resolves the failures. Perhaps there's another missing module here we implicitly rely on?

@mosche
Copy link
Contributor Author

mosche commented Jul 24, 2025

Thanks @mark-vieira, using the default distro the YAML tests pass. No idea why 🤷

@mosche mosche merged commit 71130a6 into elastic:main Jul 24, 2025
33 checks passed
mosche added a commit to mosche/elasticsearch that referenced this pull request Jul 24, 2025
mosche added a commit to mosche/elasticsearch that referenced this pull request Jul 24, 2025
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.1
8.19 Commit could not be cherrypicked due to conflicts
9.0
8.18 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 131743

mosche added a commit to mosche/elasticsearch that referenced this pull request Jul 25, 2025
…c#131743)

(cherry picked from commit 71130a6)

# Conflicts:
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/RestrictedBuildApiService.java
#	x-pack/plugin/enrich/build.gradle
#	x-pack/plugin/enrich/qa/rest-with-advanced-security/build.gradle
#	x-pack/plugin/enrich/qa/rest-with-security/build.gradle
#	x-pack/plugin/enrich/qa/rest/build.gradle
@mosche
Copy link
Contributor Author

mosche commented Jul 25, 2025

@mark-vieira actually, noticed one thing... how's FIPS working in the new test framework, that requires additional jars doesn't it?
I've previously tested this locally with FIPS enabled, but now I'm wondering if this wasn't working as expected (-Dtests.fips.enabled=true not being forwarded to the local cluster) and this should have failed instead (due to the basic license)?

mosche added a commit to mosche/elasticsearch that referenced this pull request Jul 25, 2025
…c#131743)

(cherry picked from commit 71130a6)

# Conflicts:
#	x-pack/plugin/enrich/build.gradle
#	x-pack/plugin/enrich/qa/rest-with-advanced-security/build.gradle
#	x-pack/plugin/enrich/qa/rest-with-security/build.gradle
#	x-pack/plugin/enrich/qa/rest/build.gradle
@mosche
Copy link
Contributor Author

mosche commented Jul 25, 2025

💚 All backports created successfully

Status Branch Result
8.19
8.18

Questions ?

Please refer to the Backport tool documentation

szybia added a commit to szybia/elasticsearch that referenced this pull request Jul 25, 2025
…king

* upstream/main: (90 commits)
  Register a blob cache long counter metric for total evicted regions (elastic#131862)
  Move plan attribute resolution to its own component (elastic#131830)
  Make restore support multi-project (elastic#131661)
  Use logically more correct expression (elastic#131869)
  [ES|QL] Change equals and hashcode for ConstantNullBlock (elastic#131817)
  Update `TransportVersion` to support a new model (elastic#131488)
  Correct slow log user for RCS 2.0 (elastic#130140)
  Revert "Remove 8.17 from dev branches"
  Mute org.elasticsearch.compute.aggregation.ValuesBytesRefGroupingAggregatorFunctionTests testSomeFiltered elastic#131878
  Remove 8.17 from dev branches
  Revert "CompressorFactory.compressor (elastic#131655)" (elastic#131866)
  Add fast path for single value in VALUES aggregator (elastic#130510)
  Resolve inference release tests failing due to missing feature flag  (elastic#131841)
  [Docs] Replace placeholder URLs (elastic#131309)
  CompressorFactory.compressor (elastic#131655)
  add availability info for speed loading setting (elastic#131714)
  [Logstash] Move `elastic_integration` plugin usage to ES logstash-bridge. (elastic#131486)
  Migrate x-pack-enrich legacy rest tests to new test framework (elastic#131743)
  Fix plugin example test failures due to deprecation warning (elastic#131819)
  Remove deprecated function isNotNullAndFoldable (elastic#130944)
  ...
@mark-vieira
Copy link
Contributor

@mark-vieira actually, noticed one thing... how's FIPS working in the new test framework, that requires additional jars doesn't it? I've previously tested this locally with FIPS enabled, but now I'm wondering if this wasn't working as expected (-Dtests.fips.enabled=true not being forwarded to the local cluster) and this should have failed instead (due to the basic license)?

It works more or less the same way. See FipsEnabledClusterConfigProvider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged backport pending :Core/Infra/Core Core issues without another label >refactoring Team:Core/Infra Meta label for core/infra team >test Issues or PRs that are addressing/adding tests v8.18.5 v8.19.1 v9.0.5 v9.1.1 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants