Skip to content

CI failing on Windows. #240

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

Closed
bashtage opened this issue Aug 31, 2022 · 19 comments · Fixed by #241 or #249
Closed

CI failing on Windows. #240

bashtage opened this issue Aug 31, 2022 · 19 comments · Fixed by #241 or #249

Comments

@bashtage
Copy link
Contributor

Describe the bug
loguru is breaking windows

To Reproduce
Run CI on windows

Should use standard logging for now since it is a minimal dependency.

@Dr-Irv Dr-Irv mentioned this issue Aug 31, 2022
1 task
@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Aug 31, 2022

I have a hunch that poetry upgrading is the cause of this issue, so I am trying to pin poetry to a working version. Based on issues reported in github, it seems there are issues with poetry 1.2.0 all over the place.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Aug 31, 2022

I pinned the poetry version and it passed, so trying merging your current versions with latest main and see if it makes CI work @bashtage

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Aug 31, 2022

@Dr-Irv Dr-Irv reopened this Aug 31, 2022
@Dr-Irv Dr-Irv changed the title loguru breaking Windows CI failing on Windows. Aug 31, 2022
@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Aug 31, 2022

Thought that the change to poetry version would work, but still failing.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Aug 31, 2022

It's not loguru. Wrote a test to just run a simple pandas python script, and that is not importing pandas

@bashtage
Copy link
Contributor Author

Could try windows-2019 as host.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Aug 31, 2022

I've simplified it to having something to do with where poetry installs packages . I have a simple workflow now where if I use pip to install pandas (and pandas is the only dependency), and run a testing program that just does a little pandas script, it works. If I have poetry install pandas, it fails.

@twoertwein
Copy link
Member

On mac/linux we have a cached poetry.lock but on windows we do not have a cache hit! Maybe mac/linux would also fail if they have a cache miss?

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Sep 1, 2022

It's still fails if I comment out all the stuff that looks for the cached poetry.lock

@twoertwein
Copy link
Member

It's still fails if I comment out all the stuff that looks for the cached poetry.lock

Yeah, just tested it here https://github.com/pandas-dev/pandas-stubs/runs/8125630234?check_suite_focus=true :(

The weird thing is that poetry's verbose output claims it installs loguru!

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Sep 1, 2022

Take a look at this one https://github.com/Dr-Irv/pandas-stubs/runs/8125585160?check_suite_focus=true

I made the script print out the path to python, called a simple thing to import pandas, and it is not using the python in the poetry virtual environment.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Sep 1, 2022

So it seems if you refer to sys.executable from python, it doesn't pick up the right python, but if I do python testing.py in the workflow, it works. So maybe I do have the paths right with what I am trying (using a github action to install poetry)

@twoertwein
Copy link
Member

So it seems if you refer to sys.executable from python, it doesn't pick up the right python, but if I do python testing.py in the workflow, it works. So maybe I do have the paths right with what I am trying (using a github action to install poetry)

Does that mean it is likely that something about github's windows machines changed? There is no new version of cpython, no new version of loguru, not related to caching, and it also fails with older versions of poetry.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Sep 1, 2022

Does that mean it is likely that something about github's windows machines changed? There is no new version of cpython, no new version of loguru, not related to caching, and it also fails with older versions of poetry.

I tried windows-2019 and got same error. It could be that the setup-python action changed and interacts with poetry in a weird way

@twoertwein
Copy link
Member

There wasn't a recent release of setup-python tools either.

In the meantime, I would feel comfortable merging PRs if the linux/mac tests succeed.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Sep 1, 2022

I think I have it working now with the action for installing poetry.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Sep 1, 2022

Well, it worked if I had changed loguru to using the standard logger, so it seems that poetry is running using the default python, not the python from the virtual env created by poetry. Trying some other ideas

@Dr-Irv Dr-Irv mentioned this issue Sep 1, 2022
1 task
@bashtage
Copy link
Contributor Author

bashtage commented Sep 1, 2022

Why not just disable windows until we think it is working normally? Are there any important scenarios where a windows CI would fail while Linux/OSX would not?

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Sep 1, 2022

Why not just disable windows until we think it is working normally? Are there any important scenarios where a windows CI would fail while Linux/OSX would not?

I've seen it happen for legitimate reasons, possibly due to I/O, but I can't remember.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants