Skip to content

Need update flask version, the old version have error on s390x#1

Merged
kadel merged 1 commit into
odo-devfiles:masterfrom
xkwangcn:master
Mar 16, 2022
Merged

Need update flask version, the old version have error on s390x#1
kadel merged 1 commit into
odo-devfiles:masterfrom
xkwangcn:master

Conversation

@xkwangcn

Copy link
Copy Markdown
Contributor

I trying this on s390x, but seems not only the issue for s390x, so I create the PR. Maybe you need try it on x86 platform about this issue.
With Flask=1.1.2, when do odo push, have the following error:

[odo@a04931b0508f python]$ odo push -f
 ✓  Waiting for Kubernetes resources [114ms]
 ✓  Syncing files into the container [631ms]
 ✓  Building your application in container on cluster [2s]
 ✓  Executing the application [1s]
 ⚠  devfile command "run-app" exited with error status within 1 sec
Last 20 lines of the component's log:
time="2022-03-16T02:37:30Z" level=info msg="force to kill the program" program=debugrun 
time="2022-03-16T02:37:30Z" level=debug msg="no auth required" 
time="2022-03-16T02:37:30Z" level=debug msg="succeed to find process:devrun" 
time="2022-03-16T02:37:30Z" level=info msg="try to start program" program=devrun 
time="2022-03-16T02:37:30Z" level=info msg="success to start program" program=devrun 
ODO_COMMAND_RUN is python app.py
Changing directory to ${PROJECT_SOURCE}
Executing command cd ${PROJECT_SOURCE} && python app.py
Traceback (most recent call last):
  File "app.py", line 1, in <module>
    from flask import Flask
  File "/home/jboss/.local/lib/python3.8/site-packages/flask/__init__.py", line 19, in <module>
    from . import json
  File "/home/jboss/.local/lib/python3.8/site-packages/flask/json/__init__.py", line 15, in <module>
    from itsdangerous import json as _json
ImportError: cannot import name 'json' from 'itsdangerous' (/home/jboss/.local/lib/python3.8/site-packages/itsdangerous/__init__.py)
time="2022-03-16T02:37:31Z" level=debug msg="wait program exit" program=devrun 
time="2022-03-16T02:37:31Z" level=error msg="program stopped with error:exit status 1" program=devrun 
time="2022-03-16T02:37:31Z" level=info msg="Don't start the stopped program because its retry times 0 is greater than start retries 0" program=devrun 
To get the full log output, please run 'odo log'

Pushing devfile component "my-python"
 ✓  Changes successfully pushed to component

Then update it to Flask=2.0.3, do odo push again, it working fine.

[odo@a04931b0508f python]$ odo push -f
 ✓  Waiting for Kubernetes resources [126ms]
 ✓  Syncing files into the container [604ms]
 ✓  Building your application in container on cluster [2s]
 ✓  Executing the application [1s]

Pushing devfile component "my-python"
 ✓  Changes successfully pushed to component

@kadel

kadel commented Mar 16, 2022

Copy link
Copy Markdown
Contributor

thank you @xkwangcn for this PR

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.

2 participants