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

Update python agent, pyhon, streamlit and jupyter quickstarters to 3.11 #924

Merged
merged 15 commits into from
May 30, 2023

Conversation

BraisVQ
Copy link
Contributor

@BraisVQ BraisVQ commented May 29, 2023

Closes #902
Related to #912

Summary:

  • Add Python 3.11 to agent and update packages.
  • Update python quickstarter packages and base image to python 3.11.
  • Update StreamLit quickstarter packages and base image to python 3.11.
  • Update Jupyter quickstarter packages and base image to python 3.11.

Tests:

  • Build agent successfully.
  • New agent allows building successfully with old and new version of Python QS.
  • Example application for Python QS available for both versions.
  • New agent allows building successfully with old and new version of Streamlit QS.
  • Example application for Streamlit QS available for new version.
  • Current/old version of Streamlit pod fails once build (CrashLoopBackOff)
  • Example application for Jupyter QS available for new version.
  • Jupyter Quickstarter does not uses Python agent so no tests needed for it

@BraisVQ BraisVQ added enhancement New feature or request maintenance only for maintenance of components labels May 29, 2023
@BraisVQ BraisVQ requested review from gerardcl and sklingel May 29, 2023 08:36
@BraisVQ
Copy link
Contributor Author

BraisVQ commented May 29, 2023

@sklingel @gerardcl I just did a short test and Streamlit fails with the code that we have right now on master branch but not with the update to python 3.11

Traceback (most recent call last):
File "/opt/app-root/bin/streamlit", line 5, in <module>
from streamlit.web.cli import main
File "/opt/app-root/lib64/python3.9/site-packages/streamlit/__init__.py", line 55, in <module>
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File "/opt/app-root/lib64/python3.9/site-packages/streamlit/delta_generator.py", line 43, in <module>
from streamlit.elements.arrow_altair import ArrowAltairMixin
File "/opt/app-root/lib64/python3.9/site-packages/streamlit/elements/arrow_altair.py", line 36, in <module>
from altair.vegalite.v4.api import Chart
ModuleNotFoundError: No module named 'altair.vegalite.v4'

@BraisVQ BraisVQ marked this pull request as ready for review May 29, 2023 09:27
@BraisVQ BraisVQ changed the title Update python agent and QS to 3.11 Update python agent and pyhon and streamlit quickstarters to 3.11 May 29, 2023
@BraisVQ BraisVQ changed the title Update python agent and pyhon and streamlit quickstarters to 3.11 Update python agent, pyhon and streamlit quickstarters to 3.11 May 29, 2023
@gerardcl
Copy link
Member

hi @braisvq1996 ! awesome!! this is great news! 🚀
Regarding the streamlit issue I would assume it is because of missing dependencies with python 3.9 installation? @sklingel we need your help here.
From my side I would suggest to update also any related README and *.adoc where we describe Python components.
Best,

@BraisVQ
Copy link
Contributor Author

BraisVQ commented May 29, 2023

hi @braisvq1996 ! awesome!! this is great news! 🚀 Regarding the streamlit issue I would assume it is because of missing dependencies with python 3.9 installation? @sklingel we need your help here. From my side I would suggest to update also any related README and *.adoc where we describe Python components. Best,

With the update to python 3.11 Streamlit application no longer breaks. For the issue in 3.9, I did not investigasted as the main objective here was to update ;)

@BraisVQ BraisVQ changed the title Update python agent, pyhon and streamlit quickstarters to 3.11 Update python agent, pyhon, streamlit and jupyter quickstarters to 3.11 May 29, 2023
@@ -115,16 +115,16 @@ The Jenkinsfile is provisioned with this quick starter to ease CI/CD process. In

This quickstarter uses https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/python[Python] builder agent Jenkins builder agent.

**NOTE**: The ODS Jenkins Pytnon Agent supports Python versions 3.9, 3.8 and 3.6. See next chapter for further information.
**NOTE**: The ODS Jenkins Pytnon Agent supports Python versions 3.11, 3.9, 3.8 and 3.6. See next chapter for further information.
Copy link
Member

Choose a reason for hiding this comment

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

I would add here "to avoid/stop using 3.6", or to not even mention it anymore.

Copy link
Member

@gerardcl gerardcl left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@sklingel
Copy link
Contributor

@sklingel @gerardcl I just did a short test and Streamlit fails with the code that we have right now on master branch but not with the update to python 3.11

Traceback (most recent call last):
File "/opt/app-root/bin/streamlit", line 5, in <module>
from streamlit.web.cli import main
File "/opt/app-root/lib64/python3.9/site-packages/streamlit/__init__.py", line 55, in <module>
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File "/opt/app-root/lib64/python3.9/site-packages/streamlit/delta_generator.py", line 43, in <module>
from streamlit.elements.arrow_altair import ArrowAltairMixin
File "/opt/app-root/lib64/python3.9/site-packages/streamlit/elements/arrow_altair.py", line 36, in <module>
from altair.vegalite.v4.api import Chart
ModuleNotFoundError: No module named 'altair.vegalite.v4'

That is really strange, seems like some dependency is broken, when I checked two weeks ago everything was successfully deploying for the promotion test.
Anyway, if it is fixed with python 3.11 I'm more than happy to have this upgrade.

Copy link
Contributor

@sklingel sklingel left a comment

Choose a reason for hiding this comment

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

LGTM

@BraisVQ
Copy link
Contributor Author

BraisVQ commented May 30, 2023

@sklingel @gerardcl I just did a short test and Streamlit fails with the code that we have right now on master branch but not with the update to python 3.11

Traceback (most recent call last):
File "/opt/app-root/bin/streamlit", line 5, in <module>
from streamlit.web.cli import main
File "/opt/app-root/lib64/python3.9/site-packages/streamlit/__init__.py", line 55, in <module>
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File "/opt/app-root/lib64/python3.9/site-packages/streamlit/delta_generator.py", line 43, in <module>
from streamlit.elements.arrow_altair import ArrowAltairMixin
File "/opt/app-root/lib64/python3.9/site-packages/streamlit/elements/arrow_altair.py", line 36, in <module>
from altair.vegalite.v4.api import Chart
ModuleNotFoundError: No module named 'altair.vegalite.v4'

That is really strange, seems like some dependency is broken, when I checked two weeks ago everything was successfully deploying for the promotion test.
Anyway, if it is fixed with python 3.11 I'm more than happy to have this upgrade.

I know that all the tests we did back then we're successful for streamlit with python 3.9
The only thing that might have changed is python version o base image (3.9.6 to 3.9.8 for example)

@BraisVQ BraisVQ merged commit b7a9d82 into opendevstack:master May 30, 2023
@sklingel
Copy link
Contributor

@sklingel @gerardcl I just did a short test and Streamlit fails with the code that we have right now on master branch but not with the update to python 3.11

Traceback (most recent call last):
File "/opt/app-root/bin/streamlit", line 5, in <module>
from streamlit.web.cli import main
File "/opt/app-root/lib64/python3.9/site-packages/streamlit/__init__.py", line 55, in <module>
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File "/opt/app-root/lib64/python3.9/site-packages/streamlit/delta_generator.py", line 43, in <module>
from streamlit.elements.arrow_altair import ArrowAltairMixin
File "/opt/app-root/lib64/python3.9/site-packages/streamlit/elements/arrow_altair.py", line 36, in <module>
from altair.vegalite.v4.api import Chart
ModuleNotFoundError: No module named 'altair.vegalite.v4'

That is really strange, seems like some dependency is broken, when I checked two weeks ago everything was successfully deploying for the promotion test.
Anyway, if it is fixed with python 3.11 I'm more than happy to have this upgrade.

I know that all the tests we did back then we're successful for streamlit with python 3.9 The only thing that might have changed is python version o base image (3.9.6 to 3.9.8 for example)

Seems like a recent break in streamlit: https://discuss.streamlit.io/t/modulenotfounderror-no-module-named-altair-vegalite-v4/42921/12.
I think rather the upgrade of the streamlit version, than the python version bump fixed it.

@BraisVQ BraisVQ deleted the feature/python-311 branch June 21, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maintenance only for maintenance of components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python agent with version 3.11
3 participants