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

Add plugin support (and/or an python api)? #9392

Open
DinhHuy2010 opened this issue Nov 24, 2024 · 14 comments
Open

Add plugin support (and/or an python api)? #9392

DinhHuy2010 opened this issue Nov 24, 2024 · 14 comments
Labels
rustlib Related to our Rust library API wish Not on the immediate roadmap

Comments

@DinhHuy2010
Copy link

Could uv supports plugins written both in Python and Rust like poetry?

@samypr100 samypr100 added the rustlib Related to our Rust library API label Nov 24, 2024
@zanieb zanieb added the wish Not on the immediate roadmap label Nov 26, 2024
@zanieb
Copy link
Member

zanieb commented Nov 26, 2024

Someday! But not in the short term. We have core experiences to focus on, so a plugin system is not on the roadmap yet.

@ssbarnea
Copy link

I am more interested in an Python API for calling uv, uv venv in particular, directly from python.

@DinhHuy2010
Copy link
Author

Hi, do you have any update?

@stefanobaghino
Copy link

Someday! But not in the short term. We have core experiences to focus on, so a plugin system is not on the roadmap yet.

@zanieb Thanks for being upfront in this regard. I would like to bring up that the product I work on (https://gradle.com/develocity/) is a build observability platform and we recently added support for the Python ecosystem in beta status. Our current support instruments the Python interpreter itself, meaning that uv is an area we cannot instrument directly right now, but there might be interested for this and I don't see any (clean) way we could achieve this without a plugin architecture of some sort.

I'm bringing this up not directly on behalf of the company, but simply as an individual developer with a lot of interest in uv, although I see a lot of interest from our current users into having this available, so I wouldn't rule out a chance to collaborate in the future, although I cannot give any specific commitment on the company's behalf at this time.

@zanieb
Copy link
Member

zanieb commented Feb 14, 2025

How is your instrumentation invoked?

@stefanobaghino
Copy link

How is your instrumentation invoked?

Using a site-specific configuration hook (docs).

@zanieb
Copy link
Member

zanieb commented Feb 14, 2025

That should still work with uv when we invoke the Python interpreter, right? What are you imagining a uv plugin doing here?

@stefanobaghino
Copy link

It would capture the invocations of Python when run through uv, yes, but there would be no way of capturing tasks performed by uv without invoking the Python interpreter, or if several Python invocations were orchestrated by uv, or giving some sort of insight into the uv process itself.

@zanieb
Copy link
Member

zanieb commented Feb 14, 2025

I see. What kind of insights are you trying to get into uv's behavior?

@stefanobaghino
Copy link

stefanobaghino commented Feb 14, 2025

If I show you an example it will probably give you a rough idea of the kind of observability we would like to give, luckily we support a few open source projects. I'll use an example from our instance backing the Apache Software Foundation (this dashboard in particular is for Kafka developers):

  • the timeline view shows what tasks the tool is orchestrating, and the resource usage on the machine
  • the tests view view aggregate and report tests, including information on flakiness (within the individual run if possible, and also across runs)
  • we also aggregate data across build to offer build performance and test metrics dashboards (to name a couple)

(I think it's important to point out that this is not limited to CI, but can offer observability and a tool for collaboration for teams and organizations)

(sorry for sounding like I'm trying to sell something, I definitely am not, but I hope it gives you a rough idea of the kind of information we'd like to enable users to collect)

These are just a couple of examples, but in general we try to tailor the information we offer to the specific tool.

I can think of ways in which we can instrument processes in a way that does not require integrating into those (walking up the process parents to see whether uv is running and getting info from the OS is one that comes to mind), but that doesn't allow for some deeper integration into tool-specific information that users might be interested in.

I'm not asking for anything, but I hope this gives some push towards the idea of having a plugin architecture (which I do realize is large undertaking, and one that you need to evaluate and design for carefully, should you ever decide it's a project you want to work on).

Anyway, very excited to see uv growing so much, thanks for the amazing work you are doing, the Python community is clearly enthusiastic about what you're creating. 🙇🏻

@zanieb
Copy link
Member

zanieb commented Feb 14, 2025

Thanks for the details! That's really helpful.

@konstin
Copy link
Member

konstin commented Feb 14, 2025

In uv, we use tracing for instrumentation and "observability". I've been using tracing plugins for similar views into uv (https://github.com/konstin/tracing-durations-export), a tracing export in some form could have the information you need.

@stefanobaghino
Copy link

In uv, we use tracing for instrumentation and "observability". I've been using tracing plugins for similar views into uv (https://github.com/konstin/tracing-durations-export), a tracing export in some form could have the information you need.

Thanks! I'll see if there's a way we can leverage this. 🙇🏻

@DinhHuy2010
Copy link
Author

uh, hi, what going on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rustlib Related to our Rust library API wish Not on the immediate roadmap
Projects
None yet
Development

No branches or pull requests

6 participants