-
Notifications
You must be signed in to change notification settings - Fork 0
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
venv, revision and shell prompt #4
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip flag `-e` and `--target` cannot be used at the same time, they are trying to resolve this but could take a while. See pypa/pip#9636. So I decide not to install rez with `--target` for all venv to access, just re-install it in every venv.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Revision & Virtual Env
To support updating rez tools in production time, revision is introduced : A time-slice of a container that contains a set of venv(s) managed rez tools.
Previously, rezup can provide multiple containers for user to access, and will use the default one if container name is not specified. Which means, updating rez tools that are installed in the default container can be risky. To solve that, the container needs a version-liked sub-structure to avoid user and manager accessing the same set of rez tools. Hence the revision.
The revisions are sorted by timestamp in container which will ensure the latest one can be used, and a revision can only be accessed by user when it's been marked as ready. Also, revision should not be edited after installed, just create new one.
Downside is, disk space can be consumed really fast, 30 revisions would cost about 450 MB on Windows, a set of default rez tools with one venv per revision. But this could be solved by implementing auto cleanup, which is my next TODO.
Here's the folder layout of a container revision and it's content :
Recipe
As a prep for AcademySoftwareFoundation/rez#1040, revision can not only contain default rez tools, but variety of rez extensions which can be installed with pip. To support rez tooling customization and testing, revision is designed to be created with recipe file.
Here's an example revision recipe file :
The
url
will be passed to pip CLI, and as you can see, each extension include rez can be installed in edit mode which is useful for development. And ifisolation
is set to true, additional venv will be created (with specified python version if given) for that extension (ahead for case like extension A & B requires different Qt bindings for it's GUI).Custom recipe can be saved in
~/rezup.toml
and will be used by rezup when creating new revision.Shell Prompt
Not tested in all shells.