graphite-clickhouse icon indicating copy to clipboard operation
graphite-clickhouse copied to clipboard

Fixed incorrect finder behaviour with extra-prefix specified

Open lexx-bright opened this issue 1 year ago • 1 comments

extra-prefix = "extra"

# curl -s 'http://127.0.0.1:19010/metrics/find?query=*' | jq .
[
  {
    "allowChildren": 1,
    "expandable": 1,
    "leaf": 0,
    "id": "extra",
    "text": "extra",
    "context": {}
  }
]

# curl -s 'http://127.0.0.1:19010/metrics/find?query=extra.*' | jq .
[
  {
    "allowChildren": 1,
    "expandable": 1,
    "leaf": 0,
    "id": "extra.carbon",
    "text": "carbon",
    "context": {}
  },
  {
    "allowChildren": 1,
    "expandable": 1,
    "leaf": 0,
    "id": "extra.extra",
    "text": "extra",
    "context": {}
  }
]

# curl -s 'http://127.0.0.1:19010/metrics/find?query=extra.extra.*' | jq .
[
  {
    "allowChildren": 1,
    "expandable": 1,
    "leaf": 0,
    "id": "extra.extra.extra",
    "text": "extra",
    "context": {}
  }
]

# curl -s 'http://127.0.0.1:19010/metrics/find?query=extra.notexits.*' | jq .
[
  {
    "allowChildren": 1,
    "expandable": 1,
    "leaf": 0,
    "id": "extra.notexits.extra",
    "text": "extra",
    "context": {}
  }
]

lexx-bright avatar Aug 23 '23 11:08 lexx-bright

Wha't about add integration tests ? For example see https://github.com/go-graphite/graphite-clickhouse/blob/master/tests/find_cache/test.toml

msaf1980 avatar Feb 07 '24 04:02 msaf1980