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

move anomaly localization to the last position to avoid BWC issue #189

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

ylwu-amzn
Copy link
Collaborator

@ylwu-amzn ylwu-amzn commented Mar 10, 2022

Signed-off-by: Yaliang Wu ylwu@amazon.com

Description

When test today's tarball on multi-node cluster, we see failed to parse ActionRequest into MLTrainingTaskRequest error

POST _plugins/_ppl
{
  "query": "source=nyc_taxi | fields timestamp,value | ad time_field='timestamp'"
}

{
  "error": {
    "reason": "There was internal problem at backend",
    "details": "failed to parse ActionRequest into MLTrainingTaskRequest",
    "type": "UncheckedIOException"
  },
  "status": 503
}

SQL is using client from main branch, so When parse action request, it will try to map BATCh_RCF to the 8th enum, but FunctionName in 1.3 only have 7 enum items. So will fail to parse. This PR moves ANOMALY_LOCALIZATION to the last position to avoid such issue in future.

# main branch
public enum FunctionName {
    LINEAR_REGRESSION,
    KMEANS,
    AD_LIBSVM,
    SAMPLE_ALGO,
    LOCAL_SAMPLE_CALCULATOR,
    ANOMALY_LOCALIZATION,
    FIT_RCF,
    BATCH_RCF;
    
# 1.3 branch
public enum FunctionName {
    LINEAR_REGRESSION,
    KMEANS,
    AD_LIBSVM,
    SAMPLE_ALGO,
    LOCAL_SAMPLE_CALCULATOR,
    FIT_RCF,
    BATCH_RCF;

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Yaliang Wu <ylwu@amazon.com>
@ylwu-amzn ylwu-amzn requested a review from a team March 10, 2022 00:27
@ylwu-amzn ylwu-amzn merged commit d7ddc59 into opensearch-project:main Mar 10, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 10, 2022
Signed-off-by: Yaliang Wu <ylwu@amazon.com>
(cherry picked from commit d7ddc59)
ylwu-amzn added a commit that referenced this pull request Mar 10, 2022
…) (#190)

Signed-off-by: Yaliang Wu <ylwu@amazon.com>
(cherry picked from commit d7ddc59)

Co-authored-by: Yaliang Wu <ylwu@amazon.com>
@ylwu-amzn ylwu-amzn added the enhancement New feature or request label Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.x enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants