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

[BUG] Flaky test failure - v1.2.5#mixedClusterTest - yaml rest test - indices.get_field_mapping #2440

Closed
tlfeng opened this issue Mar 11, 2022 · 5 comments · Fixed by #12422
Assignees
Labels
bug Something isn't working flaky-test Random test failure that succeeds on second run

Comments

@tlfeng
Copy link
Collaborator

tlfeng commented Mar 11, 2022

Describe the bug
Seen in #2437 (comment)

Gradle run result:
Log 3252
Reports 3252

To Reproduce
I can't reproduce it locally. 🙂
The below shows in the log of Gradle check.

REPRODUCE WITH: ./gradlew ':qa:mixed-cluster:v1.2.5#mixedClusterTest' --tests "org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT" -Dtests.method="test {p0=indices.get_field_mapping/20_missing_field/Return empty object if field doesn't exist, but index does}" -Dtests.seed=9FC2465A92C8B157 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=uk-UA -Dtests.timezone=Australia/Hobart -Druntime.java=17

org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT > test {p0=indices.get_field_mapping/20_missing_field/Return empty object if field doesn't exist, but index does} FAILED
    java.lang.AssertionError: Failure at [indices.get_field_mapping/20_missing_field:13]: expected [2xx] status code but api [indices.get_field_mapping] returned [404 Not Found] [{}]
        at __randomizedtesting.SeedInfo.seed([9FC2465A92C8B157:179679803C34DCAF]:0)
        at org.opensearch.test.rest.yaml.OpenSearchClientYamlSuiteTestCase.executeSection(OpenSearchClientYamlSuiteTestCase.java:442)
        at org.opensearch.test.rest.yaml.OpenSearchClientYamlSuiteTestCase.test(OpenSearchClientYamlSuiteTestCase.java:415)

Expected behavior
test passes.

Plugins
none.

Screenshots
none.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Occurred since Mar.10th, 2022.

The BWC test running with OpenSearch v1.3.0 can also fail.
gradle command: ./gradlew ':qa:mixed-cluster:v1.3.0#mixedClusterTest' --tests "org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT" -Dtests.method="test {p0=indices.get_field_mapping/20_missing_field/Return empty object if field doesn't exist, but index does}" -Dtests.seed=2E22A45097655A52
see #2438 (comment)

@tlfeng tlfeng added bug Something isn't working untriaged flaky-test Random test failure that succeeds on second run and removed untriaged labels Mar 11, 2022
@tlfeng tlfeng changed the title [BUG] Flaky test - v1.2.5#mixedClusterTest - yaml rest test - indices.get_field_mapping [BUG] Flaky test failure - v1.2.5#mixedClusterTest - yaml rest test - indices.get_field_mapping Mar 11, 2022
@tlfeng
Copy link
Collaborator Author

tlfeng commented Mar 12, 2022

There is an attempt to fix in the commit 4577e73

The test failure message became to the below after the above commit:

> Task :qa:mixed-cluster:v1.2.5#mixedClusterTest

REPRODUCE WITH: ./gradlew ':qa:mixed-cluster:v1.2.5#mixedClusterTest' --tests "org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT" -Dtests.method="test {p0=indices.get_field_mapping/20_missing_field/Return empty object if field doesn't exist, but index does}" -Dtests.seed=3BDEACA9E1F4F10C -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=es-PR -Dtests.timezone=Asia/Baghdad -Druntime.java=17

org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT > test {p0=indices.get_field_mapping/20_missing_field/Return empty object if field doesn't exist, but index does} FAILED
    java.lang.AssertionError: Failure at [indices.get_field_mapping/20_missing_field:20]: field [test_index.mappings] is null
        at __randomizedtesting.SeedInfo.seed([3BDEACA9E1F4F10C:B38A93734F089CF4]:0)
        at org.opensearch.test.rest.yaml.OpenSearchClientYamlSuiteTestCase.executeSection(OpenSearchClientYamlSuiteTestCase.java:442)
        at org.opensearch.test.rest.yaml.OpenSearchClientYamlSuiteTestCase.test(OpenSearchClientYamlSuiteTestCase.java:415)

See #2439 (comment)

❌   Gradle Check failure 4577e73
Log 3273
Reports 3273

@tlfeng
Copy link
Collaborator Author

tlfeng commented Mar 14, 2022

I tested the REST API manually in OpenSearch single node of both 1.x branch and 2.0 branch:

PUT http://localhost:9200/test_index

{
    "mappings": {
      "properties": {
        "text": {
          "type": "text",
          "analyzer": "whitespace"
        }
      }
    }
}
GET http://localhost:9200/test_index/_mapping/field/not_existent

Unfortunately, I didn't get 404 response code, or empty response body {}. Maybe it will only shows error in cluster with nodes of both 1.x and 2.0 versions.

@nknize
Copy link
Collaborator

nknize commented Mar 15, 2022

Muting test in #2452. It looks related to the intermediate state we're in for types removal. Should resolve once that's complete.

andrross added a commit to andrross/OpenSearch that referenced this issue Feb 21, 2024
This test was muted due to an [intermediate state][1] during type
removal. It now passes per my local testing.

[1]: opensearch-project#2440 (comment)

Signed-off-by: Andrew Ross <[email protected]>
@andrross andrross assigned andrross and unassigned nknize Feb 21, 2024
andrross added a commit to andrross/OpenSearch that referenced this issue Feb 21, 2024
This test was muted due to an [intermediate state][1] during type
removal. It now passes per my local testing.

[1]: opensearch-project#2440 (comment)

Signed-off-by: Andrew Ross <[email protected]>
reta pushed a commit that referenced this issue Feb 22, 2024
This test was muted due to an [intermediate state][1] during type
removal. It now passes per my local testing.

[1]: #2440 (comment)

Signed-off-by: Andrew Ross <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this issue Feb 22, 2024
This test was muted due to an [intermediate state][1] during type
removal. It now passes per my local testing.

[1]: #2440 (comment)

Signed-off-by: Andrew Ross <[email protected]>
(cherry picked from commit a50d1f6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kotwanikunal pushed a commit that referenced this issue Feb 22, 2024
This test was muted due to an [intermediate state][1] during type
removal. It now passes per my local testing.

[1]: #2440 (comment)


(cherry picked from commit a50d1f6)

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
peteralfonsi pushed a commit to peteralfonsi/OpenSearch that referenced this issue Mar 1, 2024
This test was muted due to an [intermediate state][1] during type
removal. It now passes per my local testing.

[1]: opensearch-project#2440 (comment)

Signed-off-by: Andrew Ross <[email protected]>
amkhar pushed a commit to amkhar/OpenSearch that referenced this issue Mar 12, 2024
This test was muted due to an [intermediate state][1] during type
removal. It now passes per my local testing.

[1]: opensearch-project#2440 (comment)

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: Aman Khare <[email protected]>
@gaobinlong
Copy link
Collaborator

This flaky test still exists, see the failed test.

@dblock dblock reopened this Mar 13, 2024
rayshrey pushed a commit to rayshrey/OpenSearch that referenced this issue Mar 18, 2024
This test was muted due to an [intermediate state][1] during type
removal. It now passes per my local testing.

[1]: opensearch-project#2440 (comment)

Signed-off-by: Andrew Ross <[email protected]>
@andrross andrross removed the untriaged label Apr 4, 2024
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this issue Apr 25, 2024
This test was muted due to an [intermediate state][1] during type
removal. It now passes per my local testing.

[1]: opensearch-project#2440 (comment)

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
@andrross
Copy link
Member

Fixed by #13624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flaky-test Random test failure that succeeds on second run
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants