Skip to content

Regression: localhost.localdomain default breaks name resolution #175

Description

@dhay

Describe the bug
In version 1.2.1, the following update was made:

Fix bug in :meth:pytest_flask.fixtures.live_server where SESSION_COOKIE_DOMAIN was set to false due to original_server_name defaulting to "localhost". The new default is "localhost.localdomain".

This causes issues when we go to make requests to our Flask test server. Specifically we get errors that look like this:

WARNING  urllib3.connectionpool:connectionpool.py:871 Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError("<urllib3.connection.HTTPConnection object at 0x16dd5a4d0>: Failed to resolve 'localhost.localdomain' ([Errno 8] nodename nor servname provided, or not known)")': /graphql

When we make a request to url_for, we get back a URL that looks like http://localhost.localdomain/graphql instead of http://localhost/graphql

While I know I can add localhost.localdomain to my local /etc/hosts file, there are many docker images we're using in our CI pipelines that also do not know how to resolve this domain name.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions