netsec-ethz / scionlab

SCIONLab user interface and administration
https://www.scionlab.org
Apache License 2.0
9 stars 16 forks source link

Update Django version #426

Closed FR4NK-W closed 2 years ago

FR4NK-W commented 2 years ago

Update Django minor version and other pip requirements


This change is Reviewable

FR4NK-W commented 2 years ago

@matzf Thanks for the hint, but even running pip-compile on the exact same version the CI image is using does not seem to work:

circleci@adc0672f53f4:/tmp$ python --version                                                                                                                             
Python 3.6.13

circleci@adc0672f53f4:/tmp$ head -n1 requirements.in
Django>=3.2.15,<4.0

circleci@adc0672f53f4:/tmp$ pip-compile --generate-hashes --output-file=requirements.txt requirements.in                                                                 
  ERROR: Could not find a version that satisfies the requirement asgiref==3.5.2 (from django==3.2.15->-r requirements.in (line 1)) (from versions: 0.8, 0.9, 0.9.1[0/802]0, 0.11.0, 0.11.1, 0.11.2, 0.12.0, 0.12.1, 0.13.0, 0.13.2, 0.13.3, 0.14.0, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.2.0, 2.3.0, 2.3.1, 2.3.2, 3.0.0, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.4.0, 3.4.1)
Traceback (most recent call last):                                                                                              
  File "/home/circleci/.pyenv/versions/3.6.13/bin/pip-compile", line 11, in <module>                                                                                         sys.exit(cli())                                                                 
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/click/core.py", line 1128, in __call__                
    return self.main(*args, **kwargs)                                                                                                                       
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/click/core.py", line 1053, in main                    
    rv = self.invoke(ctx)                                                                                                                                   
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/click/core.py", line 1395, in invoke                  
    return ctx.invoke(self.callback, **ctx.params)                                                                                                          
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/click/core.py", line 754, in invoke                                    
    return __callback(*args, **kwargs)                                                                                                          
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/click/decorators.py", line 26, in new_func                          
    return f(get_current_context(), *args, **kwargs)                                                                                          
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/piptools/scripts/compile.py", line 466, in cli                      
    results = resolver.resolve(max_rounds=max_rounds)                                                                                                       
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/piptools/resolver.py", line 175, in resolve                         
    has_changed, best_matches = self._resolve_one_round()                                                                                                   
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/piptools/resolver.py", line 319, in _resolve_one_round                 
    their_constraints.extend(self._iter_dependencies(best_match))                                                                                           
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/piptools/resolver.py", line 428, in _iter_dependencies                            
    dependencies = self.repository.get_dependencies(ireq)                                                                                                   
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/piptools/repositories/local.py", line 79, in get_dependencies                     
    return self.repository.get_dependencies(ireq)                                                                                                           
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/piptools/repositories/pypi.py", line 237, in get_dependencies                                      download_dir, ireq, wheel_cache                                                                                                                                        File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/piptools/repositories/pypi.py", line 199, in resolve_reqs                                          results = resolver._resolve_one(reqset, ireq)                                   
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/pip/_internal/resolution/legacy/resolver.py", line 379, in _resolve_one                            dist = self._get_dist_for(req_to_install)                                                                                                                              File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/pip/_internal/resolution/legacy/resolver.py", line 331, in _get_dist_for                           self._populate_link(req)                                                                                                                                               File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/pip/_internal/resolution/legacy/resolver.py", line 300, in _populate_link                          req.link = self._find_requirement_link(req)                                     
  File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/pip/_internal/resolution/legacy/resolver.py", line 266, in _find_requirement_link                  best_candidate = self.finder.find_requirement(req, upgrade)                                                                                                            File "/home/circleci/.pyenv/versions/3.6.13/lib/python3.6/site-packages/pip/_internal/index/package_finder.py", line 910, in find_requirement                              "No matching distribution found for {}".format(req)                                                                                                     
pip._internal.exceptions.DistributionNotFound: No matching distribution found for asgiref==3.5.2 (from django==3.2.15->-r requirements.in (line 1))
circleci@adc0672f53f4:/tmp$

This version is not compatible with python 3.6, and I think this is what's causing the problems. If you run pip-compile on a python 3.6, it seems to only update django and not any of the other dependencies.

Could you share for which exact python3.6 minor version and which version of pip-tools (6.4.0 produces the output above) it only updated django for you?

FR4NK-W commented 2 years ago

Well, that was 'fun'. Looks like a bug in pip-compile. I don't think it is worth to investigate for an old version of python3.6 where the difference comes from and why it only occurs in the circleci python image.

@matzf Do you want to have a look if you are happy with how the dependencies were resolved?

The CS in the integration test is now complaining about a missing /etc/scion/staticInfoConfig.json , but that's unrelated. (Running the circleci jobs with a console attached still doesn't work like it used to, and this clearly isn't the right solution: https://discuss.circleci.com/t/unable-to-ssh-into-machine-executor-environment/45358/2)

FR4NK-W commented 2 years ago

@matzf ^ rebased