Use uv to run CI#973
Conversation
|
thanks @adenzler-nvidia! |
|
yes, looks super relevant. Not sure if everything on this matrix needs to be tested on each PR, I think for forward compatibility it's ok to have nightlies (for uv-locked mujoco + nightly warp, or uv-locked warp and nightly mujoco). |
|
The other thing we need (which I didn't include but we probably should) is to make sure pyproject.toml specifies correct min version that actually work. For example, the warp-lang requirement of >= 1.9.0 likely doesn't work. |
|
@thowell wondering what we should do with this. I think the dev/release questions are probaby going to be much better once there is a proper release schedule. But are the version we have in uv.lock considered dev or release versions? I think it makes sense to test with the versions we have in uv.lock for the PR ci, compared to just getting latest. That's the whole point of having a uv.lock file? What do you think? |
|
@btaba what are your thoughts on this and what do you recommend? |
| python -m pip install --upgrade pip | ||
| pip install uv |
There was a problem hiding this comment.
It's also simpler just to use the setup-uv action as recommended in the uv docs (https://docs.astral.sh/uv/guides/integration/github/) instead of installing via pip
|
To answer @thowell , I went through uv docs a bit and here's what I came up with. I'm not a
with this config to pyproject.toml dev installs with nightlies, and prod installs from PyPI. We should test against both to make sure we maintain backwards compatibility at HEAD (mainly a constraint of our google import workflow). Before release, uv.lock should be updated to include PyPI versions only. |
|
@btaba I lean towards simplifying more. Keep the Now when we start talking about prod/release builds that pull only from PyPI, I would suggest a GitHub job that doesn't use |
|
I agree with Eric here - uv.lock should just enable always pulling a working version for development. As consequence, the PR checks should use that lock file to get the dependencies. I tend to also update pyproject.toml to these versions on the main branch because not all devs are that used to using uv yet, but that's not strictly necessary and I don't mind if we don't do that. And then I think what remains is that we need other CI jobs that check forward/backwards compatibility. If we plan to release with a dependency version that is not released, test against their dev packages, or for backwards have a check that makes sure people don't increase the uv.lock versions beyond the requirement for that dependency. |
|
@shi-eric sounds good to me. To summarize: with the pyproject mod in my OP, I don't think failures should be tolerated for the RE @adenzler-nvidia, if folks still use |
Can you clarify this point a bit more? Also I don't know what happened to @kevinzakka's comment. Maybe there's some nomenclature differences. Sorry in advance for the wall of text. Current Situation
The first workflow (prod dependencies) already has Dev workflowsThe second workflow ( Since the dev version of the The thing that should be fixed here is the mandatory-pass workflow in CI/CD needs to be installing dependencies from the Prod workflowsThis is more ambiguous since I don't fully understand what @btaba means by a prod workflow and your release process. To me, a prod workflow means testing Depending on your release process, it's usually only right before a release that this job is brought into the passing state as verification that the version of the |
|
Thanks Eric - very helpful. I think we need to understand more about the forward/backward compatibility requirements that are imposed by the Google workflow. I was assuming we could have something like this:
Does that make sense? |
|
It looks like we can create a github action that updates So I generally prescribe to the flow proposed by @adenzler-nvidia and @shi-eric This is some work though. For now let's get in whatever is the smallest change that at least ensures that our matrix is testing dev against nightlies and "release" against non-nightlies, where the latter can continue on error, and then make an issue to track this idea of relying on |
Thanks for weighing in. I didn't mean with my "bleeding-edge" statement that the |
|
A property of our CI that I would like to maintain is that we are testing against the latest nightly build to catch regressions in dependencies - which are still quite frequent - so that we can address them right away. It seems like you are recommending against testing against the latest nightlies in CI and also recommending against frequently updating the lock file. Then how do we maintain this property of rapidly catching breaking behavior in our dependencies? |
Oh, I still recommend having a CI/CD job that tests against the bleeding edge dependencies to catch issues early. We do this in Warp with testing against MJWarp main and also in Newton when testing against the nightly Warp. But I think this job shouldn't automatically increment the uv lockfile if it passes (after all, CI/CD doesn't test GPU and it's good to have a human in the loop). I think this was also what Alain had in mind when he said:
|
|
Also wanted to mention that https://docs.astral.sh/uv/guides/integration/pre-commit/ will be useful to enable. |
|
Ah OK thanks @shi-eric - let me summarize what I think are the concrete changes:
Is that a fair summary of where we have landed? |
Yes, though I am still concerned that having #2 be a required pass is burdensome and will make it hard for new MJWarp features to be used in Newton HEAD. For Warp and Newton, we make (or plan to make) releases off of a separate branch where commits can be cherry-picked onto it so that code using unreleased features from a dependency can be safely merged into But this is just a simple toggle in the CI/CD config so it's a decision that can be trivially changed if you find that the required/optional pass decision needs to be changed. I can also open a pull request to make these changes. |
|
@shi-eric a PR would be amazing thanks. |
|
This is addressed in #1084 - closing this PR. Thanks folks for the helpful discussion. |
This PR changes the CI to use the dependency versions locked in the uv.lock file. Right now CI tests against latest dev version of warp and mujoco, which means the uv workflow is untested and we have no test for known-good dependencies.
I made this a draft because there's definitely a discussion to be had here. My stance is that we should have nightlies for dev versions of mujoco/warp and use the uv workflow for the package that ships/users will use. Like this, any change that needs a change in minimum versions should be including a version upgrade as well, and we explicitly know when we are breaking dependencies.
But I probably don't have the full picture here, so let's discuss.