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.10.15 #951

Open
davidsmejia opened this issue Nov 13, 2024 · 0 comments
Open

Python 3.10.15 #951

davidsmejia opened this issue Nov 13, 2024 · 0 comments

Comments

@davidsmejia
Copy link
Contributor

Context

Related: #950

Recently the minor version for python 3.10 changed from 3.10.14 to 3.10.15. This causes an error during builds. In order to resolve we pinned the base image to 3.10.14. This shouldn't be necessary so we should determine if this is an issue that we can resolve by installing a dependency before trying to install requirements.

Build Log Output

#10 5.866 Building wheels for collected packages: uwsgi, coreschema
#10 5.867   Building wheel for uwsgi (setup.py): started
#10 13.49   Building wheel for uwsgi (setup.py): finished with status 'error'
#10 13.50   error: subprocess-exited-with-error
#10 13.50   
#10 13.50   × python setup.py bdist_wheel did not run successfully.
#10 13.50   │ exit code: 1
#10 13.50   ╰─> [226 lines of output]
#10 13.50       /usr/local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:264: UserWarning: Unknown distribution option: 'descriptions'
#10 13.50         warnings.warn(msg)
#10 13.50       running bdist_wheel
#10 13.50       running build
#10 13.50       running build_py
#10 13.50       creating build
#10 13.50       creating build/lib
#10 13.50       copying uwsgidecorators.py -> build/lib
#10 13.50       /usr/local/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
#10 13.50         warnings.warn(
#10 13.50       installing to build/bdist.linux-x86_64/wheel
#10 13.50       running install
#10 13.50       using profile: buildconf/default.ini
#10 13.50       detected include path: ['/usr/lib/gcc/x86_64-linux-gnu/12/include', '/usr/local/include', '/usr/include/x86_64-linux-gnu', '/usr/include']
#10 13.50       Patching "bin_name" to properly install_scripts dir
#10 13.50       detected CPU cores: 4
#10 13.50       configured CFLAGS: -O2 -I. -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -DUWSGI_UUID -DUWSGI_VERSION="\"2.0.20\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="20" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -I/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(transformation_offload);UDEP(router_memcached);UDEP(router_redis);UDEP(router_hash);UDEP(router_expires);UDEP(router_metrics);UDEP(transformation_template);UDEP(stats_pusher_socket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(gevent);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);ULEP(spooler);ULEP(cheaper_busyness);ULEP(symcall);ULEP(transformation_tofile);ULEP(transformation_gzip);ULEP(transformation_chunked);ULEP(transformation_offload);ULEP(router_memcached);ULEP(router_redis);ULEP(router_hash);ULEP(router_expires);ULEP(router_metrics);ULEP(transformation_template);ULEP(stats_pusher_socket);"
#10 13.50       *** uWSGI compiling server core ***
#10 13.50       [thread 1][gcc] core/utils.o
#10 13.50       [thread 2][gcc] core/protocol.o
#10 13.50       [thread 3][gcc] core/socket.o
#10 13.50       [thread 0][gcc] core/logging.o
#10 13.50       [thread 2][gcc] core/master.o
#10 13.50       [thread 0][gcc] core/master_utils.o
#10 13.50       [thread 3][gcc] core/emperor.o
#10 13.50       [thread 2][gcc] core/notify.o
#10 13.50       [thread 2][gcc] core/mule.o
#10 13.50       [thread 1][gcc] core/subscription.o
#10 13.50       [thread 0][gcc] core/stats.o
#10 13.50       [thread 2][gcc] core/sendfile.o
#10 13.50       [thread 3][gcc] core/async.o
#10 13.50       [thread 2][gcc] core/master_checks.o
#10 13.50       [thread 0][gcc] core/fifo.o
#10 13.50       [thread 1][gcc] core/offload.o
#10 13.50       [thread 3][gcc] core/io.o
#10 13.50       [thread 0][gcc] core/static.o
#10 13.50       [thread 2][gcc] core/websockets.o
#10 13.50       [thread 1][gcc] core/spooler.o
#10 13.50       [thread 0][gcc] core/snmp.o
#10 13.50       [thread 2][gcc] core/exceptions.o
#10 13.50       [thread 3][gcc] core/config.o
#10 13.50       [thread 1][gcc] core/setup_utils.o
#10 13.50       [thread 0][gcc] core/clock.o
#10 13.50       [thread 2][gcc] core/init.o
#10 13.50       [thread 1][gcc] core/buffer.o
#10 13.50       [thread 0][gcc] core/reader.o
#10 13.50       [thread 3][gcc] core/writer.o
#10 13.50       [thread 2][gcc] core/alarm.o
#10 13.50       [thread 1][gcc] core/cron.o
#10 13.50       [thread 0][gcc] core/hooks.o
#10 13.50       [thread 2][gcc] core/plugins.o
#10 13.50       [thread 3][gcc] core/lock.o
#10 13.50       [thread 1][gcc] core/cache.o
#10 13.50       core/lock.c: In function ‘uwsgi_lock_fast_init’:
#10 13.50       core/lock.c:114:17: warning: ‘pthread_mutexattr_setrobust_np’ is deprecated: pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust [-Wdeprecated-declarations]
#10 13.50         114 |                 if (pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST)) {
#10 13.50             |                 ^~
#10 13.50       In file included from /usr/include/features.h:489,
#10 13.50                        from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
#10 13.50                        from /usr/include/stdio.h:27,
#10 13.50                        from ./uwsgi.h:165,
#10 13.50                        from core/lock.c:1:
#10 13.50       /usr/include/pthread.h:951:12: note: declared here
#10 13.50         951 | extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np,
#10 13.50             |            ^~~~~~~~~~~~~~
#10 13.50       core/lock.c: In function ‘uwsgi_lock_fast’:
#10 13.50       core/lock.c:176:17: warning: ‘pthread_mutex_consistent_np’ is deprecated: pthread_mutex_consistent_np is deprecated, use pthread_mutex_consistent [-Wdeprecated-declarations]
#10 13.50         176 |                 pthread_mutex_consistent((pthread_mutex_t *) uli->lock_ptr);
#10 13.50             |                 ^~~~~~~~~~~~~~~~~~~~~~~~
#10 13.50       /usr/include/pthread.h:859:12: note: declared here
#10 13.50         859 | extern int __REDIRECT_NTH (pthread_mutex_consistent_np, (pthread_mutex_t *),
#10 13.50             |            ^~~~~~~~~~~~~~
#10 13.50       /usr/include/openssl/sha.h:50:27: note: declared here
#10 13.50          50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
#10 13.50             |                           ^~~~~~~~~~~
#10 13.50       core/ssl.c:565:9: warning: ‘SHA1_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
#10 13.50         565 |         SHA1_Final((unsigned char *)dst, &sha);
#10 13.50             |         ^~~~~~~~~~
#10 13.50       /usr/include/openssl/sha.h:51:27: note: declared here
#10 13.50          51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c);
#10 13.50             |                           ^~~~~~~~~~
#10 13.50       core/ssl.c: In function ‘uwsgi_md5’:
#10 13.50       core/ssl.c:571:9: warning: ‘MD5_Init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
#10 13.50         571 |         MD5_Init(&md5);
#10 13.50             |         ^~~~~~~~
#10 13.50       In file included from core/ssl.c:4:
#10 13.50       /usr/include/openssl/md5.h:49:27: note: declared here
#10 13.50          49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
#10 13.50             |                           ^~~~~~~~
#10 13.50       core/ssl.c:572:9: warning: ‘MD5_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
#10 13.50         572 |         MD5_Update(&md5, src, len);
#10 13.50             |         ^~~~~~~~~~
#10 13.50       /usr/include/openssl/md5.h:50:27: note: declared here
#10 13.50          50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
#10 13.50             |                           ^~~~~~~~~~
#10 13.50       core/ssl.c:573:9: warning: ‘MD5_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
#10 13.50         573 |         MD5_Final((unsigned char *)dst, &md5);
#10 13.50             |         ^~~~~~~~~
#10 13.50       /usr/include/openssl/md5.h:51:27: note: declared here
#10 13.50          51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c);
#10 13.50             |                           ^~~~~~~~~
#10 13.50       core/ssl.c: In function ‘uwsgi_sha1_2n’:
#10 13.50       core/ssl.c:579:9: warning: ‘SHA1_Init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
#10 13.50         579 |         SHA1_Init(&sha);
#10 13.50             |         ^~~~~~~~~
#10 13.50       /usr/include/openssl/sha.h:49:27: note: declared here
#10 13.50          49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c);
#10 13.50             |                           ^~~~~~~~~
#10 13.50       core/ssl.c:580:9: warning: ‘SHA1_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
#10 13.50         580 |         SHA1_Update(&sha, s1, len1);
#10 13.50             |         ^~~~~~~~~~~
#10 13.50       /usr/include/openssl/sha.h:50:27: note: declared here
#10 13.50          50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
#10 13.50             |                           ^~~~~~~~~~~
#10 13.50       core/ssl.c:581:9: warning: ‘SHA1_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
#10 13.50         581 |         SHA1_Update(&sha, s2, len2);
#10 13.50             |         ^~~~~~~~~~~
#10 13.50       /usr/include/openssl/sha.h:50:27: note: declared here
#10 13.50          50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
#10 13.50             |                           ^~~~~~~~~~~
#10 13.50       core/ssl.c:582:9: warning: ‘SHA1_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
#10 13.50         582 |         SHA1_Final((unsigned char *)dst, &sha);
#10 13.50             |         ^~~~~~~~~~
#10 13.50       /usr/include/openssl/sha.h:51:27: note: declared here
#10 13.50          51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c);
#10 13.50             |                           ^~~~~~~~~~
#10 13.50       [end of output]
#10 13.50   
#10 13.50   note: This error originates from a subprocess, and is likely not a problem with pip.
#10 13.50   ERROR: Failed building wheel for uwsgi
#10 13.50   Running setup.py clean for uwsgi
#10 13.73   Building wheel for coreschema (setup.py): started
#10 14.03   Building wheel for coreschema (setup.py): finished with status 'done'
#10 14.03   Created wheel for coreschema: filename=coreschema-0.0.4-py3-none-any.whl size=15015 sha256=8fede23f230170cbe3a53a04dcc60ff71dbed41c8e1d54681d3aa3b29622b306
#10 14.03   Stored in directory: /root/.cache/pip/wheels/97/f0/a1/ee57c9b2aaaac2e8867798bbde65749450ddae129085e1393d
#10 14.03 Successfully built coreschema
#10 14.03 Failed to build uwsgi
#10 14.05 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (uwsgi)
#10 ERROR: process "/bin/bash -o pipefail -c pip install -r requirements/prod.txt &&     mkdir -p /tmp/www/static &&     chown user /tmp/www/static" did not complete successfully: exit code: 1
------
 > [5/6] RUN pip install -r requirements/prod.txt &&     mkdir -p /tmp/www/static &&     chown user /tmp/www/static:
13.50   note: This error originates from a subprocess, and is likely not a problem with pip.
13.50   ERROR: Failed building wheel for uwsgi
13.50   Running setup.py clean for uwsgi
13.73   Building wheel for coreschema (setup.py): started
14.03   Building wheel for coreschema (setup.py): finished with status 'done'
14.03   Created wheel for coreschema: filename=coreschema-0.0.4-py3-none-any.whl size=15015 sha256=8fede23f230170cbe3a53a04dcc60ff71dbed41c8e1d54681d3aa3b29622b306
14.03   Stored in directory: /root/.cache/pip/wheels/97/f0/a1/ee57c9b2aaaac2e8867798bbde65749450ddae129085e1393d
14.03 Successfully built coreschema
14.03 Failed to build uwsgi
14.05 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (uwsgi)
------
Dockerfile.prod:16
--------------------
  15 |     COPY requirements requirements
  16 | >>> RUN pip install -r requirements/prod.txt && \
  17 | >>>     mkdir -p /tmp/www/static && \
  18 | >>>     chown user /tmp/www/static
  19 |     
--------------------
ERROR: failed to solve: process "/bin/bash -o pipefail -c pip install -r requirements/prod.txt &&     mkdir -p /tmp/www/static &&     chown user /tmp/www/static" did not complete successfully: exit code: 1
Traceback (most recent call last):
  File "/home/runner/work/scpca-portal/scpca-portal/infrastructure/deploy.py", line 226, in <module>
    docker_code = build_and_push_docker_image(args)
  File "/home/runner/work/scpca-portal/scpca-portal/infrastructure/deploy.py", line 71, in build_and_push_docker_image
    completed_command = subprocess.check_call(
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'build', '--build-arg', 'HTTP_PORT=8081', '--build-arg', 'SYSTEM_VERSION=fc475b0e8a2fed48c2f531c131e66cd0f7ed0f23', '--platform', 'linux/amd64', '--tag', 'ccdlstaging/scpca_portal_api', '-f', 'Dockerfile.prod', '.']' returned non-zero exit status 1.

Problem or idea

We should determine the root cause of this error and address or just skip this minor version and unpin when a newer version is released. A reasonable first place to look would be to see if others using this image are encountering the same issue. I think that it might require installing a python dev package based on a cursory search.

Solution or next step

  • gather more information
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant