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

[Python 3.9 Upgrade] Docker CI Images update 3.7 to 3.9 (Part 1) #3634

Merged

Conversation

peterzhuamazon
Copy link
Member

Description

[Python 3.9 Update] Docker CI Images update 3.7 to 3.9 (Part 1).

There will be a part2 on the test ci images, this one is related to build ci images.
All the locales are removed to use the default ones:

CentOS7: C/Posix
Ubuntu2004: C/Posix
Rockylinux8: C.UTF-8

Thanks.

Issues Resolved

#3351

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Jun 14, 2023

Codecov Report

Merging #3634 (b23cd26) into main (bbf2bff) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3634   +/-   ##
=======================================
  Coverage   91.48%   91.48%           
=======================================
  Files         181      181           
  Lines        5380     5381    +1     
=======================================
+ Hits         4922     4923    +1     
  Misses        458      458           

see 1 file with indirect coverage changes

@rishabh6788
Copy link
Collaborator

@peterzhuamazon Why don't we move to 3.10? Is it because it has too many breaking changes?

@peterzhuamazon
Copy link
Member Author

@peterzhuamazon Why don't we move to 3.10? Is it because it has too many breaking changes?

Hi @rishabh6788. Python 3.9 has been tested on my local for 1+ months, and it is the default given version on al2023, and easily available on other OSes such as rockylinux8.

It is very stable for several years and it is much more similar to 3.7/3.8 than 3.10.

It is also only a year apart from 3.10 in terms of lts support. So considering all the circumstances it is the best option for us in terms of migration. Thanks.

@rishabh6788
Copy link
Collaborator

Approving assuming the docker images have already been built and tested thoroughly.

@peterzhuamazon
Copy link
Member Author

Approving assuming the docker images have already been built and tested thoroughly.

The process has changes and will build after merge.
Thanks.

@peterzhuamazon
Copy link
Member Author

Need to investigate a bit as the 3.9.17 from custom repo is having some issues when loading libs compares to the 3.9.5 version coming from default universe repo Ubuntu2004.

@peterzhuamazon
Copy link
Member Author

peterzhuamazon commented Jun 15, 2023

Similar to this and missing python-apt as the re-link is messing up with default 3.8 version on Ubuntu2004: https://stackoverflow.com/questions/69949591/modulenotfounderror-no-module-named-apt-pkg-installing-deadsnakes-repository

@peterzhuamazon peterzhuamazon merged commit 9fc03ae into opensearch-project:main Jun 16, 2023
@peterzhuamazon peterzhuamazon deleted the python-3.9-dockerfiles branch June 16, 2023 18:24
@peterzhuamazon
Copy link
Member Author

peterzhuamazon commented Jun 17, 2023

Seeing errors on the python compilation here on arm64:
https://build.ci.opensearch.org/job/docker-build/3474/console

#18 705.0 Exception in thread Thread-1:
#18 705.0 Traceback (most recent call last):
#18 705.0   File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
#18 705.0     self.run()
#18 705.0   File "/usr/local/lib/python3.9/concurrent/futures/process.py", line 323, in run
#18 705.0     self.terminate_broken(cause)
#18 705.0   File "/usr/local/lib/python3.9/concurrent/futures/process.py", line 458, in terminate_broken
#18 705.0     work_item.future.set_exception(bpe)
#18 705.0   File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 549, in set_exception
#18 705.0     raise InvalidStateError('{}: {!r}'.format(self._state, self))
#18 705.0 concurrent.futures._base.InvalidStateError: CANCELLED: <Future at 0x5512854af0 state=cancelled>
#18 705.0 Listing '/usr/local/lib/python3.9/zoneinfo'...
#18 705.0 Traceback (most recent call last):
#18 705.0   File "/usr/local/lib/python3.9/compileall.py", line 459, in <module>
#18 705.0     exit_status = int(not main())
#18 705.0   File "/usr/local/lib/python3.9/compileall.py", line 436, in main
#18 705.0     if not compile_dir(dest, maxlevels, args.ddir,
#18 705.0   File "/usr/local/lib/python3.9/compileall.py", line 112, in compile_dir
#18 705.0     success = min(results, default=True)
#18 705.0   File "/usr/local/lib/python3.9/concurrent/futures/process.py", line 562, in _chain_from_iterable_of_lists
#18 705.0     for element in iterable:
#18 705.0   File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 609, in result_iterator
#18 705.0     yield fs.pop().result()
#18 705.0   File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 446, in result
#18 705.0     return self.__get_result()
#18 705.0   File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
#18 705.0     raise self._exception
#18 705.0 concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

@peterzhuamazon
Copy link
Member Author

Not sure why this is the case, as other 2 centos7 images goes to success, tho this release image is a bit of outlier as it tries to compile openssl 1.1.1 as well as glibc higher versions.

@peterzhuamazon
Copy link
Member Author

@peterzhuamazon
Copy link
Member Author

Seems like if there are two servers running build on the same time it will cause this error, and seems random, it will go away once we have rockylinux8 replace centos7.

@peterzhuamazon
Copy link
Member Author

@peterzhuamazon
Copy link
Member Author

@peterzhuamazon peterzhuamazon changed the title [Python 3.9 Update] Docker CI Images update 3.7 to 3.9 (Part 1) [Python 3.9 Upgrade] Docker CI Images update 3.7 to 3.9 (Part 1) Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

2 participants