locustio / locust

Write scalable load tests in plain Python 🚗💨
MIT License
24.55k stars 2.96k forks source link

Cleaning up the build process #2857

Closed mquinnfd closed 1 week ago

mquinnfd commented 3 weeks ago

Prerequisites

Description

Overview

After v1 of the migration to the poetry build system was completed, some kruft was left over and can now be tackled individually, and with care.

I'm using this issue to catalogue the things that should ideally be cleaned up and to contain discussion as well.

cyberw commented 3 weeks ago

that all makes sense! Looking forward to your PR!

cyberw commented 2 weeks ago

image

The more I hear about and try uv it looks like it will kick Poetry's ass :) You might want to hold off on putting more effort into a poetry based build process right now...

mquinnfd commented 2 weeks ago

Ah man yeah uv looks great - it's really become more feature complete since I last looked at it ~6 months ago or so

I'm hoping most of the build stuff we have is re-usable - it can use the pyproject.toml as it is for the most part, I suppose it's going to be the funkier stuff like the auto-scm versioning that might need some thinking (unless they have this now too :D)

I was actually working on a branch to clean up the pipeline which I'll put up now so you can at least have a look at it, maybe it's a reasonable interim step (which would make swapping for uv easier ultimately)

mquinnfd commented 2 weeks ago

^ WIP branch added above, hey at least the tests are green.

mquinnfd commented 2 weeks ago

I think betting against the Astral guys long term is probably going to be a bad idea :D I might start playing with uv again, even the docs look more polished

I know they also have rye which uses uv but seems to be more all-encompassing, not sure if this will follow the same path 🤔

mquinnfd commented 2 weeks ago

I've been eyeing up uv for some internal projects just to try it out, I think from the POV of Locust builds, the main issues would be:

It's obviously early days, and they will hopefully support this sort of tinkering in the future - but in the meantime for switching we'd need to work a bit differently with respect to the versioning (storing this in source control or strictly using tags) and hooks (multi-step build process for the caller)

mquinnfd commented 1 week ago

For now, I'm calling this done 🥳

cyberw commented 1 week ago

Yes, the tagged build worked great as well! Thanks 🙏