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

Fix cat API tests and add missing fields #551

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

Jakob3xD
Copy link
Contributor

@Jakob3xD Jakob3xD commented Sep 4, 2024

Description

  • Add h, bytes and time parameters to some cat API tests
  • Add tests against unassigned indices/shards for indices and shards cat endpoint
  • Add missing fields and adjust there types due to the test cases.
  • Remove some old? none existing? fields from the cat indices endpoint

Issues Resolved

Closes #550

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: Jakob Hahn <jakob.hahn@hetzner.com>
…ssigned indices

Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'll merge if tests pass, the CHANGELOG stuff is fine.

@@ -84,7 +84,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added `AwarenessAttributeStats` to `/_cluster/health` ([#534](https://github.com/opensearch-project/opensearch-api-specification/pull/534))
- Added `cache_reserved_in_bytes` to `ClusterFileSystem` ([#534](https://github.com/opensearch-project/opensearch-api-specification/pull/534))
- Added `cluster_manager` to `ClusterNodeCount` ([#534](https://github.com/opensearch-project/opensearch-api-specification/pull/534))
- Added support for `query` with `terms` in `_search` ([#546](https://github.com/opensearch-project/opensearch-api-specification/pull/546)).
- Added support for `query` with `terms` in `_search` ([#546](https://github.com/opensearch-project/opensearch-api-specification/pull/546))
- Added `h`, `bytes`, `time` parameters to cat API tests ([#551](https://github.com/opensearch-project/opensearch-api-specification/pull/551))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually don't include CHANGELOGs for tests, remove.

@@ -99,6 +100,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Replace nullable with null type ([#436](https://github.com/opensearch-project/opensearch-api-specification/pull/436))
- Split test suite ([#472])(https://github.com/opensearch-project/opensearch-api-specification/pull/472)
- Changed `WriteResponseBase`'s `_primary_term`, `_seq_no` & `_version` to have `int64` format ([#530](https://github.com/opensearch-project/opensearch-api-specification/pull/530))
- Adjust indices, shards cat API to test against unassigned indices ([#551](https://github.com/opensearch-project/opensearch-api-specification/pull/551))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

Copy link
Contributor

github-actions bot commented Sep 4, 2024

Changes Analysis

Commit SHA: 5f3d5e9
Comparing To SHA: 636c2d3

API Changes

Summary

└─┬Components
  ├─┬cat.thread_pool:ThreadPoolRecord
  │ └──[➕] properties (42765:9)
  ├─┬cat.indices:IndicesRecord
  │ ├──[➕] properties (41461:9)
  │ ├──[➕] properties (41437:9)
  │ ├──[➕] properties (41445:9)
  │ ├──[➕] properties (41453:9)
  │ ├──[➕] properties (41499:9)
  │ ├──[➕] properties (41507:9)
  │ ├──[➕] properties (41515:9)
  │ ├──[➕] properties (41457:9)
  │ ├──[➕] properties (41433:9)
  │ ├──[➕] properties (41441:9)
  │ ├──[➕] properties (41449:9)
  │ ├──[➕] properties (41495:9)
  │ ├──[➕] properties (41503:9)
  │ ├──[➕] properties (41511:9)
  │ ├─┬pri.fielddata.evictions
  │ │ └──[🔀] type (41021:13)❌ 
  │ ├─┬pri.get.total
  │ │ └──[🔀] type (41131:13)❌ 
  │ ├─┬pri.indexing.index_time
  │ │ └──[🔀] type (41221:13)❌ 
  │ ├─┬refresh.listeners
  │ │ └──[🔀] type (41356:13)❌ 
  │ ├─┬refresh.time
  │ │ └──[🔀] type (41326:13)❌ 
  │ ├─┬search.fetch_current
  │ │ └──[🔀] type (41366:13)❌ 
  │ ├─┬pri.refresh.external_time
  │ │ └──[🔀] type (41351:13)❌ 
  │ ├─┬segments.index_writer_memory
  │ │ └──[🔀] type (41542:13)❌ 
  │ ├─┬search.open_contexts
  │ │ └──[🔀] type (41396:13)❌ 
  │ ├─┬search.scroll_time
  │ │ └──[🔀] type (41478:13)❌ 
  │ ├─┬pri.request_cache.miss_count
  │ │ └──[🔀] type (41081:13)❌ 
  │ ├─┬request_cache.miss_count
  │ │ └──[🔀] type (41076:13)❌ 
  │ ├─┬suggest.total
  │ │ └──[🔀] type (41622:13)❌ 
  │ ├─┬warmer.total
  │ │ └──[🔀] type (41582:13)❌ 
  │ ├─┬pri.completion.size
  │ │ └──[🔀] type (41001:13)❌ 
  │ ├─┬pri.search.query_time
  │ │ └──[🔀] type (41421:13)❌ 
  │ ├─┬indexing.index_failed
  │ │ └──[🔀] type (41236:13)❌ 
  │ ├─┬pri.merges.total_docs
  │ │ └──[🔀] type (41291:13)❌ 
  │ ├─┬pri.search.open_contexts
  │ │ └──[🔀] type (41401:13)❌ 
  │ ├─┬pri.query_cache.evictions
  │ │ └──[🔀] type (41041:13)❌ 
  │ ├─┬indexing.delete_total
  │ │ └──[🔀] type (41196:13)❌ 
  │ ├─┬query_cache.memory_size
  │ │ └──[🔀] type (41026:13)❌ 
  │ ├─┬segments.fixed_bitset_memory
  │ │ └──[🔀] type (41562:13)❌ 
  │ ├─┬pri.get.missing_total
  │ │ └──[🔀] type (41171:13)❌ 
  │ ├─┬merges.current_size
  │ │ └──[🔀] type (41266:13)❌ 
  │ ├─┬pri.indexing.delete_time
  │ │ └──[🔀] type (41191:13)❌ 
  │ ├─┬pri.warmer.total_time
  │ │ └──[🔀] type (41597:13)❌ 
  │ ├─┬search.query_total
  │ │ └──[🔀] type (41426:13)❌ 
  │ ├─┬pri.indexing.delete_current
  │ │ └──[🔀] type (41181:13)❌ 
  │ ├─┬get.missing_time
  │ │ └──[🔀] type (41156:13)❌ 
  │ ├─┬pri.search.scroll_time
  │ │ └──[🔀] type (41483:13)❌ 
  │ ├─┬pri.refresh.external_total
  │ │ └──[🔀] type (41341:13)❌ 
  │ ├─┬pri.refresh.listeners
  │ │ └──[🔀] type (41361:13)❌ 
  │ ├─┬suggest.time
  │ │ └──[🔀] type (41612:13)❌ 
  │ ├─┬get.time
  │ │ └──[🔀] type (41116:13)❌ 
  │ ├─┬pri.search.scroll_current
  │ │ └──[🔀] type (41473:13)❌ 
  │ ├─┬search.fetch_total
  │ │ └──[🔀] type (41386:13)❌ 
  │ ├─┬pri.get.exists_total
  │ │ └──[🔀] type (41151:13)❌ 
  │ ├─┬pri.merges.total
  │ │ └──[🔀] type (41281:13)❌ 
  │ ├─┬get.total
  │ │ └──[🔀] type (41126:13)❌ 
  │ ├─┬pri.indexing.delete_total
  │ │ └──[🔀] type (41201:13)❌ 
  │ ├─┬pri.merges.current_docs
  │ │ └──[🔀] type (41261:13)❌ 
  │ ├─┬merges.total_time
  │ │ └──[🔀] type (41306:13)❌ 
  │ ├─┬pri.request_cache.hit_count
  │ │ └──[🔀] type (41071:13)❌ 
  │ ├─┬segments.version_map_memory
  │ │ └──[🔀] type (41552:13)❌ 
  │ ├─┬get.missing_total
  │ │ └──[🔀] type (41166:13)❌ 
  │ ├─┬pri.fielddata.memory_size
  │ │ └──[🔀] type (41011:13)❌ 
  │ ├─┬pri.flush.total_time
  │ │ └──[🔀] type (41101:13)❌ 
  │ ├─┬pri.segments.count
  │ │ └──[🔀] type (41527:13)❌ 
  │ ├─┬pri.warmer.total
  │ │ └──[🔀] type (41587:13)❌ 
  │ ├─┬pri.request_cache.evictions
  │ │ └──[🔀] type (41061:13)❌ 
  │ ├─┬indexing.index_current
  │ │ └──[🔀] type (41206:13)❌ 
  │ ├─┬pri.search.query_current
  │ │ └──[🔀] type (41411:13)❌ 
  │ ├─┬pri.segments.version_map_memory
  │ │ └──[🔀] type (41557:13)❌ 
  │ ├─┬refresh.external_time
  │ │ └──[🔀] type (41346:13)❌ 
  │ ├─┬pri.flush.total
  │ │ └──[🔀] type (41091:13)❌ 
  │ ├─┬pri.get.missing_time
  │ │ └──[🔀] type (41161:13)❌ 
  │ ├─┬pri.warmer.current
  │ │ └──[🔀] type (41577:13)❌ 
  │ ├─┬request_cache.memory_size
  │ │ └──[🔀] type (41046:13)❌ 
  │ ├─┬indexing.index_total
  │ │ └──[🔀] type (41226:13)❌ 
  │ ├─┬pri.segments.fixed_bitset_memory
  │ │ └──[🔀] type (41567:13)❌ 
  │ ├─┬pri.request_cache.memory_size
  │ │ └──[🔀] type (41051:13)❌ 
  │ ├─┬indexing.index_time
  │ │ └──[🔀] type (41216:13)❌ 
  │ ├─┬pri.search.fetch_time
  │ │ └──[🔀] type (41381:13)❌ 
  │ ├─┬pri.segments.index_writer_memory
  │ │ └──[🔀] type (41547:13)❌ 
  │ ├─┬completion.size
  │ │ └──[🔀] type (40996:13)❌ 
  │ ├─┬get.current
  │ │ └──[🔀] type (41106:13)❌ 
  │ ├─┬pri.get.time
  │ │ └──[🔀] type (41121:13)❌ 
  │ ├─┬warmer.current
  │ │ └──[🔀] type (41572:13)❌ 
  │ ├─┬search.query_time
  │ │ └──[🔀] type (41416:13)❌ 
  │ ├─┬flush.total
  │ │ └──[🔀] type (41086:13)❌ 
  │ ├─┬indexing.delete_time
  │ │ └──[🔀] type (41186:13)❌ 
  │ ├─┬merges.total_docs
  │ │ └──[🔀] type (41286:13)❌ 
  │ ├─┬merges.total_size
  │ │ └──[🔀] type (41296:13)❌ 
  │ ├─┬request_cache.evictions
  │ │ └──[🔀] type (41056:13)❌ 
  │ ├─┬suggest.current
  │ │ └──[🔀] type (41602:13)❌ 
  │ ├─┬query_cache.evictions
  │ │ └──[🔀] type (41036:13)❌ 
  │ ├─┬pri.get.current
  │ │ └──[🔀] type (41111:13)❌ 
  │ ├─┬pri.merges.current
  │ │ └──[🔀] type (41251:13)❌ 
  │ ├─┬pri.search.fetch_current
  │ │ └──[🔀] type (41371:13)❌ 
  │ ├─┬pri.search.scroll_total
  │ │ └──[🔀] type (41493:13)❌ 
  │ ├─┬pri.suggest.time
  │ │ └──[🔀] type (41617:13)❌ 
  │ ├─┬refresh.external_total
  │ │ └──[🔀] type (41336:13)❌ 
  │ ├─┬warmer.total_time
  │ │ └──[🔀] type (41592:13)❌ 
  │ ├─┬pri.merges.total_size
  │ │ └──[🔀] type (41301:13)❌ 
  │ ├─┬get.exists_total
  │ │ └──[🔀] type (41146:13)❌ 
  │ ├─┬pri.indexing.index_failed
  │ │ └──[🔀] type (41241:13)❌ 
  │ ├─┬pri.merges.current_size
  │ │ └──[🔀] type (41271:13)❌ 
  │ ├─┬pri.segments.memory
  │ │ └──[🔀] type (41537:13)❌ 
  │ ├─┬segments.memory
  │ │ └──[🔀] type (41532:13)❌ 
  │ ├─┬refresh.total
  │ │ └──[🔀] type (41316:13)❌ 
  │ ├─┬request_cache.hit_count
  │ │ └──[🔀] type (41066:13)❌ 
  │ ├─┬indexing.delete_current
  │ │ └──[🔀] type (41176:13)❌ 
  │ ├─┬merges.total
  │ │ └──[🔀] type (41276:13)❌ 
  │ ├─┬search.scroll_current
  │ │ └──[🔀] type (41468:13)❌ 
  │ ├─┬get.exists_time
  │ │ └──[🔀] type (41136:13)❌ 
  │ ├─┬pri.get.exists_time
  │ │ └──[🔀] type (41141:13)❌ 
  │ ├─┬pri.indexing.index_current
  │ │ └──[🔀] type (41211:13)❌ 
  │ ├─┬search.query_current
  │ │ └──[🔀] type (41406:13)❌ 
  │ ├─┬flush.total_time
  │ │ └──[🔀] type (41096:13)❌ 
  │ ├─┬segments.count
  │ │ └──[🔀] type (41522:13)❌ 
  │ ├─┬merges.current_docs
  │ │ └──[🔀] type (41256:13)❌ 
  │ ├─┬search.fetch_time
  │ │ └──[🔀] type (41376:13)❌ 
  │ ├─┬fielddata.memory_size
  │ │ └──[🔀] type (41006:13)❌ 
  │ ├─┬pri.indexing.index_total
  │ │ └──[🔀] type (41231:13)❌ 
  │ ├─┬pri.search.query_total
  │ │ └──[🔀] type (41431:13)❌ 
  │ ├─┬pri.suggest.total
  │ │ └──[🔀] type (41627:13)❌ 
  │ ├─┬merges.current
  │ │ └──[🔀] type (41246:13)❌ 
  │ ├─┬pri.query_cache.memory_size
  │ │ └──[🔀] type (41031:13)❌ 
  │ ├─┬pri.refresh.total
  │ │ └──[🔀] type (41321:13)❌ 
  │ ├─┬fielddata.evictions
  │ │ └──[🔀] type (41016:13)❌ 
  │ ├─┬pri.search.fetch_total
  │ │ └──[🔀] type (41391:13)❌ 
  │ ├─┬pri.merges.total_time
  │ │ └──[🔀] type (41311:13)❌ 
  │ ├─┬pri.suggest.current
  │ │ └──[🔀] type (41607:13)❌ 
  │ ├─┬pri.refresh.time
  │ │ └──[🔀] type (41331:13)❌ 
  │ └─┬search.scroll_total
  │   └──[🔀] type (41488:13)❌ 
  ├─┬cat.recovery:RecoveryRecord
  │ ├─┬stop_time_millis
  │ │ └──[🔀] $ref (29675:20)❌ 
  │ └─┬start_time_millis
  │   └──[🔀] $ref (29675:20)❌ 
  ├─┬cat.shards:ShardsRecord
  │ ├──[➕] properties (42599:9)
  │ ├──[➕] properties (42474:9)
  │ ├──[➕] properties (42462:9)
  │ ├──[➕] properties (42466:9)
  │ ├──[➕] properties (42470:9)
  │ ├──[➕] properties (42493:9)
  │ ├──[➕] properties (42497:9)
  │ ├──[➕] properties (42501:9)
  │ ├──[➕] properties (42505:9)
  │ ├─┬search.scroll_time
  │ │ └──[🔀] type (42486:13)❌ 
  │ ├─┬search.fetch_total
  │ │ └──[🔀] type (42440:13)❌ 
  │ ├─┬indexing.index_total
  │ │ └──[🔀] type (42360:13)❌ 
  │ ├─┬get.exists_total
  │ │ └──[🔀] type (42320:13)❌ 
  │ ├─┬warmer.total_time
  │ │ └──[🔀] type (42562:13)❌ 
  │ ├─┬seq_no.max
  │ │ └──[🔀] type (42537:13)❌ 
  │ ├─┬unassigned.reason
  │ │ └──[🔀] type (42238:13)❌ 
  │ ├─┬search.query_total
  │ │ └──[🔀] type (42460:13)❌ 
  │ ├─┬indexing.delete_current
  │ │ └──[🔀] type (42335:13)❌ 
  │ ├─┬path.state
  │ │ └──[🔀] type (42572:13)❌ 
  │ ├─┬recoverysource.type
  │ │ └──[🔀] type (42260:13)❌ 
  │ ├─┬seq_no.global_checkpoint
  │ │ └──[🔀] type (42547:13)❌ 
  │ ├─┬segments.count
  │ │ └──[🔀] type (42512:13)❌ 
  │ ├─┬warmer.total
  │ │ └──[🔀] type (42557:13)❌ 
  │ ├─┬seq_no.local_checkpoint
  │ │ └──[🔀] type (42542:13)❌ 
  │ ├─┬search.query_current
  │ │ └──[🔀] type (42450:13)❌ 
  │ ├─┬search.fetch_time
  │ │ └──[🔀] type (42435:13)❌ 
  │ ├─┬get.time
  │ │ └──[🔀] type (42305:13)❌ 
  │ ├─┬get.total
  │ │ └──[🔀] type (42310:13)❌ 
  │ ├─┬bulk.avg_size_in_bytes
  │ │ └──[🔀] type (42597:13)❌ 
  │ ├─┬query_cache.evictions
  │ │ └──[🔀] type (42285:13)❌ 
  │ ├─┬get.current
  │ │ └──[🔀] type (42300:13)❌ 
  │ ├─┬search.fetch_current
  │ │ └──[🔀] type (42430:13)❌ 
  │ ├─┬warmer.current
  │ │ └──[🔀] type (42552:13)❌ 
  │ ├─┬segments.index_writer_memory
  │ │ └──[🔀] type (42522:13)❌ 
  │ ├─┬refresh.total
  │ │ └──[🔀] type (42405:13)❌ 
  │ ├─┬merges.current_docs
  │ │ └──[🔀] type (42375:13)❌ 
  │ ├─┬indexing.delete_time
  │ │ └──[🔀] type (42340:13)❌ 
  │ ├─┬bulk.avg_time
  │ │ └──[🔀] type (42592:13)❌ 
  │ ├─┬merges.current_size
  │ │ └──[🔀] type (42380:13)❌ 
  │ ├─┬flush.total
  │ │ └──[🔀] type (42290:13)❌ 
  │ ├─┬flush.total_time
  │ │ └──[🔀] type (42295:13)❌ 
  │ ├─┬unassigned.details
  │ │ └──[🔀] type (42255:13)❌ 
  │ ├─┬refresh.time
  │ │ └──[🔀] type (42410:13)❌ 
  │ ├─┬path.data
  │ │ └──[🔀] type (42567:13)❌ 
  │ ├─┬segments.fixed_bitset_memory
  │ │ └──[🔀] type (42532:13)❌ 
  │ ├─┬refresh.listeners
  │ │ └──[🔀] type (42425:13)❌ 
  │ ├─┬indexing.index_current
  │ │ └──[🔀] type (42350:13)❌ 
  │ ├─┬merges.current
  │ │ └──[🔀] type (42370:13)❌ 
  │ ├─┬completion.size
  │ │ └──[🔀] type (42265:13)❌ 
  │ ├─┬fielddata.evictions
  │ │ └──[🔀] type (42275:13)❌ 
  │ ├─┬get.exists_time
  │ │ └──[🔀] type (42315:13)❌ 
  │ ├─┬refresh.external_time
  │ │ └──[🔀] type (42420:13)❌ 
  │ ├─┬unassigned.for
  │ │ └──[🔀] type (42248:13)❌ 
  │ ├─┬indexing.index_failed
  │ │ └──[🔀] type (42365:13)❌ 
  │ ├─┬id
  │ │ └──[🔀] type (42203:13)❌ 
  │ ├─┬bulk.total_time
  │ │ └──[🔀] type (42582:13)❌ 
  │ ├─┬merges.total_docs
  │ │ └──[🔀] type (42390:13)❌ 
  │ ├─┬indexing.index_time
  │ │ └──[🔀] type (42355:13)❌ 
  │ ├─┬get.missing_total
  │ │ └──[🔀] type (42330:13)❌ 
  │ ├─┬search.query_time
  │ │ └──[🔀] type (42455:13)❌ 
  │ ├─┬bulk.total_operations
  │ │ └──[🔀] type (42577:13)❌ 
  │ ├─┬bulk.total_size_in_bytes
  │ │ └──[🔀] type (42587:13)❌ 
  │ ├─┬search.scroll_total
  │ │ └──[🔀] type (42491:13)❌ 
  │ ├─┬search.open_contexts
  │ │ └──[🔀] type (42445:13)❌ 
  │ ├─┬refresh.external_total
  │ │ └──[🔀] type (42415:13)❌ 
  │ ├─┬search.scroll_current
  │ │ └──[🔀] type (42481:13)❌ 
  │ ├─┬indexing.delete_total
  │ │ └──[🔀] type (42345:13)❌ 
  │ ├─┬merges.total_time
  │ │ └──[🔀] type (42400:13)❌ 
  │ ├─┬sync_id
  │ │ └──[🔀] type (42213:13)❌ 
  │ ├─┬unassigned.at
  │ │ └──[🔀] type (42243:13)❌ 
  │ ├─┬merges.total_size
  │ │ └──[🔀] type (42395:13)❌ 
  │ ├─┬query_cache.memory_size
  │ │ └──[🔀] type (42280:13)❌ 
  │ ├─┬segments.memory
  │ │ └──[🔀] type (42517:13)❌ 
  │ ├─┬get.missing_time
  │ │ └──[🔀] type (42325:13)❌ 
  │ ├─┬fielddata.memory_size
  │ │ └──[🔀] type (42270:13)❌ 
  │ ├─┬merges.total
  │ │ └──[🔀] type (42385:13)❌ 
  │ └─┬segments.version_map_memory
  │   └──[🔀] type (42527:13)❌ 
  └─┬cat.nodes:NodesRecord
    ├──[➕] properties (41935:9)
    ├──[➕] properties (41929:9)
    ├──[➕] properties (41931:9)
    ├──[➕] properties (41933:9)
    ├──[➕] properties (41946:9)
    ├──[➕] properties (41948:9)
    └──[➕] properties (41950:9)

Document Element Total Changes Breaking Changes
components 217 186
  • BREAKING Changes: 186 out of 217
  • Modifications: 186
  • Additions: 31
  • Breaking Modifications: 186

Report

The full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/10700813881/artifacts/1891007874

API Coverage

Before After Δ
Covered (%) 533 (52.2 %) 533 (52.2 %) 0 (0 %)
Uncovered (%) 488 (47.8 %) 488 (47.8 %) 0 (0 %)
Unknown 26 26 0

@dblock dblock merged commit 65f8362 into opensearch-project:main Sep 4, 2024
25 checks passed
Copy link
Contributor

github-actions bot commented Sep 4, 2024

Spec Test Coverage Analysis

Total Tested
559 249 (44.54 %)

@Jakob3xD Jakob3xD deleted the jh-cat branch September 4, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add parameters to Cat API tests
2 participants