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

Downgrade to python 3.9 #73

Closed

Conversation

AlbertoPimpo
Copy link
Contributor

@AlbertoPimpo AlbertoPimpo commented Nov 23, 2021

After the automatic upgrade to python 3.10 dockerfile doesn't compile properly. It is because the following line in dockerfile that still refers to python 3.9:
RUN cp /usr/local/lib/python3.9/site-packages/bootstrap_italia_template/templates/bootstrap-italia-base.html templates/base-setup.html

If i change it to python 3.10 it still doesn't compile returning the following error:
`=> ERROR [16/18] RUN python manage.py migrate 0.9s

[16/18] RUN python manage.py migrate:
#21 0.884 Traceback (most recent call last):
#21 0.885 File "", line 241, in _call_with_frames_removed
#21 0.885 File "/uniTicket/uni_ticket_project/settings.py", line 24, in
#21 0.885 from . settingslocal import *
#21 0.885 File "/uniTicket/uni_ticket_project/settingslocal.py", line 330, in
#21 0.885 ADDITIONAL_USER_FIELDS = [uni_ticket_settings.EMPLOYEE_ATTRIBUTE_NAME,
#21 0.885 NameError: name 'uni_ticket_settings' is not defined

failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c python manage.py migrate]: exit code: 1`

If I downgrade the version of python to 3.9 (as in the commit of PR) it works properly.

@peppelinux
Copy link
Member

Hi @francesco-filicetti @AlbertoPimpo

I think that we must haev the docker build as a test in CI, do you agree?

name: Docker Image CI

on: [push]

jobs:

  build:

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Build the docker-compose stack
      run: docker-compose up -d
    - name: Check running containers
      run: docker ps -a
    - name: Stop docker compose
      run: docker-compose stop

@AlbertoPimpo
Copy link
Contributor Author

AlbertoPimpo commented Nov 23, 2021

I think it should be also necessary that the docker-compose.yaml actually build the image instead of downloading it like

uniticket:
build:
context: .
dockerfile: Dockerfile
container_name: uniticket
restart: always

otherwise the test will always be verified. I can do a PR for discussing it if you want.

@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2021

Codecov Report

Merging #73 (64150a1) into master (a4bb0d6) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #73   +/-   ##
=======================================
  Coverage   80.64%   80.64%           
=======================================
  Files          13       13           
  Lines        4175     4175           
=======================================
  Hits         3367     3367           
  Misses        808      808           
Flag Coverage Δ
unittests 80.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4bb0d6...64150a1. Read the comment docs.

@peppelinux
Copy link
Member

in v2.0.0 branch I enabled also python 3.10
everything seems to work fine, even the docker image build and run

https://github.com/UniversitaDellaCalabria/uniTicket/blob/v2.0.0/.github/workflows/python-app.yml

May we close this PR or is there something more to discuss to consider this issues still valid to be merged?

@AlbertoPimpo
Copy link
Contributor Author

If Python 3.10 now works, there's no need to downgrade

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.

3 participants