Skip to content

[BUG] ActionRollover min_index_age and min_primary_shard_size data types #1001

@jsatria

Description

@jsatria

What is the bug?

The min_index_age and min_primary_shard_size are number data types for the ISM plugin ActionRollover action. These should both be strings since a unit must be included. https://github.com/opensearch-project/opensearch-js/blob/main/api/_types/ism._common.d.ts#L87-L88

How can one reproduce the bug?

  1. Create an ISM policy with the rollover Action and a min_index_age without a time unit e.g.
  2. Put the policy using the ism.putPolicy API
  3. You will get an error which includes the following
"root_cause": [
  {
    "type": "illegal_argument_exception",
    "reason": "failed to parse setting [min_index_age] with value [30] as a time value: unit is missing or unrecognized"
  }
],

What is the expected behavior?

The data field should be able to include a time unit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions