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

Current CI/CD pipeline for Python 3.7 fails because of issue with importlib_metadata and flake8 #348

Closed
fpgmaas opened this issue Oct 4, 2022 · 5 comments

Comments

@fpgmaas
Copy link
Contributor

fpgmaas commented Oct 4, 2022

Example pipeline that fails: https://github.com/rstudio/py-shiny/actions/runs/3183453613

See also relevant issues here and here.

@fpgmaas fpgmaas changed the title Current CI/CD pipeline fails because of issue with importlib_metadata and flake8. Current CI/CD pipeline for Python 3.7 fails because of issue with importlib_metadata and flake8 Oct 4, 2022
@fpgmaas
Copy link
Contributor Author

fpgmaas commented Oct 5, 2022

Tried to fix it with #349, but the issue persists because flake8>5.0.0 is still installed by py-htmltools:
https://github.com/rstudio/py-shiny/actions/runs/3183453613/jobs/5192917088#step:5:21

I opened a Pull Request in py-htmltools as well; posit-dev/py-htmltools#44

@fpgmaas
Copy link
Contributor Author

fpgmaas commented Oct 5, 2022

I figured we don't need to install the full requirements-dev.txt from py-htmltools, but only the wheel package. Therefore I propose the following change: link to diff

However, the issue still persists, because the following command seems to install importlib-metadata 5.0.0 anyway:

python3 -m pip install --force-reinstall dist/shiny*.whl --find-links ../py-htmltools/dist/

see this line in GitHub workflow run

I think the current workflow can use some improvement, because some packages, such as flake8 and importlib-metadata, seem to be installed by a pip install command thrice now.

@fpgmaas
Copy link
Contributor Author

fpgmaas commented Oct 5, 2022

Weirdly enough, after pinning importlib_metadata in setup.cfg, the tests for Python 3.7 succeed, but they fail for 3.8.

workflow run

playwright._impl._api_types.Error: Protocol error (Page.navigate): error in channel "content::page": exception while running method "navigate" in namespace "page": Component returned failure code: 0x804b0013 (NS_ERROR_PORT_ACCESS_NOT_ALLOWED) [nsIWebNavigation.loadURI] _navigate@chrome://juggler/content/content/PageAgent.js:385:14

EDIT: This seems to be an unrelated issue. Workflow run triggered again and now succeeds.

@jcheng5
Copy link
Collaborator

jcheng5 commented Oct 5, 2022

@fpgmaas Yeah, I think the random port number generator just happened to pick a port number that browsers refuse to connect to. I'll fix that.

@fpgmaas
Copy link
Contributor Author

fpgmaas commented Oct 26, 2022

@jcheng5 I will close this issue since the original issue seems to be resolved.

@fpgmaas fpgmaas closed this as completed Oct 26, 2022
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

No branches or pull requests

2 participants