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

build: switched to using poetry for make build #379

Merged
merged 12 commits into from
Mar 21, 2020
Merged

build: switched to using poetry for make build #379

merged 12 commits into from
Mar 21, 2020

Conversation

ErikBjare
Copy link
Member

@ErikBjare ErikBjare commented Mar 19, 2020

make build now uses poetry install to install all Python packages and dependencies. This makes CI actually use the poetry.lock files to resolve dependencies (which pip install . doesn't).

It also:

  • Changes the Windows/Appveyor builds to use 64bit Python
  • Changes all uses of python3 to python (since python3 isn't available on Windows)
  • Adds virtualenvs to Windows and macOS builds

Fixes #378

@ErikBjare
Copy link
Member Author

ErikBjare commented Mar 19, 2020

Having some CI trouble here...

Switching to using poetry first caused it to create a venv for every subproject (since no venv was pre-activated on the windows or macOS builds), then I disabled that and ran into permission issues, and now I tried creating virtualenvs for both.

We'll see how it goes, at least the Linux build seems to be working.

@ErikBjare ErikBjare changed the title switched to poetry for installing project-wide dev dependencies switched to using poetry for make build Mar 19, 2020
@ErikBjare
Copy link
Member Author

ErikBjare commented Mar 19, 2020

Things finally seem to be working. Fingers crossed.

Edit: Apart from venv activation on Windows in Travis. Should be fixed now.

@xylix
Copy link
Contributor

xylix commented Mar 19, 2020

Is the problem in appveyor related to the order the packages are installed?

@ErikBjare
Copy link
Member Author

No, I think it has to do with that python3 doesn't exist in the virtualenv (only python, it's a Windows thing). Before we copied a version of python.exe so that there was a python3.exe, which means that when it ran the version check for aw-server it used the wrong python environment. I'm pushing a fix now.

@ErikBjare
Copy link
Member Author

I think I've finally hunted down the last uses of python3, hopefully in an hour or two it'll all pass and we can move forward with a v0.9.1.

@ErikBjare
Copy link
Member Author

Fuck yes, Appveyor passing. Hoping everything finally passes...

@xylix
Copy link
Contributor

xylix commented Mar 19, 2020

Good luck to that. I'll be working on the new macos issue(s) tomorrow afternoon

@ErikBjare
Copy link
Member Author

ErikBjare commented Mar 19, 2020

@xylix Amazing work with the macOS stuff btw, looks like it's just a few minor things left :)

If you feel like doing work on sync, feel free to check out ActivityWatch/aw-server-rust#89, or try getting into and make some improvements to the web UI.

@ErikBjare
Copy link
Member Author

The Windows build on Travis (https://travis-ci.org/github/ActivityWatch/activitywatch/jobs/664524794) didn't quit even though it was successfully done. Failed due to the timeout, but it works!

@ErikBjare
Copy link
Member Author

Seems like something is wrong with macOS builds on Travis... so this might take a while.

image

@ErikBjare
Copy link
Member Author

ErikBjare commented Mar 19, 2020

Not my lucky day...

image

Edit: No idea what happened to that screenshot...

image

@ErikBjare
Copy link
Member Author

@johan-bjareholt Do you have any idea of what might be stalling the Windows build?

@johan-bjareholt
Copy link
Member

No idea, but I'd try replacing the "kill %1" stuff with the following

https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received

This might also come in handy for debugging what's still running, never tried it though and you need to mail travis to get access apparently.

https://docs.travis-ci.com/user/running-build-in-debug-mode/#enabling-debug-mode

@ErikBjare
Copy link
Member Author

ErikBjare commented Mar 20, 2020

The problem with travis_wait is that is stops all output from the command and then dumps it all in the end. That is something I'd really like to avoid (and is why we have this solution to begin with).

Edit: Also, the command clearly exited: /c/Users/travis/.travis/functions: line 585: 913 Terminated while sleep 9m; do echo "=====[ $SECONDS seconds still running ]====="; done

@ErikBjare
Copy link
Member Author

I just went ahead and restarted the build, since we had some issues with the macOS builds around the same time and there shouldn't really be any new processes spawned in the background from the last passing commit. Hopefully that'll work.

@xylix
Copy link
Contributor

xylix commented Mar 20, 2020

https://travis-ci.community/t/build-timeout-but-actually-succeeded/2763

This talks about yarn but is it possible poetry starts some similarish background processes like gpg which prevent the windows box from shutting down? Would be really weird that it only happens on windows though...

If it's some weird background process ps could show it and for loop killing all processes should fix it. That's a very hacky solution though :/
https://travis-ci.community/t/windows-build-timeout-after-success-ps-shows-gpg-agent/4967/5

@ErikBjare
Copy link
Member Author

Since Windows timeout is now the only thing failing CI, I've decided to add Windows Travis to allowed_failures so we can go ahead and merge this and make a new release.

Windows on Travis isn't used for deployment yet anyway, so it doesn't need to work perfectly for us to move forward and merge this PR.

@ErikBjare
Copy link
Member Author

Alright, all green. Here we go.

@ErikBjare ErikBjare changed the title switched to using poetry for make build build: switched to using poetry for make build Mar 21, 2020
@ErikBjare ErikBjare merged commit f383b95 into master Mar 21, 2020
@ErikBjare ErikBjare deleted the dev/poetry branch March 21, 2020 19:51
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.

Can't start aw-qt/aw-server/etc on Linux (v0.9)
3 participants