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

trust_env to the aiohttp.ClientSession #372

Closed
wants to merge 7 commits into from
Closed

trust_env to the aiohttp.ClientSession #372

wants to merge 7 commits into from

Conversation

Temirlan-qa
Copy link

Description

Passed trust_env=True to the aiohttp.ClientSession

Issues Resolved
closes #368

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.

@dblock
Copy link
Member

dblock commented Apr 19, 2023

Please sign DCO (amend the commit with -s) and add a unit test?

@margulanz
Copy link

It was already done in this pull request #370

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.

Split up unrelated changes and it's good to go.

uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./junit/opensearch-py-codecov.xml
Copy link
Member

Choose a reason for hiding this comment

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

These changes here seem unrelated. Make a separate PR to fix codecov?

@@ -5,6 +5,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Added
- Added async support for helpers that are merged from opensearch-dsl-py ([#329](https://github.com/opensearch-project/opensearch-py/pull/329))
### Changed
- Upgrading pytest-asyncio to latest version - 0.21.0 ([#339](https://github.com/opensearch-project/opensearch-py/pull/339))
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated as well.

@@ -97,6 +97,27 @@ def test_opaque_id(self):
con = AIOHttpConnection(opaque_id="app-1")
assert con.headers["x-opaque-id"] == "app-1"

def test_trust_env(self):
Copy link
Member

Choose a reason for hiding this comment

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

Add a test for defaults if we don't have one yet, test_async_opensearch_default_options, and one that changes all the options test_async_opensearch_options.

assert con.session.connector.trust_env

async def test_async_opensearch_trust_env(self):
# Create an instance of AsyncOpenSearch with trust_env set to True
Copy link
Member

Choose a reason for hiding this comment

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

To be nitpicky, the comments are incorrect, because the test actually sets other options too, which they don't mention.

I think they are simply unnecessary as the test and the code is self-explanatory. Would just remove to avoid being out of sync with the code.

test-linux:
strategy:
fail-fast: false
matrix:
python-version: ['2.7', '3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ["2.7", "3.7", "3.8", "3.9", "3.10", "3.11"]

Choose a reason for hiding this comment

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

I think these changes are unrelated.

@saimedhi
Copy link
Collaborator

saimedhi commented May 1, 2023

Hello, @Temirlan-qa. Please fix the CI tests that are failing. If you have too many merge conflicts, you can also close this pull request and create a PR on a new branch that is in sync with the upstream source. Include only the changes that are relevant to the issue.

@saimedhi
Copy link
Collaborator

Hello @Temirlan-qa, Closing this pull request as it appears to be merged in PR #438

@saimedhi saimedhi closed this Jul 19, 2023
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.

Allow passing trust_env to aiohttp.ClientSession
6 participants