Closed Tenzer closed 1 month ago
Attention: Patch coverage is 83.33333%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 70.32%. Comparing base (
ba715b9
) to head (4be23a6
). Report is 54 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
opensearchpy/_async/client/indices.py | 66.66% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@Tenzer did you happen to go through a diff of other APIs that might have this problem? Maybe there's a way to do this systematically and add tests, including in the generator 🤔 I want to double check before cutting a newer release.
You're welcome! No, I haven't looked through changes to other APIs. I only noticed the issue with put_alias()
because we used that as part of our test code.
I looked at the 2.6.0 - 2.7.0 diff and found one more change in post_dashboards_info
, https://github.com/opensearch-project/opensearch-py/compare/v2.6.0...v2.7.0#diff-d373e8c1b532ced908538444607c89e5a80cfe7a24ef5c81a3708e0fb2cf48fdL2173, I think it's cause it's missing a request body in the spec.
cc: @DarshitChanpura
@dblock this is interesting, post is exposed but doesn't really consume any body for the request. https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/rest/DashboardsInfoAction.java#L94 We only seem to be using get request: https://github.com/opensearch-project/security-dashboards-plugin/blob/main/server/routes/index.ts#L584 https://github.com/opensearch-project/security-dashboards-plugin/blob/main/public/utils/dashboards-info-utils.tsx#L21-L34
Also, could you point the exact line change for post_dashboards_info that might be causing this. https://github.com/opensearch-project/opensearch-py/compare/v2.6.0...v2.7.0#diff-d373e8c1b532ced908538444607c89e5a80cfe7a24ef5c81a3708e0fb2cf48fdL2173 doesn't seem to match any text when searching for "dashboards_info". Maybe I missed something?
@DarshitChanpura Thanks. I think we're all good, since this method doesn't take a body
it was a bug fix.
I am sure where this is evaluated in the client code generator, but you can dig through https://github.com/opensearch-project/opensearch-py/blob/main/utils/generate_api.py.
Description
This solves an issue introduced in v2.7.0 where the argument order of the
indices.put_alias()
method were altered, resulting in a breaking change for any user that called the function without naming the arguments provided.Issues Resolved
Closes #803.
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.