Skip to content

SSL Configuration Arguments Not Passed To Async Client #1654

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

Closed
vxuv opened this issue Sep 7, 2023 · 0 comments
Closed

SSL Configuration Arguments Not Passed To Async Client #1654

vxuv opened this issue Sep 7, 2023 · 0 comments
Labels

Comments

@vxuv
Copy link
Contributor

vxuv commented Sep 7, 2023

Describe the bug
The Async API Client is misconfigured and wont handle ssl configuration settings correctly.
Severity: Low

To Reproduce

  1. Pass a proxy to the async datadog api client or pass a have a proxy running on the system.
  2. Disable ssl verification in the configuration. configuration.verify_ssl = False
  3. Run the code

Expected behavior
Expected to not get the ssl verify error after disabling verify ssl in configuration.
configuration.verify_ssl = False

Environment and Versions (please complete the following information):
System: Macbook
Name: datadog-api-client
Version: 2.16.0

import asyncio

from datadog_api_client import ApiClient, AsyncApiClient, Configuration
from datadog_api_client.v1.api.events_api import EventsApi
from datadog_api_client.v1.model.event_create_request import EventCreateRequest

API_KEY = "..."
APPLICATION_KEY = "..."


body = EventCreateRequest(
    title="Example-Event",
    text="A text message.",
    tags=[
        "test:ExampleEvent",
    ],
)

configuration = Configuration(
    api_key={
        "apiKeyAuth": API_KEY,
        "appKeyAuth": APPLICATION_KEY,
    },
)
configuration.verify_ssl = False


async def main() -> None:
    async with AsyncApiClient(configuration) as api_client:
        api_instance = EventsApi(api_client)
        response = await api_instance.create_event(body=body)

        print(response)


if __name__ == "__main__":
    asyncio.run(main())

Pull Request: #1655

@vxuv vxuv added the kind/bug label Sep 7, 2023
@vxuv vxuv changed the title Configuration Arguments Not Passed to Async Client SSL Configuration Arguments Not Passed To Async Client Sep 7, 2023
@vxuv vxuv closed this as completed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant