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

Skip elements with titles. #777

Merged
merged 5 commits into from
Jul 18, 2024
Merged

Conversation

dblock
Copy link
Member

@dblock dblock commented Jul 16, 2024

Description

A workaround for the change in opensearch-project/opensearch-api-specification#416 to avoid adding node_id_or_metric. With opensearch-project/opensearch-api-specification#434 the only API tests that need to be skipped are those that catch an error (missing index parameters). These fail as expected on the client side.

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.

@saimedhi
Copy link
Collaborator

@dblock, Please take a look at the failing tests. Thank you.

@dblock
Copy link
Member Author

dblock commented Jul 17, 2024

The failure is unrelated caused by opensearch-project/OpenSearch@29a3e2c. The put_alias method doesn't actually require index or alias, which can be specified in the body. The tests added in that PR do that.

What's the right way to fix this @saimedhi? Where do I remove the fact that these parameters are required and can default to None?

@saimedhi
Copy link
Collaborator

The failure is unrelated caused by opensearch-project/OpenSearch@29a3e2c. The put_alias method doesn't actually require index or alias, which can be specified in the body. The tests added in that PR do that.

What's the right way to fix this @saimedhi? Where do I remove the fact that these parameters are required and can default to None?

Hi @dblock, for path params they can be changed here

@dblock
Copy link
Member Author

dblock commented Jul 18, 2024

#778

Signed-off-by: dblock <dblock@amazon.com>
@dblock dblock marked this pull request as draft July 18, 2024 17:11
dblock added 3 commits July 18, 2024 13:14
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.40%. Comparing base (ba715b9) to head (5a5174b).
Report is 36 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #777      +/-   ##
==========================================
+ Coverage   71.95%   73.40%   +1.44%     
==========================================
  Files          91       67      -24     
  Lines        8001     5339    -2662     
==========================================
- Hits         5757     3919    -1838     
+ Misses       2244     1420     -824     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dblock dblock marked this pull request as ready for review July 18, 2024 17:56
@saimedhi saimedhi merged commit 1ef788a into opensearch-project:main Jul 18, 2024
63 checks passed
@dblock dblock deleted the skip-titles branch July 18, 2024 22:57
dblock added a commit to dblock/opensearch-py that referenced this pull request Aug 15, 2024
* Skip elements with titles.

Signed-off-by: dblock <dblock@amazon.com>

* Simplify and just skip by ref.

Signed-off-by: dblock <dblock@amazon.com>

* Re-generate API spec.

Signed-off-by: dblock <dblock@amazon.com>

* Do not skip alias tests.

Signed-off-by: dblock <dblock@amazon.com>

* Actually skip node_id_or_metric.

Signed-off-by: dblock <dblock@amazon.com>

---------

Signed-off-by: dblock <dblock@amazon.com>
Comment on lines -864 to +869
index: Any,
name: Any,
body: Any = None,
index: Any = None,
name: Any = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI: This is a breaking change for anybody that were calling the method without naming the arguments.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like a miss :(

Care to open a bug, or if you have time fix the code generator?

Copy link
Contributor

Choose a reason for hiding this comment

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

The number of users affected by this is probably limited, but perhaps it's worth calling it out in the release notes?

Copy link
Contributor

Choose a reason for hiding this comment

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

I have made a bug for it here: #803.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skips changelog verifier
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants