Project

General

Profile

Actions

Bug #63591

open

mgr/dashboard: pyyaml==6.0 installation fails with "AttributeError: cython_sources"

Added by Brad Hubbard 5 months ago. Updated about 2 months ago.

Status:
Fix Under Review
Priority:
High
Assignee:
Category:
Build, CI, Dependencies & Tools
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Description of problem

pyyaml==6.0 installation fails with "AttributeError: cython_sources" and is an instance of https://github.com/yaml/pyyaml/issues/601

Environment

  • ceph version string: v18.0.0-7432-g329e2a1e046
  • Platform (OS/distro/release): Fedora 39
  • Cluster details (nodes, monitors, OSDs): N/A
  • Did it happen on a stable environment or after a migration/upgrade?: N/A
  • Browser used (e.g.: Version 86.0.4240.198 (Official Build) (64-bit)): N/A

How reproducible

100%

Steps:

Create a new fedora 39 environment and run install-deps.sh

Actual results

+ pip --timeout 300 --exists-action i wheel -w wheelhouse-wip -r requirements-alerts.txt -r requirements-grafonnet.txt -r requirements-lint.txt                                                                                             
Collecting pyyaml==6.0 (from -r requirements-alerts.txt (line 1))                                                                                                                                                                           
  Downloading PyYAML-6.0.tar.gz (124 kB)                                                                                                                                                                                                    
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.0/125.0 kB 252.3 kB/s eta 0:00:00                                                                                                                                                         
  Installing build dependencies ... done                                                                                                                                                                                                    
  Getting requirements to build wheel ... error
...
        File "/tmp/pip-build-env-t3m5whfk/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__                                                                                                      
          raise AttributeError(attr)                                                                                                                                                                                                        
      AttributeError: cython_sources                                                                                                                                                                                                        
      [end of output]                                                                                                                                                                                                                       

  note: This error originates from a subprocess, and is likely not a problem with pip.                                
error: subprocess-exited-with-error 

Expected results

Successful completion of install-deps.sh

Additional info

The following patch resolves the failure in install-deps.sh and allows it to complete but has not been validated in any other way.

diff --git a/install-deps.sh b/install-deps.sh
index d01bc6464e6..1d6ba5b8cbf 100755
--- a/install-deps.sh
+++ b/install-deps.sh
@@ -304,7 +304,8 @@ function populate_wheelhouse() {
     pip $PIP_OPTS $install \
       'setuptools >= 0.8' 'pip >= 21.0' 'wheel >= 0.24' 'tox >= 2.9.1' || return 1
     if test $# != 0 ; then
-        pip $PIP_OPTS $install $@ || return 1
+        echo "cython<3" > /tmp/constraint.txt
+        PIP_CONSTRAINT=/tmp/constraint.txt pip $PIP_OPTS $install $@ || return 1
     fi
 }


Related issues 1 (0 open1 closed)

Has duplicate Ceph - Bug #63603: install-deps.sh fails with 'AttributeError: cython_sources'Duplicate

Actions
Actions #1

Updated by Nizamudeen A 5 months ago

Hi Brad,

To test this, I started a docker container with f39 docker run -it -v $PWD:/ceph fedora:39 bash and ran the install-deps script, it didn't gave any error. It just ran an finished without any issues.

Actions #2

Updated by Brad Hubbard 5 months ago

Indeed, so try this.

Make sure you clear the install cache in your repo from your last run.


$ podman run -it --rm -v.:/working:z fedora:39
# dnf install -y python3-cython
# cd working
# /.install-deps.sh
Actions #3

Updated by Pedro González Gómez 5 months ago

Hello!

I tried it myself and looks encountered the same issue as Brad, the proposed fix also seems to work, as it solved the issue, thank you Brad for pointing this out.

I'll open a PR to address the changes

Actions #4

Updated by Pedro González Gómez 4 months ago

  • Pull request ID set to 55140
Actions #5

Updated by Brad Hubbard about 2 months ago

  • Has duplicate Bug #63603: install-deps.sh fails with 'AttributeError: cython_sources' added
Actions #6

Updated by Brad Hubbard about 2 months ago

  • Status changed from New to Fix Under Review
  • Pull request ID changed from 55140 to 56014
Actions #7

Updated by Brad Hubbard about 2 months ago

  • Assignee set to Brad Hubbard
Actions

Also available in: Atom PDF