opensearch-project / opensearch-go

Go Client for OpenSearch
https://opensearch.org/docs/latest/clients/go/
Apache License 2.0
188 stars 96 forks source link

Add missing failure fields in opensearchapi structs #510

Closed Jakob3xD closed 2 months ago

Jakob3xD commented 3 months ago

Description

Add missing failure fields in opensearchapi structs displayed by errors: https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:79 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:206 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:211 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:425 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:564 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:647 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:877 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:890 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:911 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:918 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:925 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:940 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:949 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:957 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:965 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:980 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:1197 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:1215 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:1237 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:1255 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:1466 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:1486 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:1497 https://github.com/opensearch-project/opensearch-go/actions/runs/8560050080/job/23458155375#step:7:1510

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

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.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 63.24%. Comparing base (06a6dc8) to head (a1b6fd0). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #510 +/- ## ========================================== + Coverage 57.29% 63.24% +5.94% ========================================== Files 315 315 Lines 9823 7715 -2108 ========================================== - Hits 5628 4879 -749 + Misses 2902 1550 -1352 + Partials 1293 1286 -7 ``` | [Flag](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | Coverage Δ | | |---|---|---| | [integration](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `55.78% <ø> (+4.94%)` | :arrow_up: | | [unit](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `81.45% <ø> (+68.60%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | Coverage Δ | | |---|---|---| | [opensearchapi/api\_bulk.go](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510?src=pr&el=tree&filepath=opensearchapi%2Fapi_bulk.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-b3BlbnNlYXJjaGFwaS9hcGlfYnVsay5nbw==) | `100.00% <ø> (ø)` | | | [opensearchapi/api\_cat-nodeattrs.go](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510?src=pr&el=tree&filepath=opensearchapi%2Fapi_cat-nodeattrs.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-b3BlbnNlYXJjaGFwaS9hcGlfY2F0LW5vZGVhdHRycy5nbw==) | `100.00% <ø> (ø)` | | | [opensearchapi/api\_cat-nodes.go](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510?src=pr&el=tree&filepath=opensearchapi%2Fapi_cat-nodes.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-b3BlbnNlYXJjaGFwaS9hcGlfY2F0LW5vZGVzLmdv) | `100.00% <ø> (ø)` | | | [opensearchapi/api\_cluster-stats.go](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510?src=pr&el=tree&filepath=opensearchapi%2Fapi_cluster-stats.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-b3BlbnNlYXJjaGFwaS9hcGlfY2x1c3Rlci1zdGF0cy5nbw==) | `100.00% <ø> (ø)` | | | [opensearchapi/api\_datastream-stats.go](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510?src=pr&el=tree&filepath=opensearchapi%2Fapi_datastream-stats.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-b3BlbnNlYXJjaGFwaS9hcGlfZGF0YXN0cmVhbS1zdGF0cy5nbw==) | `100.00% <ø> (ø)` | | | [...archapi/api\_document-delete\_by\_query\_rethrottle.go](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510?src=pr&el=tree&filepath=opensearchapi%2Fapi_document-delete_by_query_rethrottle.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-b3BlbnNlYXJjaGFwaS9hcGlfZG9jdW1lbnQtZGVsZXRlX2J5X3F1ZXJ5X3JldGhyb3R0bGUuZ28=) | `100.00% <ø> (ø)` | | | [opensearchapi/api\_indices-block.go](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510?src=pr&el=tree&filepath=opensearchapi%2Fapi_indices-block.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-b3BlbnNlYXJjaGFwaS9hcGlfaW5kaWNlcy1ibG9jay5nbw==) | `100.00% <ø> (ø)` | | | [opensearchapi/api\_indices-cache.go](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510?src=pr&el=tree&filepath=opensearchapi%2Fapi_indices-cache.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-b3BlbnNlYXJjaGFwaS9hcGlfaW5kaWNlcy1jYWNoZS5nbw==) | `100.00% <ø> (ø)` | | | [opensearchapi/api\_indices-close.go](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510?src=pr&el=tree&filepath=opensearchapi%2Fapi_indices-close.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-b3BlbnNlYXJjaGFwaS9hcGlfaW5kaWNlcy1jbG9zZS5nbw==) | `100.00% <ø> (ø)` | | | [opensearchapi/api\_indices-flush.go](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510?src=pr&el=tree&filepath=opensearchapi%2Fapi_indices-flush.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-b3BlbnNlYXJjaGFwaS9hcGlfaW5kaWNlcy1mbHVzaC5nbw==) | `100.00% <ø> (ø)` | | | ... and [14 more](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | | ... and [229 files with indirect coverage changes](https://app.codecov.io/gh/opensearch-project/opensearch-go/pull/510/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project)
Jakob3xD commented 3 months ago

I am not sure how I can setup a broken Opensearch to test this in a practical way.