ansible-collections / community.kubernetes

Kubernetes Collection for Ansible
https://galaxy.ansible.com/community/kubernetes
GNU General Public License v3.0
265 stars 104 forks source link

CI is currently failing with 'HTTP Error 403: SSL is required' #316

Closed geerlingguy closed 3 years ago

geerlingguy commented 3 years ago
SUMMARY

On the task:

TASK [kubernetes : pip] ********************************************************
task path: /root/ansible/ansible_collections/kubernetes/core/tests/output/.tmp/integration/kubernetes-wcie89oh-ÅÑŚÌβŁÈ/tests/integration/targets/kubernetes/tasks/main.yml:56

There is currently a failure when running pip3 install kubernetes==12.0.0 openshift>=0.9.2 coverage:

    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz
    Traceback (most recent call last):
      File \"/tmp/pip-install-3wtut8x8/coverage_829c0705477d4b52aaf4ebe9b07dcb31/distribute_setup.py\", line 143, in use_setuptools
        raise ImportError
    ImportError

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File \"<string>\", line 1, in <module>
      File \"/tmp/pip-install-3wtut8x8/coverage_829c0705477d4b52aaf4ebe9b07dcb31/setup.py\", line 49, in <module>
        use_setuptools()
      File \"/tmp/pip-install-3wtut8x8/coverage_829c0705477d4b52aaf4ebe9b07dcb31/distribute_setup.py\", line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File \"/tmp/pip-install-3wtut8x8/coverage_829c0705477d4b52aaf4ebe9b07dcb31/distribute_setup.py\", line 124, in _do_download
        to_dir, download_delay)
      File \"/tmp/pip-install-3wtut8x8/coverage_829c0705477d4b52aaf4ebe9b07dcb31/distribute_setup.py\", line 193, in download_setuptools
        src = urlopen(url)
      File \"/usr/lib/python3.6/urllib/request.py\", line 223, in urlopen
        return opener.open(url, data, timeout)
      File \"/usr/lib/python3.6/urllib/request.py\", line 532, in open
        response = meth(req, response)
      File \"/usr/lib/python3.6/urllib/request.py\", line 642, in http_response
        'http', request, response, code, msg, hdrs)
      File \"/usr/lib/python3.6/urllib/request.py\", line 570, in error
        return self._call_chain(*args)
      File \"/usr/lib/python3.6/urllib/request.py\", line 504, in _call_chain
        result = func(*args)
      File \"/usr/lib/python3.6/urllib/request.py\", line 650, in http_error_default
        raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 403: SSL is required
ISSUE TYPE
COMPONENT NAME

CI tests.

geerlingguy commented 3 years ago

Yuck. It looks like that version of distribute is from 2012! https://pypi.org/project/distribute/0.6.27/

geerlingguy commented 3 years ago

Hmm...

INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so.

It keeps resolving back to older and older and older coverage packages until it hits 3.5.3 and explodes.

geerlingguy commented 3 years ago

With the above PR, I'm getting:

The conflict is caused by:
    The user requested kubernetes==12.0.0
    openshift 0.11.2 depends on kubernetes~=11.0.0
    The user requested kubernetes==12.0.0
    openshift 0.11.1 depends on kubernetes~=11.0.0
    The user requested kubernetes==12.0.0
    openshift 0.11.0 depends on kubernetes~=11.0
    The user requested kubernetes==12.0.0
    openshift 0.10.3 depends on kubernetes~=10.0
    The user requested kubernetes==12.0.0
    openshift 0.10.2 depends on kubernetes~=10.0.1
    The user requested kubernetes==12.0.0
    openshift 0.10.1 depends on kubernetes~=10.0.1
    The user requested kubernetes==12.0.0
    openshift 0.10.0 depends on kubernetes~=10.0
    The user requested kubernetes==12.0.0
    openshift 0.9.3 depends on kubernetes~=9.0.0
    The user requested kubernetes==12.0.0
    openshift 0.9.2 depends on kubernetes~=9.0.0

To fix this you could try to:
1. loosen the range of package versions you've specified

It looks like the error is happening in the downstream tests as a result of https://github.com/ansible-collections/community.kubernetes/pull/276 from @jaydesl — @Akasurde do you know of any quick fix? It seems like it could be we need the openshift library to update its own dependencies?

Akasurde commented 3 years ago

@geerlingguy This is due to new pip dependency resolver. We can't install

kubernetes==12.0.0
openshift>=0.9.2
coverage

with this combination we get -

Cannot install kubernetes==12.0.0, openshift==0.10.0, openshift==0.10.1, openshift==0.10.2, openshift==0.10.3, openshift==0.11.0, openshift==0.11.1, openshift==0.11.2, openshift==0.9.2 and openshift==0.9.3 because these package versions have conflicting dependencies.
Akasurde commented 3 years ago

trying option --use-deprecated=legacy-resolver from https://blog.python.org/2020/11/pip-20-3-release-new-resolver.html

geerlingguy commented 3 years ago

@Akasurde - But is there any way to get a resolvable set of dependencies? It seems like that would be a good goal, regardless of how strict Pip wants to be about it.