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] Transform API should throw exception for unsupported aggregation type #671

Closed
Angie-Zhang opened this issue Jan 26, 2023 · 1 comment
Assignees
Labels

Comments

@Angie-Zhang
Copy link
Contributor

What is the bug?
When creating transform jobs, even if the request format contains unsupported aggregation types, the transform API still returns 201 success. After the transform job created, the job has Error Status.

How can one reproduce the bug?
In Dev Tools set a request to create a transform job:

PUT _plugins/_transform/bucket_script_test
{
  "transform": {
    "enabled": true,
    "continuous": true,
    "schedule": {
      "interval": {
        "period": 1,
        "unit": "Minutes"
      }
    },
    "description": "Sample transform job",
    "source_index": "transform_test_source",
    "target_index": "transform_test_target",
    "data_selection_query": {
      "match_all": {}
    },
    "page_size": 1,
    "groups": [
      {
        "terms": {
          "source_field": "price",
          "target_field": "original_price"
        }
      },
      {
        "terms": {
          "source_field": "discount",
          "target_field": "discount"
        }
      }
    ],
    "aggregations": {
       "final_price": {
        "bucket_script": {
            "buckets_path": {
                "p": "price",
                "d": "discount"
            },
            "script": "params.p * (1 - params.d)"
        }
    }
    }
  }
}

It returns 201 success.

In Index Management - Transform Jobs, this job can be seen with Status: Error: Failed to search data in source indices.

What is the expected behavior?
IN OS 2.5 or earlier version, transform does not support bucket_script in aggregation. It should throw exception to reflect this eror.

What is your host/environment?

  • OS: AWS Managed Service
  • Version: OS 1.3 & OS 2.3
@Angie-Zhang Angie-Zhang added bug Something isn't working untriaged labels Jan 26, 2023
@Angie-Zhang Angie-Zhang changed the title [BUG] [BUG] Transform API should throw exception for unsupported aggregation type Jan 26, 2023
@deshsidd deshsidd assigned deshsidd and Angie-Zhang and unassigned deshsidd Feb 7, 2023
@deshsidd deshsidd added the v2.7.0 label Feb 7, 2023
@bowenlan-amzn bowenlan-amzn added enhancement New request and removed Priority-Immediate v2.7.0 bug Something isn't working labels Sep 6, 2023
@bowenlan-amzn bowenlan-amzn added the good first issue Good for newcomers label Sep 14, 2023
@n-dohrmann
Copy link
Contributor

Could I be assigned this issue? thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

4 participants