opensearch-project / index-management

🗃 Automate periodic data operations, such as deleting indices at a certain age or performing a rollover at a certain size
https://opensearch.org/docs/latest/im-plugin/index/
Apache License 2.0
52 stars 107 forks source link

[BUG] Data Stream with special characters breaks data stream settings / management table #1140

Open mattjamesaus opened 3 months ago

mattjamesaus commented 3 months ago

Describe the bug

When attempting to use the Opensearch Dashboard Datastream management table a stream with special characters breaks the gui (essentially crashing it requiring a refresh). The stream itself that's problematic in our case is

{
    "data_stream": "mb-preprod%{[@metadata][target_index]}",
    "backing_indices": 1,
    "store_size": "20.3mb",
    "store_size_bytes": 21310945,
    "maximum_timestamp": 1710406642584
},

/_dashboards/app/opensearch_index_management_dashboards#/data-streams?from=0&search=&size=20&sortDirection=desc&sortField=name

The error in the JS console is as follows

osd-ui-shared-deps.js:435 URIError: Pathname "/create-data-stream/mb-preprod%{[@metadata][target_index]}/readonly" could not be decoded. This is likely caused by an invalid percent-encoding.
    at b (osd-ui-shared-deps.js:364:33173)
    at f (osd-ui-shared-deps.js:451:21541)
    at osd-ui-shared-deps.js:451:22289
    at gs (osd-ui-shared-deps.js:435:107584)
    at uc (osd-ui-shared-deps.js:435:96718)
    at sc (osd-ui-shared-deps.js:435:96643)
    at Qs (osd-ui-shared-deps.js:435:93673)
    at osd-ui-shared-deps.js:435:45315
    at t.unstable_runWithPriority (osd-ui-shared-deps.js:443:3844)
    at Xo (osd-ui-shared-deps.js:435:45024)

Attached a screenshot of what OS looks like when it breaks

To Reproduce Steps to reproduce the behavior:

  1. Go to Index management -> Data Streams
  2. Paginate until you get to the bad data stream getting returned
  3. Page will break when it tries to render the DS in the table.

Expected behavior Even tho the stream is poorly named (or in our case named due to a bad logstash pipeline) i would expect the table to still load the badly named data stream amongst the list of other correctly named data streams.

OpenSearch Version AWS Opensearch v 2.11.0 (OpenSearch_2_11_R20231113-P4)

Dashboards Version AWS Opensearch v 2.11.0 (OpenSearch_2_11_R20231113-P4)

Plugins

The standard AWS Opensearch ones - i've attached plugins?v if req.

Screenshots

Screenshot from 2024-03-14 17-28-14

Host/Environment (please complete the following information):

Additional context

os-plugins.txt

ashwin-pc commented 3 months ago

@opensearch-project/admin can you move this issue to the ISM plugin repo

dblock commented 2 weeks ago

Catch All Triage - 1 2 3 4 5