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

tests: Replace "localhost" domain name with the equivalent IPv4 address #678

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

eskultety
Copy link
Member

@eskultety eskultety commented Oct 7, 2024

It's common that "localhost" translates with both IPv4 and IPv6. The simple containerized test PyPI server we use in our CI doesn't listen on IPv6 which may cause unpredictable issues on hosts where IPv6 is enabled and IPv6 would get prioritized by the low level network stack connection primitives. Therefore, use an IP explicitly to avoid any potential issues during pytest run, e.g.:

DEBUG Starting new HTTP connection (1): localhost:8080
DEBUG ('Connection aborted.',
       ConnectionResetError(104, 'Connection reset by peer'))

PR depends on: cachito-testing/cachi2-pip-custom-index#1

Maintainers will complete the following section

  • Commit messages are descriptive enough
  • Code coverage from testing does not decrease and new code is covered
  • Docs updated (if applicable)
  • Docs links in the code are still valid (if docs were updated)

Note: if the contribution is external (not from an organization member), the CI
pipeline will not run automatically. After verifying that the CI is safe to run:

Copy link
Member

@ben-alkov ben-alkov left a comment

Choose a reason for hiding this comment

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

  1. Did you mean to use your clone of cachito-testing-cachi2-pip-custom-index?
  2. Should we make the local v4 IP a global (instead of hardcoding everywhere)?

Otherwise, LGTM

@eskultety
Copy link
Member Author

2. Should we make the local v4 IP a global (instead of hardcoding everywhere)?

I can create a global variable for that if desired.

@eskultety
Copy link
Member Author

Integration tests for pip passed (the failures are unrelated), so I'm going to merge cachito-testing/cachi2-pip-custom-index@e3916a8, update this one and hopefully merge so that no other PRs are disrupted by the change in tests.

It's common that "localhost" translates with both IPv4 and IPv6. The
simple containerized test PyPI server we use in our CI doesn't listen
on IPv6 which may cause unpredictable issues on hosts where IPv6 is
enabled and IPv6 would get prioritized by the low level network stack
connection primitives. Therefore, use an IP explicitly to avoid any
potential issues during pytest run, e.g.:

    DEBUG Starting new HTTP connection (1): localhost:8080
    DEBUG ('Connection aborted.',
           ConnectionResetError(104, 'Connection reset by peer'))

Signed-off-by: Erik Skultety <[email protected]>
@eskultety eskultety added this pull request to the merge queue Oct 7, 2024
Merged via the queue into containerbuildsystem:main with commit b289c91 Oct 7, 2024
14 of 15 checks passed
@eskultety eskultety deleted the pypi_server_fixes branch October 8, 2024 10:21
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.

4 participants