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

Fixed double-writes. #874

Merged
merged 4 commits into from
Dec 20, 2024
Merged

Conversation

AlexLoyko
Copy link
Contributor

@AlexLoyko AlexLoyko commented Dec 19, 2024

Description

  • File is open multiple times and overwritten when generating API modules. Mini-optimization to avoid it.

Issues Resolved

None, self-research

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.

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.45%. Comparing base (ba715b9) to head (06eea03).
Report is 79 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #874      +/-   ##
==========================================
+ Coverage   71.95%   73.45%   +1.50%     
==========================================
  Files          91       77      -14     
  Lines        8001     5658    -2343     
==========================================
- Hits         5757     4156    -1601     
+ Misses       2244     1502     -742     

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

Signed-off-by: Alex Loyko <[email protected]>
Signed-off-by: Alex Loyko <[email protected]>
dblock
dblock previously approved these changes Dec 20, 2024
CHANGELOG.md Outdated
@@ -6,8 +6,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added option to pass custom headers to 'AWSV4SignerAsyncAuth' ([863](https://github.com/opensearch-project/opensearch-py/pull/863))
- Added sync and async sample that uses `search_after` parameter ([859](https://github.com/opensearch-project/opensearch-py/pull/859))
### Updated APIs
- Updated opensearch-py APIs to reflect [opensearch-api-specification@a2afe56](https://github.com/opensearch-project/opensearch-api-specification/commit/a2afe567254c42aee70b74a8d7d7228c982b56db)
Copy link
Member

Choose a reason for hiding this comment

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

This seems unrelated, remove.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

was confused because it auto-popped somehow

@@ -236,7 +236,7 @@ async def test_nowarn_when_test_uses_https_if_verify_certs_is_off(self) -> None:
assert (
str(w[0].message) == "enable_cleanup_closed ignored because "
"https://github.com/python/cpython/pull/118960 is fixed in "
"Python version sys.version_info(major=3, minor=12, micro=7, releaselevel='final', serial=0)"
"Python version sys.version_info(major=3, minor=12, micro=8, releaselevel='final', serial=0)"
Copy link
Member

Choose a reason for hiding this comment

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

This fine, but I'd prefer we fixed it once and for all by checking that the string contains https://github.com/python/cpython/pull/118960 and none of the other stuff.

Signed-off-by: Alex Loyko <[email protected]>
@dblock dblock merged commit 9777ebe into opensearch-project:main Dec 20, 2024
33 checks passed
@dblock
Copy link
Member

dblock commented Dec 20, 2024

@AlexLoyko not sure why, but CI on main failed (and passed here)

Can you please check https://github.com/opensearch-project/opensearch-py/actions/runs/12437036439/job/34726093595? PR fixes.

@AlexLoyko AlexLoyko mentioned this pull request Dec 20, 2024
@AlexLoyko
Copy link
Contributor Author

@dblock Not sure why it's failed suddenly on main (likely something about a version not being pinned), but here's a PR that fixes it: #875. Also, that error was reproduceable on main pre my commit by running nox -rs generate or nox -rs lint (also hadn't appeared before).

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.

2 participants