Skip to content

[BUG] Prometheus integration test fails in Hindi locale #1275

Closed

Description

@MaxKsyunz

What is the bug?
PrometheusDataSourceCommandsIT.testSourceMetricCommandWithTimestamp integration test fails in hi-IN locale.

It first failed in commit 7554fcc but may have existed earlier.

How can one reproduce the bug?
Check out commit 7554fcc and run the following command: ./gradlew ':integ-test:integTest' --tests "org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT.testSourceMetricCommandWithTimestamp" -Dtests.seed=EE70DA8B4C47EEC -Dtests.security.manager=false -Dtests.locale=hi-IN -Dtests.timezone=America/Atka -Druntime.java=11

What is the expected behavior?
All integration tests pass.

What is your host/environment?
Reproduced in both GHA runner and Intel MacBookPro.

Do you have any screenshots?

Relavant logs from GHA runner.
2023-01-11T20:10:21.8510990Z > Task :integ-test:integTest
2023-01-11T20:13:39.0511681Z 
2023-01-11T20:13:39.0511697Z 
2023-01-11T20:13:39.0512387Z org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT > testSourceMetricCommandWithTimestamp FAILED
2023-01-11T20:13:39.0513187Z     org.opensearch.client.ResponseException: method [POST], host [http://127.0.0.1:41195], URI [/_plugins/_ppl], status line [HTTP/1.1 400 Bad Request]
2023-01-11T20:13:39.0513628Z     {
2023-01-11T20:13:39.0513832Z       "error": {
2023-01-11T20:13:39.0514075Z         "reason": "Invalid Query",
2023-01-11T20:13:39.0586771Z         "details": "timestamp:२०२३-०१-११ ०९:१३:३८ in unsupported format, please use yyyy-MM-dd HH:mm:ss[.SSSSSSSSS]",
2023-01-11T20:13:39.0587289Z         "type": "SemanticCheckException"
2023-01-11T20:13:39.0587560Z       },
2023-01-11T20:13:39.0587789Z       "status": 400
2023-01-11T20:13:39.0587990Z     }
2023-01-11T20:13:39.0588324Z         at __randomizedtesting.SeedInfo.seed([EE70DA8B4C47EEC:85EEEEEA4DE307AB]:0)
2023-01-11T20:13:39.0588829Z         at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:384)
2023-01-11T20:13:39.0589365Z         at app//org.opensearch.client.RestClient.performRequest(RestClient.java:354)
2023-01-11T20:13:39.0589885Z         at app//org.opensearch.client.RestClient.performRequest(RestClient.java:329)
2023-01-11T20:13:39.0590900Z         at app//org.opensearch.sql.ppl.PPLIntegTestCase.executeQueryToString(PPLIntegTestCase.java:33)
2023-01-11T20:13:39.0591565Z         at app//org.opensearch.sql.ppl.PPLIntegTestCase.executeQuery(PPLIntegTestCase.java:29)
2023-01-11T20:13:39.0592382Z         at app//org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT.testSourceMetricCommandWithTimestamp(PrometheusDataSourceCommandsIT.java:56)
2023-01-11T20:13:39.5514373Z REPRODUCE WITH: ./gradlew ':integ-test:integTest' --tests "org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT.testSourceMetricCommandWithTimestamp" -Dtests.seed=EE70DA8B4C47EEC -Dtests.security.manager=false -Dtests.locale=hi-IN -Dtests.timezone=America/Atka -Druntime.java=11

Activity

  1. added
    bug
    on Jan 11, 2023
  2. changed the title [-][BUG] PrometheusDataSourceCommandsIT.testSourceMetricCommandWithTimestamp fails in Hindi locale[/-] [+][BUG] Prometheus integration test fails in Hindi locale[/+] on Jan 11, 2023
  3. self-assigned this
    on Jan 12, 2023
  4. added
    infrastructure
    on Jan 25, 2023
  5. Yury-Fridlyand commented on Jan 30, 2023

    @Yury-Fridlyand
    Collaborator

    Also failed with ja-JP-u-ca-japanese-x-lvariant-JP locale:

    org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT > testSourceMetricCommandWithTimestamp FAILED
        org.opensearch.client.ResponseException: method [POST], host [http://127.0.0.1:33919], URI [/_plugins/_ppl], status line [HTTP/1.1 400 Bad Request]
        {
          "error": {
            "reason": "Invalid Query",
            "details": "timestamp:5-01-30 11:57:51 in unsupported format, please use yyyy-MM-dd HH:mm:ss[.SSSSSSSSS]",
            "type": "SemanticCheckException"
          },
          "status": 400
        }
            at __randomizedtesting.SeedInfo.seed([9BC98F6B5BDE5D55:10C06C29A2F92412]:0)
            at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:375)
            at app//org.opensearch.client.RestClient.performRequest(RestClient.java:345)
            at app//org.opensearch.client.RestClient.performRequest(RestClient.java:320)
            at app//org.opensearch.sql.ppl.PPLIntegTestCase.executeQueryToString(PPLIntegTestCase.java:33)
            at app//org.opensearch.sql.ppl.PPLIntegTestCase.executeQuery(PPLIntegTestCase.java:29)
            at app//org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT.testSourceMetricCommandWithTimestamp(PrometheusDataSourceCommandsIT.java:56)
    REPRODUCE WITH: ./gradlew ':integ-test:integTest' --tests "org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT.testSourceMetricCommandWithTimestamp" -Dtests.seed=9BC98F6B5BDE5D55 -Dtests.security.manager=false -Dtests.locale=ja-JP-u-ca-japanese-x-lvariant-JP -Dtests.timezone=America/Indiana/Indianapolis -Druntime.java=11
    
    Suite: Test class org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT
      2> REPRODUCE WITH: ./gradlew ':integ-test:integTest' --tests "org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT.testSourceMetricCommandWithTimestamp" -Dtests.seed=9BC98F6B5BDE5D55 -Dtests.security.manager=false -Dtests.locale=ja-JP-u-ca-japanese-x-lvariant-JP -Dtests.timezone=America/Indiana/Indianapolis -Druntime.java=11
      2> org.opensearch.client.ResponseException: method [POST], host [http://127.0.0.1:33919], URI [/_plugins/_ppl], status line [HTTP/1.1 400 Bad Request]
        {
          "error": {
            "reason": "Invalid Query",
            "details": "timestamp:5-01-30 11:57:51 in unsupported format, please use yyyy-MM-dd HH:mm:ss[.SSSSSSSSS]",
            "type": "SemanticCheckException"
          },
          "status": 400
        }
            at __randomizedtesting.SeedInfo.seed([9BC98F6B5BDE5D55:10C06C29A2F92412]:0)
            at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:375)
            at app//org.opensearch.client.RestClient.performRequest(RestClient.java:345)
            at app//org.opensearch.client.RestClient.performRequest(RestClient.java:320)
            at app//org.opensearch.sql.ppl.PPLIntegTestCase.executeQueryToString(PPLIntegTestCase.java:33)
            at app//org.opensearch.sql.ppl.PPLIntegTestCase.executeQuery(PPLIntegTestCase.java:29)
            at app//org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT.testSourceMetricCommandWithTimestamp(PrometheusDataSourceCommandsIT.java:56)
    
  6. derek-ho commented on Feb 17, 2023

    @derek-ho
    Contributor

    It seems like this is a bug even on Linux, not related to windows, but still tagging with 2.7

  7. vamsimanohar commented on Mar 1, 2023

    @vamsimanohar
    Member

    @MaxKsyunz @Yury-Fridlyand
    when do we run in HIndi locale? Whats the trigger for this and is there an automated process to check for all locales?

  8. Yury-Fridlyand commented on Mar 1, 2023

    @Yury-Fridlyand
    Collaborator

    ITs pick a random locale and TZ every time. Check out the block above, it contains a command to reproduce this.

  9. MaxKsyunz commented on Apr 20, 2023

    @MaxKsyunz
    CollaboratorAuthor

    We ran into another locale that uses non-Arabic numerals:

    ./gradlew ':integ-test:integTest' --tests "org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT.testSourceMetricCommandWithTimestamp" -Dtests.seed=841AE398694E5F00 -Dtests.security.manager=false -Dtests.locale=th-TH-u-nu-thai-x-lvariant-TH -Dtests.timezone=Etc/GMT+12 -Druntime.java=11
    
  10. added
    v2.9.0
    and removed on Jul 4, 2023
  11. MaxKsyunz commented on Jul 5, 2023

    @MaxKsyunz
    CollaboratorAuthor

    @acarbonetto I removed the v2.9.0 label since this has not been worked on this dev cycle AFAIK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buginfrastructure

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions