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

Cleaning up the build process #2857

Closed
2 tasks done
mquinnfd opened this issue Aug 16, 2024 · 8 comments
Closed
2 tasks done

Cleaning up the build process #2857

mquinnfd opened this issue Aug 16, 2024 · 8 comments

Comments

@mquinnfd
Copy link
Contributor

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.

  • Slim down the built docker image
  • Introduce poe to run pre-build hooks and remove janky pre-build hook
  • Switch out the poetry installation in the pipeline to https://github.com/snok/install-poetry
  • Resurrect the MacOS build
  • Clean up use (or not use) of poetry x commands in the GH Actions pipeline
  • Ensure caching of venv steps in build are doing what they're supposed to do
  • Reduce GH Actions building of the project to the bare minimum
@cyberw
Copy link
Collaborator

cyberw commented Aug 17, 2024

that all makes sense! Looking forward to your PR!

@cyberw
Copy link
Collaborator

cyberw commented Aug 23, 2024

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@mquinnfd
Copy link
Contributor Author

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
Copy link
Contributor Author

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:

  • Dynamic versioning isn't currently supported
  • Hooks aren't supported (original reason for switching to poetry - pre-building of the UI) (now provided via plugin) as far as I can tell

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
Copy link
Contributor Author

mquinnfd commented Sep 1, 2024

For now, I'm calling this done 🥳

@mquinnfd mquinnfd closed this as completed Sep 1, 2024
@cyberw
Copy link
Collaborator

cyberw commented Sep 1, 2024

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

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

No branches or pull requests

2 participants