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

DEVPROD-335: upgrade PyYaml to 6.0+ to fix cython_sources issue #44

Merged
merged 6 commits into from
Nov 1, 2023

Conversation

ubatmongo
Copy link
Collaborator

Ticket

DEVPROD-335

What

Following error appeared while setting up remote workstation

:warning:  Note: pipx was already on your PATH at /home/ubuntu/tmp-pipx-venv/bin/pipx
done! :sparkles: :star2: :sparkles:
  installed package pipx 1.2.1, installed using Python 3.10.4
  These apps are now globally available
    - pipx
################################################################################
Installing 'evg-module-manager' command...
creating virtual environment...
creating shared libraries...
upgrading shared libraries...
installing evg-module-manager...
Fatal error from pip prevented installation. Full pip output in file:
    /home/ubuntu/.local/pipx/logs/cmd_2023-10-31_13.44.50_pip_errors.log

pip seemed to fail to build package:
    PyYAML<6.0.0,>=5.4.1

Some possibly relevant errors from pip install:
    error: subprocess-exited-with-error
    AttributeError: cython_sources
Error installing evg-module-manager.

You may need to accept an email invite to receive access to repo 'mongodb/mongo'
running command 2 of 2 to provision project 'mongodb-mongo-master': error waiting on process 'dec3c8bd-f3db-43b4-9dfd-7322b759975f': exit status 1

This is happening during remote workstation setup

This came from evg-module-manager which still points to PyYAML 5.4.1. This version has known issue with new cython version. Previous issues with similar fixes

Upgraded the PyYaml to 6.0.1 to fix this issue

Tests done

  • ran poetry install
  • ran poetry run pytest (ended with mypy error)

@ubatmongo ubatmongo requested review from a team, zituo-jin, IamXander and ablack12 and removed request for a team October 31, 2023 19:03
@ablack12 ablack12 removed their request for review October 31, 2023 19:29
@ubatmongo ubatmongo requested review from a user and juangugit October 31, 2023 22:25
pyproject.toml Outdated
@@ -21,7 +21,7 @@ click = "^8"
plumbum = "^1.7.0"
Inject = "^4.3.1"
structlog = "^21.1.0"
PyYAML = "^5.4.1"
PyYAML = "6.0.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason that we pin this specific version (not a range)?

Choose a reason for hiding this comment

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

+1. I think this should be PyYAML = "^6.0.1"

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@@ -33,6 +33,7 @@ pytest = "^7.0"
black = "^22.3"
pytest-black = "^0.3"
pytest-cov = "^2.8"
importlib_metadata = "^4.13"

Choose a reason for hiding this comment

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

Why did you add this as a dependency?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The flake8 tests were failing https://parsley.mongodb.com/test/evg_module_manager_macos_1014_unit_tests_3.7_patch_832639cf64eb0c4d086506089a24f8f4ba839a2a_65416ad5d6d80a87a8ae8320_23_10_31_21_00_06/0/7b09f16a3440bb7e229b21e73629877f?bookmarks=0,25&shareLine=1

This error happens as flake8 depends on a older version of importlib_metadata
python/importlib_metadata#406

The way to avoid this error was to either comment the tests out or downgrade the library.

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.

4 participants